From 0296c21ae5590e74185a7f39bc5aad750ed1eaec Mon Sep 17 00:00:00 2001 From: Samuel Hornus Date: Mon, 23 Jul 2012 14:46:27 +0000 Subject: [PATCH 002/157] added the Combination_enumerator class for enumerating subsets of an integer range --- .gitattributes | 4 + Generator/doc_tex/Generator/generators.tex | 19 +++ .../Generator_ref/Combination_enumerator.tex | 62 ++++++++ Generator/doc_tex/Generator_ref/intro.tex | 1 + Generator/doc_tex/Generator_ref/main.tex | 1 + .../Generator/combination_enumerator.cpp | 23 +++ .../include/CGAL/Combination_enumerator.h | 134 ++++++++++++++++++ .../test/Generator/combination_enumerator.cpp | 45 ++++++ 8 files changed, 289 insertions(+) create mode 100644 Generator/doc_tex/Generator_ref/Combination_enumerator.tex create mode 100644 Generator/examples/Generator/combination_enumerator.cpp create mode 100644 Generator/include/CGAL/Combination_enumerator.h create mode 100644 Generator/test/Generator/combination_enumerator.cpp diff --git a/.gitattributes b/.gitattributes index 8ef556f9783..29811ec5170 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1608,6 +1608,10 @@ Generator/doc_tex/Generator/generators_prog1.png -text svneol=unset#image/png Generator/doc_tex/Generator/generators_prog2.png -text svneol=unset#image/png Generator/doc_tex/Generator/hypergrid.gif -text svneol=unset#image/gif Generator/doc_tex/Generator/hypergrid.pdf -text svneol=unset#application/pdf +Generator/doc_tex/Generator_ref/Combination_enumerator.tex -text +Generator/examples/Generator/combination_enumerator.cpp -text +Generator/include/CGAL/Combination_enumerator.h -text +Generator/test/Generator/combination_enumerator.cpp -text Geomview/demo/Geomview/CMakeLists.txt -text Geomview/doc_tex/Geomview/geomview.gif -text GraphicsView/GraphicsView.odp -text diff --git a/Generator/doc_tex/Generator/generators.tex b/Generator/doc_tex/Generator/generators.tex index 428ddff9065..fecd55ba98b 100644 --- a/Generator/doc_tex/Generator/generators.tex +++ b/Generator/doc_tex/Generator/generators.tex @@ -91,6 +91,10 @@ The function \ccc{random_selection} chooses $n$ items at random from a random access iterator range which is useful to produce degenerate input data sets with multiple entries of identical items. +The class \ccc{Combination_enumerator} represents one subset, and enumerates +all fixed-size subsets of a range of integers. It is useful in the context of +high-dimensional triangulations, e.g., for enumerating the faces of a simplex. + \section{Example Generating Degenerate Point Sets} We want to generate a test set of 1000 points, where 60\% are chosen @@ -313,6 +317,21 @@ Generating 20 grid points in 4D \end{ccTexOnly} +\section{Example Generating Combinations From a Range of Integers} + +The following example enumerates and outputs all subsets of 3 elements from the +rage $[10, 20]$. Accordingly, it outputs $\displaystyle\frac{11!}{8! 3!}=165$ triples. + +\ccIncludeExampleCode{Generator/combination_enumerator.cpp} + +The output of this example is: +\begin{verbatim} +Taking 3 distinct integers in the range [10, 20]: (10 11 12) (10 11 13) (10 11 14) (10 11 15) +[...] (17 18 20) (17 19 20) (18 19 20) +Enumerated 165 combinations. +\end{verbatim} + + %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Design and Implementation History} diff --git a/Generator/doc_tex/Generator_ref/Combination_enumerator.tex b/Generator/doc_tex/Generator_ref/Combination_enumerator.tex new file mode 100644 index 00000000000..1a6553677b5 --- /dev/null +++ b/Generator/doc_tex/Generator_ref/Combination_enumerator.tex @@ -0,0 +1,62 @@ + +\begin{ccRefClass}{Combination_enumerator} + +\ccDefinition + +The class \ccRefName\ represents one subset, and enumerates all fixed-size +subsets of a range of integers. For example, it can enumerate all the subsets +of size 2 of the range $[3,6]$ which gives: +\{3,4\}, \{3,5\}, \{3,6\}, \{4,5\}, \{4,6\} and \{5,6\}. + +Each subset is uniquely represented as an increasing sequence of integers. +Thus, the subsets can be lexicographically ordered. They are enumerated in that +order, so that we can talk about the first or last subset. + +%\ccIsModel +%\ccRefConceptPage{ConceptName} + +\ccInclude{CGAL/Combination_enumerator.h} + +\ccCreation + +\ccCreationVariable{c} +\ccConstructor{Combination_enumerator(int k, int min, int max);}{% +This constructors initializes \ccVar\ to enumerate the subsets of size \ccc{k} +of the integer range \ccc{[min,max]} (both ends included). The current subset +is set to the first subset of the enumeration. +\ccPrecond{\ccc{min}$\leq$\ccc{max} and \ccc{k}$\in$[1, \ccc{max}-\ccc{min}+1].}} + +\ccConstructor{Combination_enumerator(const Combination_enumerator & combi);}% +{The copy constructor.} + +\ccAccessFunctions + +\ccMethod{int number_of_elements();}{Returns the size of the enumerated +subsets.} + +\ccMethod{int min_element();}{Returns the smallest possible value in all +enumerated subsets.} + +\ccMethod{int max_element();}{Returns the largest possible value in all +enumerated subsets.} + +\ccMethod{bool finished();}{Returns \ccc{true} if and only if all subsets have +been enumerated.} + +\ccMethod{int operator[](int i);}{Returns the \ccc{i}-th element of the +current subsets. \ccPrecond{\ccc{i}$\in$[0, +\ccVar.\ccc{number_of_elements()}-1].}} + +\ccOperations + +\ccMethod{void init();}{Resets the enumerator. The current subset is set to the +first one of the enumeration.} + +\ccMethod{void operator++();}{Moves the enumerator \ccVar\ to the next subset.} + +\ccMethod{Combination_enumerator operator++(int);}{Post-incrementation. Same as +the pre-incrementation above, but returns the original value of \ccVar.} + +%\ccSeeAlso + +\end{ccRefClass} diff --git a/Generator/doc_tex/Generator_ref/intro.tex b/Generator/doc_tex/Generator_ref/intro.tex index 4a3d0f8b02c..0eeb07eaf43 100644 --- a/Generator/doc_tex/Generator_ref/intro.tex +++ b/Generator/doc_tex/Generator_ref/intro.tex @@ -36,6 +36,7 @@ to achieve random permutations for otherwise regular generators ( \subsection*{Classes} +\ccRefIdfierPage{CGAL::Combination_enumerator} \\ \ccRefIdfierPage{CGAL::Random} \\ \ccRefIdfierPage{CGAL::Points_on_segment_2} \\ \ccRefIdfierPage{CGAL::Random_points_in_ball_d} \\ diff --git a/Generator/doc_tex/Generator_ref/main.tex b/Generator/doc_tex/Generator_ref/main.tex index 30b31b94dd6..0d0f2b53c35 100644 --- a/Generator/doc_tex/Generator_ref/main.tex +++ b/Generator/doc_tex/Generator_ref/main.tex @@ -19,6 +19,7 @@ \input{Generator_ref/random_convex_set.tex} \input{Generator_ref/random_polygon.tex} \input{Generator_ref/random_selection.tex} +\input{Generator_ref/Combination_enumerator.tex} \input{Generator_ref/Random.tex} \input{Generator_ref/RandomConvexSetTraits_2.tex} \input{Generator_ref/RandomPolygonTraits_2.tex} diff --git a/Generator/examples/Generator/combination_enumerator.cpp b/Generator/examples/Generator/combination_enumerator.cpp new file mode 100644 index 00000000000..429f4676255 --- /dev/null +++ b/Generator/examples/Generator/combination_enumerator.cpp @@ -0,0 +1,23 @@ +#include "CGAL/Combination_enumerator.h" +#include +using namespace std; +int main() +{ + unsigned int n(0); + const int K(3), Min(10), Max(20); + cout << "Taking " << K << " distinct integers in the range [" << + Min << ", " << Max << "]:"; + + CGAL::Combination_enumerator combi(K, Min, Max); + while( ! combi.finished() ) + { + cout << " ("; + for(int i = 0; i < K - 1; ++i) + cout << combi[i] << ' '; + cout << combi[K-1] << ')'; + ++n; + ++combi; + } + cout << endl << "Enumerated " << n << " combinations." << endl; + return EXIT_SUCCESS; +} diff --git a/Generator/include/CGAL/Combination_enumerator.h b/Generator/include/CGAL/Combination_enumerator.h new file mode 100644 index 00000000000..1ab7a507d80 --- /dev/null +++ b/Generator/include/CGAL/Combination_enumerator.h @@ -0,0 +1,134 @@ +// Copyright (c) 2012 +// Inria Nancy - Grand Est +// 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$ +// +// Author(s) : Samuel Hornus + +#ifndef CGAL_COMBINATION_ENUMERATOR_H +#define CGAL_COMBINATION_ENUMERATOR_H + +#include +#include + +namespace CGAL { + +class Combination_enumerator +{ + // types and member data + typedef std::vector Combination; + Combination combi_; + const int k_; + const int min_; + const int max_; + const int max_at_pos_0_; + + // protected methods + int element(const int i) const + { + CGAL_assertion( 0 <= i && i < k_ ); + return combi_[i]; + } + + int & element(const int i) + { + CGAL_assertion( 0 <= i && i < k_ ); + return combi_[i]; + } + +public: + + // For generating all the combinations of |k| distinct elements in the + // interval [min, max] (both included) + Combination_enumerator(const int k, const int min, const int max) + : combi_(k), k_(k), min_(min), max_(max), max_at_pos_0_(max + 1 - k) + { + CGAL_assertion_msg( min <= max, "min is larger than max"); + CGAL_assertion_msg( 1 <= k && k <= ( max - min + 1 ), "wrong value of k"); + init(); + } + + Combination_enumerator(const Combination_enumerator & c) + : combi_(c.combi_), k_(c.k_), min_(c.min_), max_(c.max_), max_at_pos_0_(c.max_at_pos_0_) + {} + + int number_of_elements() const + { + return k_; + } + + int min_element() const + { + return min_; + } + + int max_element() const + { + return max_; + } + + void init() + { + for( int i = 0; i < number_of_elements(); ++i ) + element(i) = min_element() + i; + } + + bool finished() const + { + return ( element(0) > max_at_pos_0_ ); + } + + int operator[](const int i) const + { + return element(i); + } + + void operator++() + { + int i(k_ - 1); + int max_at_pos_i(max_); + while( ( i >= 0 ) && ( element(i) >= max_at_pos_i ) ) + { + --i; + --max_at_pos_i; + } + if( -1 == i ) + { + if( element(0) == max_at_pos_0_ ) + ++element(0); // mark then end of the enumeration with an impossible value. + // Note than when we have arrived at the end of the enumeration, applying + // operator++() again does not change anything, so it is safe to + // apply it too many times. + } + else + { + ++element(i); + for( int j = i + 1; j < k_; ++j ) + element(j) = element(i) + j - i; + } + } + + Combination_enumerator operator++(int) + { + Combination_enumerator tmp(*this); + ++(*this); + return tmp; + } +}; + +} // end of namespace CGAL + +#endif // CGAL_COMBINATION_ENUMERATOR_H diff --git a/Generator/test/Generator/combination_enumerator.cpp b/Generator/test/Generator/combination_enumerator.cpp new file mode 100644 index 00000000000..d57f1981078 --- /dev/null +++ b/Generator/test/Generator/combination_enumerator.cpp @@ -0,0 +1,45 @@ +#include "CGAL/Combination_enumerator.h" +#include + +using namespace std; + +long fac(long from, long to) +{ + long result(1); + while( from <= to ) + { + result *= from; + ++from; + } + return result; +} + +void test(const int K, const int Min, const int Max) +{ + unsigned int n(0); + cout << "Taking " << K << " distinct integers in the range [" << + Min << ", " << Max << "]:"; + + CGAL::Combination_enumerator combi(K, Min, Max); + while( ! combi.finished() ) + { + cout << " ("; + for(int i = 0; i < K - 1; ++i) + cout << combi[i] << ' '; + cout << combi[K-1] << ')'; + ++n; + ++combi; + } + long nelem = Max - Min + 1; + long num = fac(nelem - K + 1, nelem) / fac(2, K); + cout << endl << "Enumerated " << n << " combinations. Should be " << num << endl; + CGAL_assertion(n == num); +} + +int main() +{ + test(3, 10, 20); + test(1, -10, 20); + test(4, 3, 6); + return EXIT_SUCCESS; +} From 165ce1d04350473000c13dcbc54e601682852233 Mon Sep 17 00:00:00 2001 From: Samuel Hornus Date: Wed, 25 Jul 2012 11:26:17 +0000 Subject: [PATCH 003/157] templatized the Combination_enumerator class and document the concept for the template parameter. --- .gitattributes | 1 + Generator/doc_tex/Generator/generators.tex | 7 +- .../Generator_ref/CombinationElement.tex | 44 +++++++++++++ .../Generator_ref/Combination_enumerator.tex | 65 +++++++++++-------- Generator/doc_tex/Generator_ref/intro.tex | 3 +- Generator/doc_tex/Generator_ref/main.tex | 1 + .../Generator/combination_enumerator.cpp | 6 +- .../include/CGAL/Combination_enumerator.h | 52 ++++++++------- .../test/Generator/combination_enumerator.cpp | 33 ++++++---- 9 files changed, 140 insertions(+), 72 deletions(-) create mode 100644 Generator/doc_tex/Generator_ref/CombinationElement.tex diff --git a/.gitattributes b/.gitattributes index 29811ec5170..a34bf700865 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1608,6 +1608,7 @@ Generator/doc_tex/Generator/generators_prog1.png -text svneol=unset#image/png Generator/doc_tex/Generator/generators_prog2.png -text svneol=unset#image/png Generator/doc_tex/Generator/hypergrid.gif -text svneol=unset#image/gif Generator/doc_tex/Generator/hypergrid.pdf -text svneol=unset#application/pdf +Generator/doc_tex/Generator_ref/CombinationElement.tex -text Generator/doc_tex/Generator_ref/Combination_enumerator.tex -text Generator/examples/Generator/combination_enumerator.cpp -text Generator/include/CGAL/Combination_enumerator.h -text diff --git a/Generator/doc_tex/Generator/generators.tex b/Generator/doc_tex/Generator/generators.tex index fecd55ba98b..098ad9458fc 100644 --- a/Generator/doc_tex/Generator/generators.tex +++ b/Generator/doc_tex/Generator/generators.tex @@ -91,9 +91,10 @@ The function \ccc{random_selection} chooses $n$ items at random from a random access iterator range which is useful to produce degenerate input data sets with multiple entries of identical items. -The class \ccc{Combination_enumerator} represents one subset, and enumerates -all fixed-size subsets of a range of integers. It is useful in the context of -high-dimensional triangulations, e.g., for enumerating the faces of a simplex. +The class \ccc{Combination_enumerator} represents one +combination (subset), and enumerates all fixed-size combinations (subsets) of a +range of elements. It is useful in the context of high-dimensional +triangulations, e.g., for enumerating the faces of a simplex. \section{Example Generating Degenerate Point Sets} diff --git a/Generator/doc_tex/Generator_ref/CombinationElement.tex b/Generator/doc_tex/Generator_ref/CombinationElement.tex new file mode 100644 index 00000000000..841d3acba0a --- /dev/null +++ b/Generator/doc_tex/Generator_ref/CombinationElement.tex @@ -0,0 +1,44 @@ +\begin{ccRefConcept}{CombinationElement} + +\ccDefinition + +A \ccRefName\ can be used as template parameter for the class +\ccc{Combination_enumerator}. + +\ccCreationVariable{e} + +\ccCreation + +\ccConstructor{CombinationElement(const CombinationElement & e2)}{Copy +constructor.} + +\ccOperations + +\ccMethod{void operator++();}{Incrementation of \ccVar.} + +\ccMethod{void operator--();}{Decrementation of \ccVar.} + +\ccMethod{bool operator<(const CombinationElement & e2);}{Total order comparison.} + +\ccMethod{bool operator==(const CombinationElement & e2);}{Equality test.} + +\ccMethod{CombinationElement operator+(int i);}{% +Equivalent to calling \ccc{++}\ccVar\ ~\ccc{i} times if \ccc{i} is positive. +Equivalent to calling \ccc{--}\ccVar\ ~\ccc{(-i)} times if \ccc{i} is negative.} + +\ccMethod{int operator-(const CombinationElement & e2);}{Compute the difference +\ccc{d} between \ccc{e2} and \ccVar\ so that \ccc{e2+d==e}.} + +\ccHasModels + +Any integer type (\ccc{char}, \ccc{short}, \ccc{int}, \ccc{long}, etc.) + +Pointers + +Random access iterators + +\ccSeeAlso + +\ccc{Combination_enumerator} + +\end{ccRefConcept} diff --git a/Generator/doc_tex/Generator_ref/Combination_enumerator.tex b/Generator/doc_tex/Generator_ref/Combination_enumerator.tex index 1a6553677b5..021e63fea6c 100644 --- a/Generator/doc_tex/Generator_ref/Combination_enumerator.tex +++ b/Generator/doc_tex/Generator_ref/Combination_enumerator.tex @@ -1,16 +1,21 @@ -\begin{ccRefClass}{Combination_enumerator} +\begin{ccRefClass}{Combination_enumerator} \ccDefinition -The class \ccRefName\ represents one subset, and enumerates all fixed-size -subsets of a range of integers. For example, it can enumerate all the subsets -of size 2 of the range $[3,6]$ which gives: -\{3,4\}, \{3,5\}, \{3,6\}, \{4,5\}, \{4,6\} and \{5,6\}. +The class \ccRefName\ represents one combination (subset), and enumerates all +fixed-size combinations (subsets) of a range of consecutive elements. For +example, it can enumerate all the subsets of size 2 of the range $[3,7)$ ($7$ +excluded) which gives the enumeration \{3,4\}, \{3,5\}, \{3,6\}, \{4,5\}, +\{4,6\}, \{5,6\}. The range consists of elements of type +\ccc{CombinationElement} and is specified by its first element and the element +just beyond its last one. -Each subset is uniquely represented as an increasing sequence of integers. -Thus, the subsets can be lexicographically ordered. They are enumerated in that -order, so that we can talk about the first or last subset. +The template parameter should be a model of the concept \ccc{CombinationElement}. + +Each combination is uniquely represented as an increasing sequence of elements. +Thus, the combinations can be lexicographically ordered. They are enumerated in +that order, so that we can talk about the first or last subset. %\ccIsModel %\ccRefConceptPage{ConceptName} @@ -20,39 +25,43 @@ order, so that we can talk about the first or last subset. \ccCreation \ccCreationVariable{c} -\ccConstructor{Combination_enumerator(int k, int min, int max);}{% -This constructors initializes \ccVar\ to enumerate the subsets of size \ccc{k} -of the integer range \ccc{[min,max]} (both ends included). The current subset -is set to the first subset of the enumeration. -\ccPrecond{\ccc{min}$\leq$\ccc{max} and \ccc{k}$\in$[1, \ccc{max}-\ccc{min}+1].}} +\ccConstructor{Combination_enumerator(int k, const CombinationElement & first, +const CombinationElement & beyond);}{This constructors initializes \ccVar\ to +enumerate the subsets of size \ccc{k} of the range of elements \ccc{[first, +beyond)}. The current subset is set to the first subset of the enumeration. +\ccPrecond{\ccc{1 <= k <= beyond - first}}} \ccConstructor{Combination_enumerator(const Combination_enumerator & combi);}% {The copy constructor.} -\ccAccessFunctions +\ccHeading{Access to the current combination} + +\ccMethod{const CombinationElement & operator[](int i);}{Returns the \ccc{i}-th +element of the current combination. \ccPrecond{\ccc{0 <= i < } +\ccVar.\ccc{number_of_elements()}}} + +\ccHeading{Access to the enumeration} \ccMethod{int number_of_elements();}{Returns the size of the enumerated -subsets.} +combinations (the parameter \ccc{k} from the class' constructor).} -\ccMethod{int min_element();}{Returns the smallest possible value in all -enumerated subsets.} +\ccMethod{const CombinationElement & min_element();}{Returns the smallest +possible value in all enumerated combinations (the parameter \ccc{first} of the +class' constructor).} -\ccMethod{int max_element();}{Returns the largest possible value in all -enumerated subsets.} +\ccMethod{const CombinationElement & beyond_element();}{Returns the successor +to the largest possible value in all enumerated combinations (the parameter +\ccc{beyond} of the class' constructor).} -\ccMethod{bool finished();}{Returns \ccc{true} if and only if all subsets have -been enumerated.} - -\ccMethod{int operator[](int i);}{Returns the \ccc{i}-th element of the -current subsets. \ccPrecond{\ccc{i}$\in$[0, -\ccVar.\ccc{number_of_elements()}-1].}} +\ccMethod{bool finished();}{Returns \ccc{true} if and only if all combinations +have been enumerated.} \ccOperations -\ccMethod{void init();}{Resets the enumerator. The current subset is set to the -first one of the enumeration.} +\ccMethod{void reset();}{Resets the enumerator. The current combination is set +to the first one of the enumeration.} -\ccMethod{void operator++();}{Moves the enumerator \ccVar\ to the next subset.} +\ccMethod{void operator++();}{Moves \ccVar\ to the next combination.} \ccMethod{Combination_enumerator operator++(int);}{Post-incrementation. Same as the pre-incrementation above, but returns the original value of \ccVar.} diff --git a/Generator/doc_tex/Generator_ref/intro.tex b/Generator/doc_tex/Generator_ref/intro.tex index 0eeb07eaf43..69338507273 100644 --- a/Generator/doc_tex/Generator_ref/intro.tex +++ b/Generator/doc_tex/Generator_ref/intro.tex @@ -20,6 +20,7 @@ to achieve random permutations for otherwise regular generators ( \ccRefConceptPage{PointGenerator} \\ \ccRefConceptPage{RandomConvexSetTraits_2} \\ \ccRefConceptPage{RandomPolygonTraits_2} \\ +\ccRefConceptPage{CombinationElement} \\ \subsection*{Functions} @@ -36,7 +37,7 @@ to achieve random permutations for otherwise regular generators ( \subsection*{Classes} -\ccRefIdfierPage{CGAL::Combination_enumerator} \\ +\ccRefIdfierPage{CGAL::Combination_enumerator} \\ \ccRefIdfierPage{CGAL::Random} \\ \ccRefIdfierPage{CGAL::Points_on_segment_2} \\ \ccRefIdfierPage{CGAL::Random_points_in_ball_d} \\ diff --git a/Generator/doc_tex/Generator_ref/main.tex b/Generator/doc_tex/Generator_ref/main.tex index 0d0f2b53c35..d56316f3a82 100644 --- a/Generator/doc_tex/Generator_ref/main.tex +++ b/Generator/doc_tex/Generator_ref/main.tex @@ -20,6 +20,7 @@ \input{Generator_ref/random_polygon.tex} \input{Generator_ref/random_selection.tex} \input{Generator_ref/Combination_enumerator.tex} +\input{Generator_ref/CombinationElement.tex} \input{Generator_ref/Random.tex} \input{Generator_ref/RandomConvexSetTraits_2.tex} \input{Generator_ref/RandomPolygonTraits_2.tex} diff --git a/Generator/examples/Generator/combination_enumerator.cpp b/Generator/examples/Generator/combination_enumerator.cpp index 429f4676255..dac10e33996 100644 --- a/Generator/examples/Generator/combination_enumerator.cpp +++ b/Generator/examples/Generator/combination_enumerator.cpp @@ -4,11 +4,11 @@ using namespace std; int main() { unsigned int n(0); - const int K(3), Min(10), Max(20); + const int K(3), First(10), Last(20); cout << "Taking " << K << " distinct integers in the range [" << - Min << ", " << Max << "]:"; + First << ", " << Last << "]:"; - CGAL::Combination_enumerator combi(K, Min, Max); + CGAL::Combination_enumerator combi(K, First, Last+1); while( ! combi.finished() ) { cout << " ("; diff --git a/Generator/include/CGAL/Combination_enumerator.h b/Generator/include/CGAL/Combination_enumerator.h index 1ab7a507d80..302c4fb196d 100644 --- a/Generator/include/CGAL/Combination_enumerator.h +++ b/Generator/include/CGAL/Combination_enumerator.h @@ -26,24 +26,25 @@ namespace CGAL { +template< typename T > class Combination_enumerator { // types and member data - typedef std::vector Combination; + typedef std::vector Combination; Combination combi_; const int k_; - const int min_; - const int max_; - const int max_at_pos_0_; + const T first_; + const T beyond_; + const T max_at_pos_0_; // protected methods - int element(const int i) const + const T & element(const int i) const { CGAL_assertion( 0 <= i && i < k_ ); return combi_[i]; } - int & element(const int i) + T & element(const int i) { CGAL_assertion( 0 <= i && i < k_ ); return combi_[i]; @@ -52,17 +53,16 @@ class Combination_enumerator public: // For generating all the combinations of |k| distinct elements in the - // interval [min, max] (both included) - Combination_enumerator(const int k, const int min, const int max) - : combi_(k), k_(k), min_(min), max_(max), max_at_pos_0_(max + 1 - k) + // interval [first, beyond] (both included) + Combination_enumerator(const int k, const T & first, const T & beyond) + : combi_(k), k_(k), first_(first), beyond_(beyond), max_at_pos_0_(beyond - k) { - CGAL_assertion_msg( min <= max, "min is larger than max"); - CGAL_assertion_msg( 1 <= k && k <= ( max - min + 1 ), "wrong value of k"); - init(); + CGAL_assertion_msg( (1 <= k) && (k <= beyond - first), "wrong value of k"); + reset(); } Combination_enumerator(const Combination_enumerator & c) - : combi_(c.combi_), k_(c.k_), min_(c.min_), max_(c.max_), max_at_pos_0_(c.max_at_pos_0_) + : combi_(c.combi_), k_(c.k_), first_(c.first_), beyond_(c.beyond_), max_at_pos_0_(c.max_at_pos_0_) {} int number_of_elements() const @@ -70,28 +70,32 @@ public: return k_; } - int min_element() const + const T & min_element() const { - return min_; + return first_; } - int max_element() const + const T & beyond_element() const { - return max_; + return beyond_; } - void init() + void reset() { + T elem(min_element()); for( int i = 0; i < number_of_elements(); ++i ) - element(i) = min_element() + i; + { + element(i) = elem; + ++elem; + } } bool finished() const { - return ( element(0) > max_at_pos_0_ ); + return max_at_pos_0_ < element(0); } - int operator[](const int i) const + const T & operator[](const int i) const { return element(i); } @@ -99,8 +103,8 @@ public: void operator++() { int i(k_ - 1); - int max_at_pos_i(max_); - while( ( i >= 0 ) && ( element(i) >= max_at_pos_i ) ) + T max_at_pos_i(beyond_-1); + while( ( i >= 0 ) && ( ! (element(i) < max_at_pos_i) ) ) { --i; --max_at_pos_i; @@ -117,7 +121,7 @@ public: { ++element(i); for( int j = i + 1; j < k_; ++j ) - element(j) = element(i) + j - i; + element(j) = element(i) + (j - i); } } diff --git a/Generator/test/Generator/combination_enumerator.cpp b/Generator/test/Generator/combination_enumerator.cpp index d57f1981078..2e350befe99 100644 --- a/Generator/test/Generator/combination_enumerator.cpp +++ b/Generator/test/Generator/combination_enumerator.cpp @@ -1,5 +1,6 @@ #include "CGAL/Combination_enumerator.h" #include +#include using namespace std; @@ -14,32 +15,38 @@ long fac(long from, long to) return result; } -void test(const int K, const int Min, const int Max) +template< typename T > +void test(const int K, const T & first, const T & beyond) { unsigned int n(0); - cout << "Taking " << K << " distinct integers in the range [" << - Min << ", " << Max << "]:"; - CGAL::Combination_enumerator combi(K, Min, Max); + CGAL::Combination_enumerator combi(K, first, beyond); + CGAL_assertion( first == combi.min_element() ); + CGAL_assertion( beyond == combi.beyond_element() ); + CGAL_assertion( K == combi.number_of_elements() ); while( ! combi.finished() ) { - cout << " ("; - for(int i = 0; i < K - 1; ++i) - cout << combi[i] << ' '; - cout << combi[K-1] << ')'; ++n; ++combi; } - long nelem = Max - Min + 1; + long nelem = beyond - first; long num = fac(nelem - K + 1, nelem) / fac(2, K); - cout << endl << "Enumerated " << n << " combinations. Should be " << num << endl; + cout << endl << "Enumerated " << n << " combinations. Should be " << num; CGAL_assertion(n == num); } int main() { - test(3, 10, 20); - test(1, -10, 20); - test(4, 3, 6); + srand(time(NULL)); + test(3, 10, 21); // triples in [10,20] + test(1, -10, 21); // singletons in [-10,20] + test(4, 3, 7); // the unique set {3,4,5,6} + char name[] = {'s', 'a', 'm', 'u', 'e', 'l', 0}; + test(2, name+0, name+6); + vector l; + for( int i = 0; i < 10; ++i ) + l.push_back(rand()); + test(3, l.begin(), l.end()); + cout << endl; return EXIT_SUCCESS; } From ece428cde4106697bd0a4f60401b398bcac5388d Mon Sep 17 00:00:00 2001 From: Samuel Hornus Date: Thu, 26 Jul 2012 11:56:34 +0000 Subject: [PATCH 004/157] 2nd iteration. Remarks from Sebastien and Laurent --- .gitattributes | 1 + Generator/doc_tex/Generator/generators.tex | 21 +++++++++---- .../Generator_ref/Combination_enumerator.tex | 30 +++++++++---------- Generator/doc_tex/Generator_ref/main.tex | 4 +-- .../Generator/combination_enumerator.cpp | 22 +++++++------- Generator/examples/Generator/name_pairs.cpp | 20 +++++++++++++ 6 files changed, 66 insertions(+), 32 deletions(-) create mode 100644 Generator/examples/Generator/name_pairs.cpp diff --git a/.gitattributes b/.gitattributes index a34bf700865..321b573c8ac 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1611,6 +1611,7 @@ Generator/doc_tex/Generator/hypergrid.pdf -text svneol=unset#application/pdf Generator/doc_tex/Generator_ref/CombinationElement.tex -text Generator/doc_tex/Generator_ref/Combination_enumerator.tex -text Generator/examples/Generator/combination_enumerator.cpp -text +Generator/examples/Generator/name_pairs.cpp -text Generator/include/CGAL/Combination_enumerator.h -text Generator/test/Generator/combination_enumerator.cpp -text Geomview/demo/Geomview/CMakeLists.txt -text diff --git a/Generator/doc_tex/Generator/generators.tex b/Generator/doc_tex/Generator/generators.tex index 098ad9458fc..7ac8e8ac5ad 100644 --- a/Generator/doc_tex/Generator/generators.tex +++ b/Generator/doc_tex/Generator/generators.tex @@ -318,20 +318,31 @@ Generating 20 grid points in 4D \end{ccTexOnly} -\section{Example Generating Combinations From a Range of Integers} +\section{Example Generating Combinations} + +\paragraph{From an Integer Interval} The following example enumerates and outputs all subsets of 3 elements from the -rage $[10, 20]$. Accordingly, it outputs $\displaystyle\frac{11!}{8! 3!}=165$ triples. +rage $[10, 15]$. Accordingly, it outputs $\displaystyle\frac{6!}{3! 3!}=20$ triples. +\smallskip \ccIncludeExampleCode{Generator/combination_enumerator.cpp} The output of this example is: \begin{verbatim} -Taking 3 distinct integers in the range [10, 20]: (10 11 12) (10 11 13) (10 11 14) (10 11 15) -[...] (17 18 20) (17 19 20) (18 19 20) -Enumerated 165 combinations. +Taking 3 distinct integers in the range [10, 15]: {10 11 12} {10 11 13} {10 11 14} +{10 11 15} {10 12 13} {10 12 14} {10 12 15} {10 13 14} {10 13 15} {10 14 15} +{11 12 13} {11 12 14} {11 12 15} {11 13 14} {11 13 15} {11 14 15} {12 13 14} +{12 13 15} {12 14 15} {13 14 15} +Enumerated 20 combinations. \end{verbatim} +\paragraph{From an Array of Strings} +The following example generated all pairs of names from a set of names stored +in a \ccc{std::vector}. + +\smallskip +\ccIncludeExampleCode{Generator/name_pairs.cpp} %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% \section{Design and Implementation History} diff --git a/Generator/doc_tex/Generator_ref/Combination_enumerator.tex b/Generator/doc_tex/Generator_ref/Combination_enumerator.tex index 021e63fea6c..ac023ed3535 100644 --- a/Generator/doc_tex/Generator_ref/Combination_enumerator.tex +++ b/Generator/doc_tex/Generator_ref/Combination_enumerator.tex @@ -2,12 +2,12 @@ \begin{ccRefClass}{Combination_enumerator} \ccDefinition - -The class \ccRefName\ represents one combination (subset), and enumerates all -fixed-size combinations (subsets) of a range of consecutive elements. For -example, it can enumerate all the subsets of size 2 of the range $[3,7)$ ($7$ -excluded) which gives the enumeration \{3,4\}, \{3,5\}, \{3,6\}, \{4,5\}, -\{4,6\}, \{5,6\}. The range consists of elements of type +% FIXME TODO: range -> interval +The class \ccRefName's purpose is to enumerate all fixed-size combinations +(subsets) of a \emph{source interval} of elements. For example, it can +enumerate all the combinations of 2 elements from the source interval $[3,7)$ +($7$ excluded) which gives the enumeration \{3,4\}, \{3,5\}, \{3,6\}, \{4,5\}, +\{4,6\}, \{5,6\}. The source interval consists of elements of type \ccc{CombinationElement} and is specified by its first element and the element just beyond its last one. @@ -15,7 +15,7 @@ The template parameter should be a model of the concept \ccc{CombinationElement} Each combination is uniquely represented as an increasing sequence of elements. Thus, the combinations can be lexicographically ordered. They are enumerated in -that order, so that we can talk about the first or last subset. +that order, so that we can talk about the first or last combination. %\ccIsModel %\ccRefConceptPage{ConceptName} @@ -26,10 +26,10 @@ that order, so that we can talk about the first or last subset. \ccCreationVariable{c} \ccConstructor{Combination_enumerator(int k, const CombinationElement & first, -const CombinationElement & beyond);}{This constructors initializes \ccVar\ to -enumerate the subsets of size \ccc{k} of the range of elements \ccc{[first, -beyond)}. The current subset is set to the first subset of the enumeration. -\ccPrecond{\ccc{1 <= k <= beyond - first}}} +const CombinationElement & beyond);}{This constructor initializes \ccVar\ to +enumerate the combinations of \ccc{k} elements from the source interval +\ccc{[first, beyond)}. The current combination is set to the first combination +of the enumeration. \ccPrecond{\ccc{1 <= k <= beyond - first}}} \ccConstructor{Combination_enumerator(const Combination_enumerator & combi);}% {The copy constructor.} @@ -46,12 +46,12 @@ element of the current combination. \ccPrecond{\ccc{0 <= i < } combinations (the parameter \ccc{k} from the class' constructor).} \ccMethod{const CombinationElement & min_element();}{Returns the smallest -possible value in all enumerated combinations (the parameter \ccc{first} of the -class' constructor).} +element of the source interval. (the parameter \ccc{first} of the class' +constructor).} \ccMethod{const CombinationElement & beyond_element();}{Returns the successor -to the largest possible value in all enumerated combinations (the parameter -\ccc{beyond} of the class' constructor).} +to the largest element of the source interval (the parameter \ccc{beyond} of +the class' constructor).} \ccMethod{bool finished();}{Returns \ccc{true} if and only if all combinations have been enumerated.} diff --git a/Generator/doc_tex/Generator_ref/main.tex b/Generator/doc_tex/Generator_ref/main.tex index d56316f3a82..655dab51b8f 100644 --- a/Generator/doc_tex/Generator_ref/main.tex +++ b/Generator/doc_tex/Generator_ref/main.tex @@ -7,7 +7,7 @@ \input{Generator_ref/intro.tex} -\input{Generator_ref/default_random.tex} +%\input{Generator_ref/default_random.tex} \input{Generator_ref/perturb_points_2.tex} \input{Generator_ref/points_on_segment_2.tex} \input{Generator_ref/Points_on_segment_2_functor.tex} @@ -21,7 +21,7 @@ \input{Generator_ref/random_selection.tex} \input{Generator_ref/Combination_enumerator.tex} \input{Generator_ref/CombinationElement.tex} -\input{Generator_ref/Random.tex} +%\input{Generator_ref/Random.tex} \input{Generator_ref/RandomConvexSetTraits_2.tex} \input{Generator_ref/RandomPolygonTraits_2.tex} \input{Generator_ref/Random_convex_set_traits_2.tex} diff --git a/Generator/examples/Generator/combination_enumerator.cpp b/Generator/examples/Generator/combination_enumerator.cpp index dac10e33996..4cfe9fb0455 100644 --- a/Generator/examples/Generator/combination_enumerator.cpp +++ b/Generator/examples/Generator/combination_enumerator.cpp @@ -4,17 +4,19 @@ using namespace std; int main() { unsigned int n(0); - const int K(3), First(10), Last(20); - cout << "Taking " << K << " distinct integers in the range [" << - First << ", " << Last << "]:"; + const int k(3), first(10), last(15); + cout << "Taking " << k << " distinct integers in the range [" << + first << ", " << last << "]:"; - CGAL::Combination_enumerator combi(K, First, Last+1); - while( ! combi.finished() ) - { - cout << " ("; - for(int i = 0; i < K - 1; ++i) - cout << combi[i] << ' '; - cout << combi[K-1] << ')'; + CGAL::Combination_enumerator combi(k, first, last + 1); + while( ! combi.finished() ) { + cout << " {"; + for(int i = 0; i < k; ++i) { + cout << combi[i]; + if( i < k - 1 ) + cout << ' '; + } + cout << '}'; ++n; ++combi; } diff --git a/Generator/examples/Generator/name_pairs.cpp b/Generator/examples/Generator/name_pairs.cpp new file mode 100644 index 00000000000..58a743e4426 --- /dev/null +++ b/Generator/examples/Generator/name_pairs.cpp @@ -0,0 +1,20 @@ +#include "CGAL/Combination_enumerator.h" +#include +#include +using namespace std; +int main() +{ + vector names; + names.push_back("Sun"); names.push_back("Shannon"); + names.push_back("Hurley"); names.push_back("Sawyer"); + names.push_back("Kate"); names.push_back("Claire"); + names.push_back("John"); names.push_back("Jack"); + CGAL::Combination_enumerator::iterator> + combi(2, names.begin(), names.end()); + while( ! combi.finished() ) { + cout << " {" << *combi[0] << ' ' << *combi[1] << '}'; + ++combi; + } + cout << endl; + return EXIT_SUCCESS; +} From a4a120780ff47fc3bbb285ef0ddb1c1427c71639 Mon Sep 17 00:00:00 2001 From: Samuel Hornus Date: Thu, 26 Jul 2012 11:58:26 +0000 Subject: [PATCH 005/157] small fix --- Generator/doc_tex/Generator/generators.tex | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Generator/doc_tex/Generator/generators.tex b/Generator/doc_tex/Generator/generators.tex index 7ac8e8ac5ad..0e8892c17a3 100644 --- a/Generator/doc_tex/Generator/generators.tex +++ b/Generator/doc_tex/Generator/generators.tex @@ -91,10 +91,10 @@ The function \ccc{random_selection} chooses $n$ items at random from a random access iterator range which is useful to produce degenerate input data sets with multiple entries of identical items. -The class \ccc{Combination_enumerator} represents one -combination (subset), and enumerates all fixed-size combinations (subsets) of a -range of elements. It is useful in the context of high-dimensional -triangulations, e.g., for enumerating the faces of a simplex. +The class \ccc{Combination_enumerator} is used to enumerate +all fixed-size combinations (subsets) of a interval of elements. It is useful +in the context of high-dimensional triangulations, e.g., for enumerating the +faces of a simplex. \section{Example Generating Degenerate Point Sets} From 580a2d57594d0c47516ec93c80a93cc7ea349876 Mon Sep 17 00:00:00 2001 From: Samuel Hornus Date: Thu, 26 Jul 2012 12:01:17 +0000 Subject: [PATCH 006/157] small fix --- Generator/doc_tex/Generator/generators.tex | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Generator/doc_tex/Generator/generators.tex b/Generator/doc_tex/Generator/generators.tex index 0e8892c17a3..967f802b084 100644 --- a/Generator/doc_tex/Generator/generators.tex +++ b/Generator/doc_tex/Generator/generators.tex @@ -92,7 +92,7 @@ access iterator range which is useful to produce degenerate input data sets with multiple entries of identical items. The class \ccc{Combination_enumerator} is used to enumerate -all fixed-size combinations (subsets) of a interval of elements. It is useful +all fixed-size combinations (subsets) of an interval of elements. It is useful in the context of high-dimensional triangulations, e.g., for enumerating the faces of a simplex. @@ -338,8 +338,8 @@ Enumerated 20 combinations. \end{verbatim} \paragraph{From an Array of Strings} -The following example generated all pairs of names from a set of names stored -in a \ccc{std::vector}. +The following example generates all pairs of names from a set of names stored +in an array of strings. \smallskip \ccIncludeExampleCode{Generator/name_pairs.cpp} From 3c79d41be4271d7cd26dec47c759cd2df1664559 Mon Sep 17 00:00:00 2001 From: Samuel Hornus Date: Tue, 31 Jul 2012 15:06:03 +0000 Subject: [PATCH 007/157] interval->range, and minor typos fixing --- Generator/doc_tex/Generator/generators.tex | 7 ++++--- .../Generator_ref/Combination_enumerator.tex | 15 +++++++-------- Generator/doc_tex/Generator_ref/main.tex | 4 ++-- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/Generator/doc_tex/Generator/generators.tex b/Generator/doc_tex/Generator/generators.tex index 967f802b084..377fec8ac82 100644 --- a/Generator/doc_tex/Generator/generators.tex +++ b/Generator/doc_tex/Generator/generators.tex @@ -92,7 +92,7 @@ access iterator range which is useful to produce degenerate input data sets with multiple entries of identical items. The class \ccc{Combination_enumerator} is used to enumerate -all fixed-size combinations (subsets) of an interval of elements. It is useful +all fixed-size combinations (subsets) of a range of elements. It is useful in the context of high-dimensional triangulations, e.g., for enumerating the faces of a simplex. @@ -320,10 +320,11 @@ Generating 20 grid points in 4D \section{Example Generating Combinations} -\paragraph{From an Integer Interval} +\paragraph{From a Range of Integers} The following example enumerates and outputs all subsets of 3 elements from the -rage $[10, 15]$. Accordingly, it outputs $\displaystyle\frac{6!}{3! 3!}=20$ triples. +range $[10, 15]$. Accordingly, it outputs $\displaystyle\frac{6!}{3! 3!}=20$ +triples. \smallskip \ccIncludeExampleCode{Generator/combination_enumerator.cpp} diff --git a/Generator/doc_tex/Generator_ref/Combination_enumerator.tex b/Generator/doc_tex/Generator_ref/Combination_enumerator.tex index ac023ed3535..38bb5921357 100644 --- a/Generator/doc_tex/Generator_ref/Combination_enumerator.tex +++ b/Generator/doc_tex/Generator_ref/Combination_enumerator.tex @@ -2,12 +2,11 @@ \begin{ccRefClass}{Combination_enumerator} \ccDefinition -% FIXME TODO: range -> interval -The class \ccRefName's purpose is to enumerate all fixed-size combinations -(subsets) of a \emph{source interval} of elements. For example, it can -enumerate all the combinations of 2 elements from the source interval $[3,7)$ +The class \ccRefName\ is used to enumerate all fixed-size combinations +(subsets) of a \emph{source range} of elements. For example, it can +enumerate all the combinations of 2 elements from the source range $[3,7)$ ($7$ excluded) which gives the enumeration \{3,4\}, \{3,5\}, \{3,6\}, \{4,5\}, -\{4,6\}, \{5,6\}. The source interval consists of elements of type +\{4,6\}, \{5,6\}. The source range consists of elements of type \ccc{CombinationElement} and is specified by its first element and the element just beyond its last one. @@ -27,7 +26,7 @@ that order, so that we can talk about the first or last combination. \ccCreationVariable{c} \ccConstructor{Combination_enumerator(int k, const CombinationElement & first, const CombinationElement & beyond);}{This constructor initializes \ccVar\ to -enumerate the combinations of \ccc{k} elements from the source interval +enumerate the combinations of \ccc{k} elements from the source range \ccc{[first, beyond)}. The current combination is set to the first combination of the enumeration. \ccPrecond{\ccc{1 <= k <= beyond - first}}} @@ -46,11 +45,11 @@ element of the current combination. \ccPrecond{\ccc{0 <= i < } combinations (the parameter \ccc{k} from the class' constructor).} \ccMethod{const CombinationElement & min_element();}{Returns the smallest -element of the source interval. (the parameter \ccc{first} of the class' +element of the source range. (the parameter \ccc{first} of the class' constructor).} \ccMethod{const CombinationElement & beyond_element();}{Returns the successor -to the largest element of the source interval (the parameter \ccc{beyond} of +to the largest element of the source range (the parameter \ccc{beyond} of the class' constructor).} \ccMethod{bool finished();}{Returns \ccc{true} if and only if all combinations diff --git a/Generator/doc_tex/Generator_ref/main.tex b/Generator/doc_tex/Generator_ref/main.tex index 655dab51b8f..d56316f3a82 100644 --- a/Generator/doc_tex/Generator_ref/main.tex +++ b/Generator/doc_tex/Generator_ref/main.tex @@ -7,7 +7,7 @@ \input{Generator_ref/intro.tex} -%\input{Generator_ref/default_random.tex} +\input{Generator_ref/default_random.tex} \input{Generator_ref/perturb_points_2.tex} \input{Generator_ref/points_on_segment_2.tex} \input{Generator_ref/Points_on_segment_2_functor.tex} @@ -21,7 +21,7 @@ \input{Generator_ref/random_selection.tex} \input{Generator_ref/Combination_enumerator.tex} \input{Generator_ref/CombinationElement.tex} -%\input{Generator_ref/Random.tex} +\input{Generator_ref/Random.tex} \input{Generator_ref/RandomConvexSetTraits_2.tex} \input{Generator_ref/RandomPolygonTraits_2.tex} \input{Generator_ref/Random_convex_set_traits_2.tex} From 5db6778d2cca8e542f5e610ff2273cc4ef017be9 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 20 Sep 2012 14:24:20 +0000 Subject: [PATCH 008/157] Add export from c3t3 to tetgen + test output_to_medit and output_to_tetgen in test/Mesh_3/test_c3t3.cpp --- Mesh_3/include/CGAL/IO/File_tetgen.h | 229 +++++++++++++++++++++++++++ Mesh_3/test/Mesh_3/test_c3t3.cpp | 5 + 2 files changed, 234 insertions(+) create mode 100644 Mesh_3/include/CGAL/IO/File_tetgen.h diff --git a/Mesh_3/include/CGAL/IO/File_tetgen.h b/Mesh_3/include/CGAL/IO/File_tetgen.h new file mode 100644 index 00000000000..20abcf0e355 --- /dev/null +++ b/Mesh_3/include/CGAL/IO/File_tetgen.h @@ -0,0 +1,229 @@ +// Copyright (c) 2012 GeometryFactory Sarl (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. +// +// $URL$ +// $Id$ +// +// +// Author(s) : Laurent Rineau + +#ifndef CGAL_IO_FILE_TETGEN_H +#define CGAL_IO_FILE_TETGEN_H + +#include +#include +#include +#include +#include + +namespace CGAL { + +namespace Mesh_3 { + +template +void +output_to_tetgen(std::string filename, + const C3T3& c3t3) +{ +#ifdef CGAL_MESH_3_IO_VERBOSE + std::cerr << "Output to tetgen:\n"; +#endif + + typedef Medit_pmap_generator Generator; + typedef typename Generator::Cell_pmap Cell_pmap; + typedef typename Generator::Facet_pmap Facet_pmap; + typedef typename Generator::Facet_pmap_twice Facet_pmap_twice; + typedef typename Generator::Vertex_pmap Vertex_pmap; + + Cell_pmap cell_pmap(c3t3); + Facet_pmap facet_pmap(c3t3,cell_pmap); + Facet_pmap_twice facet_pmap_twice(c3t3,cell_pmap); + Vertex_pmap vertex_pmap(c3t3,cell_pmap,facet_pmap); + + output_to_tetgen(filename, + c3t3, + vertex_pmap, + facet_pmap, + cell_pmap, + facet_pmap_twice, + Generator().print_twice()); + +#ifdef CGAL_MESH_3_IO_VERBOSE + std::cerr << "done.\n"; +#endif +} + + + +template +void +output_to_tetgen(std::string filename, + const C3T3& c3t3, + const Vertex_index_property_map& vertex_pmap, + const Facet_index_property_map& facet_pmap, + const Cell_index_property_map& cell_pmap, + const Facet_index_property_map_twice& facet_twice_pmap = Facet_index_property_map_twice(), + const bool print_each_facet_twice = false) +{ + typedef typename C3T3::Triangulation Tr; + typedef typename C3T3::Facets_in_complex_iterator Facet_iterator; + typedef typename C3T3::Cells_in_complex_iterator Cell_iterator; + + typedef typename Tr::Finite_vertices_iterator Finite_vertices_iterator; + typedef typename Tr::Vertex_handle Vertex_handle; + typedef typename Tr::Cell_handle Cell_handle; + typedef typename Tr::Point Point_3; + typedef typename Tr::Facet Facet; + + const Tr& tr = c3t3.triangulation(); + + std::map V; + + //------------------------------------------------------- + // File output + //------------------------------------------------------- + + //------------------------------------------------------- + // nodes + //------------------------------------------------------- + + std::string node_filename = filename + ".node"; + std::ofstream node_stream(node_filename.c_str()); + + node_stream << std::setprecision(20); + node_stream << tr.number_of_vertices() << " 3 0 0" << std::endl; + + std::size_t vert_counter = 0; + for(Finite_vertices_iterator + vit = tr.finite_vertices_begin(), + end = tr.finite_vertices_end(); + vit != end; ++vit) + { + const Point_3& p = vit->point(); + const double x = CGAL::to_double(p.x()); + const double y = CGAL::to_double(p.y()); + const double z = CGAL::to_double(p.z()); + + V[vit] = ++vert_counter; + + node_stream << vert_counter << " " << x << " " << y << " " << z; + node_stream << std::endl; + } + node_stream.close(); + + + //------------------------------------------------------- + // Elements + //------------------------------------------------------- + + std::string elem_filename = filename + ".elem"; + std::ofstream elem_stream(elem_filename.c_str()); + + elem_stream << std::setprecision(20); + elem_stream << c3t3.number_of_cells_in_complex() << " 4 0" << std::endl; + + std::size_t cell_counter = 0; + for (Cell_iterator + cit = c3t3.cells_in_complex_begin(), + end = c3t3.cells_in_complex_end(); + cit != end; ++cit) + { + const Cell_handle ch = cit; + + elem_stream << ++cell_counter; + for (int i=3; i>=0; i--) + { + const Vertex_handle vh = ch->vertex(i); + elem_stream << " " << V[vh]; + } + elem_stream << std::endl; + } + elem_stream.close(); + + + //------------------------------------------------------- + // Face + //------------------------------------------------------- + + std::string face_filename = filename + ".face"; + std::ofstream face_stream(face_filename.c_str()); + + face_stream << std::setprecision(20); + face_stream << c3t3.number_of_facets_in_complex() << " 0" << std::endl; + + std::size_t facet_counter = 0; + for(Facet_iterator + fit = c3t3.facets_in_complex_begin(), + end = c3t3.facets_in_complex_end(); + fit != end; ++fit ) + { + const Facet& facet = *fit; + + Vertex_handle vh1 = facet.first->vertex((facet.second+1)%4); + Vertex_handle vh2 = facet.first->vertex((facet.second+2)%4); + Vertex_handle vh3 = facet.first->vertex((facet.second+3)%4); + + face_stream << ++facet_counter << " " << V[vh1] << " " << V[vh2] << " " << V[vh3] << std::endl; + } + face_stream.close(); + + //------------------------------------------------------- + // End + //------------------------------------------------------- +} // end output_to_tetgen(...) + +} // end namespace Mesh_3 + + + + +/** + * @brief outputs mesh to tetgen format + * @param os the stream + * @param c3t3 the mesh + * @param rebind if true, labels of cells are rebinded into [1..nb_of_labels] + * @param show_patches if true, patches are labeled with different labels than + * cells. If false, each surface facet is written twice, using label of + * each adjacent cell. + */ +template +void +output_to_tetgen(std::string filename, + const C3T3& c3t3, + bool rebind = false, + bool show_patches = false) +{ + if ( rebind ) + { + if ( show_patches ) + Mesh_3::output_to_tetgen(filename,c3t3); + else + Mesh_3::output_to_tetgen(filename,c3t3); + } + else + { + if ( show_patches ) + Mesh_3::output_to_tetgen(filename,c3t3); + else + Mesh_3::output_to_tetgen(filename,c3t3); + } +} + +} // end namespace CGAL + +#endif // CGAL_IO_FILE_TETGEN_H diff --git a/Mesh_3/test/Mesh_3/test_c3t3.cpp b/Mesh_3/test/Mesh_3/test_c3t3.cpp index a5e66dbb24b..893f399a0c6 100644 --- a/Mesh_3/test/Mesh_3/test_c3t3.cpp +++ b/Mesh_3/test/Mesh_3/test_c3t3.cpp @@ -34,6 +34,7 @@ #include #include #include +#include @@ -366,6 +367,10 @@ struct Tester assert ( std::distance(patch_fit_bis,fend) == 1 ); assert ( c3t3.surface_patch_index(*patch_fit) == surface_patch_index ); assert ( c3t3.surface_patch_index(*patch_fit_bis) == surface_patch_index_bis ); + + std::ofstream out_medit("test-medit.mesh"); + CGAL::output_to_medit(out_medit, c3t3); + CGAL::output_to_tetgen("test-tetgen", c3t3); } }; From 0b5bafc49fe4483f4fa7e9d4643d235bd3965878 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 20 Sep 2012 14:38:52 +0000 Subject: [PATCH 009/157] Fix the package root of Surface_mesher, in demo/Surface_mesher Actually that is almost useless, but if one wants to use branches/experimental-packages/Marching_cube --- Surface_mesher/demo/Surface_mesher/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt index 223cd96f064..d3003b90255 100644 --- a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt +++ b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt @@ -9,7 +9,7 @@ else() cmake_policy(VERSION 2.6) endif() -set(PACKAGE_ROOT ../..) +set(PACKAGE_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/../..) # Add several CGAL packages to the include and link paths, # if they lie in ${PACKAGE_ROOT}/. From 212ab519b3adce7bd0f3d50b3613f1a1153b3365 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 21 Sep 2012 12:55:27 +0000 Subject: [PATCH 010/157] svn:ignore --- .gitignore | 4 ++++ Mesh_3/test/Mesh_3/CMakeLists.txt | 22 ++++++++++------------ 2 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.gitignore b/.gitignore index 918fc97ed87..23e10c29d69 100644 --- a/.gitignore +++ b/.gitignore @@ -649,6 +649,7 @@ Mesh_3/test/Mesh_3/.*.deps Mesh_3/test/Mesh_3/CTestTestfile.cmake Mesh_3/test/Mesh_3/Makefile Mesh_3/test/Mesh_3/ProgramOutput.* +Mesh_3/test/Mesh_3/a.lua Mesh_3/test/Mesh_3/applications Mesh_3/test/Mesh_3/cgal_test_with_cmake Mesh_3/test/Mesh_3/cgal_to_medit @@ -667,6 +668,9 @@ Mesh_3/test/Mesh_3/off_to_ghs Mesh_3/test/Mesh_3/read_mesh Mesh_3/test/Mesh_3/slivers_exuder Mesh_3/test/Mesh_3/stat_mesh +Mesh_3/test/Mesh_3/test-tetgen.elem +Mesh_3/test/Mesh_3/test-tetgen.face +Mesh_3/test/Mesh_3/test-tetgen.node Mesh_3/test/Mesh_3/test_backward_compatibility_MeshFoobarCriteria_3 Mesh_3/test/Mesh_3/test_boost_has_xxx Mesh_3/test/Mesh_3/test_c3t3 diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index 93e5f8d92c4..12b909c7e19 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -5,13 +5,15 @@ project( Mesh_3_test ) cmake_minimum_required(VERSION 2.6.2) -if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3) - cmake_policy(VERSION 2.8.4) -else() - cmake_policy(VERSION 2.6) +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6) + if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3) + cmake_policy(VERSION 2.8.4) + else() + cmake_policy(VERSION 2.6) + endif() endif() -find_package(CGAL QUIET COMPONENTS Core ImageIO) +find_package(CGAL QUIET COMPONENTS Core ) if ( CGAL_FOUND ) @@ -19,21 +21,17 @@ if ( CGAL_FOUND ) include( CGAL_CreateSingleSourceCGALProgram ) - include_directories (BEFORE ../../include) - include_directories (BEFORE ../../../AABB_tree/include) + include_directories (BEFORE "../../include") create_single_source_cgal_program( "test_backward_compatibility_MeshFoobarCriteria_3.cpp" ) create_single_source_cgal_program( "test_boost_has_xxx.cpp" ) create_single_source_cgal_program( "test_c3t3.cpp" ) create_single_source_cgal_program( "test_c3t3_with_features.cpp" ) create_single_source_cgal_program( "test_criteria.cpp" ) + create_single_source_cgal_program( "test_dihedral_angle.cpp" ) create_single_source_cgal_program( "test_domain_with_polyline_features.cpp" ) create_single_source_cgal_program( "test_mesh_criteria_creation.cpp" ) - if(CGAL_ImageIO_USE_ZLIB) - create_single_source_cgal_program( "test_meshing_3D_image.cpp" ) - else() - message(STATUS "test_meshing_3D_image requires the ZLIB library, and will not be compiled.") - endif() + create_single_source_cgal_program( "test_meshing_3D_image.cpp" ) create_single_source_cgal_program( "test_meshing_implicit_function.cpp" ) create_single_source_cgal_program( "test_meshing_polyhedron.cpp" ) create_single_source_cgal_program( "test_meshing_polyhedron_with_features.cpp" ) From a0bc4a577eb793c0f73517dcc0f1007de10dc926 Mon Sep 17 00:00:00 2001 From: Olivier Devillers Date: Fri, 21 Sep 2012 13:25:53 +0000 Subject: [PATCH 011/157] adding Generator in test-suite --- Maintenance/test_handling/candidate_branches | 1 + 1 file changed, 1 insertion(+) diff --git a/Maintenance/test_handling/candidate_branches b/Maintenance/test_handling/candidate_branches index 02a044c49ac..1b26e37f438 100644 --- a/Maintenance/test_handling/candidate_branches +++ b/Maintenance/test_handling/candidate_branches @@ -2,3 +2,4 @@ Power_test_3-VC_64bit-GF unique_sqrt_extension-sloriot global_function_solve_1-hemmer Linear_cell_complex-gdamiand +Generator-Combination_enumerator-shornus From 6fe1a41fa3d19c3a3d3f48592c7af0117442a7ce Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Fri, 21 Sep 2012 14:07:30 +0000 Subject: [PATCH 012/157] for approximation there were too few tests and some were not correct Alex and I improved the tests for approximation of algebraic reals: - more polynomials (with small and large constant and quadratic coefficient) - added a root really close to zero - test all roots of polynomial - added many precisions (including exotic ones) Known issue: RS kernel has problem with prec = 8 --- .../include/CGAL/_test_algebraic_kernel_1.h | 173 ++++++++++++------ 1 file changed, 118 insertions(+), 55 deletions(-) diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h index 7aafb882d24..327f5deae04 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h @@ -290,63 +290,126 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){ assert(compare_1(bound,Algebraic_real_1(1)) == LARGER ); assert(compare_1(bound,Algebraic_real_1(2)) == SMALLER ); } - { // Approximate_absolute_1 - { - std::list roots; - solve_1((x*x-2),true,std::back_inserter(roots)); - Algebraic_real_1 root = (CGAL::max)(roots.front(),roots.back()); - BInterval bi = approximate_absolute_1(root,5); - assert(compare_1(bi.first ,root) != LARGER ); - assert(compare_1(Algebraic_real_1(bi.second),root) != SMALLER); - assert(CGAL::sign(bi.second - bi.first) != NEGATIVE); - assert((bi.second - bi.first) * ipower(Bound(2),5) <= Bound(1) ); - }{ - std::list roots; - solve_1((x*x-3),true,std::back_inserter(roots)); - Algebraic_real_1 root = (CGAL::min)(roots.front(),roots.back()); - BInterval bi = approximate_absolute_1(root,-5); - assert(compare_1(bi.first ,root) != LARGER ); - assert(compare_1(bi.second,root) != SMALLER); - assert(CGAL::sign(bi.second - bi.first) != NEGATIVE); - assert((bi.second - bi.first) <= ipower(Bound(2),5) ); - } - } - { // Approximate_relative_1 - { - std::list roots; - solve_1((x*x-2),true,std::back_inserter(roots)); - Algebraic_real_1 root = (CGAL::max)(roots.front(),roots.back()); - BInterval bi = approximate_relative_1(root,5); - assert(compare_1(bi.first ,root) != LARGER ); - assert(compare_1(bi.second,root) != SMALLER); - assert(CGAL::sign(bi.second - bi.first) != NEGATIVE); - assert((bi.second - bi.first * ipower(Bound(2),5)) - <= (CGAL::max)(abs(bi.first),abs(bi.second))); - }{ - std::list roots; - solve_1((x*x-30),true,std::back_inserter(roots)); - Algebraic_real_1 root = (CGAL::min)(roots.front(),roots.back()); - BInterval bi = approximate_relative_1(root,-5); - assert(compare_1(bi.first ,root) != LARGER ); - assert(compare_1(bi.second,root) != SMALLER); - assert(CGAL::sign(bi.second - bi.first) != NEGATIVE); - assert((bi.second - bi.first) - <= (CGAL::max)(abs(bi.first),abs(bi.second)) * ipower(Bound(2),5)); - } - { - std::list roots; - solve_1((300*x*x-2),true,std::back_inserter(roots)); - Algebraic_real_1 root = (CGAL::min)(roots.front(),roots.back()); - BInterval bi = approximate_relative_1(root,5); - assert(compare_1(bi.first ,root) != LARGER ); - assert(compare_1(bi.second,root) != SMALLER); - assert(CGAL::sign(bi.second - bi.first) != NEGATIVE); - assert((bi.second - bi.first) * ipower(Bound(2),5) - <= (CGAL::max)(abs(bi.first),abs(bi.second)) ); - } - } + CGAL::set_pretty_mode(std::cerr); + // Approximations + bool all_right = true; + std::cout << "start test_approximation (takes a while) " << std::flush; + Coefficient c = CGAL::ipower(Coefficient(2), 2500) + 1; + // we choose coefficients: small, large, (close to) power of two + std::vector< int > coeffs; + coeffs.push_back(1); + //coeffs.push_back(3); + //coeffs.push_back(7); + coeffs.push_back(13); + //coeffs.push_back(64); + //coeffs.push_back(100); + coeffs.push_back(255); + coeffs.push_back(499); + coeffs.push_back(512); + //coeffs.push_back(1023); + //coeffs.push_back(4096); + coeffs.push_back(10000); + std::vector< int > precs; + precs.push_back(0); + precs.push_back(1); + precs.push_back(2); + //precs.push_back(3); + precs.push_back(4); + precs.push_back(8); + precs.push_back(13); + //precs.push_back(64); + //precs.push_back(512); + precs.push_back(2048); + precs.push_back(1023); + precs.push_back(53); + //precs.push_back(106); + precs.push_back(424); + for (typename std::vector< int >::const_iterator c0i = coeffs.begin(); + c0i != coeffs.end(); c0i++) { + for (typename std::vector< int >::const_iterator c2i = coeffs.begin(); + c2i != coeffs.end(); c2i++) { + // we basically test a quadratic polynomial (with choosen small and large + // quadratic and constant coefficient, which is disturbed by a root close to zero). + Polynomial_1 poly((*c2i*x*x - *c0i) * (c*x-1)); + for (typename std::vector< int >::const_iterator pi = precs.begin(); + pi != precs.end(); pi++) { + // all three roots are approximated with various precisions + long p = *pi; + { // Approximate_absolute_1 with positive p + std::list roots; + solve_1(poly,true,std::back_inserter(roots)); + for (typename std::list< Algebraic_real_1 >::const_iterator rit = roots.begin(); + rit != roots.end(); rit++) { + BInterval bi = approximate_absolute_1(*rit,p); + assert(compare_1(bi.first ,*rit) != LARGER ); + assert(compare_1(bi.second,*rit) != SMALLER); + assert(CGAL::sign(bi.second - bi.first) != NEGATIVE); + if (!((bi.second - bi.first) * (p == 0 ? Bound(1) : ipower(Bound(2),p-1)) + <= (p == 0 ? Bound(2) : Bound(1)) )) { + all_right = false; + std::cerr << "ERROR: Approximate_absolute_1 fails for prec = " << p + << " of this root: " << *rit << std::endl; + } + } + } + { // Approximate_absolute_1 with negative p + std::list roots; + solve_1(poly,true,std::back_inserter(roots)); + for (typename std::list< Algebraic_real_1 >::const_iterator rit = roots.begin(); + rit != roots.end(); rit++) { + BInterval bi = approximate_absolute_1(*rit,-p); + assert(compare_1(bi.first ,*rit) != LARGER ); + assert(compare_1(bi.second,*rit) != SMALLER); + assert(CGAL::sign(bi.second - bi.first) != NEGATIVE); + if (!((bi.second - bi.first) <= ipower(Bound(2),1-(-p)) )) { + all_right = false; + std::cerr << "ERROR: Approximate_absolute_1 fails for prec = " << -p + << " of this root: " << *rit << std::endl; + } + } + } + { // Approximate_relative_1 with positive p + std::list roots; + solve_1(poly,true,std::back_inserter(roots)); + for (typename std::list< Algebraic_real_1 >::const_iterator rit = roots.begin(); + rit != roots.end(); rit++) { + BInterval bi = approximate_relative_1(*rit,p); + assert(compare_1(bi.first ,*rit) != LARGER ); + assert(compare_1(bi.second,*rit) != SMALLER); + assert(CGAL::sign(bi.second - bi.first) != NEGATIVE); + if (!((bi.second - bi.first) * (p == 0 ? Bound(1) : ipower(Bound(2),p-1)) + <= (p == 0 ? Bound(2) : Bound(1)) * (CGAL::max)(abs(bi.first),abs(bi.second)))) { + all_right = false; + std::cerr << "ERROR: Approximate_relative_1 fails for prec = " << p + << " of this root: " << *rit << std::endl; + + } + } + } + { // Approximate_relative_1 with negative p + std::list roots; + solve_1(poly,true,std::back_inserter(roots)); + for (typename std::list< Algebraic_real_1 >::const_iterator rit = roots.begin(); + rit != roots.end(); rit++) { + BInterval bi = approximate_relative_1(*rit,-p); + assert(compare_1(bi.first ,*rit) != LARGER ); + assert(compare_1(bi.second,*rit) != SMALLER); + assert(CGAL::sign(bi.second - bi.first) != NEGATIVE); + if (!((bi.second - bi.first) <= + ipower(Bound(2),1-(-p)) * (CGAL::max)(abs(bi.first),abs(bi.second)))) { + all_right = false; + std::cerr << "ERROR: Approximate_relative_1 fails for prec = " << -p + << " of this root: " << *rit << std::endl; + } + } + } + } + } + } + assert(all_right); // some approximation was not good enough + std::cout << " ok" << std::endl; { #define CGAL_TEST_ALGEBRAIC_REAL_IO(_f) \ From 1ea6cf8f99cf66905fc06d10d1781d761565b31e Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Sat, 22 Sep 2012 21:10:51 +0000 Subject: [PATCH 013/157] Added 3 developers --- Maintenance/git/authors-file.txt | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Maintenance/git/authors-file.txt b/Maintenance/git/authors-file.txt index 5e3b0b9dce7..d08bc8613dd 100644 --- a/Maintenance/git/authors-file.txt +++ b/Maintenance/git/authors-file.txt @@ -29,6 +29,7 @@ danha = Dan Halperin dave = David Millman dboltcheva = Dobrina Boltcheva dima = Dmitrii V Pasechnik +drorata = Dror Atariah drussel = Daniel Russel dtyagi = Devashish Tyagi efif = Efi Fogel @@ -100,6 +101,8 @@ ovgrig = Ovidiu Grigore palliez = Pierre Alliez penarand = Luis Peñaranda pivanov = Petar Ivanov +pgiannop = Panos Giannopoulos +philaris = Panagiotis Cheilaris pmachado = Pedro Machado Manhaes de Castro pmemari = Pooran Memari pmoeller = Philipp Möller From 2198fc5b772c768f03af8b3b35a41a67b224eb28 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20M=C3=B6ller?= Date: Mon, 24 Sep 2012 11:36:57 +0000 Subject: [PATCH 014/157] Remove Optimisation_doc. The directory doesn't contain anything anymore besides package_info after r72242. --- .gitignore | 16 ---------------- Optimisation_doc/dont_submit | 3 --- .../package_info/Optimisation_doc/copyright | 1 - .../Optimisation_doc/description.txt | 2 -- .../package_info/Optimisation_doc/maintainer | 1 - 5 files changed, 23 deletions(-) delete mode 100644 Optimisation_doc/dont_submit delete mode 100644 Optimisation_doc/package_info/Optimisation_doc/copyright delete mode 100644 Optimisation_doc/package_info/Optimisation_doc/description.txt delete mode 100644 Optimisation_doc/package_info/Optimisation_doc/maintainer diff --git a/.gitignore b/.gitignore index 23e10c29d69..a0b68f34016 100644 --- a/.gitignore +++ b/.gitignore @@ -793,22 +793,6 @@ Optimisation_basic/Makefile Optimisation_basic/bin Optimisation_basic/doc_ps Optimisation_basic/src/Optimisation -Optimisation_doc/*.aux -Optimisation_doc/*.bbl -Optimisation_doc/*.blg -Optimisation_doc/*.dvi -Optimisation_doc/*.idx -Optimisation_doc/*.ilg -Optimisation_doc/*.ind -Optimisation_doc/*.log -Optimisation_doc/*.mxp -Optimisation_doc/*.toc -Optimisation_doc/.dep -Optimisation_doc/.obj -Optimisation_doc/.tmp -Optimisation_doc/Makefile -Optimisation_doc/bin -Optimisation_doc/doc_ps Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/*.exe Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/*.sln Periodic_3_triangulation_3/demo/Periodic_3_triangulation_3/*.vcproj diff --git a/Optimisation_doc/dont_submit b/Optimisation_doc/dont_submit deleted file mode 100644 index 72c56ebad85..00000000000 --- a/Optimisation_doc/dont_submit +++ /dev/null @@ -1,3 +0,0 @@ -Makefile* -web -package diff --git a/Optimisation_doc/package_info/Optimisation_doc/copyright b/Optimisation_doc/package_info/Optimisation_doc/copyright deleted file mode 100644 index 28daf2dfbb7..00000000000 --- a/Optimisation_doc/package_info/Optimisation_doc/copyright +++ /dev/null @@ -1 +0,0 @@ - ETH Zurich (Switzerland). diff --git a/Optimisation_doc/package_info/Optimisation_doc/description.txt b/Optimisation_doc/package_info/Optimisation_doc/description.txt deleted file mode 100644 index 47b01e042fa..00000000000 --- a/Optimisation_doc/package_info/Optimisation_doc/description.txt +++ /dev/null @@ -1,2 +0,0 @@ -Geometric Optimisation: User Manual and Introduction to Reference Manual - diff --git a/Optimisation_doc/package_info/Optimisation_doc/maintainer b/Optimisation_doc/package_info/Optimisation_doc/maintainer deleted file mode 100644 index 6fe36bffe91..00000000000 --- a/Optimisation_doc/package_info/Optimisation_doc/maintainer +++ /dev/null @@ -1 +0,0 @@ -Michael Hoffmann From 0e2878da8c437888a373f61abcc911ea11636467 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 24 Sep 2012 12:01:21 +0000 Subject: [PATCH 015/157] Add shortcuts to actions --- .../demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp index 25a086d383f..6d11e8dfdfd 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp @@ -55,12 +55,12 @@ void Polyhedron_demo_orient_soup_plugin::init(QMainWindow* mainWindow, scene = scene_interface; mw = mainWindow; messages = m; - actionOrient = new QAction(tr("Orient polygon soup"), mainWindow); + actionOrient = new QAction(tr("&Orient polygon soup"), mainWindow); actionOrient->setObjectName("actionOrient"); connect(actionOrient, SIGNAL(triggered()), this, SLOT(orient())); - actionShuffle = new QAction(tr("Shuffle polygon soup"), mainWindow); + actionShuffle = new QAction(tr("&Shuffle polygon soup"), mainWindow); connect(actionShuffle, SIGNAL(triggered()), this, SLOT(shuffle())); From a83fcd16329e512139d1b5710a3ff767524b0f5b Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 24 Sep 2012 12:03:13 +0000 Subject: [PATCH 016/157] Better "orient polygons soup" - The list of non manifold edges is now a set of canonicalized edges. - The flooding process that orients the polygons no stops at edges that are known to be non manifold. The result is better that way. --- .../Polyhedron/Scene_polygon_soup_item.cpp | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp index d1c3508fe8e..eebe88b38f6 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -27,7 +28,7 @@ struct Polygon_soup : typedef std::map, std::set > Edges_map; typedef boost::array Edge; typedef std::vector Polygons; - typedef std::vector Edges; + typedef std::set Edges; typedef Polygons::size_type size_type; Points points; Polygons polygons; @@ -82,7 +83,8 @@ struct Polygon_soup : Edge edge; edge[0] = i0; edge[1] = i1; - non_manifold_edges.push_back(edge); + if(i0 > i1) std::swap(edge[0], edge[1]); + non_manifold_edges.insert(edge); } } } @@ -296,6 +298,15 @@ Scene_polygon_soup_item::orient() const std::size_t& i1 = polygons[to_be_oriented_index][ih]; const std::size_t& i2 = polygons[to_be_oriented_index][ihp1]; + Polygon_soup::Edge edge; + edge[0] = i1; + edge[1] = i2; + if(i1 > i2) std::swap(edge[0], edge[1]); + + if(soup->non_manifold_edges.count(edge) > 0) { + continue; + } + // qDebug() << tr("edge %3-%4 (%1,%2)").arg(i1).arg(i2).arg(ih).arg(ihp1); // edge (i1,i2) Edges::iterator it_same_orient = edges.find(make_pair(i1, i2)); @@ -478,13 +489,10 @@ Scene_polygon_soup_item::direct_draw() const { ::glColor3d(1., 0., 0.); // red ::glGetBooleanv(GL_LIGHTING, &lightning); ::glDisable(GL_LIGHTING); - - for(Polygon_soup::size_type - i = 0, - end = soup->non_manifold_edges.size(); - i < end; ++i) + + BOOST_FOREACH(const Polygon_soup::Edge& edge, + soup->non_manifold_edges) { - const Polygon_soup::Edge& edge = soup->non_manifold_edges[i]; const Point_3& a = soup->points[edge[0]]; const Point_3& b = soup->points[edge[1]]; ::glBegin(GL_LINES); From e4ed1e89fac059d21966530da03fe6b4043747fc Mon Sep 17 00:00:00 2001 From: Marc Glisse Date: Mon, 24 Sep 2012 14:15:54 +0000 Subject: [PATCH 017/157] Typo in Center_of_sphere_d. --- Kernel_d/include/CGAL/constructions_d.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Kernel_d/include/CGAL/constructions_d.h b/Kernel_d/include/CGAL/constructions_d.h index c1f44d5c152..c6733619149 100644 --- a/Kernel_d/include/CGAL/constructions_d.h +++ b/Kernel_d/include/CGAL/constructions_d.h @@ -55,7 +55,7 @@ Point_d midpoint(const Point_d& p, const Point_d& q) template Point_d center_of_sphere(Forward_iterator start, Forward_iterator end) -{ typename R::Center_of_sphereHd center; +{ typename R::Center_of_sphere_d center; return center(start,end); } template typename R::FT From 05576868b9da304cc7fa8e95959aafc7a44507dc Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 24 Sep 2012 15:56:35 +0000 Subject: [PATCH 018/157] Cleanup --- .../Arr_linear_traits.tex | 19 +++++++++++-------- .../Arr_rational_function_traits.tex | 10 ++++++---- 2 files changed, 17 insertions(+), 12 deletions(-) diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_linear_traits.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_linear_traits.tex index 95b1affac40..b7a0713a028 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_linear_traits.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_linear_traits.tex @@ -13,15 +13,17 @@ \ccDefinition %============ -The traits class \ccRefName\ is a model of the \ccc{ArrangementTraits_2} -concept that allows for the construction and maintenance of arrangements of -linear objects which may be bounded (line segments) or unbounded (rays -and lines). The traits class is parameterized with a \cgal-kernel model; -see the reference page of \ccc{Arr_segment_traits_2} +The traits class \ccRefName{} is a model of the \ccc{ArrangementTraits_2} +concept, which enables the construction and maintenance of arrangements of +linear objects. The linear objects may be bounded (line segments) or +unbounded (rays and lines). Thus, it is also a model of the concept +\ccc{ArrangementOpenBoundaryTraits_2}. The traits class is parameterized +with a \cgal-kernel model; see the reference page of +\ccc{Arr_segment_traits_2} (\ccRefPage{CGAL::Arr_segment_traits_2}) for further explanations and recommendations on choosing a kernel. -\ccRefName\ defines \ccc{Kernel::Point_2} as its point type. The nested +\ccRefName{} defines \ccc{Kernel::Point_2} as its point type. The nested \ccc{X_monotone_curve_2} and \ccc{Curve_2} types defined by the traits class (as is the case with the various segment-traits classes, both types refer to the same class, as {\sl every} linear object is (weakly) $x$-monotone), @@ -35,8 +37,9 @@ it to the respective kernel object (say, to a \ccc{Kernel::Ray_2}). \ccIsModel \ccc{ArrangementTraits_2} \\ - \ccc{ArrangementLandmarkTraits_2} - + \ccc{ArrangementLandmarkTraits_2} \\ + \ccc{ArrangementOpenBoundaryTraits_2} + \subsection*{Class Arr\_linear\_traits\_2$<$Kernel$>$::Curve\_2} %==================================================== diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_rational_function_traits.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_rational_function_traits.tex index 0b4ec12395a..47f2043aece 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_rational_function_traits.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_rational_function_traits.tex @@ -14,10 +14,12 @@ %============ The traits class \ccRefName{} is a model of the \ccc{ArrangementTraits_2} -concept. It handles bounded and unbounded arcs of rational functions, -referred to as {\sl rational arcs} (in particular, such an arc may -correspond to the entire graph of a rational function), and enables the -construction and maintenance of arrangements of such arcs. +concept. It handles arcs of rational functions, referred to as +{\sl rational arcs} (in particular, such an arc may correspond to the +entire graph of a rational function). It supports bounded and +unbounded arcs. Thus, it is also a model of the concept +\ccc{ArrangementOpenBoundaryTraits_2}. The traits class enables +the construction and maintenance of arrangements of such arcs. %Rational functions, and polynomial functions in particular, are not only %interesting in their own right, they are also very useful for approximating or %interpolating more complex curves. From 99bd141b7cbfdef9d0d14e882247c04750664316 Mon Sep 17 00:00:00 2001 From: Olivier Devillers Date: Tue, 25 Sep 2012 07:39:42 +0000 Subject: [PATCH 019/157] remove warning --- Generator/test/Generator/combination_enumerator.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Generator/test/Generator/combination_enumerator.cpp b/Generator/test/Generator/combination_enumerator.cpp index 2e350befe99..7d0a20bd764 100644 --- a/Generator/test/Generator/combination_enumerator.cpp +++ b/Generator/test/Generator/combination_enumerator.cpp @@ -18,7 +18,7 @@ long fac(long from, long to) template< typename T > void test(const int K, const T & first, const T & beyond) { - unsigned int n(0); + long n(0); CGAL::Combination_enumerator combi(K, first, beyond); CGAL_assertion( first == combi.min_element() ); From fc95783370d11f8f2d4c16cb456f29b0d14ea5d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luis=20Pe=C3=B1aranda?= Date: Tue, 25 Sep 2012 14:33:19 +0000 Subject: [PATCH 020/157] fix bug in refinement with very small precisions --- Algebraic_kernel_d/include/CGAL/RS/refine_1_rs.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/Algebraic_kernel_d/include/CGAL/RS/refine_1_rs.h b/Algebraic_kernel_d/include/CGAL/RS/refine_1_rs.h index dd19eb24b3e..6c6192c173e 100644 --- a/Algebraic_kernel_d/include/CGAL/RS/refine_1_rs.h +++ b/Algebraic_kernel_d/include/CGAL/RS/refine_1_rs.h @@ -29,6 +29,19 @@ namespace RS3{ inline void refine_1(const CGAL::Algebraic_1 &a,unsigned int s=10000){ CGAL_precondition(a.inf()<=a.sup()); + // If the algebraic endpoints have room for a refinement bigger + // than desired, refine as much is possible. This would ensure that + // small refinements are never made. Other possibility to avoid + // small refinements is to refine the number just after it was + // isolated (this early refinement would also have the advantage + // that one can choose to refine until reaching a certain criterion + // and assume it is true for later refinements, but this can slow + // down the Solve_1 functor). And a last option would be to + // determine a lower bound on the precisions RS likes to refine. + if(sleft)-2) + s=mpfr_get_prec(&((mpfi_ptr)(a.mpfi()))->left)-2; + if(sright)-2) + s=mpfr_get_prec(&((mpfi_ptr)(a.mpfi()))->right)-2; // If the precision of the endpoints is not enough for the desired // refinement, allocate a new mpfi and swap later the result. if(mpfr_get_prec(&((mpfi_ptr)(a.mpfi()))->left) Date: Thu, 27 Sep 2012 13:24:24 +0000 Subject: [PATCH 021/157] missing headers for windows --- Generator/test/Generator/combination_enumerator.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Generator/test/Generator/combination_enumerator.cpp b/Generator/test/Generator/combination_enumerator.cpp index 7d0a20bd764..72831519525 100644 --- a/Generator/test/Generator/combination_enumerator.cpp +++ b/Generator/test/Generator/combination_enumerator.cpp @@ -1,6 +1,8 @@ #include "CGAL/Combination_enumerator.h" #include #include +#include +#include using namespace std; From e3cb421cd2224dbdba6fcf13bf6dc2c257880695 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 27 Sep 2012 13:29:40 +0000 Subject: [PATCH 022/157] Fix: allow the drap&drop of a collection of files, and open all of them... ... instead of opening only the first one. --- GraphicsView/src/CGAL_Qt4/DemosMainWindow.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/GraphicsView/src/CGAL_Qt4/DemosMainWindow.cpp b/GraphicsView/src/CGAL_Qt4/DemosMainWindow.cpp index 0cc364176f1..e8c7baeab43 100644 --- a/GraphicsView/src/CGAL_Qt4/DemosMainWindow.cpp +++ b/GraphicsView/src/CGAL_Qt4/DemosMainWindow.cpp @@ -91,8 +91,10 @@ DemosMainWindow::dragEnterEvent(QDragEnterEvent *event) void DemosMainWindow::dropEvent(QDropEvent *event) { - QString filename = event->mimeData()->urls().at(0).toLocalFile(); - this->open(filename); + Q_FOREACH(QUrl url, event->mimeData()->urls()) { + QString filename = url.toLocalFile(); + this->open(filename); + } event->acceptProposedAction(); } From fe83cbfaa1af62008745f60cef35e06c8a564106 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 27 Sep 2012 14:10:32 +0000 Subject: [PATCH 023/157] Fix the overriding of the cursor When several polygon soups are oriented at the same time, there was a bug. --- .../demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp index 6d11e8dfdfd..ceef12158d7 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp @@ -110,9 +110,9 @@ void Polyhedron_demo_orient_soup_plugin::orient() scene->itemChanged(item); } } + QApplication::restoreOverrideCursor(); } } - QApplication::restoreOverrideCursor(); } void Polyhedron_demo_orient_soup_plugin::shuffle() From 778ba6174fffbf2d7cfd6bdc523a37c86687ce4d Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 27 Sep 2012 14:11:22 +0000 Subject: [PATCH 024/157] Bug fix when the polygons soup is a polyhedron with borders An orientable polygons soup with border was incorrectly said non-orientable. --- Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp index eebe88b38f6..db11da5c6b7 100644 --- a/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp +++ b/Polyhedron/demo/Polyhedron/Scene_polygon_soup_item.cpp @@ -362,8 +362,14 @@ Scene_polygon_soup_item::orient() stack.push(index); } else { -// qDebug() << "else" << it_same_orient->second.size() << it_other_orient->second.size(); - success = false; // non-orientable + // qDebug() << "else" << it_same_orient->second.size() << + // (it_other_orient == edges.end() ? 0 : it_other_orient->second.size()); + if(it_same_orient->second.size() != 1 || + (it_other_orient != edges.end() && it_other_orient->second.size() > 0)) + { + // qDebug() << tr("non orientable"); + success = false; // non-orientable + } } } // end for on all edges of one } // end while loop on the polygons of the connected component From 177fa5f3edff5408f329c9af7ba6327e22e204a9 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Thu, 27 Sep 2012 21:47:48 +0000 Subject: [PATCH 025/157] reduce running time at some point we need to allow expensive tests --- .../include/CGAL/_test_algebraic_kernel_1.h | 44 ++++++++----------- 1 file changed, 19 insertions(+), 25 deletions(-) diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h index 327f5deae04..6c0c72d3303 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/include/CGAL/_test_algebraic_kernel_1.h @@ -300,46 +300,46 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){ // we choose coefficients: small, large, (close to) power of two std::vector< int > coeffs; coeffs.push_back(1); + coeffs.push_back(13); + //coeffs.push_back(255); + //coeffs.push_back(499); + //coeffs.push_back(512); + //coeffs.push_back(10000); //coeffs.push_back(3); //coeffs.push_back(7); - coeffs.push_back(13); //coeffs.push_back(64); //coeffs.push_back(100); - coeffs.push_back(255); - coeffs.push_back(499); - coeffs.push_back(512); - //coeffs.push_back(1023); + coeffs.push_back(1023); //coeffs.push_back(4096); - coeffs.push_back(10000); std::vector< int > precs; - precs.push_back(0); - precs.push_back(1); - precs.push_back(2); - //precs.push_back(3); - precs.push_back(4); + //precs.push_back(0); + //precs.push_back(1); + //precs.push_back(2); + //precs.push_back(4); precs.push_back(8); - precs.push_back(13); + //precs.push_back(13); + // precs.push_back(1023); + // precs.push_back(2048); + //precs.push_back(53); + //precs.push_back(3); //precs.push_back(64); - //precs.push_back(512); - precs.push_back(2048); - precs.push_back(1023); - precs.push_back(53); //precs.push_back(106); - precs.push_back(424); + //precs.push_back(424); for (typename std::vector< int >::const_iterator c0i = coeffs.begin(); c0i != coeffs.end(); c0i++) { for (typename std::vector< int >::const_iterator c2i = coeffs.begin(); c2i != coeffs.end(); c2i++) { // we basically test a quadratic polynomial (with choosen small and large // quadratic and constant coefficient, which is disturbed by a root close to zero). + //Polynomial_1 poly((*c2i*x*x - *c0i) * (c*x-1)); Polynomial_1 poly((*c2i*x*x - *c0i) * (c*x-1)); + std::list roots; + solve_1(poly,true,std::back_inserter(roots)); for (typename std::vector< int >::const_iterator pi = precs.begin(); pi != precs.end(); pi++) { // all three roots are approximated with various precisions long p = *pi; { // Approximate_absolute_1 with positive p - std::list roots; - solve_1(poly,true,std::back_inserter(roots)); for (typename std::list< Algebraic_real_1 >::const_iterator rit = roots.begin(); rit != roots.end(); rit++) { BInterval bi = approximate_absolute_1(*rit,p); @@ -355,8 +355,6 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){ } } { // Approximate_absolute_1 with negative p - std::list roots; - solve_1(poly,true,std::back_inserter(roots)); for (typename std::list< Algebraic_real_1 >::const_iterator rit = roots.begin(); rit != roots.end(); rit++) { BInterval bi = approximate_absolute_1(*rit,-p); @@ -371,8 +369,6 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){ } } { // Approximate_relative_1 with positive p - std::list roots; - solve_1(poly,true,std::back_inserter(roots)); for (typename std::list< Algebraic_real_1 >::const_iterator rit = roots.begin(); rit != roots.end(); rit++) { BInterval bi = approximate_relative_1(*rit,p); @@ -389,8 +385,6 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){ } } { // Approximate_relative_1 with negative p - std::list roots; - solve_1(poly,true,std::back_inserter(roots)); for (typename std::list< Algebraic_real_1 >::const_iterator rit = roots.begin(); rit != roots.end(); rit++) { BInterval bi = approximate_relative_1(*rit,-p); From ab5c017c0853447cf5809645fde224313c7c1907 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20M=C3=B6ller?= Date: Fri, 28 Sep 2012 13:15:14 +0000 Subject: [PATCH 026/157] Unconditionally disable NO_TR1 defines. Those cause trouble, because on MSVC the include paths for tr1 components are different from gcc. Instead of fixing up the include paths depending on platform, just never use a tr1 component. Nothing of value is lost compared to the boost equivalents and it removes another code-path. --- Installation/include/CGAL/config.h | 6 ++---- STL_Extension/include/CGAL/array.h | 4 ---- STL_Extension/include/CGAL/tuple.h | 23 ++++++----------------- 3 files changed, 8 insertions(+), 25 deletions(-) diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index 0df55caceb1..9abad1bc6cf 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -111,12 +111,10 @@ #if defined(BOOST_NO_VARIADIC_TEMPLATES) #define CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES 1 #endif -#if !defined(BOOST_HAS_TR1_ARRAY) +// never use TR1 #define CGAL_CFG_NO_TR1_ARRAY 1 -#endif -#if !defined(BOOST_HAS_TR1_TUPLE) +// never use TR1 #define CGAL_CFG_NO_TR1_TUPLE 1 -#endif #if !defined(__GNUC__) #define CGAL_CFG_NO_STATEMENT_EXPRESSIONS 1 #endif diff --git a/STL_Extension/include/CGAL/array.h b/STL_Extension/include/CGAL/array.h index eee9d005fc0..59923661656 100644 --- a/STL_Extension/include/CGAL/array.h +++ b/STL_Extension/include/CGAL/array.h @@ -23,8 +23,6 @@ #include #ifndef CGAL_CFG_NO_CPP0X_ARRAY # include -#elif !defined CGAL_CFG_NO_TR1_ARRAY -# include #else # include #endif @@ -35,8 +33,6 @@ namespace cpp11 { #ifndef CGAL_CFG_NO_CPP0X_ARRAY using std::array; -#elif !defined CGAL_CFG_NO_TR1_ARRAY -using std::tr1::array; #else using boost::array; #endif diff --git a/STL_Extension/include/CGAL/tuple.h b/STL_Extension/include/CGAL/tuple.h index d9b99013525..5755abe2c15 100644 --- a/STL_Extension/include/CGAL/tuple.h +++ b/STL_Extension/include/CGAL/tuple.h @@ -27,15 +27,11 @@ #ifndef CGAL_CFG_NO_CPP0X_TUPLE # include +#else +# include +# include +# include #endif -#ifndef CGAL_CFG_NO_TR1_TUPLE -# include -# include -#endif - -#include -#include -#include namespace CGAL { @@ -48,13 +44,6 @@ using std::tie; using std::get; using std::tuple_size; using std::tuple_element; -#elif !defined CGAL_CFG_NO_TR1_TUPLE -using std::tr1::tuple; -using std::tr1::make_tuple; -using std::tr1::tie; -using std::tr1::get; -using std::tr1::tuple_size; -using std::tr1::tuple_element; #else using boost::tuple; using boost::make_tuple; @@ -72,8 +61,8 @@ struct tuple_element: public boost::tuples::element{}; #endif -#if defined(CGAL_CFG_NO_CPP0X_TUPLE) && defined(CGAL_CFG_NO_TR1_TUPLE) -// If not TR1 or C++11 tuple, we need to add get(std::pair). +#if defined(CGAL_CFG_NO_CPP0X_TUPLE) +// If not C++11 tuple, we need to add get(std::pair). //////////////////////////////////////////////////////////// // // From a961eb0e6127c555f1487694c4e8a08a934ba24e Mon Sep 17 00:00:00 2001 From: Olivier Devillers Date: Mon, 1 Oct 2012 09:14:06 +0000 Subject: [PATCH 027/157] changes.html Combination_enumerator --- Installation/changes.html | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Installation/changes.html b/Installation/changes.html index d39203f5130..842bdfb8054 100644 --- a/Installation/changes.html +++ b/Installation/changes.html @@ -112,6 +112,12 @@ David A. Wheeler's 'SLOCCount', restricted to the include/CGAL/
  • Update requirements of the concepts AABBTraits and AABBGeomTraits to match the implementation of the package. +

    Generator

    +
      +
    • Addition of the Combination_enumerator +
    + +

    Release 4.1

    Release date:

    From c151d1edfd4e099471a0ab1b5b1e278d2d82fa51 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 2 Oct 2012 09:03:48 +0000 Subject: [PATCH 028/157] Fix a detail in the Mesh_3 demo c3t3 i/o plugin The I/O plugin for c3t3 can only save c3t3 items. --- Mesh_3/demo/Mesh_3/Io_c3t3_plugin.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Mesh_3/demo/Mesh_3/Io_c3t3_plugin.cpp b/Mesh_3/demo/Mesh_3/Io_c3t3_plugin.cpp index 38eefd06f89..3025ac10af1 100644 --- a/Mesh_3/demo/Mesh_3/Io_c3t3_plugin.cpp +++ b/Mesh_3/demo/Mesh_3/Io_c3t3_plugin.cpp @@ -29,9 +29,10 @@ Io_c3t3_plugin::nameFilters() const bool -Io_c3t3_plugin::canSave(const Scene_item*) +Io_c3t3_plugin::canSave(const Scene_item* item) { - return true; + const Scene_c3t3_item* c3t3_item = qobject_cast(item); + return c3t3_item != NULL; } bool From 3e36824df787681355408fe0c2fa962d9e58afef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 3 Oct 2012 08:21:35 +0000 Subject: [PATCH 029/157] remove unused variable warnings --- .../test/Straight_skeleton_2/include/CGAL/test_sls_types.h | 2 +- Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_types.h b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_types.h index f325f970f02..5b8f7676ebb 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_types.h +++ b/Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_types.h @@ -104,7 +104,7 @@ public: void on_contour_edge_entered ( Halfedge_const_handle const& ) const {} - void on_initialization_started( int size_of_vertices ) const {} + void on_initialization_started( int /*size_of_vertices*/ ) const {} void on_initial_events_collected( Vertex_const_handle const& , bool , bool ) const { check_timeout(); } 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 0ca5ca63bf3..e19e615282d 100644 --- a/Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp +++ b/Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp @@ -491,7 +491,7 @@ void dump_skeleton_to_dxf( ISls const& aSkeleton , Color aContourBisectorColor , Color aSkeletonBisectorColor , Color aPeakBisectorColor - , Color aInfiniteBisectorColor + , Color /*aInfiniteBisectorColor*/ , string aLayer , DxfStream& rDXF ) From 9f08f92ee99878d769949dbdbcb1917ed4e551f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 3 Oct 2012 08:33:54 +0000 Subject: [PATCH 030/157] BUGFIX in offset computation while computing the offset of a polygon, it might happen that a candidate polygonal component is discarded (if it's not a valid polygon but a polyline for example). In that case, some halfedges are marked as visited, but among them some could be needed by another component. In this patch, we collect all halfedges marked as visited and unmark them in case the polygon is incomplete. The test added was not correctly working before the patch. --- .gitattributes | 1 + .../Polygon_offset_builder_2_impl.h | 11 ++- .../test/Straight_skeleton_2/offset_bug.cpp | 95 +++++++++++++++++++ 3 files changed, 106 insertions(+), 1 deletion(-) create mode 100644 Straight_skeleton_2/test/Straight_skeleton_2/offset_bug.cpp diff --git a/.gitattributes b/.gitattributes index 59e4406dc5e..c3c114c125b 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3983,6 +3983,7 @@ Straight_skeleton_2/test/Straight_skeleton_2/data/wheel_16_spokes.poly -text Straight_skeleton_2/test/Straight_skeleton_2/data/wheel_16_spokes_b.poly -text Straight_skeleton_2/test/Straight_skeleton_2/data/wiggly_03_cgal.poly -text Straight_skeleton_2/test/Straight_skeleton_2/include/CGAL/test_sls_types.h -text +Straight_skeleton_2/test/Straight_skeleton_2/offset_bug.cpp -text Straight_skeleton_2/test/Straight_skeleton_2/selected.rsp -text Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cmd -text Straight_skeleton_2/test/Straight_skeleton_2/test_sls.cpp -text diff --git a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h index 622a17af7d0..7653f01bd9a 100644 --- a/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h +++ b/Straight_skeleton_2/include/CGAL/Straight_skeleton_2/Polygon_offset_builder_2_impl.h @@ -256,7 +256,7 @@ OutputIterator Polygon_offset_builder_2::TraceOffsetPolygon( mVisitor.on_offset_contour_started(); Halfedge_const_handle lHook = aSeed ; - + std::vector visited_hooks; do { CGAL_POLYOFFSET_TRACE(1,"STEP " << mStepID ) ; @@ -272,6 +272,8 @@ OutputIterator Polygon_offset_builder_2::TraceOffsetPolygon( CGAL_POLYOFFSET_TRACE(1,"B" << lLastHook->id() << " and B" << lHook->id() << " visited." ) ; lHook = lHook->opposite(); + + visited_hooks.push_back(lLastHook); } } @@ -287,6 +289,13 @@ OutputIterator Polygon_offset_builder_2::TraceOffsetPolygon( if ( lComplete ) *aOut++ = lPoly ; + else + { + for (std::size_t k=0;k +#include +#include +#include +#include +#include + +#include +#include + + +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; + +typedef Kernel::Point_2 Point_2; +typedef CGAL::Polygon_2 Contour; +typedef boost::shared_ptr ContourPtr; +typedef std::vector ContourSequence ; + +typedef CGAL::Straight_skeleton_2 Ss; + +typedef Ss::Halfedge_iterator Halfedge_iterator; +typedef Ss::Halfedge_handle Halfedge_handle; +typedef Ss::Vertex_handle Vertex_handle; + +typedef CGAL::Straight_skeleton_builder_traits_2 SsBuilderTraits; +typedef CGAL::Straight_skeleton_builder_2 SsBuilder; + +typedef CGAL::Polygon_offset_builder_traits_2 OffsetBuilderTraits; +typedef CGAL::Polygon_offset_builder_2 OffsetBuilder; + +int main() +{ + // A start-shaped polygon, oriented counter-clockwise as required for outer contours. + Point_2 pts[] = { Point_2(0,0), + Point_2(700,0), + Point_2(700,600), + Point_2(0,600), + Point_2(0,300), + Point_2(300,300), + Point_2(300,400), + Point_2(600,400), + Point_2(600,100), + Point_2(300,100), + Point_2(300,200), + Point_2(0,200) + } ; + + std::vector star(pts,pts+12); + + double offset = 50; // The offset distance + boost::optional margin = CGAL::compute_outer_frame_margin(star.begin(),star.end(),50.); + + // Proceed only if the margin was computed (an extremely sharp corner might cause overflow) + if ( margin ) + { + // Get the bbox of the polygon + CGAL::Bbox_2 bbox = CGAL::bbox_2(star.begin(),star.end()); + + // Compute the boundaries of the frame + double fxmin = bbox.xmin() - *margin ; + double fxmax = bbox.xmax() + *margin ; + double fymin = bbox.ymin() - *margin ; + double fymax = bbox.ymax() + *margin ; + + // Create the rectangular frame + Point_2 frame[4]= { Point_2(fxmin,fymin) + , Point_2(fxmax,fymin) + , Point_2(fxmax,fymax) + , Point_2(fxmin,fymax) + } ; + + SsBuilder ssb ; + + ssb.enter_contour(frame,frame+4); + ssb.enter_contour(star.rbegin(),star.rend()); + + boost::shared_ptr ss = ssb.construct_skeleton(); + + if ( ss ) + { + ContourSequence offset_contours ; + OffsetBuilder ob(*ss); + + ob.construct_offset_contours(offset, std::back_inserter(offset_contours)); + + if ( offset_contours.size()!=3 ) + { + std::cerr << "ERROR: invalid number of componant!\n"; + return 1; + } + } + } + + return 0; +} From 88a8731ebf855c1e9a8b5b606ec3468cabb47cd8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20M=C3=B6ller?= Date: Wed, 3 Oct 2012 10:14:08 +0000 Subject: [PATCH 031/157] locate is a dependent name and needs to be qualified to be found --- Alpha_shapes_2/include/CGAL/Alpha_shape_2.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h index 85b6fb811a8..3b42b8f24e6 100644 --- a/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h +++ b/Alpha_shapes_2/include/CGAL/Alpha_shape_2.h @@ -591,7 +591,7 @@ public: // Classifies a point `p' with respect to `A'. Locate_type type; int i; - Face_handle pFace = locate(p, type, i); + Face_handle pFace = this->locate(p, type, i); switch (type) { case VERTEX : return classify(pFace->vertex(i), alpha); From 1856f12f18eac825d372275c6f5eee4e94e40642 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 4 Oct 2012 08:27:11 +0000 Subject: [PATCH 032/157] c++0x is c++11 --- Manual/doc_tex/Preliminaries/main.tex | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Manual/doc_tex/Preliminaries/main.tex b/Manual/doc_tex/Preliminaries/main.tex index 9c9d10078f4..b614edd5a2d 100644 --- a/Manual/doc_tex/Preliminaries/main.tex +++ b/Manual/doc_tex/Preliminaries/main.tex @@ -99,13 +99,14 @@ to force its definition on the command line, and it is possible to prevent its d definition by setting \ccc{CGAL_HAS_NO_THREADS} from the command line. -\section{C++0x Support} +\section{C++11 Support} \cgal\ is based on the \CC\ standard released in 1998 (and later refined in 2003). -A new major version of this standard is being prepared, and is refered to as C++0x. +A new major version of this standard has been released, and is refered to as C++11. Some compilers and standard library implementations already provide some of the -functionality of this new standard, as a preview. For example, \gcc\ provides -a command-line switch \ccc{-std=c++0x} which enables some of those features. +functionality of this new standard. For example, \gcc\ provides +a command-line switch (\ccc{-std=c++0x} or \ccc{-std=c++11} depending on the compiler version) +which enables some of those features. \cgal\ attempts to support this mode progressively, and already makes use of some of these features if they are available, although no extensive support has From bb5f4dc8e1364b995ef4930d5a927df3ec00a9c1 Mon Sep 17 00:00:00 2001 From: Alexander Kobel Date: Thu, 4 Oct 2012 09:00:46 +0000 Subject: [PATCH 034/157] added evaluation of LEDA_LINKER_FLAGS --- Installation/cmake/modules/CGAL_UseLEDA.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Installation/cmake/modules/CGAL_UseLEDA.cmake b/Installation/cmake/modules/CGAL_UseLEDA.cmake index a66a58badca..3b641e8b496 100644 --- a/Installation/cmake/modules/CGAL_UseLEDA.cmake +++ b/Installation/cmake/modules/CGAL_UseLEDA.cmake @@ -23,6 +23,8 @@ if ( LEDA_FOUND AND NOT LEDA_SETUP ) endif() uniquely_add_flags( CMAKE_CXX_FLAGS ${LEDA_CXX_FLAGS} ) + uniquely_add_flags( CMAKE_SHARED_LINKER_FLAGS ${LEDA_LINKER_FLAGS} ) + uniquely_add_flags( CMAKE_MODULE_LINKER_FLAGS ${LEDA_LINKER_FLAGS} ) # Setup is done set ( LEDA_SETUP TRUE ) From 04f07ef7bf5bd852be61aa351bf2e61608fc02bd Mon Sep 17 00:00:00 2001 From: Alexander Kobel Date: Thu, 4 Oct 2012 09:05:32 +0000 Subject: [PATCH 035/157] replace spurious *_LIBRARY_DIR occurences by *_LIBRARIES_DIR --- Installation/cmake/modules/CGAL_Macros.cmake | 186 +++++++++---------- 1 file changed, 93 insertions(+), 93 deletions(-) diff --git a/Installation/cmake/modules/CGAL_Macros.cmake b/Installation/cmake/modules/CGAL_Macros.cmake index 781743f15be..4e2940f2a15 100644 --- a/Installation/cmake/modules/CGAL_Macros.cmake +++ b/Installation/cmake/modules/CGAL_Macros.cmake @@ -2,40 +2,40 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) set(CGAL_MACROS_FILE_INCLUDED 1 ) include("${CGAL_MODULES_DIR}/CGAL_VersionUtils.cmake") - + # Probably unused. -- Laurent Rineau, 2011/07/21 macro(assert _arg ) if ( NOT ${_arg} ) - message( FATAL_ERROR "Variable ${_arg} must be defined" ) + message( FATAL_ERROR "Variable ${_arg} must be defined" ) endif() endmacro() macro( hide_variable var ) - set ( ${var} ${${var}} CACHE INTERNAL "Variable hidden from user" FORCE ) + set ( ${var} ${${var}} CACHE INTERNAL "Variable hidden from user" FORCE ) endmacro() macro( cache_set var ) - set ( ${var} ${ARGN} CACHE INTERNAL "" ) - set ( ${var} ${ARGN} CACHE INTERNAL "" ) + set ( ${var} ${ARGN} CACHE INTERNAL "" ) + set ( ${var} ${ARGN} CACHE INTERNAL "" ) endmacro() - + macro( typed_cache_set type doc var ) - set ( ${var} ${ARGN} CACHE ${type} ${doc} FORCE ) - set ( ${var} ${ARGN} CACHE ${type} ${doc} FORCE ) + set ( ${var} ${ARGN} CACHE ${type} ${doc} FORCE ) + set ( ${var} ${ARGN} CACHE ${type} ${doc} FORCE ) endmacro() - + macro( cache_get var ) - set ( ${var} ) + set ( ${var} ) endmacro() # Splits inlist in the first element (head) and the rest (tail) macro( list_split head tail ) - set( ${head} ) + set( ${head} ) set( ${tail} ) set( _LS_is_head TRUE ) foreach( _LS_item ${ARGN} ) if ( _LS_is_head ) - set( ${head} ${_LS_item} ) + set( ${head} ${_LS_item} ) set( _LS_is_head FALSE ) else() list( APPEND ${tail} ${_LS_item} ) @@ -43,7 +43,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) endforeach() endmacro() - # adds elements to an internal cached list + # adds elements to an internal cached list macro( add_to_cached_list listname ) cache_get ( ${listname} ) set( _ATC_${listname}_tmp ${${listname}} ) @@ -52,7 +52,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) endif() cache_set ( ${listname} ${_ATC_${listname}_tmp} ) endmacro() - + # adds elements to an in-memory variable named 'listname' macro( add_to_memory_list listname ) if ( NOT "${ARGN}" STREQUAL "" ) @@ -61,7 +61,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) endmacro() # adds elements to a list. - # If the first argument after 'listname' is PERSISTENT then 'listname' + # If the first argument after 'listname' is PERSISTENT then 'listname' # is a persistent internal cached variable, otherwise is a memory variable. macro( add_to_list listname ) list_split( _ATL_ARGN_HEAD _ATL_ARGN_TAIL ${ARGN} ) @@ -78,19 +78,19 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) if ( ${idx} LESS ${${list}_length} ) list( GET ${list} ${idx} ${var} ) else() - set( ${var} "NOTFOUND" ) + set( ${var} "NOTFOUND" ) endif() endmacro() - + macro( found_in_list item_list item result ) set( ${result} "FALSE" ) foreach( element ${${item_list}} ) if ( "${element}" STREQUAL "${item}" ) set( ${result} "TRUE" ) endif() - endforeach() + endforeach() endmacro() - + macro( uniquely_add_flags target_var ) if ( "${ARGC}" GREATER "1" ) set( target_list "${${target_var}}" ) @@ -101,7 +101,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) found_in_list( target_list ${flag} ${flag}_FOUND ) if ( NOT ${flag}_FOUND ) typed_cache_set( STRING "User-defined flags" ${target_var} "${${target_var}} ${flag}" ) - endif() + endif() endforeach() endif() endmacro() @@ -146,62 +146,62 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) message("${search_dirs}") endif() endfunction() - + macro( get_dependency_version LIB ) - + if ( "${ARGC}" GREATER "1" ) set( PKG ${ARGV1} ) else() set( PKG ${LIB} ) endif() - + if ( ${PKG}_FOUND ) - + set ( ${LIB}_VERSION "unknown" ) - + try_run( ${LIB}_RUN_RES - ${LIB}_COMPILE_RES + ${LIB}_COMPILE_RES "${CMAKE_BINARY_DIR}" "${CGAL_INSTALLATION_PACKAGE_DIR}/config/support/print_${LIB}_version.cpp" CMAKE_FLAGS "-DINCLUDE_DIRECTORIES:STRING=${${PKG}_INCLUDE_DIR};${${PKG}_DEPENDENCY_INCLUDE_DIR}" "-DLINK_LIBRARIES:STRING=${${PKG}_LIBRARIES};${${PKG}_DEPENDENCY_LIBRARIES}" - "-DLINK_DIRECTORIES:STRING=${${PKG}_LIBRARY_DIR};${${PKG}_DEPENDENCY_LIBRARY_DIR}" - OUTPUT_VARIABLE ${LIB}_OUTPUT + "-DLINK_DIRECTORIES:STRING=${${PKG}_LIBRARIES_DIR};${${PKG}_DEPENDENCY_LIBRARIES_DIR}" + OUTPUT_VARIABLE ${LIB}_OUTPUT ) - + if ( ${LIB}_COMPILE_RES ) - + if ( ${LIB}_RUN_RES EQUAL "0" ) - + string( REGEX MATCH "version=.*\$" ${LIB}_VERSION_LINE ${${LIB}_OUTPUT} ) string( REPLACE "\n" "" ${LIB}_VERSION_LINE2 ${${LIB}_VERSION_LINE} ) string( REPLACE "\r" "" ${LIB}_VERSION_LINE3 ${${LIB}_VERSION_LINE2} ) string( REPLACE "version=" "" ${LIB}_VERSION ${${LIB}_VERSION_LINE3} ) - + else() - + message( STATUS "WARNING: ${LIB} found but print_${LIB}_version.cpp exited with error condition: ${${LIB}_RUN_RES}" ) message( STATUS "${PKG}_INCLUDE_DIR=${${PKG}_INCLUDE_DIR}" ) message( STATUS "${PKG}_LIBRARIES=${${PKG}_LIBRARIES}" ) - message( STATUS "${PKG}_LIBRARY_DIR=${${PKG}_LIBRARY_DIR}" ) + message( STATUS "${PKG}_LIBRARIES_DIR=${${PKG}_LIBRARIES_DIR}" ) message( STATUS "${${LIB}_OUTPUT}" ) - + endif() - + else() - + message( STATUS "WARNING: ${LIB} found but could not compile print_${LIB}_version.cpp:") message( STATUS "${PKG}_INCLUDE_DIR=${${PKG}_INCLUDE_DIR}" ) message( STATUS "${PKG}_LIBRARIES=${${PKG}_LIBRARIES}" ) - message( STATUS "${PKG}_LIBRARY_DIR=${${PKG}_LIBRARY_DIR}" ) + message( STATUS "${PKG}_LIBRARIES_DIR=${${PKG}_LIBRARIES_DIR}" ) message( STATUS "${${LIB}_OUTPUT}" ) - - endif() - + + endif() + message( STATUS "USING ${LIB}_VERSION = '${${LIB}_VERSION}'" ) - + endif() - + endmacro() macro( use_lib ) @@ -229,7 +229,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) ####message( STATUS "${lib} include: ${${vlib}_INCLUDE_DIR}" ) include_directories ( SYSTEM ${${vlib}_INCLUDE_DIR} ) - # TODO EBEB remove definitions? + # TODO EBEB remove definitions? ####message( STATUS "${lib} definitions: ${${vlib}_DEFINITIONS}" ) add_definitions( ${${vlib}_DEFINITIONS} "-DCGAL_USE_${vlib}" ) @@ -239,9 +239,9 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) endif() ####message (STATUS "Configured ${lib} in standard way") - + set( ${vlib}_SETUP TRUE ) - + endif() endif() @@ -274,24 +274,24 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) add_to_list( CGAL_LIBRARIES ${CGAL_${component}_LIBRARY} ) endif() add_to_list( CGAL_3RD_PARTY_LIBRARIES ${CGAL_${component}_3RD_PARTY_LIBRARIES} ) - + add_to_list( CGAL_3RD_PARTY_INCLUDE_DIRS ${CGAL_${component}_3RD_PARTY_INCLUDE_DIRS} ) add_to_list( CGAL_3RD_PARTY_DEFINITIONS ${CGAL_${component}_3RD_PARTY_DEFINITIONS} ) add_to_list( CGAL_3RD_PARTY_LIBRARIES_DIRS ${CGAL_${component}_3RD_PARTY_LIBRARIES_DIRS} ) # Nothing to add for Core - if (${component} STREQUAL "ImageIO") + if (${component} STREQUAL "ImageIO") find_package( OpenGL ) find_package( ZLIB ) endif() - if (${component} STREQUAL "Qt3") + if (${component} STREQUAL "Qt3") find_package( OpenGL ) find_package( Qt3-patched ) endif() - if (${component} STREQUAL "Qt4") + if (${component} STREQUAL "Qt4") find_package( OpenGL ) find_package( Qt4 ) endif() @@ -302,25 +302,25 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) if ( ${component} STREQUAL "ALL_PRECONFIGURED_LIBS" ) - if (CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT) + if (CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT) message( STATUS "External libraries are all used") foreach ( CGAL_3RD_PARTY_LIB ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES}) - if (${CGAL_3RD_PARTY_LIB}_FOUND) + if (${CGAL_3RD_PARTY_LIB}_FOUND) use_lib( ${CGAL_3RD_PARTY_LIB} ${${CGAL_3RD_PARTY_LIB}_USE_FILE}) endif() endforeach() else() - message( SEND_ERROR "Component ALL_PRECONFIGURED_LIBS only allow with CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT=ON") - endif() - - else() + message( SEND_ERROR "Component ALL_PRECONFIGURED_LIBS only allow with CGAL_ALLOW_ALL_PRECONFIGURED_LIBS_COMPONENT=ON") + endif() + + else() if (NOT DEFINED CGAL_EXT_LIB_${component}_PREFIX) set(CGAL_EXT_LIB_${component}_PREFIX ${component}) endif() - + set( vlib "${CGAL_EXT_LIB_${component}_PREFIX}" ) - if ( NOT CGAL_IGNORE_PRECONFIGURED_${component} AND ${vlib}_FOUND) + if ( NOT CGAL_IGNORE_PRECONFIGURED_${component} AND ${vlib}_FOUND) ####message( STATUS "External library ${component} has been preconfigured") use_lib( ${component} ${${vlib}_USE_FILE}) @@ -330,11 +330,11 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) ####message( STATUS "External library ${component} has not been preconfigured") find_package( ${component} ) ####message( STATUS "External library ${vlib} after find") - if (${vlib}_FOUND) + if (${vlib}_FOUND) ####message( STATUS "External library ${vlib} about to be used") use_lib( ${component} ${${vlib}_USE_FILE}) endif() - + endif() endif() @@ -359,7 +359,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) endif() use_component( MPFR ) - if (GMPXX_FOUND) + if (GMPXX_FOUND) use_component( GMPXX ) endif() use_component( GMP ) @@ -395,7 +395,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) endif() set(ORIGINAL_CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} PARENT_SCOPE) - + set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} ${CGAL_CMAKE_MODULE_PATH}) # Export those variables to the parent scope (the scope that calls the function) @@ -407,23 +407,23 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) endfunction() macro( create_CGALconfig_files ) - + # CGALConfig.cmake is platform specific so it is generated and stored in the binary folder. configure_file("${CGAL_MODULES_DIR}/CGALConfig_binary.cmake.in" "${CMAKE_BINARY_DIR}/CGALConfig.cmake" @ONLY) - + # There is also a version of CGALConfig.cmake that is prepared in case CGAL in installed in CMAKE_INSTALL_PREFIX. configure_file("${CGAL_MODULES_DIR}/CGALConfig_install.cmake.in" "${CMAKE_BINARY_DIR}/config/CGALConfig.cmake" @ONLY) #write prefix exceptions file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "${SPECIAL_PREFIXES}\n") - file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "${SPECIAL_PREFIXES}") + file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "${SPECIAL_PREFIXES}") foreach( lib ${CGAL_SUPPORTING_3RD_PARTY_LIBRARIES} ) list( FIND CGAL_ESSENTIAL_3RD_PARTY_LIBRARIES "${lib}" POSITION ) # if lib is essential or preconfiguration for an activated library ... if ( ("${POSITION}" STRGREATER "-1") OR ( CGAL_ENABLE_PRECONFIG AND WITH_${lib} )) - + set (vlib ${CGAL_EXT_LIB_${lib}_PREFIX} ) #the next 'if' is needed to avoid ${vlib} config variables to be overidden in case of a local configuration change file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "if (NOT CGAL_IGNORE_PRECONFIGURED_${lib})\n") @@ -433,8 +433,8 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake " set( ${vlib}_LIBRARIES \"${${vlib}_LIBRARIES}\" )\n") file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake " set( ${vlib}_DEFINITIONS \"${${vlib}_DEFINITIONS}\" )\n") file( APPEND ${CMAKE_BINARY_DIR}/CGALConfig.cmake "endif()\n\n") - - + + #the next 'if' is needed to avoid ${vlib} config variables to be overidden in case of a local configuration change file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "if (NOT CGAL_IGNORE_PRECONFIGURED_${lib})\n") file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake " set( ${vlib}_FOUND \"${${vlib}_FOUND}\")\n") @@ -443,12 +443,12 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake " set( ${vlib}_LIBRARIES \"${${vlib}_LIBRARIES}\" )\n") file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake " set( ${vlib}_DEFINITIONS \"${${vlib}_DEFINITIONS}\" )\n") file( APPEND ${CMAKE_BINARY_DIR}/config/CGALConfig.cmake "endif()\n\n") - endif() + endif() endforeach() endmacro() - + macro ( fetch_env_var VAR ) if ( "${${VAR}}" STREQUAL "" ) set( ${VAR}_env_value "$ENV{${VAR}}" ) @@ -461,19 +461,19 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) ## All the following macros are probably unused. -- Laurent Rineau, 2011/07/21 - + # Composes a tagged list of libraries: a list with interpersed keywords or tags # indicating that all following libraries, up to the next tag, are to be linked only for the # corresponding build type. The 'general' tag indicates libraries that corresponds to all build types. - # 'optimized' corresponds to release builds and 'debug' to debug builds. Tags are case sensitve and - # the inital range of libraries listed before any tag is implicitely 'general' + # 'optimized' corresponds to release builds and 'debug' to debug builds. Tags are case sensitve and + # the inital range of libraries listed before any tag is implicitely 'general' # # This macro takes 3 lists of general, optimized and debug libraries, resp, and populates the list # given in the fourth argument. # # The first three parameters must be strings containing a semi-colon separated list of elements. # All three lists must be passed, but any of them can be an empty string "". - # The fourth parameter, corresponding to the result, must be a variable name and it will be APPENDED + # The fourth parameter, corresponding to the result, must be a variable name and it will be APPENDED # (retaining any previous contents) # # If there is a last parameter whose value is "PERSISTENT" then the result is an internal cached variable, @@ -494,7 +494,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) if ( NOT "${libs_optimized}" STREQUAL "" ) add_to_list( ${libs} ${_CTL_IN_CACHE} optimized ${libs_optimized} ) endif() - + if ( NOT "${libs_debug}" STREQUAL "" ) add_to_list( ${libs} ${_CTL_IN_CACHE} debug ${libs_debug} ) endif() @@ -532,13 +532,13 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) else() - if ( "${_DTL_tag}" STREQUAL "general" ) - set( _DTL_target ${libs_general} ) - elseif ( "${_DTL_tag}" STREQUAL "optimized" ) - set( _DTL_target ${libs_optimized} ) - else() - set( _DTL_target ${libs_debug} ) - endif() + if ( "${_DTL_tag}" STREQUAL "general" ) + set( _DTL_target ${libs_general} ) + elseif ( "${_DTL_tag}" STREQUAL "optimized" ) + set( _DTL_target ${libs_optimized} ) + else() + set( _DTL_target ${libs_debug} ) + endif() add_to_list( ${_DTL_target} ${_DTL_IN_CACHE} ${_DTL_lib} ) @@ -579,28 +579,28 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) list( LENGTH ${libs_general_or_optimized} _TL_libs_general_or_optimized_len ) list( LENGTH ${libs_general_or_debug} _TL_libs_general_or_debug_len ) - if ( _TL_libs_general_or_optimized_len EQUAL 0 ) + if ( _TL_libs_general_or_optimized_len EQUAL 0 ) compose_tagged_libraries( "${${libs_general_or_debug}}" "" "" ${libs} ${ARGN} ) - elseif ( _TL_libs_general_or_debug_len EQUAL 0 ) + elseif ( _TL_libs_general_or_debug_len EQUAL 0 ) compose_tagged_libraries( "${${libs_general_or_optimized}}" "" "" ${libs} ${ARGN} ) - else() + else() compose_tagged_libraries( "" "${${libs_general_or_optimized}}" "${${libs_general_or_debug}}" ${libs} ${ARGN} ) endif() endmacro() # add_to_tagged_libraries( libsR ${libsA} ) - # + # # Appends the list of tagged libraries contained in the variable 'libA' to the list # of tagged libraries contained in the variable 'libR', properly redistributing each tagged subsequence. # # The first argument is the name of the variable recieving the list. It will be APPENDED - # (retaining any previous contents). + # (retaining any previous contents). # The second parameter is a single string value containing the tagged # lists of libraries to append (as a semi-colon separated list). It can be empty, in which case noting is added. # # If there is a third parameter whose value is PERSISTENT, then 'libR' is an internal cached variable, otherwise - # it is an in-memory variable. + # it is an in-memory variable. # # It is not possible to append more than one list in the same call. # @@ -619,7 +619,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) macro( add_to_tagged_libraries libsR in_cache libsA ) if ( "${in_cache}" STREQUAL "PERSISTENT" ) - set( _CTL_IN_CACHE "PERSISTENT" ) + set( _CTL_IN_CACHE "PERSISTENT" ) else() set( _CTL_IN_CACHE ) endif() @@ -642,7 +642,7 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) cache_set( ${libsR} ) else() set( ${libsR} ) - endif() + endif() compose_tagged_libraries( "${_CTL_general_0}" "${_CTL_optimized_0}" "${_CTL_debug_0}" ${libsR} ${_CTL_IN_CACHE} ) @@ -678,15 +678,15 @@ function(process_CGAL_subdirectory entry subdir type_name) if(EXISTS ${entry}/../../dont_submit) file(STRINGS ${entry}/../../dont_submit dont_submit_grep REGEX "^${ENTRY_DIR_NAME}/?\$") - if(dont_submit_grep) + if(dont_submit_grep) set(ADD_SUBDIR FALSE) endif() file(STRINGS ${entry}/../../dont_submit dont_submit_grep REGEX "^${subdir}/${ENTRY_DIR_NAME}/?\$") - if(dont_submit_grep) + if(dont_submit_grep) set(ADD_SUBDIR FALSE) endif() file(STRINGS ${entry}/../../dont_submit dont_submit_grep REGEX "^${subdir}/?\$") - if(dont_submit_grep) + if(dont_submit_grep) set(ADD_SUBDIR FALSE) endif() endif() From 160e9375001b93d605e0ac16d78816e6b560e82c Mon Sep 17 00:00:00 2001 From: Alexander Kobel Date: Thu, 4 Oct 2012 09:34:54 +0000 Subject: [PATCH 036/157] try $ENV{_DIR}/[include,lib] as a fallback for $ENV{_[INC,LIB]_DIR} --- Installation/cmake/modules/FindESBTL.cmake | 12 +++-- Installation/cmake/modules/FindEigen3.cmake | 18 +++---- Installation/cmake/modules/FindGMP.cmake | 34 ++++++------ Installation/cmake/modules/FindGMPXX.cmake | 16 ++++-- Installation/cmake/modules/FindLEDA.cmake | 60 +++++++++++---------- Installation/cmake/modules/FindMPFI.cmake | 18 +++---- Installation/cmake/modules/FindMPFR.cmake | 32 ++++++----- Installation/cmake/modules/FindNTL.cmake | 22 ++++---- Installation/cmake/modules/FindRS.cmake | 16 +++--- Installation/cmake/modules/FindRS3.cmake | 18 ++++--- Installation/cmake/modules/FindTAUCS.cmake | 15 ++++-- 11 files changed, 150 insertions(+), 111 deletions(-) diff --git a/Installation/cmake/modules/FindESBTL.cmake b/Installation/cmake/modules/FindESBTL.cmake index acb4fc3f6ae..73db2463c39 100644 --- a/Installation/cmake/modules/FindESBTL.cmake +++ b/Installation/cmake/modules/FindESBTL.cmake @@ -8,14 +8,16 @@ # Is it already configured? if (ESBTL_INCLUDE_DIR) set(ESBTL_FOUND TRUE) -else() +else() - find_path(ESBTL_INCLUDE_DIR + find_path(ESBTL_INCLUDE_DIR NAMES ESBTL/default.h - PATHS ENV ESBTL_INC_DIR + HINTS ENV ESBTL_INC_DIR + ENV ESBTL_DIR + PATH_SUFFIXES include /usr/include /usr/local/include - DOC "The directory containing the ESBTL header files WITHOUT the ESBTL prefix" + DOC "The directory containing the ESBTL header files WITHOUT the ESBTL prefix" ) if(ESBTL_INCLUDE_DIR) @@ -23,7 +25,7 @@ else() endif() endif() - + if(ESBTL_FOUND) message(STATUS "Found ESBTL: ${ESBTL_INCLUDE_DIR}") endif() diff --git a/Installation/cmake/modules/FindEigen3.cmake b/Installation/cmake/modules/FindEigen3.cmake index 1f49d7284af..36d008f6bd8 100644 --- a/Installation/cmake/modules/FindEigen3.cmake +++ b/Installation/cmake/modules/FindEigen3.cmake @@ -66,17 +66,17 @@ if (EIGEN3_INCLUDE_DIR) "set to ${EIGEN3_INCLUDE_DIR}, but that path does not contains the file " "signature_of_eigen3_matrix_library and is considered as invalid.") endif() - - + + else (EIGEN3_INCLUDE_DIR) find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library - HINTS - $ENV{EIGEN3_INC_DIR} - PATHS - ${KDE4_INCLUDE_DIR} - PATH_SUFFIXES eigen3 eigen + HINTS ENV EIGEN3_INC_DIR + ENV EIGEN3_DIR + PATH_SUFFIXES include + PATHS ${KDE4_INCLUDE_DIR} + PATH_SUFFIXES eigen3 eigen ) if(EIGEN3_INCLUDE_DIR) @@ -91,7 +91,7 @@ else (EIGEN3_INCLUDE_DIR) # Add variables to cache set( EIGEN3_INCLUDE_DIR "${EIGEN3_INCLUDE_DIR}" CACHE PATH "Directories containing the Eigen3 header files" FORCE ) - - + + endif(EIGEN3_INCLUDE_DIR) diff --git a/Installation/cmake/modules/FindGMP.cmake b/Installation/cmake/modules/FindGMP.cmake index f54aa604266..8accb1fd3e7 100644 --- a/Installation/cmake/modules/FindGMP.cmake +++ b/Installation/cmake/modules/FindGMP.cmake @@ -22,14 +22,16 @@ endif() # Is it already configured? if (GMP_in_cache) - - set(GMP_FOUND TRUE) - -else() - find_path(GMP_INCLUDE_DIR - NAMES gmp.h - PATHS ENV GMP_INC_DIR + set(GMP_FOUND TRUE) + +else() + + find_path(GMP_INCLUDE_DIR + NAMES gmp.h + HINTS ENV GMP_INC_DIR + ENV GMP_DIR + PATH_SUFFIXES include ${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/include DOC "The directory containing the GMP header files" ) @@ -37,22 +39,24 @@ else() if ( GMP_INCLUDE_DIR STREQUAL "${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/include" ) cache_set( GMP_IN_CGAL_AUXILIARY TRUE ) endif() - + find_library(GMP_LIBRARIES NAMES gmp libgmp-10 - PATHS ENV GMP_LIB_DIR - ${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/lib + HINTS ENV GMP_LIB_DIR + ENV GMP_DIR + PATH_SUFFIXES lib + ${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/lib DOC "Path to the GMP library" ) - - if ( GMP_LIBRARIES ) + + if ( GMP_LIBRARIES ) get_filename_component(GMP_LIBRARIES_DIR ${GMP_LIBRARIES} PATH CACHE ) endif() - + # Attempt to load a user-defined configuration for GMP if couldn't be found if ( NOT GMP_INCLUDE_DIR OR NOT GMP_LIBRARIES_DIR ) include( GMPConfig OPTIONAL ) endif() - + find_package_handle_standard_args(GMP "DEFAULT_MSG" GMP_LIBRARIES GMP_INCLUDE_DIR) - + endif() diff --git a/Installation/cmake/modules/FindGMPXX.cmake b/Installation/cmake/modules/FindGMPXX.cmake index 9c049f72cf6..d5969e9ea08 100644 --- a/Installation/cmake/modules/FindGMPXX.cmake +++ b/Installation/cmake/modules/FindGMPXX.cmake @@ -17,18 +17,24 @@ if(WITH_GMP AND GMP_FOUND) set(GMPXX_FIND_QUIETLY TRUE) endif() - find_path(GMPXX_INCLUDE_DIR NAMES gmpxx.h - PATHS ${GMP_INCLUDE_DIR_SEARCH} + find_path(GMPXX_INCLUDE_DIR NAMES gmpxx.h + HINTS ENV GMPXX_INC_DIR + ENV GMPXX_DIR + PATH_SUFFIXES include + ${GMP_INCLUDE_DIR_SEARCH} DOC "The directory containing the GMPXX include files" ) find_library(GMPXX_LIBRARIES NAMES gmpxx - PATHS ${GMP_LIBRARIES_DIR_SEARCH} + HINTS ENV GMPXX_LIB_DIR + ENV GMPXX_DIR + PATH_SUFFIXES lib + ${GMP_LIBRARIES_DIR_SEARCH} DOC "Path to the GMPXX library" ) - + include(FindPackageHandleStandardArgs) - + find_package_handle_standard_args(GMPXX "DEFAULT_MSG" GMPXX_LIBRARIES GMPXX_INCLUDE_DIR ) else() diff --git a/Installation/cmake/modules/FindLEDA.cmake b/Installation/cmake/modules/FindLEDA.cmake index 7350ce01c21..32ff155b3fa 100644 --- a/Installation/cmake/modules/FindLEDA.cmake +++ b/Installation/cmake/modules/FindLEDA.cmake @@ -1,40 +1,46 @@ -if (LEDA_INCLUDE_DIR AND LEDA_LIBRARIES ) - +if (LEDA_INCLUDE_DIR AND LEDA_LIBRARIES ) + set(LEDA_FOUND TRUE) - -else() - - find_path(LEDA_INCLUDE_DIR + +else() + + find_path(LEDA_INCLUDE_DIR NAMES "LEDA/basic.h" "LEDA/system/basic.h" - PATHS ENV LEDA_INC_DIR + HINTS ENV LEDA_INC_DIR + ENV LEDA_DIR + PATH_SUFFIXES incl DOC "The directory containing the LEDA header files WITHOUT the LEDA prefix" ) - + find_library(LEDA_LIBRARY_RELEASE NAMES "leda" - PATHS ENV LEDA_LIB_DIR - DOC "Path to the LEDA library" + HINTS ENV LEDA_LIB_DIR + ENV LEDA_DIR +# PATH_SUFFIXES lib + DOC "Path to the LEDA library" ) - + find_library(LEDA_LIBRARY_DEBUG NAMES "ledaD" - PATHS ENV LEDA_LIB_DIR - DOC "Path to the LEDA library" + HINTS ENV LEDA_LIB_DIR + ENV LEDA_DIR +# PATH_SUFFIXES lib + DOC "Path to the LEDA library" ) - + if ( NOT LEDA_INCLUDE_DIR ) typed_cache_set( FILEPATH "The directory containing the LEDA header files WITHOUT the LEDA prefix" LEDA_INCLUDE_DIR "$ENV{LEDA_INC_DIR}" ) endif() - + if ( NOT LEDA_DEFINITIONS ) typed_cache_set( STRING "Definitions for the LEDA library" LEDA_DEFINITIONS "$ENV{LEDA_DEFINITIONS}" ) - endif() - + endif() + if ( NOT LEDA_CXX_FLAGS ) typed_cache_set( STRING "Compiler flags for the LEDA library" LEDA_CXX_FLAGS "$ENV{LEDA_CXX_FLAGS}" ) - endif() - + endif() + if ( NOT LEDA_LINKER_FLAGS ) typed_cache_set( STRING "Linker flags for the LEDA library" LEDA_LINKER_FLAGS "$ENV{LEDA_LINKER_FLAGS}" ) - endif() + endif() if ( NOT LEDA_LIBRARY_RELEASE ) typed_cache_set( FILEPATH "The LEDA release-mode libraries" LEDA_LIBRARY_RELEASE "$ENV{LEDA_LIBRARY_RELEASE}" ) @@ -51,24 +57,24 @@ else() set(LEDA_LIBRARIES_ ${LEDA_LIBRARY_RELEASE}) endif() endif() - + set(LEDA_LIBRARIES ${LEDA_LIBRARIES_} CACHE FILEPATH "The LEDA library") endif() - + set( LEDA_BASIC_H "${LEDA_INCLUDE_DIR}/LEDA/system/basic.h" ) if ( NOT EXISTS ${LEDA_BASIC_H} ) set( LEDA_BASIC_H "${LEDA_INCLUDE_DIR}/LEDA/basic.h" ) endif() if ( EXISTS ${LEDA_BASIC_H} ) - + file(READ "${LEDA_BASIC_H}" LEDA_BASIC_H_CONTENTS) - + string(REGEX REPLACE ".*#define __LEDA__ ([0-9]+).*" "\\1" LEDA_VERSION "${LEDA_BASIC_H_CONTENTS}") - + message( STATUS "USING LEDA_VERSION = '${LEDA_VERSION}'" ) - + endif() if ( NOT LEDA_VERSION AND NOT "$ENV{LEDA_VERSION}" STREQUAL "" ) @@ -85,4 +91,4 @@ if ( LEDA_INCLUDE_DIR AND LEDA_LIBRARIES) set(LEDA_FOUND TRUE) set(LEDA_USE_FILE "CGAL_UseLEDA") endif() - + diff --git a/Installation/cmake/modules/FindMPFI.cmake b/Installation/cmake/modules/FindMPFI.cmake index 113ae900312..f76fab7a538 100644 --- a/Installation/cmake/modules/FindMPFI.cmake +++ b/Installation/cmake/modules/FindMPFI.cmake @@ -1,24 +1,24 @@ find_package( GMP QUIET ) if( GMP_FOUND ) - + if( MPFI_INCLUDE_DIR AND MPFI_LIBRARIES ) set( MPFI_FOUND TRUE ) endif( MPFI_INCLUDE_DIR AND MPFI_LIBRARIES ) find_path(MPFI_INCLUDE_DIR NAMES mpfi.h - HINTS - $ENV{MPFI_INC_DIR} - PATHS - ${GMP_INCLUDE_DIR_SEARCH} + HINTS ENV MPFI_INC_DIR + ENV MPFI_DIR + PATH_SUFFIXES include + PATHS ${GMP_INCLUDE_DIR_SEARCH} DOC "The directory containing the MPFI header files" ) find_library(MPFI_LIBRARIES NAMES mpfi - HINTS - $ENV{MPFI_LIB_DIR} - PATHS - ${GMP_LIBRARIES_DIR_SEARCH} + HINTS ENV MPFI_LIB_DIR + ENV MPFI_DIR + PATH_SUFFIXES lib + PATHS ${GMP_LIBRARIES_DIR_SEARCH} DOC "Directory containing the MPFI library" ) diff --git a/Installation/cmake/modules/FindMPFR.cmake b/Installation/cmake/modules/FindMPFR.cmake index 94f41f9d9a6..485c6171b9f 100644 --- a/Installation/cmake/modules/FindMPFR.cmake +++ b/Installation/cmake/modules/FindMPFR.cmake @@ -20,15 +20,17 @@ if(NOT MPFR_LIBRARIES) endif() # Is it already configured? -if (MPFR_in_cache) - - set(MPFR_FOUND TRUE) - -else() +if (MPFR_in_cache) - find_path(MPFR_INCLUDE_DIR - NAMES mpfr.h - PATHS ENV MPFR_INC_DIR + set(MPFR_FOUND TRUE) + +else() + + find_path(MPFR_INCLUDE_DIR + NAMES mpfr.h + HINTS ENV MPFR_INC_DIR + ENV MPFR_DIR + PATH_SUFFIXES include ${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/include DOC "The directory containing the MPFR header files" ) @@ -36,17 +38,19 @@ else() if ( MPFR_INCLUDE_DIR STREQUAL "${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/include" ) cache_set( MPFR_IN_CGAL_AUXILIARY TRUE ) endif() - + find_library(MPFR_LIBRARIES NAMES mpfr libmpfr-4 libmpfr-1 - PATHS ENV MPFR_LIB_DIR - ${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/lib + HINTS ENV MPFR_LIB_DIR + ENV MPFR_DIR + PATH_SUFFIXES lib + ${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/lib DOC "Path to the MPFR library" ) - - if ( MPFR_LIBRARIES ) + + if ( MPFR_LIBRARIES ) get_filename_component(MPFR_LIBRARIES_DIR ${MPFR_LIBRARIES} PATH CACHE ) endif() - + # Attempt to load a user-defined configuration for MPFR if couldn't be found if ( NOT MPFR_INCLUDE_DIR OR NOT MPFR_LIBRARIES_DIR ) include( MPFRConfig OPTIONAL ) diff --git a/Installation/cmake/modules/FindNTL.cmake b/Installation/cmake/modules/FindNTL.cmake index cbbf5ca34a2..8be88eab624 100644 --- a/Installation/cmake/modules/FindNTL.cmake +++ b/Installation/cmake/modules/FindNTL.cmake @@ -24,20 +24,22 @@ else( (TARGET CGAL AND NOT WITH_GMP) OR NOT GMP_FOUND ) find_path(NTL_INCLUDE_DIR NAMES NTL/ZZ.h - HINTS - $ENV{NTL_INC_DIR} + HINTS ENV NTL_INC_DIR + ENV NTL_DIR + PATH_SUFFIXES include DOC "The directory containing the NTL include files" ) find_library(NTL_LIBRARY NAMES ntl - HINTS - $ENV{NTL_LIB_DIR} + HINTS ENV NTL_LIB_DIR + ENV NTL_DIR + PATH_SUFFIXES lib DOC "Path to the NTL library" ) - if ( NTL_INCLUDE_DIR AND NTL_LIBRARY ) - + if ( NTL_INCLUDE_DIR AND NTL_LIBRARY ) + #check version set( NTL_VERSION_H "${NTL_INCLUDE_DIR}/NTL/version.h" ) @@ -45,9 +47,9 @@ else( (TARGET CGAL AND NOT WITH_GMP) OR NOT GMP_FOUND ) if ( EXISTS ${NTL_VERSION_H} ) file( READ "${NTL_VERSION_H}" NTL_VERSION_H_CONTENTS ) - + string( REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" CGAL_NTL_VERSION "${NTL_VERSION_H_CONTENTS}" ) - + #message( STATUS "DETECTED NTL_VERSION = '${CGAL_NTL_VERSION}'" ) IS_VERSION_GREATER( "${CGAL_NTL_VERSION}" "5.0.0" _IS_NTL_VERSION_GREATER ) @@ -61,7 +63,7 @@ else( (TARGET CGAL AND NOT WITH_GMP) OR NOT GMP_FOUND ) endif (EXISTS ${NTL_VERSION_H} ) - endif ( NTL_INCLUDE_DIR AND NTL_LIBRARY ) + endif ( NTL_INCLUDE_DIR AND NTL_LIBRARY ) if ( NTL_FOUND ) @@ -77,7 +79,7 @@ else( (TARGET CGAL AND NOT WITH_GMP) OR NOT GMP_FOUND ) DEFAULT_MSG NTL_LIBRARY NTL_INCLUDE_DIR ) - + mark_as_advanced( NTL_INCLUDE_DIR NTL_LIBRARY ) # TODO add flag to CGAL Polynomials diff --git a/Installation/cmake/modules/FindRS.cmake b/Installation/cmake/modules/FindRS.cmake index ab39259e8ef..7ac4c68cabb 100644 --- a/Installation/cmake/modules/FindRS.cmake +++ b/Installation/cmake/modules/FindRS.cmake @@ -1,11 +1,11 @@ # RS needs GMP 4.2 or newer, this script will fail if an old version is # detected -if( NOT GMP_FOUND ) +if( NOT GMP_FOUND ) find_package( GMP ) endif() -if( NOT MPFI_FOUND ) +if( NOT MPFI_FOUND ) find_package( MPFI ) endif() @@ -15,18 +15,20 @@ if( MPFI_FOUND ) find_path(RS_INCLUDE_DIR NAMES rs_exports.h - HINTS - $ENV{RS_INC_DIR} + HINTS ENV RS_INC_DIR + ENV RS_DIR + PATH_SUFFIXES include DOC "The directory containing the RS include files" ) find_library(RS_LIBRARIES NAMES rsexport_rs - HINTS - $ENV{RS_LIB_DIR} + HINTS ENV RS_LIB_DIR + ENV RS_DIR + PATH_SUFFIXES lib DOC "Path to the RS library" ) - + get_dependency_version( GMP ) IS_VERSION_LESS("$GMP_VERSION}" "4.2.0" _IS_GMP_VERSION_TO_LOW) diff --git a/Installation/cmake/modules/FindRS3.cmake b/Installation/cmake/modules/FindRS3.cmake index e592d0bf8ce..a53390553eb 100644 --- a/Installation/cmake/modules/FindRS3.cmake +++ b/Installation/cmake/modules/FindRS3.cmake @@ -13,17 +13,23 @@ if( MPFI_FOUND ) find_path(RS3_INCLUDE_DIR NAMES rs3_fncts.h - HINTS - $ENV{RS_INC_DIR} -# TODO uses the same environment variable + HINTS ENV RS3_INC_DIR + ENV RS3_DIR + PATH_SUFFIXES include + ENV RS_INC_DIR + ENV RS_INC_DIR + PATH_SUFFIXES include DOC "The directory containing the RS3 include files" ) find_library(RS3_LIBRARIES NAMES rs3 - HINTS - $ENV{RS_LIB_DIR} -# TODO uses the same environment variable + HINTS ENV RS3_LIB_DIR + ENV RS3_DIR + PATH_SUFFIXES lib + ENV RS_LIB_DIR + ENV RS_DIR + PATH_SUFFIXES lib DOC "Path to the RS3 library" ) diff --git a/Installation/cmake/modules/FindTAUCS.cmake b/Installation/cmake/modules/FindTAUCS.cmake index 4c35c3e6e3d..56ad8eed095 100644 --- a/Installation/cmake/modules/FindTAUCS.cmake +++ b/Installation/cmake/modules/FindTAUCS.cmake @@ -52,9 +52,12 @@ else() else() find_path(TAUCS_INCLUDE_DIR NAMES taucs.h - PATHS ${CGAL_TAUCS_INCLUDE_DIR} + HINTS ${CGAL_TAUCS_INCLUDE_DIR} + PATH_SUFFIXES taucs + ENV TAUCS_DIR + PATH_SUFFIXES include ENV TAUCS_INC_DIR - PATH_SUFFIXES taucs + PATH_SUFFIXES taucs ) endif() @@ -67,15 +70,19 @@ else() find_library(TAUCS_LIBRARY NAMES "taucs" PATHS ${CGAL_TAUCS_LIBRARIES_DIR} + ENV TAUCS_DIR + PATH_SUFFIXES lib ENV TAUCS_LIB_DIR - PATH_SUFFIXES taucs + PATH_SUFFIXES taucs DOC "TAUCS library" ) find_library(METIS_LIBRARY NAMES "metis" PATHS ${CGAL_TAUCS_LIBRARIES_DIR} + ENV TAUCS + PATH_SUFFIXES lib ENV TAUCS_LIB_DIR - PATH_SUFFIXES taucs + PATH_SUFFIXES taucs DOC "Metis library" ) if(TAUCS_LIBRARY AND METIS_LIBRARY) From c81470929e1822ed40964f3690ad8f799722d16d Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Thu, 4 Oct 2012 09:56:48 +0000 Subject: [PATCH 037/157] fixed variable --- Installation/cmake/modules/FindRS3.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/cmake/modules/FindRS3.cmake b/Installation/cmake/modules/FindRS3.cmake index a53390553eb..8147050a326 100644 --- a/Installation/cmake/modules/FindRS3.cmake +++ b/Installation/cmake/modules/FindRS3.cmake @@ -17,7 +17,7 @@ if( MPFI_FOUND ) ENV RS3_DIR PATH_SUFFIXES include ENV RS_INC_DIR - ENV RS_INC_DIR + ENV RS_DIR PATH_SUFFIXES include DOC "The directory containing the RS3 include files" ) From 25dbce2285ee603a744061f88bfc6b57ad37a7ad Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Thu, 4 Oct 2012 10:15:49 +0000 Subject: [PATCH 038/157] added _DIR to some libs --- Installation/doc_tex/Installation/installation.tex | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/Installation/doc_tex/Installation/installation.tex b/Installation/doc_tex/Installation/installation.tex index f5282a2164c..072b12b75d7 100644 --- a/Installation/doc_tex/Installation/installation.tex +++ b/Installation/doc_tex/Installation/installation.tex @@ -1049,6 +1049,7 @@ usage of \gmp\ and of \mpfr\ will be disabled. \begin{tabular}{|l|l|l|} \hline \textbf{Variable} & \textbf{Description} & \textbf{Type}\\\hline\hline \texttt{WITH\_GMP} & Indicates whether to search and use \gmp\/\mpfr\ or not & CMake\\\hline + \texttt{GMP\_DIR} & Directory of \gmp\ default installation & Environment\\\hline \texttt{GMP\_INCLUDE\_DIR} & Directory containing the \texttt{gmp.h} file & CMake\\\hline \texttt{GMP\_INC\_DIR} & Idem & Environment\\\hline \texttt{GMP\_LIBRARIES\_DIR} & Directory containing the compiled \gmp\ library & CMake\\\hline @@ -1069,6 +1070,7 @@ Under Linux, the \gmpxx\ is also searched for, and you may specify the following \gdef\lcTabularBorder{2} \begin{tabular}{|l|l|l|} \hline \textbf{Variable} & \textbf{Description} & \textbf{Type}\\\hline\hline + \texttt{GMPXX\_DIR} & Directory of \gmpxx\ default installation & Environment\\\hline \texttt{GMPXX\_INCLUDE\_DIR} & Directory containing the \texttt{gmpxx.h} file & CMake\\\hline \texttt{GMPXX\_LIBRARIES} & Full pathname of the compiled \gmpxx\ library & CMake\\\hline \end{tabular} @@ -1135,7 +1137,7 @@ be sufficient to just indicate the library directory via the \texttt{LEDA\_LIBRA If that doesn't work because, for example, the names are different, you can provide the full pathnames of each variant via \texttt{LEDA\_LIBRARY\_RELEASE} and \texttt{LEDA\_LIBRARY\_DEBUG}. -The variables specifying definitions and flags can be left undefined if they are not needed by LEDA. +The variables specifying definitions and flags can be left undefined if they are not needed by \leda. {\ccTexHtml{\small}{} \renewcommand{\arraystretch}{1.3} @@ -1143,6 +1145,7 @@ The variables specifying definitions and flags can be left undefined if they are \begin{tabular}{|l|l|l|} \hline \textbf{Variable} & \textbf{Description} & \textbf{Type}\\\hline\hline \texttt{WITH\_LEDA} & Indicates whether to search and use \leda\ or not & CMake\\\hline + \texttt{LEDA\_DIR} & Directory of \leda\ default installation & Environment\\\hline \texttt{LEDA\_INCLUDE\_DIR} & Directory containing the file \texttt{LEDA/system/basic.h} & CMake\\\hline \texttt{LEDA\_LIBRARIES} & Directory containing the compiled \leda\ libraries & CMake\\\hline \texttt{LEDA\_INC\_DIR} & Directory containing the file \texttt{LEDA/system/basic.h} & Environment\\\hline @@ -1170,6 +1173,7 @@ and library files must be specified by using environment variables. \gdef\lcTabularBorder{2} \begin{tabular}{|l|l|l|} \hline \textbf{Variable} & \textbf{Description} & \textbf{Type}\\\hline\hline + \texttt{MPFI\_DIR} & Directory of \mpfi\ default installation & Environment\\\hline \texttt{MPFI\_INCLUDE\_DIR} & Directory containing the \texttt{mpfi.h} file & CMake\\\hline \texttt{MPFI\_INC\_DIR} & Idem & Environment\\\hline \texttt{MPFI\_LIBRARIES\_DIR} & Directory containing the compiled \mpfi\ library & CMake\\\hline @@ -1197,6 +1201,7 @@ related to the latter library may also need to be defined. \gdef\lcTabularBorder{2} \begin{tabular}{|l|l|l|} \hline \textbf{Variable} & \textbf{Description} & \textbf{Type}\\\hline\hline + \texttt{RS\_DIR} & Directory of \rs\ default installation & Environment\\\hline \texttt{RS\_INCLUDE\_DIR} & Directory containing the \texttt{rs\_exports.h} file & CMake\\\hline \texttt{RS\_INC\_DIR} & Idem & Environment\\\hline \texttt{RS\_LIBRARIES\_DIR} & Directory containing the compiled \rs\ library & CMake\\\hline @@ -1212,6 +1217,7 @@ Similar variables exist for \rs3. \gdef\lcTabularBorder{2} \begin{tabular}{|l|l|l|} \hline \textbf{Variable} & \textbf{Description} & \textbf{Type}\\\hline\hline + \texttt{RS3\_DIR} & Directory of \rs3 default installation & Environment\\\hline \texttt{RS3\_INCLUDE\_DIR} & Directory containing the \texttt{rs\_exports.h} file & CMake\\\hline \texttt{RS3\_INC\_DIR} & Idem & Environment\\\hline \texttt{RS3\_LIBRARIES\_DIR} & Directory containing the compiled \rs\ library & CMake\\\hline @@ -1238,6 +1244,7 @@ headers and library files must be specified using environment variables. \gdef\lcTabularBorder{2} \begin{tabular}{|l|l|l|} \hline \textbf{Variable} & \textbf{Description} & \textbf{Type}\\\hline\hline + \texttt{NTL\_DIR} & Directory of \ntl\ default installation & Environment\\\hline \texttt{NTL\_INCLUDE\_DIR} & Directory containing the \texttt{NTL/ZZX.h} file & CMake\\\hline \texttt{NTL\_INC\_DIR} & Idem & Environment\\\hline \texttt{NTL\_LIBRARIES\_DIR} & Directory containing the compiled \ntl\ library & CMake\\\hline @@ -1257,6 +1264,7 @@ Only the {\em directory} containing the header files of \eigen\ 3.1 (or greater \gdef\lcTabularBorder{2} \begin{tabular}{|l|l|l|} \hline \textbf{Variable} & \textbf{Description} & \textbf{Type}\\\hline\hline + \texttt{EIGEN3\_DIR} & Directory of \eigen\ default installation & Environment\\\hline \texttt{EIGEN3\_INCLUDE\_DIR} & Directory containing the file \texttt{signature\_of\_eigen3\_matrix\_library} & CMake\\\hline \texttt{EIGEN3\_INC\_DIR} & Idem & Environment\\\hline \end{tabular} @@ -1340,7 +1348,7 @@ the header files and the full pathnames of the release and debug libraries \gdef\lcTabularBorder{2} \begin{tabular}{|l|l|l|} \hline \textbf{Variable} & \textbf{Description} & \textbf{Type}\\\hline\hline - \texttt{QGLVIEWERROOT} & Root directory of the QGLViewer library & Environment\\\hline + \texttt{QGLVIEWERROOT} & Root directory of the QGLViewer library & Environment\\\hline \texttt{QGLVIEWER\_INCLUDE\_DIR} & Directory containing the \texttt{QGLViewer/qglviewer.h} file & CMake\\\hline \texttt{QGLVIEWER\_LIBRARY\_RELEASE} & Full pathname to a release build of the QGLViewer library & CMake\\\hline \texttt{QGLVIEWER\_LIBRARY\_DEBUG} & Full pathname to a debug build of the QGLViewer library & CMake\\\hline @@ -1360,6 +1368,7 @@ environment variable is sufficient. \gdef\lcTabularBorder{2} \begin{tabular}{|l|l|l|} \hline \textbf{Variable} & \textbf{Description} & \textbf{Type}\\\hline\hline + \texttt{ESBTL\_DIR} & Directory of \esbtl\ default installation & Environment\\\hline \texttt{ESBTL\_INC\_DIR} & Directory containing the \texttt{ESBTL/default.h} file & Environment\\\hline \texttt{ESBTL\_INCLUDE\_DIR} & Directory containing the \texttt{ESBTL/default.h} file & CMake\\\hline \end{tabular} From c06f84d4db90b18473836c333dce0ebd9ac6a739 Mon Sep 17 00:00:00 2001 From: Alexander Kobel Date: Thu, 4 Oct 2012 12:06:46 +0000 Subject: [PATCH 039/157] fixed fallback to RS_dirs for RS3 --- Installation/cmake/modules/FindRS3.cmake | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Installation/cmake/modules/FindRS3.cmake b/Installation/cmake/modules/FindRS3.cmake index 8147050a326..cb1cc2a082b 100644 --- a/Installation/cmake/modules/FindRS3.cmake +++ b/Installation/cmake/modules/FindRS3.cmake @@ -19,6 +19,7 @@ if( MPFI_FOUND ) ENV RS_INC_DIR ENV RS_DIR PATH_SUFFIXES include + PATHS ${RS_INCLUDE_DIR} DOC "The directory containing the RS3 include files" ) @@ -30,6 +31,7 @@ if( MPFI_FOUND ) ENV RS_LIB_DIR ENV RS_DIR PATH_SUFFIXES lib + PATHS ${RS_LIBRARIES_DIR} DOC "Path to the RS3 library" ) From d3d82afd4abe1d14c77a74e7d8688d545f4250b1 Mon Sep 17 00:00:00 2001 From: Alexander Kobel Date: Thu, 4 Oct 2012 12:07:42 +0000 Subject: [PATCH 040/157] automatically add -ffriend-injection, -fno-strict-aliasing, -lX11 as required for LEDA --- Installation/cmake/modules/CGAL_UseLEDA.cmake | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/Installation/cmake/modules/CGAL_UseLEDA.cmake b/Installation/cmake/modules/CGAL_UseLEDA.cmake index 3b641e8b496..31394fe9d8d 100644 --- a/Installation/cmake/modules/CGAL_UseLEDA.cmake +++ b/Installation/cmake/modules/CGAL_UseLEDA.cmake @@ -22,6 +22,23 @@ if ( LEDA_FOUND AND NOT LEDA_SETUP ) link_libraries( ${LEDA_LIBRARIES} ) endif() + if ( CMAKE_COMPILER_IS_GNUCXX ) + get_dependency_version (GCC) + if ( NOT "${GCC_VERSION}" VERSION_LESS "4.1" ) + message( STATUS "Using LEDA with gcc version 4.1 or later. Adding -ffriend-injection" ) + uniquely_add_flags (CMAKE_CXX_FLAGS "-ffriend-injection") + endif() + if ( NOT "${GCC_VERSION}" VERSION_LESS "4.4" ) + message( STATUS "Using LEDA with gcc version 4.4 or later. Adding -fno-strict-aliasing" ) + uniquely_add_flags (CMAKE_CXX_FLAGS "-fno-strict-aliasing") + endif() + if ( UNIX ) + message( STATUS "Using LEDA with gcc on *nix. Adding -lX11" ) + uniquely_add_flags( CMAKE_SHARED_LINKER_FLAGS "-lX11" ) + uniquely_add_flags( CMAKE_MODULE_LINKER_FLAGS "-lX11" ) + endif() + endif() + uniquely_add_flags( CMAKE_CXX_FLAGS ${LEDA_CXX_FLAGS} ) uniquely_add_flags( CMAKE_SHARED_LINKER_FLAGS ${LEDA_LINKER_FLAGS} ) uniquely_add_flags( CMAKE_MODULE_LINKER_FLAGS ${LEDA_LINKER_FLAGS} ) From 284de86348bf6f577a3f8e4e8b232bc49106fb43 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 4 Oct 2012 12:43:28 +0000 Subject: [PATCH 041/157] A change to that file was commited by error. Culprit revision: | ------------------------------------------------------------------------ | r72283 | lrineau | 2012-09-21 14:55:27 +0200 (Fri, 21 Sep 2012) | 1 line | Changed paths: | M /branches/next/Mesh_3/test/Mesh_3 | M /branches/next/Mesh_3/test/Mesh_3/CMakeLists.txt | | svn:ignore | ------------------------------------------------------------------------ --- Mesh_3/test/Mesh_3/CMakeLists.txt | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/Mesh_3/test/Mesh_3/CMakeLists.txt b/Mesh_3/test/Mesh_3/CMakeLists.txt index 12b909c7e19..93e5f8d92c4 100644 --- a/Mesh_3/test/Mesh_3/CMakeLists.txt +++ b/Mesh_3/test/Mesh_3/CMakeLists.txt @@ -5,15 +5,13 @@ project( Mesh_3_test ) cmake_minimum_required(VERSION 2.6.2) -if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}" VERSION_GREATER 2.6) - if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3) - cmake_policy(VERSION 2.8.4) - else() - cmake_policy(VERSION 2.6) - endif() +if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR_VERSION}.${CMAKE_PATCH_VERSION}" VERSION_GREATER 2.8.3) + cmake_policy(VERSION 2.8.4) +else() + cmake_policy(VERSION 2.6) endif() -find_package(CGAL QUIET COMPONENTS Core ) +find_package(CGAL QUIET COMPONENTS Core ImageIO) if ( CGAL_FOUND ) @@ -21,17 +19,21 @@ if ( CGAL_FOUND ) include( CGAL_CreateSingleSourceCGALProgram ) - include_directories (BEFORE "../../include") + include_directories (BEFORE ../../include) + include_directories (BEFORE ../../../AABB_tree/include) create_single_source_cgal_program( "test_backward_compatibility_MeshFoobarCriteria_3.cpp" ) create_single_source_cgal_program( "test_boost_has_xxx.cpp" ) create_single_source_cgal_program( "test_c3t3.cpp" ) create_single_source_cgal_program( "test_c3t3_with_features.cpp" ) create_single_source_cgal_program( "test_criteria.cpp" ) - create_single_source_cgal_program( "test_dihedral_angle.cpp" ) create_single_source_cgal_program( "test_domain_with_polyline_features.cpp" ) create_single_source_cgal_program( "test_mesh_criteria_creation.cpp" ) - create_single_source_cgal_program( "test_meshing_3D_image.cpp" ) + if(CGAL_ImageIO_USE_ZLIB) + create_single_source_cgal_program( "test_meshing_3D_image.cpp" ) + else() + message(STATUS "test_meshing_3D_image requires the ZLIB library, and will not be compiled.") + endif() create_single_source_cgal_program( "test_meshing_implicit_function.cpp" ) create_single_source_cgal_program( "test_meshing_polyhedron.cpp" ) create_single_source_cgal_program( "test_meshing_polyhedron_with_features.cpp" ) From 461a23478ddf3b4d9f30e7330c0649c986c9d38b Mon Sep 17 00:00:00 2001 From: Alexander Kobel Date: Thu, 4 Oct 2012 13:28:51 +0000 Subject: [PATCH 042/157] move detection whether additional LEDA flags are necessary to FindLEDA stage only apply includes if UseLEDA is called --- Installation/cmake/modules/CGAL_UseLEDA.cmake | 23 +++++++------------ Installation/cmake/modules/FindLEDA.cmake | 20 ++++++++++++++++ 2 files changed, 28 insertions(+), 15 deletions(-) diff --git a/Installation/cmake/modules/CGAL_UseLEDA.cmake b/Installation/cmake/modules/CGAL_UseLEDA.cmake index 31394fe9d8d..7e1d11001bb 100644 --- a/Installation/cmake/modules/CGAL_UseLEDA.cmake +++ b/Installation/cmake/modules/CGAL_UseLEDA.cmake @@ -22,21 +22,14 @@ if ( LEDA_FOUND AND NOT LEDA_SETUP ) link_libraries( ${LEDA_LIBRARIES} ) endif() - if ( CMAKE_COMPILER_IS_GNUCXX ) - get_dependency_version (GCC) - if ( NOT "${GCC_VERSION}" VERSION_LESS "4.1" ) - message( STATUS "Using LEDA with gcc version 4.1 or later. Adding -ffriend-injection" ) - uniquely_add_flags (CMAKE_CXX_FLAGS "-ffriend-injection") - endif() - if ( NOT "${GCC_VERSION}" VERSION_LESS "4.4" ) - message( STATUS "Using LEDA with gcc version 4.4 or later. Adding -fno-strict-aliasing" ) - uniquely_add_flags (CMAKE_CXX_FLAGS "-fno-strict-aliasing") - endif() - if ( UNIX ) - message( STATUS "Using LEDA with gcc on *nix. Adding -lX11" ) - uniquely_add_flags( CMAKE_SHARED_LINKER_FLAGS "-lX11" ) - uniquely_add_flags( CMAKE_MODULE_LINKER_FLAGS "-lX11" ) - endif() + if (LEDA_CGAL_FRIEND_INJECTION) + message( STATUS "${LEDA_CGAL_FRIEND_INJECTION}" ) + endif() + if (LEDA_CGAL_NO_STRICT_ALIASING) + message( STATUS "${LEDA_CGAL_NO_STRICT_ALIASING}" ) + endif() + if (LEDA_CGAL_LINK_X11) + message( STATUS "${LEDA_CGAL_LINK_X11}" ) endif() uniquely_add_flags( CMAKE_CXX_FLAGS ${LEDA_CXX_FLAGS} ) diff --git a/Installation/cmake/modules/FindLEDA.cmake b/Installation/cmake/modules/FindLEDA.cmake index 32ff155b3fa..5e0f425d34a 100644 --- a/Installation/cmake/modules/FindLEDA.cmake +++ b/Installation/cmake/modules/FindLEDA.cmake @@ -89,6 +89,26 @@ endif() if ( LEDA_INCLUDE_DIR AND LEDA_LIBRARIES) set(LEDA_FOUND TRUE) + + if ( CMAKE_COMPILER_IS_GNUCXX ) + get_dependency_version (GCC) + if ( NOT "${GCC_VERSION}" VERSION_LESS "4.1" ) + set(LEDA_CGAL_FRIEND_INJECTION TRUE) + typed_cache_set( STRING "Add -ffriend-injection on gcc >= 4.1" LEDA_CGAL_FRIEND_INJECTION "Using LEDA with gcc version 4.1 or later: Adding -ffriend-injection") + uniquely_add_flags (LEDA_CXX_FLAGS "-ffriend-injection") + endif() + if ( NOT "${GCC_VERSION}" VERSION_LESS "4.4" ) + set(LEDA_CGAL_NO_STRICT_ALIASING TRUE) + typed_cache_set( STRING "Add -fno-strict-aliasing on gcc >= 4.4" LEDA_CGAL_NO_STRICT_ALIASING "Using LEDA with gcc version 4.4 or later: Adding -fno-strict-aliasing") + uniquely_add_flags (LEDA_CXX_FLAGS "-fno-strict-aliasing") + endif() + if ( UNIX ) + set(LEDA_CGAL_LINK_X11 TRUE) + typed_cache_set( STRING "Link against X11 on *nix" LEDA_CGAL_LINK_X11 "Using LEDA with gcc on *nix: Adding -lX11") + uniquely_add_flags( LEDA_LINKER_FLAGS "-lX11" ) + endif() + endif() + set(LEDA_USE_FILE "CGAL_UseLEDA") endif() From 6b0bf6078cafe186eba266c9389c7476444a2cd6 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 4 Oct 2012 14:56:03 +0000 Subject: [PATCH 043/157] BUGFIX: backup points attributes before the call to c3t3.remove_from_complex C3t3::remove_from_complex modifies the in_dimension() of the vertex (That may have been a bug.) It is actually a merge from r72577 of /branches/features/Mesh_3-experimental-GF/Mesh_3 --- .../include/CGAL/Mesh_3/Protect_edges_sizing_field.h | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) 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 4605af80ba7..758e1ff4a73 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 @@ -845,6 +845,12 @@ change_ball_size(const Vertex_handle& v, const FT size) c3t3_.remove_from_complex(v,vit->first); } + + // Store point data + Index index = v->index(); + int dim = v->in_dimension(); + Bare_point p = v->point().point(); + // Remove v from corners boost::optional corner_index; if ( c3t3_.is_in_complex(v) ) @@ -852,12 +858,6 @@ change_ball_size(const Vertex_handle& v, const FT size) corner_index = c3t3_.corner_index(v); c3t3_.remove_from_complex(v); } - - // Store point data - Index index = v->index(); - int dim = v->in_dimension(); - Bare_point p = v->point().point(); - // Change v size c3t3_.triangulation().remove(v); Vertex_handle new_v = insert_point(p, size*size, dim, index); From 9230a787f18530bb14292412c296f83434aaf2ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 4 Oct 2012 21:46:27 +0000 Subject: [PATCH 045/157] typo in function names (missing _) --- .../Surface_mesh_simplification_ref/EdgeProfile.tex | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/EdgeProfile.tex b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/EdgeProfile.tex index 45406680a3a..d1f2b05de35 100644 --- a/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/EdgeProfile.tex +++ b/Surface_mesh_simplification/doc_tex/Surface_mesh_simplification_ref/EdgeProfile.tex @@ -46,10 +46,10 @@ This profile is used by the stop, cost and placement policies. \ccGlue \ccMethod{vertex_descriptor v1() const;}{The other vertex of the edge to be collapsed.} \ccGlue - \ccMethod{edge_descriptor v0v1() const;}{One of the directed edges corresponding to the undirected + \ccMethod{edge_descriptor v0_v1() const;}{One of the directed edges corresponding to the undirected edge being collapsed.} \ccGlue - \ccMethod{edge_descriptor v1v0() const;}{The other directed edge corresponding to the undirected + \ccMethod{edge_descriptor v1_v0() const;}{The other directed edge corresponding to the undirected edge being collapsed.} \ccGlue \ccMethod{Point const& p0() const;}{The point of vertex $v0$.} @@ -60,11 +60,11 @@ This profile is used by the stop, cost and placement policies. {If $v0v1$ belongs to a finite face (is not a border edge) the third vertex of that triangular face, a {\em null descriptor} otherwise.} \ccGlue - \ccMethod{edge_descriptor v1vL() const;} + \ccMethod{edge_descriptor v_1vL() const;} {If $v0v1$ belongs to a finite face (is not a border edge) the directed edge from $v1$ to $vL$, a {\em null descriptor} otherwise.} \ccGlue - \ccMethod{edge_descriptor vLv0() const;} + \ccMethod{edge_descriptor vL_v0() const;} {If $v0v1$ belongs to a finite face (is not a border edge) the directed edge from $vL$ to $v0$, a {\em null descriptor} otherwise.} \ccGlue @@ -72,11 +72,11 @@ This profile is used by the stop, cost and placement policies. {If $v1v0$ belongs to a finite face (is not a border edge) the third vertex of that triangular face, a {\em null descriptor} otherwise.} \ccGlue - \ccMethod{edge_descriptor v0vR() const;} + \ccMethod{edge_descriptor v0_vR() const;} {If $v1v0$ belongs to a finite face (is not a border edge) the directed edge from $v0$ to $vR$, a {\em null descriptor} otherwise.} \ccGlue - \ccMethod{edge_descriptor vRv1() const;} + \ccMethod{edge_descriptor vR_v1() const;} {If $v1v0$ belongs to a finite face (is not a border edge) the directed edge from $vR$ to $v1$, a {\em null descriptor} otherwise.} \ccGlue From 0a081c2abdb2b0bea62b774865f58fced137af6e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 12:21:44 +0000 Subject: [PATCH 046/157] Add an option to check the syntax of headers, individually. That feature can be enabled with g++, clang++, and icpc (intel). It could be implemented for MSVC, with the flag /Zs, but that is not yet done (and probably will not). The option is controlled by a CMake option, CGAL_ENABLE_CHECK_HEADERS, that is disabled by default. If that option is enabled by the user, then CMake will check if the compiler $CXX understand the syntax: $CXX -x c++ -fsyntax-only CGAL/header.h and send an error otherwise. Then phony targets will be created: - a target check_CGAL__header_h for each header , - a target check_pkg_ for each package , - and a target check_headers for the whole CGAL. Those new targets currently give a lot of compilation errors if CGAL_ENABLE_CHECK_HEADERS is enabled! + fix several missing includes in Mesh_2. --- Installation/CMakeLists.txt | 60 +++++++++++++++++++ .../config/support/test_syntaxonly.cpp | 0 Mesh_2/include/CGAL/Mesh_2/Refine_edges.h | 2 + Mesh_2/include/CGAL/Mesher_level.h | 2 + .../Triangulation_mesher_level_traits_3.h | 1 + 5 files changed, 65 insertions(+) create mode 100644 Installation/config/support/test_syntaxonly.cpp diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 35d9a874297..ce6725245f3 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -948,3 +948,63 @@ if( WITH_CPACK AND EXISTS "${CMAKE_ROOT}/Modules/CPack.cmake" ) endif() + +if ( CGAL_BRANCH_BUILD ) + option(CGAL_ENABLE_CHECK_HEADERS + "Enable the special targets \"check_pkg_headers\", and \"check_pkg__headers\" for each package" + FALSE) + + if(CGAL_ENABLE_CHECK_HEADERS) + + if(NOT DEFINED CGAL_CHECK_SYNTAX_ONLY) + execute_process(COMMAND + ${CMAKE_CXX_COMPILER} -x c++ -fsyntax-only ${CMAKE_CURRENT_SOURCE_DIR}/config/support/test_syntaxonly.cpp + ERROR_QUIET + RESULT_VARIABLE ok) + if(ok EQUAL 0) + set(CGAL_CHECK_SYNTAX_ONLY ON CACHE INTERNAL "") + else() + set(CGAL_CHECK_SYNTAX_ONLY OFF CACHE INTERNAL "") + endif() + endif(NOT DEFINED CGAL_CHECK_SYNTAX_ONLY) + + if(NOT CGAL_CHECK_SYNTAX_ONLY) + message(FATAL_ERROR "Your compiler does not seem to support -fsyntax-only. +You must disable CGAL_ENABLE_CHECK_HEADERS.") + endif() + + ## Fill the variable include_options with all the -I and -isystem options + set(include_options) + foreach (incdir ${CGAL_INCLUDE_DIRS}) + list(APPEND include_options "-I${incdir}") + endforeach() + foreach (incdir ${CGAL_3RD_PARTY_INCLUDE_DIRS}) + list(APPEND include_options "-isystem${incdir}") + endforeach() + include_directories ( SYSTEM ${CGAL_3RD_PARTY_INCLUDE_DIRS} ) + + ## Loop on package and headers + set(check_pkg_target_list) + foreach (package ${CGAL_CONFIGURED_PACKAGES_NAMES}) + if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include) + set(depends "") + file(GLOB_RECURSE ${package}_HEADERS + RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include" + "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/*.h") + foreach(header ${${package}_HEADERS}) + string(REPLACE "/" "__" header2 "${header}") + string(REPLACE "." "_" header2 "${header2}") + add_custom_target(check_${header2} + COMMAND ${CMAKE_CXX_COMPILER} ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_DEFINITIONS} ${include_options} -x c++ -fsyntax-only "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/${header}" + VERBATIM + COMMENT "Check header ${header}" + ) + list(APPEND depends check_${header2}) + endforeach() # look on headers + add_custom_target(check_pkg_${package}_headers DEPENDS ${depends}) + list(APPEND check_pkg_target_list check_pkg_${package}_headers) + endif() # if the package has an include directory + endforeach() # loop on packages + add_custom_target(check_headers DEPENDS ${check_pkg_target_list}) + endif() +endif( CGAL_BRANCH_BUILD ) diff --git a/Installation/config/support/test_syntaxonly.cpp b/Installation/config/support/test_syntaxonly.cpp new file mode 100644 index 00000000000..e69de29bb2d diff --git a/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h b/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h index 0ceb0ad7793..363bfefdb65 100644 --- a/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h +++ b/Mesh_2/include/CGAL/Mesh_2/Refine_edges.h @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include #include diff --git a/Mesh_2/include/CGAL/Mesher_level.h b/Mesh_2/include/CGAL/Mesher_level.h index 8e0c46ff335..5ba8f158ef2 100644 --- a/Mesh_2/include/CGAL/Mesher_level.h +++ b/Mesh_2/include/CGAL/Mesher_level.h @@ -21,6 +21,8 @@ #ifndef CGAL_MESHER_LEVEL_H #define CGAL_MESHER_LEVEL_H +#include + namespace CGAL { enum Mesher_level_conflict_status { diff --git a/Mesh_2/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h b/Mesh_2/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h index f8195ba3678..35dab457521 100644 --- a/Mesh_2/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h +++ b/Mesh_2/include/CGAL/Meshes/Triangulation_mesher_level_traits_3.h @@ -24,6 +24,7 @@ #include #include #include +#include namespace CGAL { From e062c5f9e53d22839598030a41ec341e88942bbf Mon Sep 17 00:00:00 2001 From: Alexander Kobel Date: Fri, 5 Oct 2012 12:40:10 +0000 Subject: [PATCH 047/157] fixed PATH_SUFFIXES inconsistencies: - proper indentation - merge double occurences - standardize location at the end block, before DOC tested with GMP(XX), MPFR, MPFI, LEDA, RS(3), NTL and a (small) number of ways to specify library locations via environment and CMake variables, on Debian 64bit --- Installation/cmake/modules/CGAL_UseLEDA.cmake | 1 - Installation/cmake/modules/FindESBTL.cmake | 2 +- Installation/cmake/modules/FindEigen3.cmake | 3 +-- Installation/cmake/modules/FindGMP.cmake | 4 ++-- Installation/cmake/modules/FindGMPXX.cmake | 4 ++-- Installation/cmake/modules/FindLEDA.cmake | 6 +++--- Installation/cmake/modules/FindMPFI.cmake | 4 ++-- Installation/cmake/modules/FindMPFR.cmake | 6 +++--- Installation/cmake/modules/FindNTL.cmake | 4 ++-- Installation/cmake/modules/FindRS.cmake | 4 ++-- Installation/cmake/modules/FindRS3.cmake | 6 ++---- Installation/cmake/modules/FindTAUCS.cmake | 10 +++------- 12 files changed, 23 insertions(+), 31 deletions(-) diff --git a/Installation/cmake/modules/CGAL_UseLEDA.cmake b/Installation/cmake/modules/CGAL_UseLEDA.cmake index 7e1d11001bb..cca9859f03a 100644 --- a/Installation/cmake/modules/CGAL_UseLEDA.cmake +++ b/Installation/cmake/modules/CGAL_UseLEDA.cmake @@ -40,4 +40,3 @@ if ( LEDA_FOUND AND NOT LEDA_SETUP ) set ( LEDA_SETUP TRUE ) endif() - diff --git a/Installation/cmake/modules/FindESBTL.cmake b/Installation/cmake/modules/FindESBTL.cmake index 73db2463c39..cae5dd8681f 100644 --- a/Installation/cmake/modules/FindESBTL.cmake +++ b/Installation/cmake/modules/FindESBTL.cmake @@ -14,9 +14,9 @@ else() NAMES ESBTL/default.h HINTS ENV ESBTL_INC_DIR ENV ESBTL_DIR - PATH_SUFFIXES include /usr/include /usr/local/include + PATH_SUFFIXES include DOC "The directory containing the ESBTL header files WITHOUT the ESBTL prefix" ) diff --git a/Installation/cmake/modules/FindEigen3.cmake b/Installation/cmake/modules/FindEigen3.cmake index 36d008f6bd8..6b259f68ea2 100644 --- a/Installation/cmake/modules/FindEigen3.cmake +++ b/Installation/cmake/modules/FindEigen3.cmake @@ -74,9 +74,8 @@ else (EIGEN3_INCLUDE_DIR) find_path(EIGEN3_INCLUDE_DIR NAMES signature_of_eigen3_matrix_library HINTS ENV EIGEN3_INC_DIR ENV EIGEN3_DIR - PATH_SUFFIXES include PATHS ${KDE4_INCLUDE_DIR} - PATH_SUFFIXES eigen3 eigen + PATH_SUFFIXES include eigen3 eigen ) if(EIGEN3_INCLUDE_DIR) diff --git a/Installation/cmake/modules/FindGMP.cmake b/Installation/cmake/modules/FindGMP.cmake index 8accb1fd3e7..11f1add0ae9 100644 --- a/Installation/cmake/modules/FindGMP.cmake +++ b/Installation/cmake/modules/FindGMP.cmake @@ -31,8 +31,8 @@ else() NAMES gmp.h HINTS ENV GMP_INC_DIR ENV GMP_DIR - PATH_SUFFIXES include ${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/include + PATH_SUFFIXES include DOC "The directory containing the GMP header files" ) @@ -43,8 +43,8 @@ else() find_library(GMP_LIBRARIES NAMES gmp libgmp-10 HINTS ENV GMP_LIB_DIR ENV GMP_DIR - PATH_SUFFIXES lib ${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/lib + PATH_SUFFIXES lib DOC "Path to the GMP library" ) diff --git a/Installation/cmake/modules/FindGMPXX.cmake b/Installation/cmake/modules/FindGMPXX.cmake index d5969e9ea08..f851cd90343 100644 --- a/Installation/cmake/modules/FindGMPXX.cmake +++ b/Installation/cmake/modules/FindGMPXX.cmake @@ -20,16 +20,16 @@ if(WITH_GMP AND GMP_FOUND) find_path(GMPXX_INCLUDE_DIR NAMES gmpxx.h HINTS ENV GMPXX_INC_DIR ENV GMPXX_DIR - PATH_SUFFIXES include ${GMP_INCLUDE_DIR_SEARCH} + PATH_SUFFIXES include DOC "The directory containing the GMPXX include files" ) find_library(GMPXX_LIBRARIES NAMES gmpxx HINTS ENV GMPXX_LIB_DIR ENV GMPXX_DIR - PATH_SUFFIXES lib ${GMP_LIBRARIES_DIR_SEARCH} + PATH_SUFFIXES lib DOC "Path to the GMPXX library" ) diff --git a/Installation/cmake/modules/FindLEDA.cmake b/Installation/cmake/modules/FindLEDA.cmake index 5e0f425d34a..f65cbe38ad0 100644 --- a/Installation/cmake/modules/FindLEDA.cmake +++ b/Installation/cmake/modules/FindLEDA.cmake @@ -8,21 +8,21 @@ else() NAMES "LEDA/basic.h" "LEDA/system/basic.h" HINTS ENV LEDA_INC_DIR ENV LEDA_DIR - PATH_SUFFIXES incl + PATH_SUFFIXES incl DOC "The directory containing the LEDA header files WITHOUT the LEDA prefix" ) find_library(LEDA_LIBRARY_RELEASE NAMES "leda" HINTS ENV LEDA_LIB_DIR ENV LEDA_DIR -# PATH_SUFFIXES lib +# PATH_SUFFIXES lib DOC "Path to the LEDA library" ) find_library(LEDA_LIBRARY_DEBUG NAMES "ledaD" HINTS ENV LEDA_LIB_DIR ENV LEDA_DIR -# PATH_SUFFIXES lib +# PATH_SUFFIXES lib DOC "Path to the LEDA library" ) diff --git a/Installation/cmake/modules/FindMPFI.cmake b/Installation/cmake/modules/FindMPFI.cmake index f76fab7a538..630227c99d5 100644 --- a/Installation/cmake/modules/FindMPFI.cmake +++ b/Installation/cmake/modules/FindMPFI.cmake @@ -9,16 +9,16 @@ if( GMP_FOUND ) find_path(MPFI_INCLUDE_DIR NAMES mpfi.h HINTS ENV MPFI_INC_DIR ENV MPFI_DIR - PATH_SUFFIXES include PATHS ${GMP_INCLUDE_DIR_SEARCH} + PATH_SUFFIXES include DOC "The directory containing the MPFI header files" ) find_library(MPFI_LIBRARIES NAMES mpfi HINTS ENV MPFI_LIB_DIR ENV MPFI_DIR - PATH_SUFFIXES lib PATHS ${GMP_LIBRARIES_DIR_SEARCH} + PATH_SUFFIXES lib DOC "Directory containing the MPFI library" ) diff --git a/Installation/cmake/modules/FindMPFR.cmake b/Installation/cmake/modules/FindMPFR.cmake index 485c6171b9f..c01948fb188 100644 --- a/Installation/cmake/modules/FindMPFR.cmake +++ b/Installation/cmake/modules/FindMPFR.cmake @@ -30,9 +30,9 @@ else() NAMES mpfr.h HINTS ENV MPFR_INC_DIR ENV MPFR_DIR - PATH_SUFFIXES include ${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/include - DOC "The directory containing the MPFR header files" + PATH_SUFFIXES include + DOC "The directory containing the MPFR header files" ) if ( MPFR_INCLUDE_DIR STREQUAL "${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/include" ) @@ -42,8 +42,8 @@ else() find_library(MPFR_LIBRARIES NAMES mpfr libmpfr-4 libmpfr-1 HINTS ENV MPFR_LIB_DIR ENV MPFR_DIR - PATH_SUFFIXES lib ${CGAL_INSTALLATION_PACKAGE_DIR}/auxiliary/gmp/lib + PATH_SUFFIXES lib DOC "Path to the MPFR library" ) diff --git a/Installation/cmake/modules/FindNTL.cmake b/Installation/cmake/modules/FindNTL.cmake index 8be88eab624..7342e7e7bc1 100644 --- a/Installation/cmake/modules/FindNTL.cmake +++ b/Installation/cmake/modules/FindNTL.cmake @@ -26,7 +26,7 @@ else( (TARGET CGAL AND NOT WITH_GMP) OR NOT GMP_FOUND ) NAMES NTL/ZZ.h HINTS ENV NTL_INC_DIR ENV NTL_DIR - PATH_SUFFIXES include + PATH_SUFFIXES include DOC "The directory containing the NTL include files" ) @@ -34,7 +34,7 @@ else( (TARGET CGAL AND NOT WITH_GMP) OR NOT GMP_FOUND ) NAMES ntl HINTS ENV NTL_LIB_DIR ENV NTL_DIR - PATH_SUFFIXES lib + PATH_SUFFIXES lib DOC "Path to the NTL library" ) diff --git a/Installation/cmake/modules/FindRS.cmake b/Installation/cmake/modules/FindRS.cmake index 7ac4c68cabb..892058a0138 100644 --- a/Installation/cmake/modules/FindRS.cmake +++ b/Installation/cmake/modules/FindRS.cmake @@ -17,7 +17,7 @@ if( MPFI_FOUND ) NAMES rs_exports.h HINTS ENV RS_INC_DIR ENV RS_DIR - PATH_SUFFIXES include + PATH_SUFFIXES include DOC "The directory containing the RS include files" ) @@ -25,7 +25,7 @@ if( MPFI_FOUND ) NAMES rsexport_rs HINTS ENV RS_LIB_DIR ENV RS_DIR - PATH_SUFFIXES lib + PATH_SUFFIXES lib DOC "Path to the RS library" ) diff --git a/Installation/cmake/modules/FindRS3.cmake b/Installation/cmake/modules/FindRS3.cmake index cb1cc2a082b..9764b5e04d9 100644 --- a/Installation/cmake/modules/FindRS3.cmake +++ b/Installation/cmake/modules/FindRS3.cmake @@ -15,11 +15,10 @@ if( MPFI_FOUND ) NAMES rs3_fncts.h HINTS ENV RS3_INC_DIR ENV RS3_DIR - PATH_SUFFIXES include ENV RS_INC_DIR ENV RS_DIR - PATH_SUFFIXES include PATHS ${RS_INCLUDE_DIR} + PATH_SUFFIXES include DOC "The directory containing the RS3 include files" ) @@ -27,11 +26,10 @@ if( MPFI_FOUND ) NAMES rs3 HINTS ENV RS3_LIB_DIR ENV RS3_DIR - PATH_SUFFIXES lib ENV RS_LIB_DIR ENV RS_DIR - PATH_SUFFIXES lib PATHS ${RS_LIBRARIES_DIR} + PATH_SUFFIXES lib DOC "Path to the RS3 library" ) diff --git a/Installation/cmake/modules/FindTAUCS.cmake b/Installation/cmake/modules/FindTAUCS.cmake index 56ad8eed095..d6625e7471c 100644 --- a/Installation/cmake/modules/FindTAUCS.cmake +++ b/Installation/cmake/modules/FindTAUCS.cmake @@ -53,11 +53,9 @@ else() find_path(TAUCS_INCLUDE_DIR NAMES taucs.h HINTS ${CGAL_TAUCS_INCLUDE_DIR} - PATH_SUFFIXES taucs ENV TAUCS_DIR - PATH_SUFFIXES include ENV TAUCS_INC_DIR - PATH_SUFFIXES taucs + PATH_SUFFIXES taucs include ) endif() @@ -71,18 +69,16 @@ else() NAMES "taucs" PATHS ${CGAL_TAUCS_LIBRARIES_DIR} ENV TAUCS_DIR - PATH_SUFFIXES lib ENV TAUCS_LIB_DIR - PATH_SUFFIXES taucs + PATH_SUFFIXES taucs lib DOC "TAUCS library" ) find_library(METIS_LIBRARY NAMES "metis" PATHS ${CGAL_TAUCS_LIBRARIES_DIR} ENV TAUCS - PATH_SUFFIXES lib ENV TAUCS_LIB_DIR - PATH_SUFFIXES taucs + PATH_SUFFIXES taucs lib DOC "Metis library" ) if(TAUCS_LIBRARY AND METIS_LIBRARY) From 7618e75092447539f48cb71b5231d42373a4cb46 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 12:58:58 +0000 Subject: [PATCH 048/157] Replace phony targets check_* by real targets That way the check is not redone for file that already passed the check. --- Installation/CMakeLists.txt | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index ce6725245f3..407d969d9ac 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -994,8 +994,10 @@ You must disable CGAL_ENABLE_CHECK_HEADERS.") foreach(header ${${package}_HEADERS}) string(REPLACE "/" "__" header2 "${header}") string(REPLACE "." "_" header2 "${header2}") - add_custom_target(check_${header2} + add_custom_command(OUTPUT check_${header2} COMMAND ${CMAKE_CXX_COMPILER} ${CGAL_3RD_PARTY_DEFINITIONS} ${CGAL_DEFINITIONS} ${include_options} -x c++ -fsyntax-only "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/${header}" + COMMAND ${CMAKE_COMMAND} -E touch check_${header2} + DEPENDS "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/${header}" VERBATIM COMMENT "Check header ${header}" ) From 2eea24531f1d9b1d0c1d70327f42ab8214a54b7b Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 13:18:03 +0000 Subject: [PATCH 049/157] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index 7300c601801..8ba8eb6a2c6 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -19,9 +19,9 @@ # "next" alone 0 21 * * Sat cd $HOME/CGAL/create_internal_release && $HOME/bin/create_release $HOME/CGAL/next --public --do-it # "next" + candidates -0 21 * * Mon,Tue,Wed,Thu cd $HOME/CGAL/create_internal_release && $HOME/bin/create_release $HOME/CGAL/next $HOME/CGAL/candidate-packages --public --do-it +0 21 * * Mon,Tue,Wed,Thu,Fri cd $HOME/CGAL/create_internal_release && $HOME/bin/create_release $HOME/CGAL/next $HOME/CGAL/candidate-packages --public --do-it # from branch 4.1 -0 21 * * Sun,Fri cd $HOME/CGAL/create_internal_release-4.1-branch && $HOME/bin/create_release $HOME/CGAL/CGAL-4.1-branch --public --do-it +0 21 * * Sun cd $HOME/CGAL/create_internal_release-4.1-branch && $HOME/bin/create_release $HOME/CGAL/CGAL-4.1-branch --public --do-it # Try to launch the test suite, every 10mn, from 21:00 to 22:50 From 8b10a56f36062a5597241d8d63ee88a35fd92346 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 13:30:04 +0000 Subject: [PATCH 050/157] Rename a test to avoid a conflict There was target name conflict with test/Arrangement_on_surface_2/point_location.cpp --- .gitignore | 6 ++++++ .../Nef_2/{point_location.cpp => nef_2_point_location.cpp} | 0 2 files changed, 6 insertions(+) rename Nef_2/test/Nef_2/{point_location.cpp => nef_2_point_location.cpp} (100%) diff --git a/.gitignore b/.gitignore index a0b68f34016..79d2f91ad65 100644 --- a/.gitignore +++ b/.gitignore @@ -695,6 +695,12 @@ Modular_arithmetic/doc_tex/Modular_arithmetic/*.aux Modular_arithmetic/doc_tex/Modular_arithmetic/*.hax Modular_arithmetic/doc_tex/Modular_arithmetic_ref/main.aux Modular_arithmetic/doc_tex/Modular_arithmetic_ref/main.hax +Nef_2/test/Nef_2/CMakeLists.txt +Nef_2/test/Nef_2/EPoint-test +Nef_2/test/Nef_2/Nef_polyhedron_2-test +Nef_2/test/Nef_2/Polynomial-test +Nef_2/test/Nef_2/cgal_test_with_cmake +Nef_2/test/Nef_2/nef_2_point_location Nef_3/demo/Nef_3/Makefile Nef_3/examples/Nef_3/Makefile Nef_3/examples/Nef_3/comparison diff --git a/Nef_2/test/Nef_2/point_location.cpp b/Nef_2/test/Nef_2/nef_2_point_location.cpp similarity index 100% rename from Nef_2/test/Nef_2/point_location.cpp rename to Nef_2/test/Nef_2/nef_2_point_location.cpp From bdbe6745dc61fedd3ed22cae0994100815232d98 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 14:08:47 +0000 Subject: [PATCH 051/157] Rename a test to avoid a conflict There was target name conflict with test/Algebraic_foundations/Coercion_traits.cpp --- .gitignore | 3 +++ Number_types/test/Number_types/CMakeLists.txt | 2 +- .../{Coercion_traits.cpp => test_nt_Coercion_traits.cpp} | 0 3 files changed, 4 insertions(+), 1 deletion(-) rename Number_types/test/Number_types/{Coercion_traits.cpp => test_nt_Coercion_traits.cpp} (100%) diff --git a/.gitignore b/.gitignore index 79d2f91ad65..15f3477f244 100644 --- a/.gitignore +++ b/.gitignore @@ -761,6 +761,7 @@ Number_types/test/Number_types/cgal_test_with_cmake Number_types/test/Number_types/constant Number_types/test/Number_types/double Number_types/test/Number_types/doubletst +Number_types/test/Number_types/eigen Number_types/test/Number_types/float Number_types/test/Number_types/floattst Number_types/test/Number_types/int @@ -780,7 +781,9 @@ Number_types/test/Number_types/quotient_io Number_types/test/Number_types/root_of_2 Number_types/test/Number_types/rounding_modes Number_types/test/Number_types/simplest_rational +Number_types/test/Number_types/test_nt_Coercion_traits Number_types/test/Number_types/to_interval_test +Number_types/test/Number_types/unsigned Number_types/test/Number_types/utilities Optimisation_basic/*.aux Optimisation_basic/*.bbl diff --git a/Number_types/test/Number_types/CMakeLists.txt b/Number_types/test/Number_types/CMakeLists.txt index 72cf17b8246..a533cf60d24 100644 --- a/Number_types/test/Number_types/CMakeLists.txt +++ b/Number_types/test/Number_types/CMakeLists.txt @@ -81,7 +81,7 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "Gmpfi.cpp" ) create_single_source_cgal_program( "Gmpfr_bug.cpp" ) create_single_source_cgal_program( "Quotient_new.cpp" ) - create_single_source_cgal_program( "Coercion_traits.cpp" ) + create_single_source_cgal_program( "test_nt_Coercion_traits.cpp" ) else( CGAL_FOUND ) diff --git a/Number_types/test/Number_types/Coercion_traits.cpp b/Number_types/test/Number_types/test_nt_Coercion_traits.cpp similarity index 100% rename from Number_types/test/Number_types/Coercion_traits.cpp rename to Number_types/test/Number_types/test_nt_Coercion_traits.cpp From 7e6972d819c49a4881f26b94d630329d8dd98787 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 14:13:53 +0000 Subject: [PATCH 052/157] Rename two tests to avoid conflicts There was target name conflicts with test/Algebraic_foundations/Coercion_traits.cpp and test/Arithmetic_kernel/Get_arithmetic_kernel.cpp --- .gitattributes | 4 ++-- .gitignore | 21 +++++++++++++++++++ ...pp => test_polynomial_Coercion_traits.cpp} | 0 ...test_polynomial_Get_arithmetic_kernel.cpp} | 0 4 files changed, 23 insertions(+), 2 deletions(-) rename Polynomial/test/Polynomial/{Coercion_traits.cpp => test_polynomial_Coercion_traits.cpp} (100%) rename Polynomial/test/Polynomial/{Get_arithmetic_kernel.cpp => test_polynomial_Get_arithmetic_kernel.cpp} (100%) diff --git a/.gitattributes b/.gitattributes index c3c114c125b..ba3adeeaea8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3371,12 +3371,12 @@ Polynomial/include/CGAL/Polynomial/sturm_habicht_sequence.h -text Polynomial/include/CGAL/Polynomial/subresultants.h -text Polynomial/include/CGAL/Polynomial_type_generator.h -text Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h -text -Polynomial/test/Polynomial/Coercion_traits.cpp -text -Polynomial/test/Polynomial/Get_arithmetic_kernel.cpp -text Polynomial/test/Polynomial/Polynomial_type_generator.cpp -text Polynomial/test/Polynomial/polynomial_utils.cpp -text Polynomial/test/Polynomial/sturm_habicht_sequence.cpp -text Polynomial/test/Polynomial/subresultants.cpp -text +Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp -text +Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp -text Polytope_distance_d/doc_tex/Polytope_distance_d/dist.png -text Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.gif -text svneol=unset#image/gif Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.pdf -text svneol=unset#application/pdf diff --git a/.gitignore b/.gitignore index 15f3477f244..a10a28da813 100644 --- a/.gitignore +++ b/.gitignore @@ -906,6 +906,27 @@ Polynomial/doc_tex/Polynomial/main.aux Polynomial/doc_tex/Polynomial/main.hax Polynomial/doc_tex/Polynomial_ref/main.aux Polynomial/doc_tex/Polynomial_ref/main.hax +Polynomial/test/Polynomial/CMakeLists.txt +Polynomial/test/Polynomial/Exponent_vector +Polynomial/test/Polynomial/Interpolator +Polynomial/test/Polynomial/Polynomial_traits_d +Polynomial/test/Polynomial/Polynomial_type_generator +Polynomial/test/Polynomial/Polynomial_using_core +Polynomial/test/Polynomial/Polynomial_using_leda +Polynomial/test/Polynomial/cgal_test_with_cmake +Polynomial/test/Polynomial/modular_gcd_utcf_algorithm_M +Polynomial/test/Polynomial/modular_gcd_utcf_dfai +Polynomial/test/Polynomial/modular_gcd_utcf_pure_wang +Polynomial/test/Polynomial/modular_gcd_utcf_with_wang +Polynomial/test/Polynomial/modular_gcd_utils +Polynomial/test/Polynomial/polynomial_functions +Polynomial/test/Polynomial/polynomial_gcd +Polynomial/test/Polynomial/polynomial_utils +Polynomial/test/Polynomial/resultant +Polynomial/test/Polynomial/sturm_habicht_sequence +Polynomial/test/Polynomial/subresultants +Polynomial/test/Polynomial/test_polynomial_Coercion_traits +Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel Polytope_distance_d/*.aux Polytope_distance_d/*.bbl Polytope_distance_d/*.blg diff --git a/Polynomial/test/Polynomial/Coercion_traits.cpp b/Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp similarity index 100% rename from Polynomial/test/Polynomial/Coercion_traits.cpp rename to Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp diff --git a/Polynomial/test/Polynomial/Get_arithmetic_kernel.cpp b/Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp similarity index 100% rename from Polynomial/test/Polynomial/Get_arithmetic_kernel.cpp rename to Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp From cf87ecd497a7b253887162cfd63e174e59e43bf8 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 14:22:15 +0000 Subject: [PATCH 053/157] Rename a test to avoid a conflict There was a target name conflict with Triangulation_2/test_triangulation_tds.cpp --- .gitignore | 2 ++ ...{test_triangulation_tds.cpp => test_triangulation_tds_3.cpp} | 0 2 files changed, 2 insertions(+) rename Triangulation_3/test/Triangulation_3/{test_triangulation_tds.cpp => test_triangulation_tds_3.cpp} (100%) diff --git a/.gitignore b/.gitignore index a10a28da813..2035579991b 100644 --- a/.gitignore +++ b/.gitignore @@ -1301,10 +1301,12 @@ Triangulation_3/test/Triangulation_3/test_delaunay_hierarchy_3_old Triangulation_3/test/Triangulation_3/test_dt_deterministic_3 Triangulation_3/test/Triangulation_3/test_regular_3 Triangulation_3/test/Triangulation_3/test_regular_as_delaunay_3 +Triangulation_3/test/Triangulation_3/test_regular_insert_range_with_info Triangulation_3/test/Triangulation_3/test_regular_remove_3 Triangulation_3/test/Triangulation_3/test_regular_traits_3 Triangulation_3/test/Triangulation_3/test_simplex_3 Triangulation_3/test/Triangulation_3/test_static_filters Triangulation_3/test/Triangulation_3/test_triangulation_3 Triangulation_3/test/Triangulation_3/test_triangulation_tds +Triangulation_3/test/Triangulation_3/test_triangulation_tds_3 /build* diff --git a/Triangulation_3/test/Triangulation_3/test_triangulation_tds.cpp b/Triangulation_3/test/Triangulation_3/test_triangulation_tds_3.cpp similarity index 100% rename from Triangulation_3/test/Triangulation_3/test_triangulation_tds.cpp rename to Triangulation_3/test/Triangulation_3/test_triangulation_tds_3.cpp From 5c757a0a4d20fe8773cf1dd4dcb9110cf370a5fb Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 14:24:38 +0000 Subject: [PATCH 054/157] Fix/Improve all #include of all STL_Extension headers --- .gitignore | 1 + STL_Extension/include/CGAL/Fourtuple.h | 2 ++ STL_Extension/include/CGAL/Handle_for.h | 2 ++ STL_Extension/include/CGAL/Handle_for_virtual.h | 2 +- STL_Extension/include/CGAL/Iterator_project.h | 2 ++ STL_Extension/include/CGAL/Multiset.h | 1 + STL_Extension/include/CGAL/Sixtuple.h | 2 ++ STL_Extension/include/CGAL/Threetuple.h | 2 ++ STL_Extension/include/CGAL/Twotuple.h | 2 ++ STL_Extension/include/CGAL/function_objects.h | 2 ++ 10 files changed, 17 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 2035579991b..2f64a69ef0c 100644 --- a/.gitignore +++ b/.gitignore @@ -1001,6 +1001,7 @@ STL_Extension/test/STL_Extension/test_is_iterator STL_Extension/test/STL_Extension/test_is_streamable STL_Extension/test/STL_Extension/test_lexcompare_outputrange STL_Extension/test/STL_Extension/test_multiset +STL_Extension/test/STL_Extension/test_namespaces STL_Extension/test/STL_Extension/test_nth_element STL_Extension/test/STL_Extension/test_stl_extension STL_Extension/test/STL_Extension/test_type_traits diff --git a/STL_Extension/include/CGAL/Fourtuple.h b/STL_Extension/include/CGAL/Fourtuple.h index f96e8cb35f6..a4385679ef9 100644 --- a/STL_Extension/include/CGAL/Fourtuple.h +++ b/STL_Extension/include/CGAL/Fourtuple.h @@ -25,6 +25,8 @@ #ifndef CGAL_FOURTUPLE_H #define CGAL_FOURTUPLE_H +#include + #ifndef CGAL_NO_DEPRECATED_CODE namespace CGAL { diff --git a/STL_Extension/include/CGAL/Handle_for.h b/STL_Extension/include/CGAL/Handle_for.h index 8340f2359e8..fa589810da2 100644 --- a/STL_Extension/include/CGAL/Handle_for.h +++ b/STL_Extension/include/CGAL/Handle_for.h @@ -25,6 +25,8 @@ #ifndef CGAL_HANDLE_FOR_H #define CGAL_HANDLE_FOR_H +#include + #include #include #include diff --git a/STL_Extension/include/CGAL/Handle_for_virtual.h b/STL_Extension/include/CGAL/Handle_for_virtual.h index 1edc47ddd8d..34873917c85 100644 --- a/STL_Extension/include/CGAL/Handle_for_virtual.h +++ b/STL_Extension/include/CGAL/Handle_for_virtual.h @@ -26,7 +26,7 @@ #ifndef CGAL_HANDLE_FOR_VIRTUAL_H #define CGAL_HANDLE_FOR_VIRTUAL_H -#include +#include #include #include diff --git a/STL_Extension/include/CGAL/Iterator_project.h b/STL_Extension/include/CGAL/Iterator_project.h index 1c971a67bf7..7b2d8c9ef4d 100644 --- a/STL_Extension/include/CGAL/Iterator_project.h +++ b/STL_Extension/include/CGAL/Iterator_project.h @@ -27,6 +27,8 @@ #ifndef CGAL_ITERATOR_PROJECT_H #define CGAL_ITERATOR_PROJECT_H 1 +#include + namespace CGAL { // Relies on iterator traits. Quite simplified compared to earlier version. diff --git a/STL_Extension/include/CGAL/Multiset.h b/STL_Extension/include/CGAL/Multiset.h index 95eaca9a0e2..642bbcf1d15 100644 --- a/STL_Extension/include/CGAL/Multiset.h +++ b/STL_Extension/include/CGAL/Multiset.h @@ -25,6 +25,7 @@ #include #include #include +#include #include namespace CGAL { diff --git a/STL_Extension/include/CGAL/Sixtuple.h b/STL_Extension/include/CGAL/Sixtuple.h index a6fa181027c..c8c98c21697 100644 --- a/STL_Extension/include/CGAL/Sixtuple.h +++ b/STL_Extension/include/CGAL/Sixtuple.h @@ -25,6 +25,8 @@ #ifndef CGAL_SIXTUPLE_H #define CGAL_SIXTUPLE_H +#include + #ifndef CGAL_NO_DEPRECATED_CODE namespace CGAL { diff --git a/STL_Extension/include/CGAL/Threetuple.h b/STL_Extension/include/CGAL/Threetuple.h index a36e7fa6e6b..4dbe4920856 100644 --- a/STL_Extension/include/CGAL/Threetuple.h +++ b/STL_Extension/include/CGAL/Threetuple.h @@ -25,6 +25,8 @@ #ifndef CGAL_THREETUPLE_H #define CGAL_THREETUPLE_H +#include + #ifndef CGAL_NO_DEPRECATED_CODE namespace CGAL { diff --git a/STL_Extension/include/CGAL/Twotuple.h b/STL_Extension/include/CGAL/Twotuple.h index af5d834f753..4bfae8260ab 100644 --- a/STL_Extension/include/CGAL/Twotuple.h +++ b/STL_Extension/include/CGAL/Twotuple.h @@ -25,6 +25,8 @@ #ifndef CGAL_TWOTUPLE_H #define CGAL_TWOTUPLE_H +#include + #ifndef CGAL_NO_DEPRECATED_CODE namespace CGAL { diff --git a/STL_Extension/include/CGAL/function_objects.h b/STL_Extension/include/CGAL/function_objects.h index 3cabe354c14..aa2743a110d 100644 --- a/STL_Extension/include/CGAL/function_objects.h +++ b/STL_Extension/include/CGAL/function_objects.h @@ -29,6 +29,8 @@ #include +#include + namespace CGAL { template < class Value> From 2e656f35d1b3b8c1fdecb489eda9543fb55ae718 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 14:42:33 +0000 Subject: [PATCH 055/157] Rename examples/Arr_2/point_location.cpp to point_location_example.cpp There is a conflict with the same target in test/Arr_2/. As I do not know how to launch the Arr_2 test suite from a branch build, I prefer to rename the example instead of renaming the test. But I would have preferred the latter. --- .gitignore | 53 +++++++++++++++++++ .../Arrangement_on_surface_2/arr_queries.tex | 6 +-- ...ocation.cpp => point_location_example.cpp} | 0 3 files changed, 56 insertions(+), 3 deletions(-) rename Arrangement_on_surface_2/examples/Arrangement_on_surface_2/{point_location.cpp => point_location_example.cpp} (100%) diff --git a/.gitignore b/.gitignore index 2f64a69ef0c..25b92eaacfc 100644 --- a/.gitignore +++ b/.gitignore @@ -62,8 +62,61 @@ Arithmetic_kernel/test/Arithmetic_kernel/Get_arithmetic_kernel Arithmetic_kernel/test/Arithmetic_kernel/LEDA_arithmetic_kernel Arrangement_on_surface_2/examples/Arrangement_on_surface_2/Bezier_curves Arrangement_on_surface_2/examples/Arrangement_on_surface_2/CMakeLists.txt +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/aggregated_insertion +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_curves +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/algebraic_segments +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_ex_dcel_io.dat +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_ex_io.dat +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_ex_io_hist.dat +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/arr_ex_io_unbounded.dat +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/batched_point_location +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_dual_adapter +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bounded_planar_vertical_decomposition +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/cgal_test_with_cmake +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circles +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_arcs +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/circular_line_arcs +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/conic_multiplicities +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/conics +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/consolidated_curve_data +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/curve_history +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dcel_extension_io Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dual_lines +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/dual_with_data +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/edge_insertion +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/edge_manipulation +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/edge_manipulation_curve_history +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/face_extension_overlay +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/generic_curve_data +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/global_insertion +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/global_removal +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/incremental_insertion +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/io +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/io_curve_history +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/io_unbounded +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/isolated_vertices +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/observer +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/overlay_unbounded +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location_example +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/polylines +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/predefined_kernel_non_intersecting +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/rational_functions +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/rational_functions_rational_coefficients +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/special_edge_insertion +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/spherical_insert +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/sweep_line +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/tracing_counting +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unb_planar_vertical_decomposition +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unbounded_non_intersecting +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/unbounded_rational_functions +Arrangement_on_surface_2/examples/Arrangement_on_surface_2/vertical_ray_shooting Arrangement_on_surface_2/test/Arrangement_on_surface_2/CMakeLists.txt +Arrangement_on_surface_2/test/Arrangement_on_surface_2/test_point_location.cpp BGL/examples/BGL_arrangement_2/CMakeLists.txt BGL/examples/BGL_arrangement_2/Makefile BGL/examples/BGL_arrangement_2/cgal_test_with_cmake diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_queries.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_queries.tex index d42b57654bf..546559e867b 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_queries.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_queries.tex @@ -236,7 +236,7 @@ can be found in \ccc{point_location_utils.h}). It then employs the naive and the landmark strategies to issue several point-location queries on this arrangement: -\ccIncludeExampleCode{Arrangement_on_surface_2/point_location.cpp} +\ccIncludeExampleCode{Arrangement_on_surface_2/point_location_example.cpp} Note that the program uses the auxiliary \ccc{point_location_query()} function template to nicely print the @@ -316,7 +316,7 @@ void vertical_ray_shooting_query The following program uses the auxiliary function listed above to perform vertical ray-shooting queries on an arrangement. The arrangement and the query points are exactly the same as in -\ccc{point_location.cpp} (see Figure~\ref{arr_fig:ex_5}): +\ccc{point_location_example.cpp} (see Figure~\ref{arr_fig:ex_5}): \ccIncludeExampleCode{Arrangement_on_surface_2/vertical_ray_shooting.cpp} @@ -360,6 +360,6 @@ additional data structures. The following program issues a batched point-location query, which is essentially equivalent to the six separate queries performed in -\ccc{point_location.cpp} (see Section~\ref{arr_ssec:pl}): +\ccc{point_location_example.cpp} (see Section~\ref{arr_ssec:pl}): \ccIncludeExampleCode{Arrangement_on_surface_2/batched_point_location.cpp} diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location_example.cpp similarity index 100% rename from Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location.cpp rename to Arrangement_on_surface_2/examples/Arrangement_on_surface_2/point_location_example.cpp From 8564c188d6839e27b74833ea57255369d79931c3 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 14:45:47 +0000 Subject: [PATCH 056/157] Rename benchmark.cpp to benchmark_box_intersection.cpp There was another target of the same name. --- .gitignore | 7 +++++++ .../{benchmark.cpp => benchmark_box_intersection.cpp} | 0 2 files changed, 7 insertions(+) rename Box_intersection_d/test/Box_intersection_d/{benchmark.cpp => benchmark_box_intersection.cpp} (100%) diff --git a/.gitignore b/.gitignore index 25b92eaacfc..b9db30ac8c0 100644 --- a/.gitignore +++ b/.gitignore @@ -129,6 +129,13 @@ Boolean_set_operations_2/demo/Boolean_set_operations_2/*.sln Boolean_set_operations_2/demo/Boolean_set_operations_2/*.vcproj Boolean_set_operations_2/demo/Boolean_set_operations_2/Makefile Boolean_set_operations_2/demo/Boolean_set_operations_2/boolean_operations_2 +Box_intersection_d/test/Box_intersection_d/CMakeLists.txt +Box_intersection_d/test/Box_intersection_d/automated_test +Box_intersection_d/test/Box_intersection_d/benchmark.data +Box_intersection_d/test/Box_intersection_d/benchmark_box_intersection +Box_intersection_d/test/Box_intersection_d/box_grid +Box_intersection_d/test/Box_intersection_d/cgal_test_with_cmake +Box_intersection_d/test/Box_intersection_d/random_set_test CGAL_ImageIO/demo/CGALimageIO/Makefile CGAL_ImageIO/demo/CGALimageIO/cgal_test_with_cmake CGAL_ImageIO/demo/CGALimageIO/cmake_install.cmake diff --git a/Box_intersection_d/test/Box_intersection_d/benchmark.cpp b/Box_intersection_d/test/Box_intersection_d/benchmark_box_intersection.cpp similarity index 100% rename from Box_intersection_d/test/Box_intersection_d/benchmark.cpp rename to Box_intersection_d/test/Box_intersection_d/benchmark_box_intersection.cpp From d052891efbc327299d73508ed6a328c46c4c0c14 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 14:47:31 +0000 Subject: [PATCH 057/157] Rename box_grid.cpp There was another target of the same name in ../../examples --- .../test/Box_intersection_d/{box_grid.cpp => test_box_grid.cpp} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename Box_intersection_d/test/Box_intersection_d/{box_grid.cpp => test_box_grid.cpp} (100%) diff --git a/Box_intersection_d/test/Box_intersection_d/box_grid.cpp b/Box_intersection_d/test/Box_intersection_d/test_box_grid.cpp similarity index 100% rename from Box_intersection_d/test/Box_intersection_d/box_grid.cpp rename to Box_intersection_d/test/Box_intersection_d/test_box_grid.cpp From 5327785cc020fa1bef4839b5b5e3944790962f22 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 14:49:55 +0000 Subject: [PATCH 058/157] Rename combination_enumerator.cpp There was another target of the same name in ../../examples --- .gitattributes | 2 +- .gitignore | 2 ++ ...mbination_enumerator.cpp => test_combination_enumerator.cpp} | 0 3 files changed, 3 insertions(+), 1 deletion(-) rename Generator/test/Generator/{combination_enumerator.cpp => test_combination_enumerator.cpp} (100%) diff --git a/.gitattributes b/.gitattributes index ba3adeeaea8..31f1bae2f75 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1637,7 +1637,7 @@ Generator/doc_tex/Generator_ref/Combination_enumerator.tex -text Generator/examples/Generator/combination_enumerator.cpp -text Generator/examples/Generator/name_pairs.cpp -text Generator/include/CGAL/Combination_enumerator.h -text -Generator/test/Generator/combination_enumerator.cpp -text +Generator/test/Generator/test_combination_enumerator.cpp -text Geomview/demo/Geomview/CMakeLists.txt -text Geomview/doc_tex/Geomview/geomview.gif -text GraphicsView/GraphicsView.odp -text diff --git a/.gitignore b/.gitignore index b9db30ac8c0..299385adcaa 100644 --- a/.gitignore +++ b/.gitignore @@ -179,9 +179,11 @@ Generator/examples/Generator/random_segments1 Generator/examples/Generator/random_segments2 Generator/examples/Generator/sphere_d Generator/test/Generator/CMakeLists.txt +Generator/test/Generator/bug Generator/test/Generator/cgal_test_with_cmake Generator/test/Generator/random_poly_test Generator/test/Generator/rcs_test +Generator/test/Generator/test_combination_enumerator Generator/test/Generator/test_generators GraphicsView/TAGS GraphicsView/demo/Circular_kernel_2/*.exe diff --git a/Generator/test/Generator/combination_enumerator.cpp b/Generator/test/Generator/test_combination_enumerator.cpp similarity index 100% rename from Generator/test/Generator/combination_enumerator.cpp rename to Generator/test/Generator/test_combination_enumerator.cpp From ab866f899c95c0a8621120fe58a97425ef3d021e Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 15:00:03 +0000 Subject: [PATCH 059/157] Rename a test. There was another target of the same name in ../../examples --- .gitignore | 7 +++++++ .../{range_search.cpp => test_range_search.cpp} | 0 2 files changed, 7 insertions(+) rename Point_set_2/test/Point_set_2/{range_search.cpp => test_range_search.cpp} (100%) diff --git a/.gitignore b/.gitignore index 299385adcaa..e8fab52d062 100644 --- a/.gitignore +++ b/.gitignore @@ -886,6 +886,13 @@ Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_trian Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_triangulation_traits_H_3 Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_triangulation_traits_SC_3 Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/test_periodic_3_triangulation_traits_SH_3 +Point_set_2/test/Point_set_2/CMakeLists.txt +Point_set_2/test/Point_set_2/cgal_test_with_cmake +Point_set_2/test/Point_set_2/nearest_nb1 +Point_set_2/test/Point_set_2/nearest_nb_fcn +Point_set_2/test/Point_set_2/range_search_fcn +Point_set_2/test/Point_set_2/rs_check_empty +Point_set_2/test/Point_set_2/test_range_search Point_set_processing_3/doc_doxygen Point_set_processing_3/doc_html Point_set_processing_3/doc_pdf diff --git a/Point_set_2/test/Point_set_2/range_search.cpp b/Point_set_2/test/Point_set_2/test_range_search.cpp similarity index 100% rename from Point_set_2/test/Point_set_2/range_search.cpp rename to Point_set_2/test/Point_set_2/test_range_search.cpp From 3b0cacdd2d90db24b302156e02836bca6ab4b8ea Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 15:01:50 +0000 Subject: [PATCH 060/157] Rename a test. There was another target of the same name in ../../examples --- .gitattributes | 2 +- .gitignore | 1 + .../Polynomial/{subresultants.cpp => test_subresultants.cpp} | 0 3 files changed, 2 insertions(+), 1 deletion(-) rename Polynomial/test/Polynomial/{subresultants.cpp => test_subresultants.cpp} (100%) diff --git a/.gitattributes b/.gitattributes index 31f1bae2f75..27f73776193 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3374,9 +3374,9 @@ Polynomial/include/CGAL/Test/_test_polynomial_traits_d.h -text Polynomial/test/Polynomial/Polynomial_type_generator.cpp -text Polynomial/test/Polynomial/polynomial_utils.cpp -text Polynomial/test/Polynomial/sturm_habicht_sequence.cpp -text -Polynomial/test/Polynomial/subresultants.cpp -text Polynomial/test/Polynomial/test_polynomial_Coercion_traits.cpp -text Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel.cpp -text +Polynomial/test/Polynomial/test_subresultants.cpp -text Polytope_distance_d/doc_tex/Polytope_distance_d/dist.png -text Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.gif -text svneol=unset#image/gif Polytope_distance_d/doc_tex/Polytope_distance_d/polydist.pdf -text svneol=unset#application/pdf diff --git a/.gitignore b/.gitignore index e8fab52d062..7b6c6ddfc6e 100644 --- a/.gitignore +++ b/.gitignore @@ -996,6 +996,7 @@ Polynomial/test/Polynomial/sturm_habicht_sequence Polynomial/test/Polynomial/subresultants Polynomial/test/Polynomial/test_polynomial_Coercion_traits Polynomial/test/Polynomial/test_polynomial_Get_arithmetic_kernel +Polynomial/test/Polynomial/test_subresultants Polytope_distance_d/*.aux Polytope_distance_d/*.bbl Polytope_distance_d/*.blg diff --git a/Polynomial/test/Polynomial/subresultants.cpp b/Polynomial/test/Polynomial/test_subresultants.cpp similarity index 100% rename from Polynomial/test/Polynomial/subresultants.cpp rename to Polynomial/test/Polynomial/test_subresultants.cpp From d438e6bfaeb448281bcfbc78bf3f0c14afe9fd38 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 15:03:54 +0000 Subject: [PATCH 061/157] Rename a test. There was another target of the same name in ../../examples --- .gitignore | 15 +++++++++++++++ .../{barycenter.cpp => test_barycenter.cpp} | 0 2 files changed, 15 insertions(+) rename Principal_component_analysis/test/Principal_component_analysis/{barycenter.cpp => test_barycenter.cpp} (100%) diff --git a/.gitignore b/.gitignore index 7b6c6ddfc6e..9508e85339b 100644 --- a/.gitignore +++ b/.gitignore @@ -1016,6 +1016,21 @@ Polytope_distance_d/doc_ps Polytope_distance_d/test/Polytope_distance_d/CMakeLists.txt Polytope_distance_d/test/Polytope_distance_d/cgal_test_with_cmake Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d_d +Principal_component_analysis/test/Principal_component_analysis/CMakeLists.txt +Principal_component_analysis/test/Principal_component_analysis/bounding_box +Principal_component_analysis/test/Principal_component_analysis/cgal_test_with_cmake +Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_circles_2 +Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_cuboids_3 +Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_points_2 +Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_points_3 +Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_rectangles_2 +Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_segments_2 +Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_segments_3 +Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_spheres_3 +Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_tetrahedra_3 +Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_triangles_2 +Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_triangles_3 +Principal_component_analysis/test/Principal_component_analysis/test_barycenter QP_solver/documentation/Degeneracies.aux QP_solver/documentation/Degeneracies.log QP_solver/documentation/Degeneracies.pdf diff --git a/Principal_component_analysis/test/Principal_component_analysis/barycenter.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_barycenter.cpp similarity index 100% rename from Principal_component_analysis/test/Principal_component_analysis/barycenter.cpp rename to Principal_component_analysis/test/Principal_component_analysis/test_barycenter.cpp From 1c3ec5c655feaa424815636d2cf8d18ad2177b9c Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 15:06:07 +0000 Subject: [PATCH 062/157] Rename a test. There was another target of the same name in ../../examples --- .gitignore | 1 + .../{bounding_box.cpp => test_bounding_box.cpp} | 0 2 files changed, 1 insertion(+) rename Principal_component_analysis/test/Principal_component_analysis/{bounding_box.cpp => test_bounding_box.cpp} (100%) diff --git a/.gitignore b/.gitignore index 9508e85339b..71a4db0bc00 100644 --- a/.gitignore +++ b/.gitignore @@ -1031,6 +1031,7 @@ Principal_component_analysis/test/Principal_component_analysis/linear_least_squa Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_triangles_2 Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_triangles_3 Principal_component_analysis/test/Principal_component_analysis/test_barycenter +Principal_component_analysis/test/Principal_component_analysis/test_bounding_box QP_solver/documentation/Degeneracies.aux QP_solver/documentation/Degeneracies.log QP_solver/documentation/Degeneracies.pdf diff --git a/Principal_component_analysis/test/Principal_component_analysis/bounding_box.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_bounding_box.cpp similarity index 100% rename from Principal_component_analysis/test/Principal_component_analysis/bounding_box.cpp rename to Principal_component_analysis/test/Principal_component_analysis/test_bounding_box.cpp From 001b045b9843d4e3fb93b09c56cdbbc75250e01a Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 15:08:26 +0000 Subject: [PATCH 063/157] Rename all tests. There are another targets of the same names in ../../examples --- .gitattributes | 18 +++++++++--------- .gitignore | 11 +++++++++++ ...linear_least_squares_fitting_circles_2.cpp} | 0 ...linear_least_squares_fitting_cuboids_3.cpp} | 0 ..._linear_least_squares_fitting_points_2.cpp} | 0 ..._linear_least_squares_fitting_points_3.cpp} | 0 ...ear_least_squares_fitting_rectangles_2.cpp} | 0 ...inear_least_squares_fitting_segments_2.cpp} | 0 ...inear_least_squares_fitting_segments_3.cpp} | 0 ...linear_least_squares_fitting_spheres_3.cpp} | 0 ...ear_least_squares_fitting_tetrahedra_3.cpp} | 0 ...near_least_squares_fitting_triangles_2.cpp} | 0 ...near_least_squares_fitting_triangles_3.cpp} | 0 13 files changed, 20 insertions(+), 9 deletions(-) rename Principal_component_analysis/test/Principal_component_analysis/{linear_least_squares_fitting_circles_2.cpp => test_linear_least_squares_fitting_circles_2.cpp} (100%) rename Principal_component_analysis/test/Principal_component_analysis/{linear_least_squares_fitting_cuboids_3.cpp => test_linear_least_squares_fitting_cuboids_3.cpp} (100%) rename Principal_component_analysis/test/Principal_component_analysis/{linear_least_squares_fitting_points_2.cpp => test_linear_least_squares_fitting_points_2.cpp} (100%) rename Principal_component_analysis/test/Principal_component_analysis/{linear_least_squares_fitting_points_3.cpp => test_linear_least_squares_fitting_points_3.cpp} (100%) rename Principal_component_analysis/test/Principal_component_analysis/{linear_least_squares_fitting_rectangles_2.cpp => test_linear_least_squares_fitting_rectangles_2.cpp} (100%) rename Principal_component_analysis/test/Principal_component_analysis/{linear_least_squares_fitting_segments_2.cpp => test_linear_least_squares_fitting_segments_2.cpp} (100%) rename Principal_component_analysis/test/Principal_component_analysis/{linear_least_squares_fitting_segments_3.cpp => test_linear_least_squares_fitting_segments_3.cpp} (100%) rename Principal_component_analysis/test/Principal_component_analysis/{linear_least_squares_fitting_spheres_3.cpp => test_linear_least_squares_fitting_spheres_3.cpp} (100%) rename Principal_component_analysis/test/Principal_component_analysis/{linear_least_squares_fitting_tetrahedra_3.cpp => test_linear_least_squares_fitting_tetrahedra_3.cpp} (100%) rename Principal_component_analysis/test/Principal_component_analysis/{linear_least_squares_fitting_triangles_2.cpp => test_linear_least_squares_fitting_triangles_2.cpp} (100%) rename Principal_component_analysis/test/Principal_component_analysis/{linear_least_squares_fitting_triangles_3.cpp => test_linear_least_squares_fitting_triangles_3.cpp} (100%) diff --git a/.gitattributes b/.gitattributes index 27f73776193..a4b734c81a8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3422,15 +3422,15 @@ Principal_component_analysis/include/CGAL/linear_least_squares_fitting_tetrahedr Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_2.h -text Principal_component_analysis/include/CGAL/linear_least_squares_fitting_triangles_3.h -text Principal_component_analysis/test/Principal_component_analysis/Principal_component_analysis.sln eol=crlf -Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_circles_2.cpp -text -Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_cuboids_3.cpp -text -Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_rectangles_2.cpp -text -Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_segments_2.cpp -text -Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_segments_3.cpp -text -Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_spheres_3.cpp -text -Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_tetrahedra_3.cpp -text -Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_triangles_2.cpp -text -Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_triangles_3.cpp -text +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_circles_2.cpp -text +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_cuboids_3.cpp -text +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_rectangles_2.cpp -text +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_2.cpp -text +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_3.cpp -text +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_spheres_3.cpp -text +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_tetrahedra_3.cpp -text +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_2.cpp -text +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_3.cpp -text QP_solver/doc_tex/QP_solver/PkgDescription.tex -text QP_solver/doc_tex/QP_solver/closest_point.fig -text svneol=unset#application/octet-stream QP_solver/doc_tex/QP_solver/closest_point.gif -text svneol=unset#image/gif diff --git a/.gitignore b/.gitignore index 71a4db0bc00..faa8e50fe93 100644 --- a/.gitignore +++ b/.gitignore @@ -1032,6 +1032,17 @@ Principal_component_analysis/test/Principal_component_analysis/linear_least_squa Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_triangles_3 Principal_component_analysis/test/Principal_component_analysis/test_barycenter Principal_component_analysis/test/Principal_component_analysis/test_bounding_box +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_circles_2 +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_cuboids_3 +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_2 +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_3 +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_rectangles_2 +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_2 +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_3 +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_spheres_3 +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_tetrahedra_3 +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_2 +Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_3 QP_solver/documentation/Degeneracies.aux QP_solver/documentation/Degeneracies.log QP_solver/documentation/Degeneracies.pdf diff --git a/Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_circles_2.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_circles_2.cpp similarity index 100% rename from Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_circles_2.cpp rename to Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_circles_2.cpp diff --git a/Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_cuboids_3.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_cuboids_3.cpp similarity index 100% rename from Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_cuboids_3.cpp rename to Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_cuboids_3.cpp diff --git a/Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_points_2.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_2.cpp similarity index 100% rename from Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_points_2.cpp rename to Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_2.cpp diff --git a/Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_points_3.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_3.cpp similarity index 100% rename from Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_points_3.cpp rename to Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_points_3.cpp diff --git a/Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_rectangles_2.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_rectangles_2.cpp similarity index 100% rename from Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_rectangles_2.cpp rename to Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_rectangles_2.cpp diff --git a/Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_segments_2.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_2.cpp similarity index 100% rename from Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_segments_2.cpp rename to Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_2.cpp diff --git a/Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_segments_3.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_3.cpp similarity index 100% rename from Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_segments_3.cpp rename to Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_segments_3.cpp diff --git a/Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_spheres_3.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_spheres_3.cpp similarity index 100% rename from Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_spheres_3.cpp rename to Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_spheres_3.cpp diff --git a/Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_tetrahedra_3.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_tetrahedra_3.cpp similarity index 100% rename from Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_tetrahedra_3.cpp rename to Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_tetrahedra_3.cpp diff --git a/Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_triangles_2.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_2.cpp similarity index 100% rename from Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_triangles_2.cpp rename to Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_2.cpp diff --git a/Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_triangles_3.cpp b/Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_3.cpp similarity index 100% rename from Principal_component_analysis/test/Principal_component_analysis/linear_least_squares_fitting_triangles_3.cpp rename to Principal_component_analysis/test/Principal_component_analysis/test_linear_least_squares_fitting_triangles_3.cpp From 69eb193a27b8a3ef9f93b576b6c78ade646b312d Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 15:11:41 +0000 Subject: [PATCH 064/157] Rename all tests. There are another targets of the same names in ../../examples --- .gitignore | 3 +++ .../{segment_tree_set_2.cpp => test_segment_tree_set_2.cpp} | 0 2 files changed, 3 insertions(+) rename SearchStructures/test/RangeSegmentTrees/{segment_tree_set_2.cpp => test_segment_tree_set_2.cpp} (100%) diff --git a/.gitignore b/.gitignore index faa8e50fe93..2be65b5e032 100644 --- a/.gitignore +++ b/.gitignore @@ -1103,6 +1103,9 @@ STL_Extension/test/STL_Extension/test_nth_element STL_Extension/test/STL_Extension/test_stl_extension STL_Extension/test/STL_Extension/test_type_traits STL_Extension/test/STL_Extension/test_vector +SearchStructures/test/RangeSegmentTrees/CMakeLists.txt +SearchStructures/test/RangeSegmentTrees/cgal_test_with_cmake +SearchStructures/test/RangeSegmentTrees/test_segment_tree_set_2 Skin_surface_3/.cdtproject Skin_surface_3/.project Skin_surface_3/.settings diff --git a/SearchStructures/test/RangeSegmentTrees/segment_tree_set_2.cpp b/SearchStructures/test/RangeSegmentTrees/test_segment_tree_set_2.cpp similarity index 100% rename from SearchStructures/test/RangeSegmentTrees/segment_tree_set_2.cpp rename to SearchStructures/test/RangeSegmentTrees/test_segment_tree_set_2.cpp From 213d8cd835cad57ddeff88ebbb7ec062fef5ea0d Mon Sep 17 00:00:00 2001 From: Olivier Devillers Date: Fri, 5 Oct 2012 15:24:22 +0000 Subject: [PATCH 065/157] add Ross Hemsley --- Maintenance/git/authors-file.txt | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Maintenance/git/authors-file.txt b/Maintenance/git/authors-file.txt index d08bc8613dd..a0e31b23e71 100644 --- a/Maintenance/git/authors-file.txt +++ b/Maintenance/git/authors-file.txt @@ -92,7 +92,7 @@ naamamay = Naama Mayer nicokruithof = Nico Kruithof nmeskini = Naceur Meskini nsalman = Nader Salman -odevil = Olivier Devillers +odevil = Olivier Devillers olivierrouiller = Olivier Rouiller ophirset = Ophir Setter orenzalz = Oren Salzman @@ -109,6 +109,7 @@ pmoeller = Philipp Möller rahul = Rahul Ray rchaine = Raphaëlle Chaine reichel = Joachim Reichel +rlhemsley = Ross Hemsley rozapoga = Roza Pogalnikova rschindl = Ralf Schindlbeck rursu = Radu Ursu From 3736e9e01cda87c2f9f86198550e3e4399a7e8c5 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Fri, 5 Oct 2012 15:27:59 +0000 Subject: [PATCH 066/157] Rename a test --- .gitignore | 1 + ...triangulation_2.cpp => test_KDS_Delaunay_triangulation_2.cpp} | 0 2 files changed, 1 insertion(+) rename Kinetic_data_structures/test/Kinetic_data_structures/{Delaunay_triangulation_2.cpp => test_KDS_Delaunay_triangulation_2.cpp} (100%) diff --git a/.gitignore b/.gitignore index 2be65b5e032..3ad118d2119 100644 --- a/.gitignore +++ b/.gitignore @@ -301,6 +301,7 @@ Kinetic_data_structures/test/Kinetic_data_structures/random_kds Kinetic_data_structures/test/Kinetic_data_structures/regular_triangulation_3 Kinetic_data_structures/test/Kinetic_data_structures/simulator Kinetic_data_structures/test/Kinetic_data_structures/solvers +Kinetic_data_structures/test/Kinetic_data_structures/test_KDS_Delaunay_triangulation_2 Kinetic_data_structures/test/Kinetic_data_structures/timings Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3.qrc.depends Linear_cell_complex/demo/Linear_cell_complex/Linear_cell_complex_3_demo diff --git a/Kinetic_data_structures/test/Kinetic_data_structures/Delaunay_triangulation_2.cpp b/Kinetic_data_structures/test/Kinetic_data_structures/test_KDS_Delaunay_triangulation_2.cpp similarity index 100% rename from Kinetic_data_structures/test/Kinetic_data_structures/Delaunay_triangulation_2.cpp rename to Kinetic_data_structures/test/Kinetic_data_structures/test_KDS_Delaunay_triangulation_2.cpp From ccb742fba0d06821e3e5047ef42e892dc8276326 Mon Sep 17 00:00:00 2001 From: Ophir Setter Date: Fri, 5 Oct 2012 17:29:41 +0000 Subject: [PATCH 067/157] * Removing Arr_vertex_property_map and Arr_face_property_map. * Adding documentation for Arr_face_index_map and Arr_vertex_index_map. * Improving examples of BGL. --- .gitattributes | 2 + .../Arrangement_on_surface_2/arr_boost.tex | 31 ++--- .../Arr_face_index_map.tex | 79 ++++++++++++ .../Arr_vertex_index_map.tex | 79 ++++++++++++ .../Arrangement_on_surface_2_ref/intro.tex | 3 + .../Arrangement_on_surface_2_ref/main.tex | 2 + .../bgl_dual_adapter.cpp | 116 ++++++++---------- .../bgl_primal_adapter.cpp | 3 +- .../include/CGAL/Arr_face_index_map.h | 101 --------------- .../include/CGAL/Arr_vertex_index_map.h | 100 --------------- 10 files changed, 237 insertions(+), 279 deletions(-) create mode 100644 Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_face_index_map.tex create mode 100644 Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_vertex_index_map.tex diff --git a/.gitattributes b/.gitattributes index a4b734c81a8..9f2d6431a08 100644 --- a/.gitattributes +++ b/.gitattributes @@ -451,8 +451,10 @@ Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/fig/unb_dcel.fig -text Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/fig/unb_dcel.gif -text svneol=unset#image/gif Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/fig/unb_dcel.pdf -text svneol=unset#application/pdf Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_algebraic_segment_traits.tex -text +Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_face_index_map.tex -text Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_halfedge_direction.tex -text Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_rational_function_traits.tex -text +Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_vertex_index_map.tex -text Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/arr_do_intersect.tex -text Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/arr_zone.tex -text Arrangement_on_surface_2/doc_tex/Sweep_line_2/fig/Curve_intersections_2.png -text diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_boost.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_boost.tex index 767cfeaca80..efe482e0aa9 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_boost.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2/arr_boost.tex @@ -25,7 +25,7 @@ faces. %------------------------------------------------- Arrangement instances are adapted to \boost\ graphs by specializing the -\ccc{boost:graph_traits} template for \ccc{Arrangement_2} instances. The +\ccc{boost::graph_traits} template for \ccc{Arrangement_2} instances. The graph-traits states the graph concepts that the arrangement class models (see below) and defines the types required by these concepts. @@ -67,10 +67,12 @@ For example, when we compute the shortest paths from a given source vertex $s$ to all other vertices we can obtain a map of distances and a map of predecessors --- namely for each $v$ vertex we have its distance from $s$ and a descriptor of the vertex that precedes $v$ in the shortest path from $s$. -If the vertex descriptors are simply indices, one can use vectors to -efficiently represent the property maps. As this is not the case with the -arrangement graph, we offer the \ccc{Arr_vertex_property_map} -template allows for an efficient mapping of \ccc{Vertex_handle} objects to +If the vertex descriptors are simply indices, boost supplies tools to +easily represent property maps using vectors. +\ccc{Arr_vertex_index_map} class allows create such +indices, and together with \ccc{boost::vector_property_map} allows for +an efficient mapping of \ccc{Vertex_handle} objects to properties of type \ccc{Type}. Note however that unlike the \ccc{Arr_vertex_index_map} class, the vertex property-map class is not kept synchronized with the number of vertices in the arrangement, so it @@ -100,8 +102,9 @@ as shown in Figure~\ref{arr_fig:ex_bgl}, then use Dijkstra's shortest-paths algorithm from the \bgl\ to compute the graph distance of all vertices from the leftmost vertex in the arrangement $v_0$. Note the usage of the \ccc{Arr_vertex_index_map} and -the \ccc{Arr_vertex_property_map} classes. The latter one, instantiated by -the type \ccc{double} is used to map vertices to their distances from $v_0$. +the \ccc{boost::vector_property_map} classes. The +latter one, instantiated by the type \ccc{double} is used to map +vertices to their distances from $v_0$. \ccIncludeExampleCode{Arrangement_on_surface_2/bgl_primal_adapter.cpp} @@ -112,7 +115,7 @@ It is possible to give a dual graph representation for an arrangement instance, such that each arrangement face corresponds to a graph vertex and two vertices are adjacent iff the corresponding faces share a common edge on their boundaries. This is done by specializing the -\ccc{boost:graph_traits} template for \ccc{Dual} instances, +\ccc{boost::graph_traits} template for \ccc{Dual} instances, where \ccc{Dual} is a template specialization that gives a dual interpretation to an arrangement instance. @@ -129,16 +132,16 @@ arrangement graph is also a model of the concepts \ccc{VertexListGraph}, Since we use \ccc{Face_handle} objects as the vertex descriptors, we define the \ccc{Arr_face_index_map} class-template, which maintains an -efficient mapping of face handles to indices. We also provide the template -\ccc{Arr_face_property_map} for associating arbitrary -data with the arrangement faces. +efficient mapping of face handles to indices. +Like vertices, \ccc{boost::vector_property_map} can be +used for associating arbitrary data with the arrangement faces. In the following example we construct the same arrangement as in example \ccc{bgl_primal_adapter.cpp} (see Figure~\ref{arr_fig:ex_bgl}), and perform breadth-first search on the graph faces, starting from the unbounded face. We extend the \dcel\ faces -with an unsigned integer, marking the discover time of the face and use a -breadth-first-search visitor to obtain these times and update the faces -accordingly: +with an unsigned integer, marking the discover time of the face +using \boost\ visitors and a property-map class that directly accesses +the extended data of the faces: \ccIncludeExampleCode{Arrangement_on_surface_2/bgl_dual_adapter.cpp} diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_face_index_map.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_face_index_map.tex new file mode 100644 index 00000000000..d0b0015bfd2 --- /dev/null +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_face_index_map.tex @@ -0,0 +1,79 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: Arr_face_index_map.tex +% +------------------------------------------------------------------------+ +% | +% | Package: Arrangement_2 +% | +% +------------------------------------------------------------------------+ + +\ccRefPageBegin + +\begin{ccRefClass}{Arr_face_index_map} +\label{arr_ref:arr_face_index_map} + +\ccDefinition +%============ + +\ccClassTemplateName{} maintains a mapping of face handles of an +attached arrangement object to indices (of type \ccc{unsigned int}). +This class template is a model of the \boost{} concept +\ccc{ReadablePropertyMap}. A mapping between face handles and indices +enables convenient usage of property-map classes supplied by \boost{}. +For example, the property-map class templates +\ccc{boost::vector_property_map}, which is based on \ccc{std::vector}, +and \ccc{boost::iterator_property_map}, which can be used to implement +a property map based on a native C\hbox{\tt ++} array, require the +user to supply a mapping such as \ccClassTemplateName{}. + +As new faces might be inserted into the attached arrangement, and +existing faces might be removed, the notification mechanism is used +to dynamically maintain the mapping of face handles to indices. + +\ccRefines{DefaultConstructible, CopyConstructible, Assignable} + +\ccIsModel + \ccc{boost::ReadablePropertyMap} + +\ccInheritsFrom\ccc{Arr_observer} + +\ccInclude{CGAL/Arr_face_index_map.h} + +\ccTypes +%======= + +\ccNestedType{Arrangement_2}{the type of the attached arrangement.} + +\ccTypedef{typedef typename Arrangement_2::Face_handle Face_handle;} + {the face handle type.} + +\ccNestedType{category}{boost::readable_property_map_tag} +\ccGlue +\ccNestedType{value_type}{unsigned int} +\ccGlue +\ccNestedType{reference}{unsigned int} +\ccGlue +\ccNestedType{key_type}{Face_handle} + +\ccTypedef{typedef Unique_hash_map Index_map;} + {The type of mapping of faces to indices.} + +\ccCreation +\ccCreationVariable{face_index_map} +%=================================== + +\ccConstructor{Arr_face_index_map();} + {constructs a map that is unattached to any arrangement instance.} + +\ccConstructor{Arr_face_index_map(Arrangement_2& arr);} + {constructs a map and attaches it to the given arrangement \ccc{arr}.} + +\ccSeeAlso +%========= + \ccc{Arr_observer}\lcTex{ + (\ccRefPage{Arr_observer})}\\ + \ccc{Arr_vertex_index_map}\lcTex{ + (\ccRefPage{Arr_vertex_index_map})} + +\end{ccRefClass} + +\ccRefPageEnd diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_vertex_index_map.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_vertex_index_map.tex new file mode 100644 index 00000000000..f0421c42e10 --- /dev/null +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_vertex_index_map.tex @@ -0,0 +1,79 @@ +% +------------------------------------------------------------------------+ +% | Reference manual page: Arr_vertex_index_map.tex +% +------------------------------------------------------------------------+ +% | +% | Package: Arrangement_2 +% | +% +------------------------------------------------------------------------+ + +\ccRefPageBegin + +\begin{ccRefClass}{Arr_vertex_index_map} +\label{arr_ref:arr_vertex_index_map} + +\ccDefinition +%============ + +\ccClassTemplateName{} maintains a mapping of vertex handles of an +attached arrangement object to indices (of type \ccc{unsigned int}). +This class template is a model of the \boost{} concept +\ccc{ReadablePropertyMap}. A mapping between vertex handles and indices +enables convenient usage of property-map classes supplied by \boost{}. +For example, the property-map class templates +\ccc{boost::vector_property_map}, which is based on \ccc{std::vector}, +and \ccc{boost::iterator_property_map}, which can be used to implement +a property map based on a native C\hbox{\tt ++} array, require the +user to supply a mapping such as \ccClassTemplateName{}. + +As new vertices might be inserted into the attached arrangement, and +existing vertices might be removed, the notification mechanism is used +to dynamically maintain the mapping of vertex handles to indices. + +\ccRefines{DefaultConstructible, CopyConstructible, Assignable} + +\ccIsModel + \ccc{boost::ReadablePropertyMap} + +\ccInheritsFrom\ccc{Arr_observer} + +\ccInclude{CGAL/Arr_vertex_index_map.h} + +\ccTypes +%======= + +\ccNestedType{Arrangement_2}{the type of the attached arrangement.} + +\ccTypedef{typedef typename Arrangement_2::Vertex_handle Vertex_handle;} + {the vertex handle type.} + +\ccNestedType{category}{boost::readable_property_map_tag} +\ccGlue +\ccNestedType{value_type}{unsigned int} +\ccGlue +\ccNestedType{reference}{unsigned int} +\ccGlue +\ccNestedType{key_type}{Vertex_handle} + +\ccTypedef{typedef Unique_hash_map Index_map;} + {The type of mapping of vertices to indices.} + +\ccCreation +\ccCreationVariable{vertex_index_map} +%=================================== + +\ccConstructor{Arr_vertex_index_map();} + {constructs a map that is unattached to any arrangement instance.} + +\ccConstructor{Arr_vertex_index_map(Arrangement_2& arr);} + {constructs a map and attaches it to the given arrangement \ccc{arr}.} + +\ccSeeAlso +%========= +\ccc{Arr_observer}\lcTex{ + (\ccRefPage{Arr_observer})}\\ +\ccc{Arr_face_index_map}\lcTex{ + (\ccRefPage{Arr_face_index_map})} + +\end{ccRefClass} + +\ccRefPageEnd diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/intro.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/intro.tex index fbdfe854b97..0aa72239fe7 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/intro.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/intro.tex @@ -131,6 +131,9 @@ implemented as peripheral classes or as free (global) functions. \ccRefIdfierPage{CGAL::Arr_walk_along_line_point_location}\\ \ccRefIdfierPage{CGAL::Arr_trapezoid_ric_point_location}\\ \ccRefIdfierPage{CGAL::Arr_landmarks_point_location} +~\\ +\ccRefIdfierPage{CGAL::Arr_vertex_index_map} +\ccRefIdfierPage{CGAL::Arr_face_index_map} \subsection*{Tags} diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/main.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/main.tex index 5b46db53339..4a8657ef268 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/main.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/main.tex @@ -85,4 +85,6 @@ \input{Arrangement_on_surface_2_ref/Arr_with_hist_text_formatter.tex} \input{Arrangement_on_surface_2_ref/Arr_oblivious_side_tag.tex} \input{Arrangement_on_surface_2_ref/Arr_open_side_tag.tex} +\input{Arrangement_on_surface_2_ref/Arr_vertex_index_map.tex} +\input{Arrangement_on_surface_2_ref/Arr_face_index_map.tex} \endgroup diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp index b08bb6aeb00..63dff41194e 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp @@ -6,89 +6,79 @@ #include #include #include - -#include -#include - #include #include +#include +#include +#include + #include "arr_print.h" -typedef CGAL::Cartesian Kernel; -typedef CGAL::Arr_segment_traits_2 Traits_2; -typedef Traits_2::Point_2 Point_2; -typedef Traits_2::X_monotone_curve_2 Segment_2; -typedef CGAL::Arr_face_extended_dcel Dcel; -typedef CGAL::Arrangement_2 Arrangement_2; -typedef CGAL::Dual Dual_arrangement_2; - -// A BFS visitor class that associates each vertex with its discover time. -// In our case graph vertices represent arrangement faces. -template -class Discover_time_bfs_visitor : public boost::default_bfs_visitor -{ -private: - - const IndexMap *index_map; // Mapping vertices to indices. - unsigned int time; // The current time stamp. - +// A property map that reads/writes the information to/from the extended +// face. +template class Extended_face_property_map { public: + typedef typename Arrangement::Face_handle Face_handle; - // Constructor. - Discover_time_bfs_visitor (const IndexMap& imap) : - index_map (&imap), - time (0) - {} + // Boost property type definitions. + typedef boost::read_write_property_map_tag category; + typedef Type value_type; + typedef value_type& reference; + typedef Face_handle key_type; - // Write the discover time for a given vertex. - template - void discover_vertex(Vertex u, const Graph& /* g */) - { - u->set_data (time); - time++; - } + // The get function is required by the property map concept. + friend reference get(const Extended_face_property_map& map, key_type key) + { return key->data(); } + + // The put function is required by the property map concept. + friend void put(const Extended_face_property_map& map, + key_type key, value_type val) + { key->set_data(val); } }; -int main () +typedef CGAL::Cartesian Kernel; +typedef CGAL::Arr_segment_traits_2 Traits_2; +typedef CGAL::Arr_face_extended_dcel Dcel; +typedef CGAL::Arrangement_2 Ex_arrangement; +typedef CGAL::Dual Dual_arrangement; +typedef CGAL::Arr_face_index_map Face_index_map; +typedef Extended_face_property_map + Face_property_map; +typedef Kernel::Point_2 Point_2; +typedef Kernel::Segment_2 Segment_2; + +int main() { - Arrangement_2 arr; - // Construct an arrangement of seven intersecting line segments. - insert (arr, Segment_2 (Point_2 (1, 1), Point_2 (7, 1))); - insert (arr, Segment_2 (Point_2 (1, 1), Point_2 (3, 7))); - insert (arr, Segment_2 (Point_2 (1, 4), Point_2 (7, 1))); - insert (arr, Segment_2 (Point_2 (2, 2), Point_2 (9, 3))); - insert (arr, Segment_2 (Point_2 (2, 2), Point_2 (4, 4))); - insert (arr, Segment_2 (Point_2 (7, 1), Point_2 (9, 3))); - insert (arr, Segment_2 (Point_2 (3, 7), Point_2 (9, 3))); + Point_2 p1(1, 1), p2(1, 4), p3(2, 2), p4(3, 7), p5(4, 4), p6(7, 1), p7(9, 3); + Ex_arrangement arr; + insert(arr, Segment_2(p1, p6)); + insert(arr, Segment_2(p1, p4)); insert(arr, Segment_2(p2, p6)); + insert(arr, Segment_2(p3, p7)); insert(arr, Segment_2(p3, p5)); + insert(arr, Segment_2(p6, p7)); insert(arr, Segment_2(p4, p7)); // Create a mapping of the arrangement faces to indices. - CGAL::Arr_face_index_map index_map (arr); - - // Perform breadth-first search from the unbounded face, and use the BFS + Face_index_map index_map(arr); + + // Perform breadth-first search from the unbounded face, using the event // visitor to associate each arrangement face with its discover time. - Discover_time_bfs_visitor > - bfs_visitor (index_map); - Arrangement_2::Face_handle uf = arr.unbounded_face(); - - boost::breadth_first_search (Dual_arrangement_2 (arr), uf, - boost::vertex_index_map (index_map). - visitor (bfs_visitor)); - - // Print the results: - Arrangement_2::Face_iterator fit; + unsigned int time = 0; + boost::breadth_first_search(Dual_arrangement(arr), arr.unbounded_face(), + boost::vertex_index_map(index_map).visitor + (boost::make_bfs_visitor + (stamp_times(Face_property_map(), time, + boost::on_discover_vertex())))); + // Print the discover time of each arrangement face. + Ex_arrangement::Face_iterator fit; for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) { std::cout << "Discover time " << fit->data() << " for "; - if (fit != uf) { + if (fit != arr.unbounded_face()) { std::cout << "face "; - print_ccb (fit->outer_ccb()); + print_ccb(fit->outer_ccb()); } - else - std::cout << "the unbounded face." << std::endl; + else std::cout << "the unbounded face." << std::endl; } - return 0; } diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp index 5480f252b5b..e7a95faae29 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp @@ -123,7 +123,8 @@ int main() // Perform Dijkstra's algorithm from the vertex v0. Edge_length_func edge_length; - CGAL::Arr_vertex_property_map dist_map(index_map); + + boost::vector_property_map > dist_map(arr.number_of_vertices(), index_map); boost::dijkstra_shortest_paths(arr, v0, boost::vertex_index_map(index_map). weight_map(edge_length). 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 f8323f8ee5e..89326e7d3af 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 @@ -275,107 +275,6 @@ unsigned int get (const CGAL::Arr_face_index_map& index_map, return (index_map[f]); } -/*! \class - * An auxiliary class that automatically maintains a mapping of the - * arrangement faces to some property of a given type. - */ -template -class Arr_face_property_map -{ -public: - - typedef Arrangement_ Arrangement_2; - typedef typename Arrangement_2::Face_handle Face_handle; - typedef Arr_face_index_map Index_map; - - // Boost property type definitions: - typedef boost::read_write_property_map_tag category; - typedef Type_ value_type; - typedef value_type& reference; - typedef Face_handle key_type; - -private: - - typedef Arr_face_property_map Self; - - // Data members: - const Index_map *ind_map; // The index map. - value_type *props; // The properties vector. - bool owner; // Should the vector be freed. - - /*! Assignment operator - not supported. */ - Self& operator= (const Self& ); - -public: - - /*! Constructor. */ - Arr_face_property_map (const Index_map& index_map) : - ind_map (&index_map), - owner (true) - { - props = new value_type [index_map.arrangement()->number_of_faces()]; - } - - /*! Copy constructor - performs shallow copy. */ - Arr_face_property_map (const Self& map) : - ind_map (map.ind_map), - props (map.props), - owner (false) - {} - - /*! Destructor. */ - ~Arr_face_property_map () - { - if (owner) - delete[] props; - } - - /*! Get the property associated with a face (const version). */ - const value_type& operator[] (Face_handle f) const - { - return (props [(*ind_map)[f]]); - } - - /*! Get the property associated with a face (non-const version). */ - value_type& operator[] (Face_handle f) - { - return (props [(*ind_map)[f]]); - } - -}; - -/*! - * Get the index property-map function. Provided so that boost is able to - * access the Arr_face_property_map above. - * \param prop_map The property map. - * \param f A face handle. - * \return The face propery. - */ -template -const typename CGAL::Arr_face_property_map::value_type& -get (const CGAL::Arr_face_property_map& prop_map, - typename Arrangement::Face_handle f) -{ - return (prop_map[f]); -} - -/*! - * Put the index property-map function. Provided so that boost is able to - * update the Arr_face_property_map above. - * \param prop_map The property map. - * \param f A face handle. - * \param t The face propery. - */ -template -void put (CGAL::Arr_face_property_map& prop_map, - typename Arrangement::Face_handle f, - typename CGAL::Arr_face_property_map:: - value_type t) -{ - prop_map[f] = t; - return; -} - } //namespace CGAL #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 e5641f230d7..d9f12b19000 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 @@ -280,106 +280,6 @@ unsigned int get (const CGAL::Arr_vertex_index_map& index_map, return index_map[v]; } -/*! \class - * An auxiliary class that automatically maintains a mapping of the - * arrangement vertices to some property of a given type. - */ -template -class Arr_vertex_property_map -{ -public: - - typedef Arrangement_ Arrangement_2; - typedef typename Arrangement_2::Vertex_handle Vertex_handle; - typedef Arr_vertex_index_map Index_map; - - // Boost property type definitions: - typedef boost::read_write_property_map_tag category; - typedef Type_ value_type; - typedef value_type& reference; - typedef Vertex_handle key_type; - -private: - - typedef Arr_vertex_property_map Self; - - // Data members: - const Index_map *ind_map; // The index map. - value_type *props; // The properties vector. - bool owner; // Should the vector be freed. - - /*! Assignment operator - not supported. */ - Self& operator= (const Self& ); - -public: - - /*! Constructor. */ - Arr_vertex_property_map (const Index_map& index_map) : - ind_map (&index_map), - owner (true) - { - props = new value_type [index_map.arrangement()->number_of_vertices()]; - } - - /*! Copy constructor - performs shallow copy. */ - Arr_vertex_property_map (const Self& map) : - ind_map (map.ind_map), - props (map.props), - owner (false) - {} - - /*! Destructor. */ - ~Arr_vertex_property_map () - { - if (owner) - delete[] props; - } - - /*! Get the property associated with a vertex (const version). */ - const value_type& operator[] (Vertex_handle v) const - { - return props[(*ind_map)[v]]; - } - - /*! Get the property associated with a vertex (non-const version). */ - value_type& operator[] (Vertex_handle v) - { - return props[(*ind_map)[v]]; - } - -}; - -/*! - * Get the index property-map function. Provided so that boost is able to - * access the Arr_vertex_property_map above. - * \param prop_map The property map. - * \param v A vertex handle. - * \return The vertex propery. - */ -template -const typename CGAL::Arr_vertex_property_map::value_type& -get (const CGAL::Arr_vertex_property_map& prop_map, - typename Arrangement::Vertex_handle v) -{ - return prop_map[v]; -} - -/*! - * Put the index property-map function. Provided so that boost is able to - * update the Arr_vertex_property_map above. - * \param prop_map The property map. - * \param v A vertex handle. - * \param t The vertex propery. - */ -template -void put (CGAL::Arr_vertex_property_map& prop_map, - typename Arrangement::Vertex_handle v, - typename CGAL::Arr_vertex_property_map:: - value_type t) -{ - prop_map[v] = t; -} - } //namespace CGAL #endif From 91f88474a8137f41d3bdac28cb56e2d64a8e9089 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20M=C3=B6ller?= Date: Fri, 5 Oct 2012 18:15:46 +0000 Subject: [PATCH 068/157] The conditional code does not only require variadic templates but also a variadic implementation of tuple. One would think that you never run in a situation where you only have variadics but no tuple. But thanks to clang pretending to be a gcc 4.2.1, some configuration code might think otherwise. --- STL_Extension/include/CGAL/iterator.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/STL_Extension/include/CGAL/iterator.h b/STL_Extension/include/CGAL/iterator.h index 40f3d059cc5..5415c64fed8 100644 --- a/STL_Extension/include/CGAL/iterator.h +++ b/STL_Extension/include/CGAL/iterator.h @@ -1187,7 +1187,7 @@ filter_output_iterator(I e, const P& p) { return Filter_output_iterator< I, P >(e, p); } -#ifndef CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES +#if !defined(CGAL_CFG_NO_CPP0X_VARIADIC_TEMPLATES) && !defined(CGAL_CFG_NO_CPP0X_TUPLE) namespace internal { From 2bbc6c94a903b09266a8d360526eabfb49372059 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Fri, 5 Oct 2012 22:14:02 +0000 Subject: [PATCH 069/157] added missing { --- Installation/cmake/modules/FindRS.cmake | 2 +- Installation/cmake/modules/FindRS3.cmake | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Installation/cmake/modules/FindRS.cmake b/Installation/cmake/modules/FindRS.cmake index ab39259e8ef..dea56f89783 100644 --- a/Installation/cmake/modules/FindRS.cmake +++ b/Installation/cmake/modules/FindRS.cmake @@ -29,7 +29,7 @@ if( MPFI_FOUND ) get_dependency_version( GMP ) - IS_VERSION_LESS("$GMP_VERSION}" "4.2.0" _IS_GMP_VERSION_TO_LOW) + IS_VERSION_LESS("${GMP_VERSION}" "4.2.0" _IS_GMP_VERSION_TO_LOW) if(_IS_GMP_VERSION_TO_LOW) diff --git a/Installation/cmake/modules/FindRS3.cmake b/Installation/cmake/modules/FindRS3.cmake index e592d0bf8ce..ace4b9c8b4f 100644 --- a/Installation/cmake/modules/FindRS3.cmake +++ b/Installation/cmake/modules/FindRS3.cmake @@ -29,7 +29,7 @@ if( MPFI_FOUND ) get_dependency_version( GMP ) - IS_VERSION_LESS("$GMP_VERSION}" "4.2.0" _IS_GMP_VERSION_TO_LOW) + IS_VERSION_LESS("${GMP_VERSION}" "4.2.0" _IS_GMP_VERSION_TO_LOW) if(_IS_GMP_VERSION_TO_LOW) From 4cae227f105341beaadd06c114c91c3c782fc7c9 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Fri, 5 Oct 2012 22:34:46 +0000 Subject: [PATCH 070/157] NTL_VERSION can also be just \d.\d (regex was \d.\d.\d) --- Installation/cmake/modules/FindNTL.cmake | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Installation/cmake/modules/FindNTL.cmake b/Installation/cmake/modules/FindNTL.cmake index cbbf5ca34a2..337c375ff19 100644 --- a/Installation/cmake/modules/FindNTL.cmake +++ b/Installation/cmake/modules/FindNTL.cmake @@ -46,9 +46,9 @@ else( (TARGET CGAL AND NOT WITH_GMP) OR NOT GMP_FOUND ) file( READ "${NTL_VERSION_H}" NTL_VERSION_H_CONTENTS ) - string( REGEX MATCH "[0-9]+\\.[0-9]+\\.[0-9]+" CGAL_NTL_VERSION "${NTL_VERSION_H_CONTENTS}" ) + string( REGEX MATCH "[0-9]+(\\.[0-9]+)+" CGAL_NTL_VERSION "${NTL_VERSION_H_CONTENTS}" ) - #message( STATUS "DETECTED NTL_VERSION = '${CGAL_NTL_VERSION}'" ) + message( STATUS "DETECTED NTL_VERSION = '${CGAL_NTL_VERSION}'" ) IS_VERSION_GREATER( "${CGAL_NTL_VERSION}" "5.0.0" _IS_NTL_VERSION_GREATER ) From 456b5ae02183674cfe4b21369a94072e469d0696 Mon Sep 17 00:00:00 2001 From: Ophir Setter Date: Sun, 7 Oct 2012 22:27:26 +0000 Subject: [PATCH 071/157] Fixing for other versions of boost --- .../Arrangement_on_surface_2/bgl_primal_adapter.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp index e7a95faae29..86f064c8657 100644 --- a/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp +++ b/Arrangement_on_surface_2/examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp @@ -11,6 +11,12 @@ #include #include +#if BOOST_VERSION > 104000 +#include +#else +#include +#endif + typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Traits_2; typedef Traits_2::Point_2 Point_2; From 456c08e9b976ddf3aeebe3bed364732785172b47 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 8 Oct 2012 07:45:30 +0000 Subject: [PATCH 072/157] exactly one element should be a primary selection --- .../include/CGAL/CGAL_Ipelet_base_v7.h | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h index deaf48795ae..c4308666270 100644 --- a/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h +++ b/CGAL_ipelets/include/CGAL/CGAL_Ipelet_base_v7.h @@ -60,7 +60,8 @@ namespace CGAL{ typedef ipe::Curve IpeSegmentSubPath;//ipe6 compatibility typedef ipe::Matrix IpeMatrix;//ipe6 compatibility typedef ipe::Path IpePath;//ipe6 compatibility - + //indicates if the selection should be primary or secondary. Exactly one primary selection should exist + ipe::TSelect get_selection_type() const { return get_IpePage()->primarySelection()==-1 ? ipe::EPrimarySelected : ipe::ESecondarySelected;} //ipe6 compatibility void transform_selected_objects_(const IpeMatrix& tfm) const { for (int i=0;icount();++i) @@ -82,7 +83,7 @@ namespace CGAL{ //~ grp->push_back( get_IpePage()->object(i-1) ); get_IpePage()->remove(i-1); } - get_IpePage()->append(ipe::ESecondarySelected,CURRENTLAYER,grp); + get_IpePage()->append(get_selection_type(),CURRENTLAYER,grp); } @@ -318,7 +319,7 @@ public: shape.appendSubPath(*it); if (delete_underlying_polygons) delete_selected_objects_(); - get_IpePage()->append(ipe::ESecondarySelected,CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape)); + get_IpePage()->append(get_selection_type(),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape)); } void @@ -372,7 +373,7 @@ public: obj_ipe->setPathMode(ipe::EStrokedAndFilled); obj_ipe->setFill(ipe::Attribute::BLACK()); } - get_IpePage()->append( (deselect_all?ipe::ENotSelected:ipe::ESecondarySelected),CURRENTLAYER,obj_ipe); + get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,obj_ipe); return obj_ipe; } return NULL; @@ -386,14 +387,14 @@ public: ); ipe::Shape shape; shape.appendSubPath(ellipse); - get_IpePage()->append( (deselect_all?ipe::ENotSelected:ipe::EPrimarySelected),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape)); + get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape)); } void draw_in_ipe(const Point_2& P,bool deselect_all=false) const { ipe::Reference *mark = new ipe::Reference(CURRENTATTRIBUTES,CURRENTATTRIBUTES.iMarkShape, ipe::Vector(CGAL::to_double(P.x()),CGAL::to_double(P.y()))); - get_IpePage()->append( (deselect_all?ipe::ENotSelected:ipe::ESecondarySelected),CURRENTLAYER,mark); + get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,mark); } void @@ -402,7 +403,7 @@ public: ipe::Segment seg_ipe; seg_ipe.iP = ipe::Vector(CGAL::to_double(S.point(0).x()),CGAL::to_double(S.point(0).y())); seg_ipe.iQ = ipe::Vector(CGAL::to_double(S.point(1).x()),CGAL::to_double(S.point(1).y())); - get_IpePage()->append( (deselect_all?ipe::ENotSelected:ipe::ESecondarySelected),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,ipe::Shape(seg_ipe))); + get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,ipe::Shape(seg_ipe))); } template @@ -431,7 +432,7 @@ public: ipeS,ipeT); ipe::Shape shape; shape.appendSubPath(SSP_ipe); - get_IpePage()->append( (deselect_all?ipe::ENotSelected:ipe::ESecondarySelected),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape)); + get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape)); } @@ -448,7 +449,7 @@ public: SSP_ipe->setClosed(true); ipe::Shape shape; shape.appendSubPath(SSP_ipe); - get_IpePage()->append( (deselect_all?ipe::ENotSelected:ipe::ESecondarySelected),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape)); + get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape)); } void @@ -466,7 +467,7 @@ public: SSP_ipe->setClosed(true); ipe::Shape shape; shape.appendSubPath(SSP_ipe); - get_IpePage()->append( (deselect_all?ipe::ENotSelected:ipe::ESecondarySelected),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape)); + get_IpePage()->append( (deselect_all?ipe::ENotSelected:get_selection_type()),CURRENTLAYER,new ipe::Path(CURRENTATTRIBUTES,shape)); } From b7b4b5f43e60b9520db54269c8033cc6dfe97e27 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 8 Oct 2012 08:02:37 +0000 Subject: [PATCH 073/157] s/qt.nokia.com/qt.digia.com/g --- .../doc_tex/GraphicsView/GraphicsView.tex | 22 +++++++++---------- .../doc_tex/GraphicsView/PkgDescription.tex | 2 +- .../doc_tex/GraphicsView_ref/intro.tex | 2 +- 3 files changed, 13 insertions(+), 13 deletions(-) diff --git a/GraphicsView/doc_tex/GraphicsView/GraphicsView.tex b/GraphicsView/doc_tex/GraphicsView/GraphicsView.tex index ba65f000090..b4292777f31 100644 --- a/GraphicsView/doc_tex/GraphicsView/GraphicsView.tex +++ b/GraphicsView/doc_tex/GraphicsView/GraphicsView.tex @@ -1,17 +1,17 @@ -\ccAnchor{http://qt.nokia.com/}{Qt} is a {\sc Gui} toolkit for +\ccAnchor{http://qt.digia.com/}{Qt} is a {\sc Gui} toolkit for cross-platform application development. % +-----------------------------------------------------+ \section{Introduction} This chapter describes classes that help to visualize two dimensional \cgal\ objects -with the \ccAnchor{http://doc.qt.nokia.com/latest/graphicsview.html}{Qt Graphics View Framework}. +with the \ccAnchor{http://doc.qt.digia.com/latest/graphicsview.html}{Qt Graphics View Framework}. -This framework uses the model view paradigm. \ccAnchor{http://doc.qt.nokia.com/latest/qgraphicsitem.html}{\ccc{QGraphicsItem}}s are stored in a -\ccAnchor{http://doc.qt.nokia.com/latest/qgraphicsscene.html}{\ccc{QGraphicsScene}} -and are displayed in a \ccAnchor{http://doc.qt.nokia.com/latest/qgraphicsview.html}{\ccc{QGraphicsView}}. The items +This framework uses the model view paradigm. \ccAnchor{http://doc.qt.digia.com/latest/qgraphicsitem.html}{\ccc{QGraphicsItem}}s are stored in a +\ccAnchor{http://doc.qt.digia.com/latest/qgraphicsscene.html}{\ccc{QGraphicsScene}} +and are displayed in a \ccAnchor{http://doc.qt.digia.com/latest/qgraphicsview.html}{\ccc{QGraphicsView}}. The items have a paint method which is called when an item is in the visible area of a view. The framework is also responsible for dispatching events from the view via the scene to the items. The framework is extensible in the sense @@ -46,14 +46,14 @@ brings them together we adopted the following, hybrid naming conventions. \section{Overall Design} In Figure~\ref{graphicsview:uml} you see four classes depicted in grey, -that come from the Qt Graphics View Framework. The \ccAnchor{http://doc.qt.nokia.com/latest/qgraphicsscene.html}{\ccc{QGraphicsScene}} -contains \ccAnchor{http://doc.qt.nokia.com/latest/qgraphicsitem.html}{\ccc{QGraphicsItem}}s, which get displayed in any number -of \ccAnchor{http://doc.qt.nokia.com/latest/qgraphicsview.html}{\ccc{QGraphicsView}}s. The views are widgets, that is they take screen space +that come from the Qt Graphics View Framework. The \ccAnchor{http://doc.qt.digia.com/latest/qgraphicsscene.html}{\ccc{QGraphicsScene}} +contains \ccAnchor{http://doc.qt.digia.com/latest/qgraphicsitem.html}{\ccc{QGraphicsItem}}s, which get displayed in any number +of \ccAnchor{http://doc.qt.digia.com/latest/qgraphicsview.html}{\ccc{QGraphicsView}}s. The views are widgets, that is they take screen space in an application. -The fourth class is the \ccAnchor{http://doc.qt.nokia.com/latest/qobject.html}{\ccc{QObject}}. It plays an important role in Qt for -event handling and memory management. First, it allows to add \ccAnchor{http://doc.qt.nokia.com/latest/signalsandslots.html}{signals and -slots}, and to connect them. Second, it allows to install \ccAnchor{http://doc.qt.nokia.com/latest/eventsandfilters.html}{event filters}. +The fourth class is the \ccAnchor{http://doc.qt.digia.com/latest/qobject.html}{\ccc{QObject}}. It plays an important role in Qt for +event handling and memory management. First, it allows to add \ccAnchor{http://doc.qt.digia.com/latest/signalsandslots.html}{signals and +slots}, and to connect them. Second, it allows to install \ccAnchor{http://doc.qt.digia.com/latest/eventsandfilters.html}{event filters}. \begin{figure}[t] diff --git a/GraphicsView/doc_tex/GraphicsView/PkgDescription.tex b/GraphicsView/doc_tex/GraphicsView/PkgDescription.tex index 0da44f0ae44..e342a60453f 100644 --- a/GraphicsView/doc_tex/GraphicsView/PkgDescription.tex +++ b/GraphicsView/doc_tex/GraphicsView/PkgDescription.tex @@ -2,7 +2,7 @@ \begin{ccPkgDescription}{CGAL and the Qt Graphics View Framework \label{Pkg:GraphicsView}} \ccPkgHowToCiteCgal{cgal:fr-cqgvf-12} \ccPkgSummary{This package provides classes for displaying \cgal\ objects -and data structures in the \ccAnchor{http://doc.qt.nokia.com/latest/graphicsview.html}{Qt 4 Graphics View Framework}.} +and data structures in the \ccAnchor{http://doc.qt.digia.com/latest/graphicsview.html}{Qt 4 Graphics View Framework}.} % \ccPkgDependsOn{Qt 4} \ccPkgIntroducedInCGAL{3.4} diff --git a/GraphicsView/doc_tex/GraphicsView_ref/intro.tex b/GraphicsView/doc_tex/GraphicsView_ref/intro.tex index 662ad85fef6..6ec49e18636 100644 --- a/GraphicsView/doc_tex/GraphicsView_ref/intro.tex +++ b/GraphicsView/doc_tex/GraphicsView_ref/intro.tex @@ -6,7 +6,7 @@ This package provides some classes which allow to use \cgal\ classes in -\qt\ applications which make use of the \ccAnchor{http://doc.qt.nokia.com/latest/graphicsview.html}{Qt Graphics View Framework}. +\qt\ applications which make use of the \ccAnchor{http://doc.qt.digia.com/latest/graphicsview.html}{Qt Graphics View Framework}. \section{Classified Reference Pages} From f8b9521b3b79436bc73443519f5347dd94742541 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 8 Oct 2012 08:41:43 +0000 Subject: [PATCH 075/157] Fix headers of Algebraic_foundations Mostly missing headers. But sometimes I have removed the use of , because that header is hell for the moment. --- .../include/CGAL/Algebraic_extension_traits.h | 3 +++ .../include/CGAL/Algebraic_structure_traits.h | 5 ++++- Algebraic_foundations/include/CGAL/Coercion_traits.h | 4 ++-- Algebraic_foundations/include/CGAL/Fraction_traits.h | 2 +- Algebraic_foundations/include/CGAL/Real_embeddable_traits.h | 2 +- .../include/CGAL/Test/_test_coercion_traits.h | 4 ++++ Algebraic_foundations/include/CGAL/ipower.h | 2 ++ Algebraic_foundations/include/CGAL/number_utils.h | 4 +++- Algebraic_foundations/include/CGAL/number_utils_classes.h | 3 ++- 9 files changed, 22 insertions(+), 7 deletions(-) diff --git a/Algebraic_foundations/include/CGAL/Algebraic_extension_traits.h b/Algebraic_foundations/include/CGAL/Algebraic_extension_traits.h index f9020e57163..e43fde416c9 100644 --- a/Algebraic_foundations/include/CGAL/Algebraic_extension_traits.h +++ b/Algebraic_foundations/include/CGAL/Algebraic_extension_traits.h @@ -29,6 +29,9 @@ #define CGAL_ALGEBRAIC_NUMBER_TRAITS_H 1 #include // for std::accumulate +#include // for std::unary_function +#include +#include namespace CGAL { diff --git a/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h b/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h index 76a0b601e58..12dbcf57506 100644 --- a/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h +++ b/Algebraic_foundations/include/CGAL/Algebraic_structure_traits.h @@ -24,8 +24,11 @@ #ifndef CGAL_ALGEBRAIC_STRUCTURE_TRAITS_H #define CGAL_ALGEBRAIC_STRUCTURE_TRAITS_H -#include +#include +#include #include +#include +#include namespace CGAL { diff --git a/Algebraic_foundations/include/CGAL/Coercion_traits.h b/Algebraic_foundations/include/CGAL/Coercion_traits.h index 331911d4506..bc220340f77 100644 --- a/Algebraic_foundations/include/CGAL/Coercion_traits.h +++ b/Algebraic_foundations/include/CGAL/Coercion_traits.h @@ -30,13 +30,13 @@ #ifndef CGAL_COERCION_TRAITS_H #define CGAL_COERCION_TRAITS_H 1 -#include - #include #include #include +#include + // Makro to define an additional operator for binary functors which takes // two number types as parameters that are interoperable with the // number type diff --git a/Algebraic_foundations/include/CGAL/Fraction_traits.h b/Algebraic_foundations/include/CGAL/Fraction_traits.h index da94c1535fc..684a5ec2c4f 100644 --- a/Algebraic_foundations/include/CGAL/Fraction_traits.h +++ b/Algebraic_foundations/include/CGAL/Fraction_traits.h @@ -35,7 +35,7 @@ #ifndef CGAL_FRACTION_TRAITS_H #define CGAL_FRACTION_TRAITS_H -#include +#include namespace CGAL { diff --git a/Algebraic_foundations/include/CGAL/Real_embeddable_traits.h b/Algebraic_foundations/include/CGAL/Real_embeddable_traits.h index 21e6d18a4ec..671a7c9c79e 100644 --- a/Algebraic_foundations/include/CGAL/Real_embeddable_traits.h +++ b/Algebraic_foundations/include/CGAL/Real_embeddable_traits.h @@ -24,7 +24,7 @@ #ifndef CGAL_REAL_EMBEDDABLE_TRAITS_H #define CGAL_REAL_EMBEDDABLE_TRAITS_H -#include +#include namespace CGAL { diff --git a/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h b/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h index 959d50489a3..8697e799d1e 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_coercion_traits.h @@ -26,6 +26,10 @@ */ #include +#include +#include +#include +#include // These are test functions for the Coercion_traits namespace CGAL { diff --git a/Algebraic_foundations/include/CGAL/ipower.h b/Algebraic_foundations/include/CGAL/ipower.h index 5908be86d37..6b107816061 100644 --- a/Algebraic_foundations/include/CGAL/ipower.h +++ b/Algebraic_foundations/include/CGAL/ipower.h @@ -26,6 +26,8 @@ #ifndef CGAL_IPOWER_H #define CGAL_IPOWER_H +#include + namespace CGAL { template diff --git a/Algebraic_foundations/include/CGAL/number_utils.h b/Algebraic_foundations/include/CGAL/number_utils.h index aff2dbe2be2..b3e55286698 100644 --- a/Algebraic_foundations/include/CGAL/number_utils.h +++ b/Algebraic_foundations/include/CGAL/number_utils.h @@ -25,7 +25,9 @@ #ifndef CGAL_NUMBER_UTILS_H #define CGAL_NUMBER_UTILS_H -#include +#include +#include +#include namespace CGAL { CGAL_NTS_BEGIN_NAMESPACE diff --git a/Algebraic_foundations/include/CGAL/number_utils_classes.h b/Algebraic_foundations/include/CGAL/number_utils_classes.h index bdb7a96701a..005e01a7643 100644 --- a/Algebraic_foundations/include/CGAL/number_utils_classes.h +++ b/Algebraic_foundations/include/CGAL/number_utils_classes.h @@ -28,7 +28,8 @@ #ifndef CGAL_NUMBER_UTILS_CLASSES_H #define CGAL_NUMBER_UTILS_CLASSES_H 1 -#include +#include +#include #include #include From 590bdeca5f66e729fcbee8e76c3297bc6c5bc5b9 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 8 Oct 2012 08:43:52 +0000 Subject: [PATCH 076/157] Fix headers of Number_types Mostly missing headers. is really a problem. There are too many circular dependencies between number types headers. I have created a new header that only defines macros. --- Number_types/include/CGAL/FPU.h | 2 +- Number_types/include/CGAL/IEEE_754_unions.h | 1 + Number_types/include/CGAL/Interval_nt.h | 8 +++- Number_types/include/CGAL/MP_Float_impl.h | 6 +++ Number_types/include/CGAL/NT_converter.h | 2 + .../CGAL/Root_of_traits_specializations.h | 1 + .../include/CGAL/Sqrt_extension_fwd.h | 2 + Number_types/include/CGAL/double.h | 5 +- Number_types/include/CGAL/float.h | 4 +- Number_types/include/CGAL/number_type_basic.h | 25 ++-------- .../include/CGAL/number_type_config.h | 47 +++++++++++++++++++ Number_types/include/CGAL/utils.h | 2 +- Number_types/include/CGAL/utils_classes.h | 4 +- 13 files changed, 81 insertions(+), 28 deletions(-) create mode 100644 Number_types/include/CGAL/number_type_config.h diff --git a/Number_types/include/CGAL/FPU.h b/Number_types/include/CGAL/FPU.h index 569bef2f848..383c2751b5d 100644 --- a/Number_types/include/CGAL/FPU.h +++ b/Number_types/include/CGAL/FPU.h @@ -25,7 +25,7 @@ #ifndef CGAL_FPU_H #define CGAL_FPU_H -#include +#include #ifndef __INTEL_COMPILER #include // for HUGE_VAL diff --git a/Number_types/include/CGAL/IEEE_754_unions.h b/Number_types/include/CGAL/IEEE_754_unions.h index 3b3a96117f6..1dfdd924e39 100644 --- a/Number_types/include/CGAL/IEEE_754_unions.h +++ b/Number_types/include/CGAL/IEEE_754_unions.h @@ -26,6 +26,7 @@ #define CGAL_IEEE_754_UNIONS_H #include +#include union IEEE_754_double { diff --git a/Number_types/include/CGAL/Interval_nt.h b/Number_types/include/CGAL/Interval_nt.h index b1a4df0e85f..bedb40f0ea9 100644 --- a/Number_types/include/CGAL/Interval_nt.h +++ b/Number_types/include/CGAL/Interval_nt.h @@ -40,9 +40,15 @@ // - test whether stopping constant propagation only in functions taking // double as arguments, improves performance. -#include +#include // for std::pair +#include +#include +#include #include #include +#include +#include +#include #include namespace CGAL { diff --git a/Number_types/include/CGAL/MP_Float_impl.h b/Number_types/include/CGAL/MP_Float_impl.h index 1546d576835..bee61ba2b5b 100644 --- a/Number_types/include/CGAL/MP_Float_impl.h +++ b/Number_types/include/CGAL/MP_Float_impl.h @@ -19,10 +19,14 @@ // // Author(s) : Sylvain Pion +#ifndef CGAL_MP_FLOAT_IMPL_H +#define CGAL_MP_FLOAT_IMPL_H + #include #include #include #include +#include namespace CGAL { @@ -505,3 +509,5 @@ operator>> (std::istream & is, MP_Float &b) } } //namespace CGAL + +#endif // CGAL_MP_FLOAT_IMPL_H diff --git a/Number_types/include/CGAL/NT_converter.h b/Number_types/include/CGAL/NT_converter.h index 0f24dfa70af..495a11e6c3d 100644 --- a/Number_types/include/CGAL/NT_converter.h +++ b/Number_types/include/CGAL/NT_converter.h @@ -22,6 +22,8 @@ #define CGAL_NT_CONVERTER_H #include +#include +#include template class Interval_nt; diff --git a/Number_types/include/CGAL/Root_of_traits_specializations.h b/Number_types/include/CGAL/Root_of_traits_specializations.h index 4c15d42464c..0aee70ad9ce 100644 --- a/Number_types/include/CGAL/Root_of_traits_specializations.h +++ b/Number_types/include/CGAL/Root_of_traits_specializations.h @@ -25,6 +25,7 @@ #define CGAL_ROOT_OF_TRAITS_SPECIALIZATIONS_H #include +#include namespace CGAL { diff --git a/Number_types/include/CGAL/Sqrt_extension_fwd.h b/Number_types/include/CGAL/Sqrt_extension_fwd.h index 3864250b0b5..1b118f71bef 100644 --- a/Number_types/include/CGAL/Sqrt_extension_fwd.h +++ b/Number_types/include/CGAL/Sqrt_extension_fwd.h @@ -24,6 +24,8 @@ #ifndef CGAL_SQRT_EXTENSION_FWD_H #define CGAL_SQRT_EXTENSION_FWD_H +#include + namespace CGAL{ template diff --git a/Number_types/include/CGAL/double.h b/Number_types/include/CGAL/double.h index 88eb597c8c6..ff2ba81954a 100644 --- a/Number_types/include/CGAL/double.h +++ b/Number_types/include/CGAL/double.h @@ -25,8 +25,9 @@ #ifndef CGAL_DOUBLE_H #define CGAL_DOUBLE_H -#include - +#include +#include +#include #include #include #include // for nextafter diff --git a/Number_types/include/CGAL/float.h b/Number_types/include/CGAL/float.h index 5d172ff7e4c..75e5a49d669 100644 --- a/Number_types/include/CGAL/float.h +++ b/Number_types/include/CGAL/float.h @@ -26,7 +26,9 @@ #ifndef CGAL_FLOAT_H #define CGAL_FLOAT_H -#include +#include +#include +#include #include // std::sqrt, std::pow diff --git a/Number_types/include/CGAL/number_type_basic.h b/Number_types/include/CGAL/number_type_basic.h index ccaa4da08f6..bc71689703d 100644 --- a/Number_types/include/CGAL/number_type_basic.h +++ b/Number_types/include/CGAL/number_type_basic.h @@ -26,24 +26,7 @@ #ifndef CGAL_NUMBER_TYPE_BASIC_H #define CGAL_NUMBER_TYPE_BASIC_H -#include - -#define CGAL_PI 3.14159265358979323846 - - -#ifdef CGAL_USE_NTS_NAMESPACE - -#define CGAL_NTS_BEGIN_NAMESPACE namespace NTS { -#define CGAL_NTS_END_NAMESPACE } -#define CGAL_NTS ::CGAL::NTS:: - -#else - -#define CGAL_NTS_BEGIN_NAMESPACE -#define CGAL_NTS_END_NAMESPACE -#define CGAL_NTS ::CGAL:: - -#endif +#include #include @@ -71,9 +54,6 @@ #include #include -#include -#include - #include #include @@ -95,4 +75,7 @@ #endif // CGAL_USE_GMPXX #endif // CGAL_USE_GMP +#include +#include + #endif // CGAL_NUMBER_TYPE_BASIC_H diff --git a/Number_types/include/CGAL/number_type_config.h b/Number_types/include/CGAL/number_type_config.h new file mode 100644 index 00000000000..52312cca9bd --- /dev/null +++ b/Number_types/include/CGAL/number_type_config.h @@ -0,0 +1,47 @@ +// Copyright (c) 1999,2007,2012 +// 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$ +// +// +// Author(s) : Stefan Schirra, Michael Hemmer + +#ifndef CGAL_NUMBER_TYPE_CONFIG_H +#define CGAL_NUMBER_TYPE_CONFIG_H + +#include + +#define CGAL_PI 3.14159265358979323846 + + +#ifdef CGAL_USE_NTS_NAMESPACE + +#define CGAL_NTS_BEGIN_NAMESPACE namespace NTS { +#define CGAL_NTS_END_NAMESPACE } +#define CGAL_NTS ::CGAL::NTS:: + +#else + +#define CGAL_NTS_BEGIN_NAMESPACE +#define CGAL_NTS_END_NAMESPACE +#define CGAL_NTS ::CGAL:: + +#endif + +#endif // CGAL_NUMBER_TYPE_CONFIG_H diff --git a/Number_types/include/CGAL/utils.h b/Number_types/include/CGAL/utils.h index 61faefbd217..4fbb0f90f65 100644 --- a/Number_types/include/CGAL/utils.h +++ b/Number_types/include/CGAL/utils.h @@ -21,7 +21,7 @@ #ifndef CGAL_UTILS_H #define CGAL_UTILS_H -#include +#include namespace CGAL { diff --git a/Number_types/include/CGAL/utils_classes.h b/Number_types/include/CGAL/utils_classes.h index 6358e17f0a5..d623bf1e2a5 100644 --- a/Number_types/include/CGAL/utils_classes.h +++ b/Number_types/include/CGAL/utils_classes.h @@ -17,7 +17,9 @@ #ifndef CGAL_UTILS_CLASSES_H #define CGAL_UTILS_CLASSES_H -#include + +#include +#include // for std::binary_function #ifdef CGAL_USE_SSE2_MAX #include From 72e709b10ddf170885b243ed8c7579841d2a86f9 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 8 Oct 2012 08:46:14 +0000 Subject: [PATCH 077/157] Fix headers of Interval_support --- Interval_support/include/CGAL/Interval_traits.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Interval_support/include/CGAL/Interval_traits.h b/Interval_support/include/CGAL/Interval_traits.h index 6d434bc477d..ba54a3614b3 100644 --- a/Interval_support/include/CGAL/Interval_traits.h +++ b/Interval_support/include/CGAL/Interval_traits.h @@ -51,7 +51,8 @@ #ifndef CGAL_INTERVAL_TRAITS_H #define CGAL_INTERVAL_TRAITS_H -#include +#include +#include #include #include From 5ef5350f043f309836e7f20398bbf01c0f335ef0 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 8 Oct 2012 09:02:18 +0000 Subject: [PATCH 078/157] Fix headers of Kernel_23 Mostly missing #include, but I had to create a from , to reduce dependency problems. --- .../include/CGAL/Kernel/function_objects.h | 1 + .../CGAL/Kernel/global_functions_internal_2.h | 1 + .../CGAL/Kernel/global_functions_internal_3.h | 1 + Kernel_23/include/CGAL/determinant.h | 2 + .../CGAL/internal/Projection_traits_3.h | 2 + Kernel_23/include/CGAL/kernel_basic.h | 12 +----- Kernel_23/include/CGAL/kernel_config.h | 40 +++++++++++++++++++ Kernel_23/include/CGAL/kernel_to_kernel.h | 5 +++ .../CGAL/predicates/sign_of_determinant.h | 1 + Kernel_23/include/CGAL/rational_rotation.h | 1 + 10 files changed, 55 insertions(+), 11 deletions(-) create mode 100644 Kernel_23/include/CGAL/kernel_config.h diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 8939078661f..ec304568b2c 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -33,6 +33,7 @@ #include #include #include +#include namespace CGAL { diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h b/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h index 126e359fca2..a870077752c 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_internal_2.h @@ -31,6 +31,7 @@ // These functions are not documented for now, but could be as some point. #include +#include #include #include "boost/mpl/equal_to.hpp" #include diff --git a/Kernel_23/include/CGAL/Kernel/global_functions_internal_3.h b/Kernel_23/include/CGAL/Kernel/global_functions_internal_3.h index 1da73db32ba..89eb748c483 100644 --- a/Kernel_23/include/CGAL/Kernel/global_functions_internal_3.h +++ b/Kernel_23/include/CGAL/Kernel/global_functions_internal_3.h @@ -29,6 +29,7 @@ // See comments in CGAL/Kernel/global_functions_internal_3.h. #include +#include #include #include "boost/mpl/equal_to.hpp" #include diff --git a/Kernel_23/include/CGAL/determinant.h b/Kernel_23/include/CGAL/determinant.h index b23d8f181d4..d576653d909 100644 --- a/Kernel_23/include/CGAL/determinant.h +++ b/Kernel_23/include/CGAL/determinant.h @@ -26,6 +26,8 @@ #ifndef CGAL_DETERMINANT_H #define CGAL_DETERMINANT_H +#include + namespace CGAL { template diff --git a/Kernel_23/include/CGAL/internal/Projection_traits_3.h b/Kernel_23/include/CGAL/internal/Projection_traits_3.h index 8aa46bca30b..bd759de091a 100644 --- a/Kernel_23/include/CGAL/internal/Projection_traits_3.h +++ b/Kernel_23/include/CGAL/internal/Projection_traits_3.h @@ -27,6 +27,8 @@ #include #include +#include + namespace CGAL { namespace internal { diff --git a/Kernel_23/include/CGAL/kernel_basic.h b/Kernel_23/include/CGAL/kernel_basic.h index ee3f4b37973..8d1acee9f07 100644 --- a/Kernel_23/include/CGAL/kernel_basic.h +++ b/Kernel_23/include/CGAL/kernel_basic.h @@ -25,17 +25,7 @@ #ifndef CGAL_KERNEL_BASIC_H #define CGAL_KERNEL_BASIC_H -#ifndef CGAL_KERNEL_INLINE -# define CGAL_KERNEL_INLINE inline -#endif - -#ifndef CGAL_KERNEL_MEDIUM_INLINE -# define CGAL_KERNEL_MEDIUM_INLINE -#endif - -#ifndef CGAL_KERNEL_LARGE_INLINE -# define CGAL_KERNEL_LARGE_INLINE -#endif +#include #include #include diff --git a/Kernel_23/include/CGAL/kernel_config.h b/Kernel_23/include/CGAL/kernel_config.h new file mode 100644 index 00000000000..ebb23a61967 --- /dev/null +++ b/Kernel_23/include/CGAL/kernel_config.h @@ -0,0 +1,40 @@ +// Copyright (c) 1999,2003 +// 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$ +// +// +// Author(s) : Stefan Schirra + +#ifndef CGAL_KERNEL_CONFIG_H +#define CGAL_KERNEL_CONFIG_H + +#ifndef CGAL_KERNEL_INLINE +# define CGAL_KERNEL_INLINE inline +#endif + +#ifndef CGAL_KERNEL_MEDIUM_INLINE +# define CGAL_KERNEL_MEDIUM_INLINE +#endif + +#ifndef CGAL_KERNEL_LARGE_INLINE +# define CGAL_KERNEL_LARGE_INLINE +#endif + +#endif // CGAL_KERNEL_CONFIG_H diff --git a/Kernel_23/include/CGAL/kernel_to_kernel.h b/Kernel_23/include/CGAL/kernel_to_kernel.h index ba9957759b1..5c3f8c84646 100644 --- a/Kernel_23/include/CGAL/kernel_to_kernel.h +++ b/Kernel_23/include/CGAL/kernel_to_kernel.h @@ -37,6 +37,11 @@ #endif #endif +#include +#include +#include +#include + namespace CGAL { template diff --git a/Kernel_23/include/CGAL/predicates/sign_of_determinant.h b/Kernel_23/include/CGAL/predicates/sign_of_determinant.h index 221f1e38571..3b3d1267131 100644 --- a/Kernel_23/include/CGAL/predicates/sign_of_determinant.h +++ b/Kernel_23/include/CGAL/predicates/sign_of_determinant.h @@ -27,6 +27,7 @@ #define CGAL_PREDICATES_SIGN_OF_DETERMINANT_H #include +#include namespace CGAL { diff --git a/Kernel_23/include/CGAL/rational_rotation.h b/Kernel_23/include/CGAL/rational_rotation.h index fd8a7e805d0..60d70926abb 100644 --- a/Kernel_23/include/CGAL/rational_rotation.h +++ b/Kernel_23/include/CGAL/rational_rotation.h @@ -27,6 +27,7 @@ #define CGAL_RATIONAL_ROTATION_H #include +#include namespace CGAL { From 7bc300794dd8798b541235432027bb0966496b1a Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 8 Oct 2012 09:03:50 +0000 Subject: [PATCH 079/157] Fix last errors in headers of CGAL foundations All were missing #include. --- .gitignore | 10 ++++++++++ .../include/CGAL/Cartesian/Aff_transformation_rep_2.h | 2 ++ .../include/CGAL/Cartesian/Aff_transformation_rep_3.h | 1 + Cartesian_kernel/include/CGAL/Cartesian/Sphere_3.h | 1 + .../include/CGAL/Cartesian/Tetrahedron_3.h | 1 + .../include/CGAL/Cartesian/Translation_rep_2.h | 2 ++ .../include/CGAL/Cartesian/line_constructions_2.h | 2 ++ .../include/CGAL/Cartesian/point_constructions_2.h | 1 + .../include/CGAL/Cartesian/predicates_on_points_3.h | 1 + .../include/CGAL/constructions/kernel_ftC2.h | 1 + .../include/CGAL/constructions/kernel_ftC3.h | 1 + Distance_2/include/CGAL/squared_distance_2_1.h | 1 + .../include/CGAL/Homogeneous/Aff_transformationH2.h | 1 + .../include/CGAL/Homogeneous/Aff_transformationH3.h | 2 ++ .../include/CGAL/Homogeneous/DirectionH2.h | 2 ++ .../include/CGAL/Homogeneous/DirectionH3.h | 3 ++- .../include/CGAL/Homogeneous/Iso_cuboidH3.h | 3 +++ Homogeneous_kernel/include/CGAL/Homogeneous/LineH2.h | 1 + Homogeneous_kernel/include/CGAL/Homogeneous/RayH3.h | 3 +++ Homogeneous_kernel/include/CGAL/Homogeneous/SphereH3.h | 1 + .../include/CGAL/Homogeneous/basic_constructionsH3.h | 4 ++++ Number_types/include/CGAL/Interval_nt.h | 1 + STL_Extension/include/CGAL/assertions.h | 2 ++ 23 files changed, 46 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index 3ad118d2119..7c1fe6399f1 100644 --- a/.gitignore +++ b/.gitignore @@ -29,6 +29,16 @@ AABB_tree/test/AABB_tree/aabb_naive_vs_tree_distance_segment_test AABB_tree/test/AABB_tree/aabb_projection_triangle_test AABB_tree/test/AABB_tree/aabb_projection_triangle_test.vcproj AABB_tree/test/AABB_tree/cgal_test_with_cmake +Algebraic_foundations/test/Algebraic_foundations/Algebraic_extension_traits +Algebraic_foundations/test/Algebraic_foundations/Algebraic_structure_traits +Algebraic_foundations/test/Algebraic_foundations/CMakeLists.txt +Algebraic_foundations/test/Algebraic_foundations/Chinese_remainder_traits +Algebraic_foundations/test/Algebraic_foundations/Coercion_traits +Algebraic_foundations/test/Algebraic_foundations/Real_embeddable_traits +Algebraic_foundations/test/Algebraic_foundations/Scalar_factor_traits +Algebraic_foundations/test/Algebraic_foundations/cgal_test_with_cmake +Algebraic_foundations/test/Algebraic_foundations/extended_euclidean_algorithm +Algebraic_foundations/test/Algebraic_foundations/ipower Algebraic_kernel_d/test/Algebraic_kernel_d/cgal_test_with_cmake Algebraic_kernel_d/test/Algebraic_kernel_d/rs_isolator Alpha_shapes_2/demo/Alpha_shapes_2/*.exe diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_2.h b/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_2.h index d5a25f176b7..4502c872680 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_2.h @@ -26,6 +26,8 @@ #define CGAL_CARTESIAN_AFF_TRANSFORMATION_REP_2_H #include +#include +#include namespace CGAL { diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_3.h index a759fd70241..21c900d60ff 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Aff_transformation_rep_3.h @@ -25,6 +25,7 @@ #ifndef CGAL_CARTESIAN_AFF_TRANSFORMATION_REP_3_H #define CGAL_CARTESIAN_AFF_TRANSFORMATION_REP_3_H +#include #include namespace CGAL { diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Sphere_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Sphere_3.h index 698b3b87763..d59e03a7e09 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Sphere_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Sphere_3.h @@ -28,6 +28,7 @@ #include #include #include +#include namespace CGAL { diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Tetrahedron_3.h b/Cartesian_kernel/include/CGAL/Cartesian/Tetrahedron_3.h index c5e17c7b3a0..c1831ad95b7 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Tetrahedron_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Tetrahedron_3.h @@ -27,6 +27,7 @@ #include #include +#include #include #include diff --git a/Cartesian_kernel/include/CGAL/Cartesian/Translation_rep_2.h b/Cartesian_kernel/include/CGAL/Cartesian/Translation_rep_2.h index 05f13266216..1f7143b2a15 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/Translation_rep_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/Translation_rep_2.h @@ -25,6 +25,8 @@ #ifndef CGAL_CARTESIAN_TRANSLATION_REP_2_H #define CGAL_CARTESIAN_TRANSLATION_REP_2_H +#include + namespace CGAL { template < class R > diff --git a/Cartesian_kernel/include/CGAL/Cartesian/line_constructions_2.h b/Cartesian_kernel/include/CGAL/Cartesian/line_constructions_2.h index 3b3a3451fd7..3109bca1594 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/line_constructions_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/line_constructions_2.h @@ -28,6 +28,8 @@ #include #include +#include + namespace CGAL { template < class K > diff --git a/Cartesian_kernel/include/CGAL/Cartesian/point_constructions_2.h b/Cartesian_kernel/include/CGAL/Cartesian/point_constructions_2.h index 295c206f23a..0084292a38a 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/point_constructions_2.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/point_constructions_2.h @@ -26,6 +26,7 @@ #define CGAL_CARTESIAN_POINT_CONSTRUCTIONS_2_H #include +#include namespace CGAL { diff --git a/Cartesian_kernel/include/CGAL/Cartesian/predicates_on_points_3.h b/Cartesian_kernel/include/CGAL/Cartesian/predicates_on_points_3.h index a56f561753d..0adb098a6c3 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/predicates_on_points_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/predicates_on_points_3.h @@ -26,6 +26,7 @@ #define CGAL_CARTESIAN_PREDICATES_ON_POINTS_3_H #include +#include namespace CGAL { diff --git a/Cartesian_kernel/include/CGAL/constructions/kernel_ftC2.h b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC2.h index ab3238f2710..e30c68b2022 100644 --- a/Cartesian_kernel/include/CGAL/constructions/kernel_ftC2.h +++ b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC2.h @@ -26,6 +26,7 @@ #define CGAL_CONSTRUCTIONS_KERNEL_FTC2_H #include +#include namespace CGAL { diff --git a/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h index f1d2af1c552..ae9c0c9edfc 100644 --- a/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h +++ b/Cartesian_kernel/include/CGAL/constructions/kernel_ftC3.h @@ -26,6 +26,7 @@ #define CGAL_CONSTRUCTIONS_KERNEL_FTC3_H #include +#include namespace CGAL { diff --git a/Distance_2/include/CGAL/squared_distance_2_1.h b/Distance_2/include/CGAL/squared_distance_2_1.h index 9851623ab28..333ca3cb232 100644 --- a/Distance_2/include/CGAL/squared_distance_2_1.h +++ b/Distance_2/include/CGAL/squared_distance_2_1.h @@ -35,6 +35,7 @@ #include #include #include +#include namespace CGAL { diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/Aff_transformationH2.h b/Homogeneous_kernel/include/CGAL/Homogeneous/Aff_transformationH2.h index 117d6eaef3e..252b2ccd81a 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/Aff_transformationH2.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/Aff_transformationH2.h @@ -27,6 +27,7 @@ #include #include +#include namespace CGAL { diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/Aff_transformationH3.h b/Homogeneous_kernel/include/CGAL/Homogeneous/Aff_transformationH3.h index 58ad8d18a9f..25d5589dc7c 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/Aff_transformationH3.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/Aff_transformationH3.h @@ -27,6 +27,8 @@ #include #include +#include +#include namespace CGAL { diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH2.h b/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH2.h index 61909ff49f8..ce4842b0ee1 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH2.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH2.h @@ -27,6 +27,8 @@ #include #include +#include +#include namespace CGAL { diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH3.h b/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH3.h index 4848bf6631a..e253a47e643 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH3.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/DirectionH3.h @@ -25,9 +25,10 @@ #ifndef CGAL_HOMOGENEOUS_DIRECTION_3_H #define CGAL_HOMOGENEOUS_DIRECTION_3_H +#include #include #include - +#include namespace CGAL { template < class R_ > diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_cuboidH3.h b/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_cuboidH3.h index e9097ed552f..46df6df4119 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_cuboidH3.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/Iso_cuboidH3.h @@ -26,6 +26,9 @@ #define CGAL_ISO_CUBOIDH3_H #include +#include +#include +#include namespace CGAL { diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/LineH2.h b/Homogeneous_kernel/include/CGAL/Homogeneous/LineH2.h index 01e5801567d..dc9e9971634 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/LineH2.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/LineH2.h @@ -25,6 +25,7 @@ #ifndef CGAL_LINEH2_H #define CGAL_LINEH2_H +#include #include namespace CGAL { diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/RayH3.h b/Homogeneous_kernel/include/CGAL/Homogeneous/RayH3.h index 8dd63794be6..44b191a06f0 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/RayH3.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/RayH3.h @@ -26,6 +26,9 @@ #define CGAL_RAYH3_H #include +#include +#include +#include namespace CGAL { diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/SphereH3.h b/Homogeneous_kernel/include/CGAL/Homogeneous/SphereH3.h index fc9c8342a4e..57f3424e003 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/SphereH3.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/SphereH3.h @@ -28,6 +28,7 @@ #include #include #include +#include namespace CGAL { diff --git a/Homogeneous_kernel/include/CGAL/Homogeneous/basic_constructionsH3.h b/Homogeneous_kernel/include/CGAL/Homogeneous/basic_constructionsH3.h index 8fe6c0dfbd2..937b08f5a79 100644 --- a/Homogeneous_kernel/include/CGAL/Homogeneous/basic_constructionsH3.h +++ b/Homogeneous_kernel/include/CGAL/Homogeneous/basic_constructionsH3.h @@ -26,6 +26,10 @@ #ifndef CGAL_BASIC_CONSTRUCTIONSH3_H #define CGAL_BASIC_CONSTRUCTIONSH3_H +#include +#include + + namespace CGAL { template diff --git a/Number_types/include/CGAL/Interval_nt.h b/Number_types/include/CGAL/Interval_nt.h index bedb40f0ea9..547e9a2a99a 100644 --- a/Number_types/include/CGAL/Interval_nt.h +++ b/Number_types/include/CGAL/Interval_nt.h @@ -44,6 +44,7 @@ #include #include #include +#include #include #include #include diff --git a/STL_Extension/include/CGAL/assertions.h b/STL_Extension/include/CGAL/assertions.h index edad2e4b3d0..0470dfa2467 100644 --- a/STL_Extension/include/CGAL/assertions.h +++ b/STL_Extension/include/CGAL/assertions.h @@ -27,6 +27,8 @@ #ifndef CGAL_ASSERTIONS_H #define CGAL_ASSERTIONS_H +#include + // #include // for backward compatibility #ifndef CGAL_NO_ASSERTIONS From ac039fdeca4f87a4d2af3d2141104b21b680840f Mon Sep 17 00:00:00 2001 From: Efi Fogel Date: Mon, 8 Oct 2012 09:24:11 +0000 Subject: [PATCH 080/157] fixed typos --- .../Arr_face_index_map.tex | 18 +++++++++--------- .../Arr_vertex_index_map.tex | 18 +++++++++--------- .../Arrangement_on_surface_2_ref/intro.tex | 4 ++-- 3 files changed, 20 insertions(+), 20 deletions(-) diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_face_index_map.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_face_index_map.tex index d0b0015bfd2..22ea4a6ea9f 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_face_index_map.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_face_index_map.tex @@ -43,16 +43,16 @@ to dynamically maintain the mapping of face handles to indices. \ccNestedType{Arrangement_2}{the type of the attached arrangement.} -\ccTypedef{typedef typename Arrangement_2::Face_handle Face_handle;} - {the face handle type.} +\ccNestedType{category}{\ccc{boost::readable_property_map_tag}} +\ccGlue +\ccNestedType{value_type}{\ccc{unsigned int}} +\ccGlue +\ccNestedType{reference}{u\ccc{nsigned int}} +\ccGlue +\ccNestedType{key_type}{\ccc{Face_handle}} -\ccNestedType{category}{boost::readable_property_map_tag} -\ccGlue -\ccNestedType{value_type}{unsigned int} -\ccGlue -\ccNestedType{reference}{unsigned int} -\ccGlue -\ccNestedType{key_type}{Face_handle} +\ccTypedef{typedef typename Arrangement_2::Face_handle Face_handle;} + {The face handle type.} \ccTypedef{typedef Unique_hash_map Index_map;} {The type of mapping of faces to indices.} diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_vertex_index_map.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_vertex_index_map.tex index f0421c42e10..0a003a87dab 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_vertex_index_map.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/Arr_vertex_index_map.tex @@ -43,16 +43,16 @@ to dynamically maintain the mapping of vertex handles to indices. \ccNestedType{Arrangement_2}{the type of the attached arrangement.} -\ccTypedef{typedef typename Arrangement_2::Vertex_handle Vertex_handle;} - {the vertex handle type.} +\ccNestedType{category}{\ccc{boost::readable_property_map_tag}} +\ccGlue +\ccNestedType{value_type}{\ccc{unsigned int}} +\ccGlue +\ccNestedType{reference}{\ccc{unsigned int}} +\ccGlue +\ccNestedType{key_type}{V\ccc{ertex_handle}} -\ccNestedType{category}{boost::readable_property_map_tag} -\ccGlue -\ccNestedType{value_type}{unsigned int} -\ccGlue -\ccNestedType{reference}{unsigned int} -\ccGlue -\ccNestedType{key_type}{Vertex_handle} +\ccTypedef{typedef typename Arrangement_2::Vertex_handle Vertex_handle;} + {The vertex handle type.} \ccTypedef{typedef Unique_hash_map Index_map;} {The type of mapping of vertices to indices.} diff --git a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/intro.tex b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/intro.tex index 0aa72239fe7..08a9561ba1c 100644 --- a/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/intro.tex +++ b/Arrangement_on_surface_2/doc_tex/Arrangement_on_surface_2_ref/intro.tex @@ -130,9 +130,9 @@ implemented as peripheral classes or as free (global) functions. \ccRefIdfierPage{CGAL::Arr_naive_point_location}\\ \ccRefIdfierPage{CGAL::Arr_walk_along_line_point_location}\\ \ccRefIdfierPage{CGAL::Arr_trapezoid_ric_point_location}\\ -\ccRefIdfierPage{CGAL::Arr_landmarks_point_location} +\ccRefIdfierPage{CGAL::Arr_landmarks_point_location}\\ ~\\ -\ccRefIdfierPage{CGAL::Arr_vertex_index_map} +\ccRefIdfierPage{CGAL::Arr_vertex_index_map}\\ \ccRefIdfierPage{CGAL::Arr_face_index_map} \subsection*{Tags} From 795c71fc9bcd0bafd3315569f36bbf47f17e67b5 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 8 Oct 2012 09:33:38 +0000 Subject: [PATCH 081/157] Fix headers of Mesh_2 and Mesh_3. All were missing #include. I found out that way that and were using global functions instead of functors of the traits class. Note also the funny bug that was depending on ! --- Mesh_2/include/CGAL/Delaunay_mesh_criteria_2.h | 1 + Mesh_2/include/CGAL/Filter_circulator.h | 3 +++ Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h | 4 +++- Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h | 8 ++++++-- Mesh_3/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h | 3 +++ Mesh_3/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h | 2 ++ Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h | 1 + Mesh_3/include/CGAL/exude_mesh_3.h | 2 ++ .../include/CGAL/Regular_triangulation_cell_base_3.h | 2 +- 9 files changed, 22 insertions(+), 4 deletions(-) diff --git a/Mesh_2/include/CGAL/Delaunay_mesh_criteria_2.h b/Mesh_2/include/CGAL/Delaunay_mesh_criteria_2.h index 9adf47aa3f2..f46096ddf12 100644 --- a/Mesh_2/include/CGAL/Delaunay_mesh_criteria_2.h +++ b/Mesh_2/include/CGAL/Delaunay_mesh_criteria_2.h @@ -22,6 +22,7 @@ #define CGAL_DELAUNAY_MESH_CRITERIA_2_H #include +#include namespace CGAL { diff --git a/Mesh_2/include/CGAL/Filter_circulator.h b/Mesh_2/include/CGAL/Filter_circulator.h index 132bf2aeb8d..bf53f0d6db7 100644 --- a/Mesh_2/include/CGAL/Filter_circulator.h +++ b/Mesh_2/include/CGAL/Filter_circulator.h @@ -21,6 +21,9 @@ #ifndef CGAL_FILTRED_CIRCULATOR_H #define CGAL_FILTRED_CIRCULATOR_H +#include +#include + namespace CGAL { template 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 758e1ff4a73..fb04217b162 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 @@ -355,7 +355,9 @@ insert_corners() nearest = (*it)->point(); } } - const FT nearest_sq_dist = CGAL::squared_distance( nearest, p); + typename Gt::Compute_squared_distance_3 squared_distance = + c3t3_.triangulation().geom_traits().compute_squared_distance_3_object(); + const FT nearest_sq_dist = squared_distance( nearest, p); w = (std::min)(w, nearest_sq_dist / FT(9)); } 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 9592d6ff773..32cc3d0d456 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/Refine_facets_3.h @@ -31,6 +31,8 @@ #include #include +#include + #include #include #include @@ -692,6 +694,7 @@ compute_facet_properties(const Facet& facet) const // Functor typename Gt::Is_degenerate_3 is_degenerate = Gt().is_degenerate_3_object(); + typename Gt::Compare_xyz_3 compare_xyz = Gt().compare_xyz_3_object(); typename MD::Do_intersect_surface do_intersect_surface = r_oracle_.do_intersect_surface_object(); @@ -714,7 +717,7 @@ compute_facet_properties(const Facet& facet) const // Trick to have canonical vector : thus, we compute alwais the same // intersection Segment_3 segment = *p_segment; - if ( CGAL::compare_xyz(p_segment->source(),p_segment->target()) + if ( compare_xyz(p_segment->source(),p_segment->target()) == CGAL::LARGER ) { typename Gt::Construct_opposite_segment_3 opposite = @@ -764,7 +767,8 @@ compute_facet_properties(const Facet& facet) const // Trick to have canonical vector : thus, we compute alwais the same // intersection Line_3 line = *p_line; - if ( CGAL::compare_xyz(p_line->point(0),p_line->point(1)) + typename Gt::Compare_xyz_3 compare_xyz = Gt().compare_xyz_3_object(); + if ( compare_xyz(p_line->point(0),p_line->point(1)) == CGAL::LARGER ) { typename Gt::Construct_opposite_line_3 opposite = diff --git a/Mesh_3/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h b/Mesh_3/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h index a2dd88d7228..a5edf1429d2 100644 --- a/Mesh_3/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h +++ b/Mesh_3/include/CGAL/Mesh_3/mesh_standard_cell_criteria.h @@ -28,6 +28,9 @@ #include +#include // for CGAL::min +#include // for CGAL::square +#include namespace CGAL { diff --git a/Mesh_3/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h b/Mesh_3/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h index 800e1768d5e..55244677029 100644 --- a/Mesh_3/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h +++ b/Mesh_3/include/CGAL/Mesh_3/mesh_standard_facet_criteria.h @@ -27,7 +27,9 @@ #ifndef CGAL_MESH_3_MESH_STANDARD_FACET_CRITERIA_H #define CGAL_MESH_3_MESH_STANDARD_FACET_CRITERIA_H +#include // for to_double #include +#include namespace CGAL { diff --git a/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h b/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h index a2fdb83fa93..27ad8e11564 100644 --- a/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h +++ b/Mesh_3/include/CGAL/Mesh_3/vertex_perturbation.h @@ -35,6 +35,7 @@ #include #include +#include namespace CGAL { diff --git a/Mesh_3/include/CGAL/exude_mesh_3.h b/Mesh_3/include/CGAL/exude_mesh_3.h index f28d2e2a8fe..e71764534b7 100644 --- a/Mesh_3/include/CGAL/exude_mesh_3.h +++ b/Mesh_3/include/CGAL/exude_mesh_3.h @@ -29,6 +29,8 @@ #include #include #include +#include +#include namespace CGAL { diff --git a/Triangulation_3/include/CGAL/Regular_triangulation_cell_base_3.h b/Triangulation_3/include/CGAL/Regular_triangulation_cell_base_3.h index c9e9d5a6852..9af5d0d8e69 100644 --- a/Triangulation_3/include/CGAL/Regular_triangulation_cell_base_3.h +++ b/Triangulation_3/include/CGAL/Regular_triangulation_cell_base_3.h @@ -24,7 +24,7 @@ #define CGAL_REGULAR_TRIANGULATION_CELL_BASE_3_H #include -#include +#include namespace CGAL { From 83f909ec777adb18fd208f2ae5a52f38543eb355 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 9 Oct 2012 09:09:23 +0000 Subject: [PATCH 082/157] Fix missing #include --- Cartesian_kernel/include/CGAL/Cartesian/plane_constructions_3.h | 1 + 1 file changed, 1 insertion(+) diff --git a/Cartesian_kernel/include/CGAL/Cartesian/plane_constructions_3.h b/Cartesian_kernel/include/CGAL/Cartesian/plane_constructions_3.h index a311c2ff745..470ab3803ca 100644 --- a/Cartesian_kernel/include/CGAL/Cartesian/plane_constructions_3.h +++ b/Cartesian_kernel/include/CGAL/Cartesian/plane_constructions_3.h @@ -26,6 +26,7 @@ #define CGAL_CARTESIAN_PLANE_CONSTRUCTIONS_3_H #include +#include #include namespace CGAL { From 7fbe8d6bef228e075c8f95cea4c3c07dd122d333 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 9 Oct 2012 09:24:27 +0000 Subject: [PATCH 083/157] That package has been renamed, but but its package_info. --- .../package_info/{CGALimageIO => CGAL_ImageIO}/license.txt | 0 .../package_info/{CGALimageIO => CGAL_ImageIO}/maintainer | 0 2 files changed, 0 insertions(+), 0 deletions(-) rename CGAL_ImageIO/package_info/{CGALimageIO => CGAL_ImageIO}/license.txt (100%) rename CGAL_ImageIO/package_info/{CGALimageIO => CGAL_ImageIO}/maintainer (100%) diff --git a/CGAL_ImageIO/package_info/CGALimageIO/license.txt b/CGAL_ImageIO/package_info/CGAL_ImageIO/license.txt similarity index 100% rename from CGAL_ImageIO/package_info/CGALimageIO/license.txt rename to CGAL_ImageIO/package_info/CGAL_ImageIO/license.txt diff --git a/CGAL_ImageIO/package_info/CGALimageIO/maintainer b/CGAL_ImageIO/package_info/CGAL_ImageIO/maintainer similarity index 100% rename from CGAL_ImageIO/package_info/CGALimageIO/maintainer rename to CGAL_ImageIO/package_info/CGAL_ImageIO/maintainer From 648472bdacd565b9e438c02edc4f726b6b6cace1 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 9 Oct 2012 09:26:23 +0000 Subject: [PATCH 084/157] After a run of detect_packages_license --- Inscribed_areas/package_info/Inscribed_areas/license.txt | 2 +- Installation/CMakeLists.txt | 4 ++-- Intersections_2/test/Intersections_2/test_intersections_2.cpp | 4 ---- Intersections_3/test/Intersections_3/test_intersections_3.cpp | 4 ---- Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h | 4 ++-- Scripts/developer_scripts/cgal_test_with_cmake | 2 ++ Scripts/developer_scripts/create_cgal_test | 1 + 7 files changed, 8 insertions(+), 13 deletions(-) diff --git a/Inscribed_areas/package_info/Inscribed_areas/license.txt b/Inscribed_areas/package_info/Inscribed_areas/license.txt index 8bb8efcb72b..0d3d7e59728 100644 --- a/Inscribed_areas/package_info/Inscribed_areas/license.txt +++ b/Inscribed_areas/package_info/Inscribed_areas/license.txt @@ -1 +1 @@ -GPL (v3 or later) +GPL (v3 or later) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 407d969d9ac..c12c568e84c 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -988,9 +988,9 @@ You must disable CGAL_ENABLE_CHECK_HEADERS.") foreach (package ${CGAL_CONFIGURED_PACKAGES_NAMES}) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include) set(depends "") - file(GLOB_RECURSE ${package}_HEADERS + file(GLOB ${package}_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include" - "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/*.h") + "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/CGAL/*.h") foreach(header ${${package}_HEADERS}) string(REPLACE "/" "__" header2 "${header}") string(REPLACE "." "_" header2 "${header2}") diff --git a/Intersections_2/test/Intersections_2/test_intersections_2.cpp b/Intersections_2/test/Intersections_2/test_intersections_2.cpp index c128bb5a50d..606524f35b0 100644 --- a/Intersections_2/test/Intersections_2/test_intersections_2.cpp +++ b/Intersections_2/test/Intersections_2/test_intersections_2.cpp @@ -21,10 +21,6 @@ #include #include -#ifdef NDEBUG -# error The test-suite needs no NDEBUG defined -#endif - const double epsilon = 0.001; struct randomint { diff --git a/Intersections_3/test/Intersections_3/test_intersections_3.cpp b/Intersections_3/test/Intersections_3/test_intersections_3.cpp index 36921c8a403..f45790aa32d 100644 --- a/Intersections_3/test/Intersections_3/test_intersections_3.cpp +++ b/Intersections_3/test/Intersections_3/test_intersections_3.cpp @@ -10,10 +10,6 @@ #include #include -#ifdef NDEBUG -# error The test-suite needs no NDEBUG defined -#endif - const double epsilon = 0.001; struct randomint { diff --git a/Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h b/Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h index 6e5869a2d0f..315d3275090 100644 --- a/Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h @@ -57,8 +57,8 @@ dihedral_angle(const typename K::Point_3& a, const Vector_3 abad = cross_product(ab,ad); const double x = CGAL::to_double(scalar_product(cross_product(ab,ac), abad)); - const FT l_ab = CGAL::sqrt(sq_distance(a,b)); - const double y = CGAL::to_double(l_ab * scalar_product(ac,abad)); + const double l_ab = CGAL::sqrt(CGAL::to_double(sq_distance(a,b))); + const double y = l_ab * CGAL::to_double(scalar_product(ac,abad)); return FT(std::atan2(y, x) * 180 / CGAL_PI ); } diff --git a/Scripts/developer_scripts/cgal_test_with_cmake b/Scripts/developer_scripts/cgal_test_with_cmake index d888c301401..ee4c8181a01 100755 --- a/Scripts/developer_scripts/cgal_test_with_cmake +++ b/Scripts/developer_scripts/cgal_test_with_cmake @@ -13,4 +13,6 @@ fi [ ! -x cgal_test_with_cmake ] && echo "No cgal_test_with_cmake in current directory, creating it" && create_cgal_test_with_cmake ${in_demo} ./cgal_test_with_cmake $@ +RESULT=$? cat error.txt +exit $RESULT diff --git a/Scripts/developer_scripts/create_cgal_test b/Scripts/developer_scripts/create_cgal_test index 706427ac936..e472be4cc95 100755 --- a/Scripts/developer_scripts/create_cgal_test +++ b/Scripts/developer_scripts/create_cgal_test @@ -81,6 +81,7 @@ configure() echo "Configuring... " if eval 'cmake "\$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \\ + -DCMAKE_BUILD_TYPE=Debug \\ -DCGAL_DIR="\$CGAL_DIR" \\ .' ; then From f0118a13110a60b12afb7e82c81230024e6ff6a8 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 9 Oct 2012 09:28:37 +0000 Subject: [PATCH 085/157] Revert last commit (commited by error) --- Inscribed_areas/package_info/Inscribed_areas/license.txt | 2 +- Installation/CMakeLists.txt | 4 ++-- Intersections_2/test/Intersections_2/test_intersections_2.cpp | 4 ++++ Intersections_3/test/Intersections_3/test_intersections_3.cpp | 4 ++++ Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h | 4 ++-- Scripts/developer_scripts/cgal_test_with_cmake | 2 -- Scripts/developer_scripts/create_cgal_test | 1 - 7 files changed, 13 insertions(+), 8 deletions(-) diff --git a/Inscribed_areas/package_info/Inscribed_areas/license.txt b/Inscribed_areas/package_info/Inscribed_areas/license.txt index 0d3d7e59728..8bb8efcb72b 100644 --- a/Inscribed_areas/package_info/Inscribed_areas/license.txt +++ b/Inscribed_areas/package_info/Inscribed_areas/license.txt @@ -1 +1 @@ -GPL (v3 or later) +GPL (v3 or later) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index c12c568e84c..407d969d9ac 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -988,9 +988,9 @@ You must disable CGAL_ENABLE_CHECK_HEADERS.") foreach (package ${CGAL_CONFIGURED_PACKAGES_NAMES}) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include) set(depends "") - file(GLOB ${package}_HEADERS + file(GLOB_RECURSE ${package}_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include" - "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/CGAL/*.h") + "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/*.h") foreach(header ${${package}_HEADERS}) string(REPLACE "/" "__" header2 "${header}") string(REPLACE "." "_" header2 "${header2}") diff --git a/Intersections_2/test/Intersections_2/test_intersections_2.cpp b/Intersections_2/test/Intersections_2/test_intersections_2.cpp index 606524f35b0..c128bb5a50d 100644 --- a/Intersections_2/test/Intersections_2/test_intersections_2.cpp +++ b/Intersections_2/test/Intersections_2/test_intersections_2.cpp @@ -21,6 +21,10 @@ #include #include +#ifdef NDEBUG +# error The test-suite needs no NDEBUG defined +#endif + const double epsilon = 0.001; struct randomint { diff --git a/Intersections_3/test/Intersections_3/test_intersections_3.cpp b/Intersections_3/test/Intersections_3/test_intersections_3.cpp index f45790aa32d..36921c8a403 100644 --- a/Intersections_3/test/Intersections_3/test_intersections_3.cpp +++ b/Intersections_3/test/Intersections_3/test_intersections_3.cpp @@ -10,6 +10,10 @@ #include #include +#ifdef NDEBUG +# error The test-suite needs no NDEBUG defined +#endif + const double epsilon = 0.001; struct randomint { diff --git a/Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h b/Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h index 315d3275090..6e5869a2d0f 100644 --- a/Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h @@ -57,8 +57,8 @@ dihedral_angle(const typename K::Point_3& a, const Vector_3 abad = cross_product(ab,ad); const double x = CGAL::to_double(scalar_product(cross_product(ab,ac), abad)); - const double l_ab = CGAL::sqrt(CGAL::to_double(sq_distance(a,b))); - const double y = l_ab * CGAL::to_double(scalar_product(ac,abad)); + const FT l_ab = CGAL::sqrt(sq_distance(a,b)); + const double y = CGAL::to_double(l_ab * scalar_product(ac,abad)); return FT(std::atan2(y, x) * 180 / CGAL_PI ); } diff --git a/Scripts/developer_scripts/cgal_test_with_cmake b/Scripts/developer_scripts/cgal_test_with_cmake index ee4c8181a01..d888c301401 100755 --- a/Scripts/developer_scripts/cgal_test_with_cmake +++ b/Scripts/developer_scripts/cgal_test_with_cmake @@ -13,6 +13,4 @@ fi [ ! -x cgal_test_with_cmake ] && echo "No cgal_test_with_cmake in current directory, creating it" && create_cgal_test_with_cmake ${in_demo} ./cgal_test_with_cmake $@ -RESULT=$? cat error.txt -exit $RESULT diff --git a/Scripts/developer_scripts/create_cgal_test b/Scripts/developer_scripts/create_cgal_test index e472be4cc95..706427ac936 100755 --- a/Scripts/developer_scripts/create_cgal_test +++ b/Scripts/developer_scripts/create_cgal_test @@ -81,7 +81,6 @@ configure() echo "Configuring... " if eval 'cmake "\$CMAKE_GENERATOR" -DRUNNING_CGAL_AUTO_TEST=TRUE \\ - -DCMAKE_BUILD_TYPE=Debug \\ -DCGAL_DIR="\$CGAL_DIR" \\ .' ; then From 8e1eb85565a5d666821900f247330560e6109a28 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 9 Oct 2012 09:29:31 +0000 Subject: [PATCH 086/157] After a run of detect_packages_license --- Inscribed_areas/package_info/Inscribed_areas/license.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Inscribed_areas/package_info/Inscribed_areas/license.txt b/Inscribed_areas/package_info/Inscribed_areas/license.txt index 8bb8efcb72b..0d3d7e59728 100644 --- a/Inscribed_areas/package_info/Inscribed_areas/license.txt +++ b/Inscribed_areas/package_info/Inscribed_areas/license.txt @@ -1 +1 @@ -GPL (v3 or later) +GPL (v3 or later) From 8cfa1699a3769eef211809546dabc7938e215954 Mon Sep 17 00:00:00 2001 From: Michael Hemmer Date: Tue, 9 Oct 2012 11:52:16 +0000 Subject: [PATCH 087/157] update email --- .../package_info/Algebraic_foundations/maintainer | 2 +- Algebraic_kernel_d/package_info/Algebraic_kernel_d/maintainer | 2 +- Arithmetic_kernel/package_info/Arithmetic_kernel/maintainer | 2 +- Interval_support/package_info/Interval_support/maintainer | 2 +- Modular_arithmetic/package_info/Modular_arithmetic/maintainer | 2 +- Polynomial/package_info/Polynomial/maintainer | 3 ++- 6 files changed, 7 insertions(+), 6 deletions(-) diff --git a/Algebraic_foundations/package_info/Algebraic_foundations/maintainer b/Algebraic_foundations/package_info/Algebraic_foundations/maintainer index 1a805590fcb..2fac76fa750 100644 --- a/Algebraic_foundations/package_info/Algebraic_foundations/maintainer +++ b/Algebraic_foundations/package_info/Algebraic_foundations/maintainer @@ -1 +1 @@ -Michael Hemmer +Michael Hemmer \ No newline at end of file diff --git a/Algebraic_kernel_d/package_info/Algebraic_kernel_d/maintainer b/Algebraic_kernel_d/package_info/Algebraic_kernel_d/maintainer index 84ecaa5f3f7..77cf0d990e8 100644 --- a/Algebraic_kernel_d/package_info/Algebraic_kernel_d/maintainer +++ b/Algebraic_kernel_d/package_info/Algebraic_kernel_d/maintainer @@ -1,3 +1,3 @@ -Univariate algebraic kernel: Michael Hemmer. +Univariate algebraic kernel: Michael Hemmer . Univariate algebraic kernel based on RS: Luis Peñaranda. Bivariate algebraic kernel: Michael Kerber. diff --git a/Arithmetic_kernel/package_info/Arithmetic_kernel/maintainer b/Arithmetic_kernel/package_info/Arithmetic_kernel/maintainer index b354f14e7dd..291dcf918ae 100644 --- a/Arithmetic_kernel/package_info/Arithmetic_kernel/maintainer +++ b/Arithmetic_kernel/package_info/Arithmetic_kernel/maintainer @@ -1 +1 @@ -Michael Hemmer +Michael Hemmer diff --git a/Interval_support/package_info/Interval_support/maintainer b/Interval_support/package_info/Interval_support/maintainer index b354f14e7dd..291dcf918ae 100644 --- a/Interval_support/package_info/Interval_support/maintainer +++ b/Interval_support/package_info/Interval_support/maintainer @@ -1 +1 @@ -Michael Hemmer +Michael Hemmer diff --git a/Modular_arithmetic/package_info/Modular_arithmetic/maintainer b/Modular_arithmetic/package_info/Modular_arithmetic/maintainer index 004333ad859..291dcf918ae 100644 --- a/Modular_arithmetic/package_info/Modular_arithmetic/maintainer +++ b/Modular_arithmetic/package_info/Modular_arithmetic/maintainer @@ -1 +1 @@ -Michael Hemmer +Michael Hemmer diff --git a/Polynomial/package_info/Polynomial/maintainer b/Polynomial/package_info/Polynomial/maintainer index 004333ad859..664ae558940 100644 --- a/Polynomial/package_info/Polynomial/maintainer +++ b/Polynomial/package_info/Polynomial/maintainer @@ -1 +1,2 @@ -Michael Hemmer +Michael Hemmer +Eric Berberich \ No newline at end of file From 9b72601224e75bcbb60d05d3566f6f3975c1a1d9 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Tue, 9 Oct 2012 12:21:53 +0000 Subject: [PATCH 088/157] give some more facts about optional libs, in particular NTL --- Installation/doc_tex/Installation/installation.tex | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/Installation/doc_tex/Installation/installation.tex b/Installation/doc_tex/Installation/installation.tex index 072b12b75d7..b2b2f937b24 100644 --- a/Installation/doc_tex/Installation/installation.tex +++ b/Installation/doc_tex/Installation/installation.tex @@ -516,9 +516,11 @@ your own demos you might need these \cgal-libraries. \section{Optional Third Party Libraries\label{sec:optional3rdpartysoftware}} -Optional 3rd party software is only required to build examples and -demos shipped with \cgal\ or to build your own project using \cgal. In order -to simplify these builds, various libraries can be \emph{prepared to be +Optional 3rd party software can be used by \cgal\ for various reasons: +Usually certain optional libraries are required to build examples and +demos shipped with \cgal\ or to build your own project using \cgal. +Another reason is to speed up basic tasks. +In order to support these goals, all optional libraries can be \emph{prepared to be used with \cgal} while configuring \cgal, just in the same way as essential libraries are configured. Whenever building an example or a demo (or your own executable), these \emph{preconfigured} libraries @@ -581,9 +583,9 @@ Mainly parts in \cgal's algebraic kernel require \rs3. \ntl\ provides data structures and algorithms for signed, arbitrary length integers, and for vectors, matrices, and polynomials over the -integers and over finite fields. In \cgal\ \ntl\ is used to speed up -polynomial operations such as GCDs. It is recommended to install \ntl\ -with support from \gmp. +integers and over finite fields. The optional library \ntl\ is used by +\cgal\ to speed up operations of the Polynomial package, such as GCDs. +It is recommended to install \ntl\ with support from \gmp. \ntl\ can be downloaded from \ntlpage. Version 5.1 or higher is recommended. From 681f282d77a8554fd18701b6d5287e1a3aff182d Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Tue, 9 Oct 2012 12:55:09 +0000 Subject: [PATCH 089/157] Fix by Daniel Russel to make testsuite greener Raise "NUMERICAL ISSUE" instead of "WARNING". The latter made some rows of the testsuite completely yellow. Fix has been tested locally. --- .../include/CGAL/Kinetic/Sort.h | 56 +++++++++---------- .../Polynomial_kernel/include/Check_solver.h | 12 ++-- 2 files changed, 34 insertions(+), 34 deletions(-) diff --git a/Kinetic_data_structures/include/CGAL/Kinetic/Sort.h b/Kinetic_data_structures/include/CGAL/Kinetic/Sort.h index dd4a286f16a..d5e0a34ad57 100644 --- a/Kinetic_data_structures/include/CGAL/Kinetic/Sort.h +++ b/Kinetic_data_structures/include/CGAL/Kinetic/Sort.h @@ -14,7 +14,7 @@ // // $URL$ // $Id$ -// +// // // Author(s) : Daniel Russel @@ -54,7 +54,7 @@ template class Sort: typedef typename Traits::Active_points_1_table TTable; typedef typename Traits::Kinetic_kernel::Compare_x_1 KLess; typedef typename Traits::Instantaneous_kernel::Compare_x_1 IComp; - + //typedef typename Traits::Instantaneous_kernel::Compare_x_1 ILess; typedef Sort This; @@ -69,7 +69,7 @@ template class Sort: // STL algorithms want less rather than compare. So we need to convert. struct ILess { ILess(IComp ic): ic_(ic){} - + bool operator()(Object_key a, Object_key b) const { bool ret=( ic_(a,b) == CGAL::SMALLER); return ret; @@ -113,16 +113,16 @@ template class Sort: } Less less_; }*/ - + typedef Swap_event Event; friend class Swap_event; // Redirects the Simulator notifications to function calls CGAL_KINETIC_DECLARE_LISTENERS(typename Traits::Simulator, typename Active_objects_table) public: - + // Register this KDS with the MovingObjectTable and the Simulator - Sort(Traits tr, Visitor v=Visitor()/*, + Sort(Traits tr, Visitor v=Visitor()/*, typedef Active_objects_table::Handle aot, Kinetic_less kless=tr.kinetic_kernel_object().is_less_x_1_object(), Instantaneous_less iless*/): compare_(tr.kinetic_kernel_object().compare_x_1_object()), @@ -161,9 +161,9 @@ public: k, iless_); CGAL_LOG(Log::LOTS, "\nInserting " << k); if (it != sorted_.end()) { - CGAL_LOG(Log::LOTS, " before " << it->object() <object() <delete_event(n->event()); n->set_event(Event_key()); } - + it->swap(*n); - + CGAL_LOG(Log::LOTS, "Updating next certificate " << std::endl); if (n != sorted_.end()) { rebuild_certificate(n); @@ -241,14 +241,14 @@ public: } else { it->set_event(simulator_->null_event()); } - - + + CGAL_LOG(Log::LOTS, "Updating prev certificate " << std::endl); if (it != sorted_.begin()) { rebuild_certificate(prior(it)); } v_.post_swap(it, n); - + CGAL_LOG_WRITE(Log::LOTS, write(LOG_STREAM)); } @@ -261,18 +261,18 @@ public: std::cerr << "ERROR: objects " << it->object() << " and " << next(it)->object() << " are out of order.\n"; std::cerr << "Kinetic are " << aot_->at(it->object()) << " and " << aot_->at(*next(it)) << std::endl; - std::cerr << "Time is " << ik_.time() << std::endl; - /*std::cerr << "Static are " << ik_.current_coordinates_object()(it->object()) << " and " + std::cerr << "Time is " << ik_.time() << std::endl; + /*std::cerr << "Static are " << ik_.current_coordinates_object()(it->object()) << " and " << ik_.current_coordinates_object()(next(it)->object()) << std::endl;*/ std::cerr << "ERROR: order is "; #else if (warned_.find(*it) == warned_.end() || warned_[*it].find(*next(it)) == warned_[*it].end()) { - std::cerr << "WARNING: objects " << it->object() << " and " + std::cerr << "NUMERIC ISSUE: objects " << it->object() << " and " << next(it)->object() << " are out of order.\n"; std::cerr << aot_->at(it->object()) << " and " << aot_->at(next(it)->object()) << std::endl; - std::cerr << "Time is " << ik_.time() << std::endl; - std::cerr << "WARNING: order is "; + std::cerr << "Time is " << ik_.time() << std::endl; + std::cerr << "NUMERIC ISSUE: order is "; } #endif write(std::cerr); @@ -288,25 +288,25 @@ public: } } } - if (compare_.sign_at( aot_->at(it->object()), + if (compare_.sign_at( aot_->at(it->object()), aot_->at(next(it)->object()), simulator_->current_time()) == CGAL::LARGER) { #ifdef CGAL_KINETIC_CHECK_EXACTNESS std::cerr << "ERROR: kinetic objects " << it->object() << " and " << next(it)->object() << " are out of order.\n"; std::cerr << "Kinetic are " << aot_->at(it->object()) << " and " << aot_->at(*next(it)) << std::endl; - std::cerr << "Time is " <object()) << " and " + std::cerr << "Time is " <object()) << " and " << ik_.current_coordinates_object()(next(it)->object()) << std::endl;*/ std::cerr << "ERROR: order is "; #else if (warned_.find(*it) == warned_.end() || warned_[*it].find(*next(it)) == warned_[*it].end()) { - std::cerr << "WARNING: objects " << it->object() << " and " + std::cerr << "NUMERIC ISSUE: objects " << it->object() << " and " << next(it)->object() << " are out of order.\n"; std::cerr << aot_->at(it->object()) << " and " << aot_->at(next(it)->object()) << std::endl; - std::cerr << "Time is " <::const_iterator it = sorted_.begin(); it->object() != sorted_.back().object(); ++it) { @@ -371,7 +371,7 @@ public: //iterator it = std::equal_range(sorted_.begin(), sorted_.end(),k).first; CGAL_precondition(it != sorted_.end()); CGAL_precondition(it->object() == k); - + v_.pre_remove_vertex(it); if (next(it) != Iterator(end())) { simulator_->delete_event(it->event()); @@ -453,7 +453,7 @@ public: if (s_.will_fail()) out << " next is " << s_.failure_time(); else out << " out of failures"; } - void audit(typename Sort::Event_key + void audit(typename Sort::Event_key #ifndef NDEBUG tk #endif 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 23eb1a1c917..5dc41b49884 100644 --- a/Kinetic_data_structures/test/Polynomial_kernel/include/Check_solver.h +++ b/Kinetic_data_structures/test/Polynomial_kernel/include/Check_solver.h @@ -36,7 +36,7 @@ public: /*void time_estimate(const Fn &, const Rt& , False){ } - + void time_estimate(const Fn &q, const Rt& start, True){ Root_stack s= k_.root_stack_object(q, start, std::numeric_limits::infinity()); CGAL::Timer timer; @@ -92,7 +92,7 @@ public: if (reps==0 && verbose) { //comp.push_back(CGAL::to_double(r)); if (last_root > s.top()) { - std::cerr << "WARNING last root was " << last_root << " and current root is " + std::cerr << "NUMERIC ISSUE last root was " << last_root << " and current root is " << s.top() << std::endl; } CGAL_assertion(last_root<= s.top()); @@ -103,13 +103,13 @@ public: int i=0; }*/ roots.push_back(s.top()); - + std::cout << "<" << CGAL::to_double(s.top()); //if (iem(s.top())) { std::cout <<"E";} std::cout << "> " << std::flush; /*} else { - + }*/ } s.pop(); @@ -152,11 +152,11 @@ public: std::cout << std::endl; for (unsigned int i=0; i< taken_maple.size(); ++i) { if (!taken_maple[i]) - std::cerr << "WARNING Missing " << roots_b[i] << std::endl; + std::cerr << "NUMERIC ISSUE Missing " << roots_b[i] << std::endl; } for (unsigned int i=0; i< taken_solver.size(); ++i) { - if (!taken_solver[i]) std::cerr << "WARNING Extra " << roots[i] << std::endl; + if (!taken_solver[i]) std::cerr << "NUMERIC ISSUE Extra " << roots[i] << std::endl; } } From abd413f3fc4c0eb0906cf5645fcd7878e1467af8 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 9 Oct 2012 13:33:06 +0000 Subject: [PATCH 090/157] Cherry pick a bug-fix to demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp | ------------------------------------------------------------------------ | r72724 | lrineau | 2012-10-09 15:30:02 +0200 (Tue, 09 Oct 2012) | 4 lines | Changed paths: | M /branches/features/Mesh_3-experimental-GF/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp | | The orient_soup_plugin applies also to polyhedron items | | because of the "shuffle" function. | | ------------------------------------------------------------------------ --- .../demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp index ceef12158d7..60a312124bc 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_orient_soup_plugin.cpp @@ -25,7 +25,8 @@ public: bool applicable() const { Q_FOREACH(Scene_interface::Item_id index, scene->selectionIndices()) { - if(qobject_cast(scene->item(index))) + if(qobject_cast(scene->item(index))|| + qobject_cast(scene->item(index))) return true; } return false; From 5d0388577509651e8866941af9bfe90857d527e7 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 10 Oct 2012 09:58:32 +0000 Subject: [PATCH 091/157] Enable the Doxygen testsuite --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index 8ba8eb6a2c6..6e7f276fad9 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -9,6 +9,7 @@ # | | | | | # * * * * * command to be executed +PATH=/bin:/usr/bin:/home/lrineau/bin # Update testsuite result pages 5,15,25,35,45,55 * * * * cd $HOME/CGAL/collect_and_public_testresults; ./treat_result_collection @@ -30,6 +31,9 @@ # Manual Test suite, at 9:40pm 40 21 * * * cd $HOME/CGAL/releases-and-testsuites-with-cmake/CGAL-I/doc_tex; nice -19 $HOME/bin/cgal_manual -testsuite || true +# Doxygen Test suite, at 9:05pm +0 21 * * * time $HOME/CGAL/python-3.3/bin/python3 testsuite.py --doxyassist $HOME/CGAL/doxyassist/doxyassist.py --doxygen $HOME/CGAL/doxygen-svn/bin/doxygen --documentation $HOME/CGAL/doxy-port-pmoeller/Documentation --publish /var/CGAL/www/Members/Doxygen_test/ --do-update --do-purge-rebuild + # Dump the crontab to SVN every hour at minute 18 18 * * * * $HOME/bin/dump_crontab From 960a24e02ca63bca1adb39140efc3a5ca785c9d4 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Wed, 10 Oct 2012 10:12:15 +0000 Subject: [PATCH 092/157] we're now having a NTL testsuite and support NTL --- Polynomial/dont_submit | 2 -- 1 file changed, 2 deletions(-) diff --git a/Polynomial/dont_submit b/Polynomial/dont_submit index 7095bfc63e2..ead4a88c090 100644 --- a/Polynomial/dont_submit +++ b/Polynomial/dont_submit @@ -1,8 +1,6 @@ include/CGAL/Polynomial/polynomial_functions.h test/Polynomial/polynomial_functions.cpp -include/CGAL/Polynomial/polynomial_gcd_ntl.h - include/CGAL/Polynomial/wang.h include/CGAL/Polynomial/Wang_traits.h From 4dc69cd3c00cb829b61354aa8423355f8bdda176 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Wed, 10 Oct 2012 12:06:11 +0000 Subject: [PATCH 093/157] this demo needs ImageIO Now only raise a "r" instead of a compile error in testsuite if CGAL_ImageIO=OFF --- CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt b/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt index 1b52e8dcec2..7508c18dbb3 100644 --- a/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt +++ b/CGAL_ImageIO/test/CGAL_ImageIO/CMakeLists.txt @@ -21,7 +21,11 @@ if ( CGAL_FOUND ) include( CGAL_CreateSingleSourceCGALProgram ) -create_single_source_cgal_program( "test_trilinear_interpolation.cpp" ) + if (WITH_CGAL_ImageIO) + create_single_source_cgal_program( "test_trilinear_interpolation.cpp" ) + else() + message(STATUS "NOTICE: Some tests require the CGAL_ImageIO library, and will not be compiled.") + endif() else() From eb0a39a7116afbac0d1a0220049e33ed29272285 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 10 Oct 2012 12:22:55 +0000 Subject: [PATCH 094/157] Remove # error The test-suite needs no NDEBUG defined. --- Intersections_2/test/Intersections_2/test_intersections_2.cpp | 4 ---- Intersections_3/test/Intersections_3/test_intersections_3.cpp | 4 ---- 2 files changed, 8 deletions(-) diff --git a/Intersections_2/test/Intersections_2/test_intersections_2.cpp b/Intersections_2/test/Intersections_2/test_intersections_2.cpp index c128bb5a50d..606524f35b0 100644 --- a/Intersections_2/test/Intersections_2/test_intersections_2.cpp +++ b/Intersections_2/test/Intersections_2/test_intersections_2.cpp @@ -21,10 +21,6 @@ #include #include -#ifdef NDEBUG -# error The test-suite needs no NDEBUG defined -#endif - const double epsilon = 0.001; struct randomint { diff --git a/Intersections_3/test/Intersections_3/test_intersections_3.cpp b/Intersections_3/test/Intersections_3/test_intersections_3.cpp index 36921c8a403..f45790aa32d 100644 --- a/Intersections_3/test/Intersections_3/test_intersections_3.cpp +++ b/Intersections_3/test/Intersections_3/test_intersections_3.cpp @@ -10,10 +10,6 @@ #include #include -#ifdef NDEBUG -# error The test-suite needs no NDEBUG defined -#endif - const double epsilon = 0.001; struct randomint { From f435be98fbf31fc7ebfd48af73a59cc86af8e5e0 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 10 Oct 2012 12:24:15 +0000 Subject: [PATCH 095/157] Fix an efficiency bug, when FT is not double. dihedral_angle() returns a double. So values must be converted to double ASAP. --- Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h b/Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h index 6e5869a2d0f..315d3275090 100644 --- a/Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h +++ b/Mesh_3/include/CGAL/Mesh_3/dihedral_angle_3.h @@ -57,8 +57,8 @@ dihedral_angle(const typename K::Point_3& a, const Vector_3 abad = cross_product(ab,ad); const double x = CGAL::to_double(scalar_product(cross_product(ab,ac), abad)); - const FT l_ab = CGAL::sqrt(sq_distance(a,b)); - const double y = CGAL::to_double(l_ab * scalar_product(ac,abad)); + const double l_ab = CGAL::sqrt(CGAL::to_double(sq_distance(a,b))); + const double y = l_ab * CGAL::to_double(scalar_product(ac,abad)); return FT(std::atan2(y, x) * 180 / CGAL_PI ); } From ac76a86278da05e75ad4a76a4e83b254160ebd38 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 10 Oct 2012 12:25:39 +0000 Subject: [PATCH 096/157] Do check only headers in the include/CGAL directory. Not in sub-directories. --- Installation/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index 407d969d9ac..c12c568e84c 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -988,9 +988,9 @@ You must disable CGAL_ENABLE_CHECK_HEADERS.") foreach (package ${CGAL_CONFIGURED_PACKAGES_NAMES}) if(EXISTS ${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include) set(depends "") - file(GLOB_RECURSE ${package}_HEADERS + file(GLOB ${package}_HEADERS RELATIVE "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include" - "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/*.h") + "${CMAKE_CURRENT_SOURCE_DIR}/../${package}/include/CGAL/*.h") foreach(header ${${package}_HEADERS}) string(REPLACE "/" "__" header2 "${header}") string(REPLACE "." "_" header2 "${header2}") From fb244b47b41639037a12bb2aac696dfdec3c0a41 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 10 Oct 2012 12:41:11 +0000 Subject: [PATCH 097/157] remove empty destructor --- AABB_tree/include/CGAL/AABB_traits.h | 3 --- 1 file changed, 3 deletions(-) diff --git a/AABB_tree/include/CGAL/AABB_traits.h b/AABB_tree/include/CGAL/AABB_traits.h index cbcfb928f7d..7dc91a1ffec 100644 --- a/AABB_tree/include/CGAL/AABB_traits.h +++ b/AABB_tree/include/CGAL/AABB_traits.h @@ -68,9 +68,6 @@ public: /// Constructor AABB_traits() { }; - /// Non-virtual Destructor - ~AABB_traits() { }; - typedef typename GeomTraits::Compute_squared_distance_3 Squared_distance; Squared_distance squared_distance_object() const { return GeomTraits().compute_squared_distance_3_object(); } From 64c998cfa7480701f78f8f821ffc2b7182896b6f Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Wed, 10 Oct 2012 12:49:18 +0000 Subject: [PATCH 098/157] do not compile some example if ImageIO is not configured --- Mesh_3/examples/Mesh_3/CMakeLists.txt | 22 +++++++++++++--------- 1 file changed, 13 insertions(+), 9 deletions(-) diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index 6c3196201c9..47e6e345298 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -36,16 +36,20 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "mesh_implicit_sphere_variable_size.cpp" ) create_single_source_cgal_program( "mesh_two_implicit_spheres_with_balls.cpp" ) # create_single_source_cgal_program( "mesh_implicit_domains.cpp" "implicit_functions.cpp" ) - if( CGAL_ImageIO_USE_ZLIB ) - create_single_source_cgal_program( "mesh_3D_image.cpp" ) - create_single_source_cgal_program( "mesh_3D_image_variable_size.cpp" ) - else() - message( STATUS "NOTICE: The example mesh_3D_image.cpp needs CGAL_ImageIO to be configured with ZLIB support, and will not be compiled." ) - endif() - create_single_source_cgal_program( "mesh_polyhedral_domain.cpp" ) + create_single_source_cgal_program( "mesh_polyhedral_domain.cpp" ) create_single_source_cgal_program( "mesh_polyhedral_domain_with_features.cpp" ) - create_single_source_cgal_program( "mesh_optimization_example.cpp" ) - create_single_source_cgal_program( "mesh_optimization_lloyd_example.cpp" ) + if( WITH_CGAL_ImageIO ) + create_single_source_cgal_program( "mesh_optimization_example.cpp" ) + create_single_source_cgal_program( "mesh_optimization_lloyd_example.cpp" ) + if( CGAL_ImageIO_USE_ZLIB ) + create_single_source_cgal_program( "mesh_3D_image.cpp" ) + create_single_source_cgal_program( "mesh_3D_image_variable_size.cpp" ) + else() + message( STATUS "NOTICE: The example mesh_3D_image.cpp needs CGAL_ImageIO to be configured with ZLIB support, and will not be compiled." ) + endif() + else() + message( STATUS "NOTICE: Some examples need the CGAL_ImageIO library, and will not be compiled." ) + endif() # create_single_source_cgal_program( "mesh_polyhedral_implicit_function.cpp" ) # create_single_source_cgal_program( "mesh_polyhedral_surface_tolerance_region.cpp" ) # create_single_source_cgal_program( "mesh_polyhedral_edge_tolerance_region.cpp" ) From e4136efc7b97a7831f8f0905c11e01d6c2376215 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Wed, 10 Oct 2012 12:50:40 +0000 Subject: [PATCH 099/157] better verbosity --- Mesh_3/examples/Mesh_3/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index 47e6e345298..6dd0cd0837f 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -45,7 +45,7 @@ if ( CGAL_FOUND ) create_single_source_cgal_program( "mesh_3D_image.cpp" ) create_single_source_cgal_program( "mesh_3D_image_variable_size.cpp" ) else() - message( STATUS "NOTICE: The example mesh_3D_image.cpp needs CGAL_ImageIO to be configured with ZLIB support, and will not be compiled." ) + message( STATUS "NOTICE: The examples mesh_3D_image.cpp and mesh_3D_image_variable_size.cpp need CGAL_ImageIO to be configured with ZLIB support, and will not be compiled." ) endif() else() message( STATUS "NOTICE: Some examples need the CGAL_ImageIO library, and will not be compiled." ) From 1d59758d89173fd4ce3b28a9d9442a999d02c599 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Wed, 10 Oct 2012 14:21:50 +0000 Subject: [PATCH 100/157] add an additional check for requested component and raise the "NOTICE" if lib is not build --- Installation/cmake/modules/CGAL_Macros.cmake | 37 +++++++++++++------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/Installation/cmake/modules/CGAL_Macros.cmake b/Installation/cmake/modules/CGAL_Macros.cmake index 4e2940f2a15..507f113d120 100644 --- a/Installation/cmake/modules/CGAL_Macros.cmake +++ b/Installation/cmake/modules/CGAL_Macros.cmake @@ -314,25 +314,36 @@ if( NOT CGAL_MACROS_FILE_INCLUDED ) endif() else() - if (NOT DEFINED CGAL_EXT_LIB_${component}_PREFIX) - set(CGAL_EXT_LIB_${component}_PREFIX ${component}) - endif() - set( vlib "${CGAL_EXT_LIB_${component}_PREFIX}" ) + list( FIND CGAL_CONFIGURED_LIBRARIES "CGAL_${component}" POSITION ) + if ( "${POSITION}" EQUAL "-1" ) # if component is not a CGAL_ - if ( NOT CGAL_IGNORE_PRECONFIGURED_${component} AND ${vlib}_FOUND) + if (NOT DEFINED CGAL_EXT_LIB_${component}_PREFIX) + set(CGAL_EXT_LIB_${component}_PREFIX ${component}) + endif() - ####message( STATUS "External library ${component} has been preconfigured") - use_lib( ${component} ${${vlib}_USE_FILE}) + set( vlib "${CGAL_EXT_LIB_${component}_PREFIX}" ) + if ( NOT CGAL_IGNORE_PRECONFIGURED_${component} AND ${vlib}_FOUND) + + ####message( STATUS "External library ${component} has been preconfigured") + use_lib( ${component} ${${vlib}_USE_FILE}) + + else() + + ####message( STATUS "External library ${component} has not been preconfigured") + find_package( ${component} ) + ####message( STATUS "External library ${vlib} after find") + if (${vlib}_FOUND) + ####message( STATUS "External library ${vlib} about to be used") + use_lib( ${component} ${${vlib}_USE_FILE}) + endif() + + endif() else() - ####message( STATUS "External library ${component} has not been preconfigured") - find_package( ${component} ) - ####message( STATUS "External library ${vlib} after find") - if (${vlib}_FOUND) - ####message( STATUS "External library ${vlib} about to be used") - use_lib( ${component} ${${vlib}_USE_FILE}) + if (NOT WITH_CGAL_${component}) + message(STATUS "NOTICE: The CGAL_${component} library seems to be required but is not build. Thus, it is expected that some executables will not be compiled.") endif() endif() From 14970d909f786b8402fb41fb9423073d89d93084 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Wed, 10 Oct 2012 14:50:53 +0000 Subject: [PATCH 101/157] if a library is not configured, there should not be an error --- Testsuite/test/collect_cgal_testresults_from_cmake | 1 + 1 file changed, 1 insertion(+) diff --git a/Testsuite/test/collect_cgal_testresults_from_cmake b/Testsuite/test/collect_cgal_testresults_from_cmake index 4cf57924b6e..905a3d4d804 100755 --- a/Testsuite/test/collect_cgal_testresults_from_cmake +++ b/Testsuite/test/collect_cgal_testresults_from_cmake @@ -129,6 +129,7 @@ parse_lib_building_results() fi if [ -z "${configured}" ] ; then + y_or_no='r' echo "Not configured!" >> ${libname}_${shared_or_static}/$TEST_REPORT fi From 547fbfe8d0bbdeae072d9b0f7ec4d39a620fa245 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 10 Oct 2012 19:18:04 +0000 Subject: [PATCH 102/157] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index 6e7f276fad9..1cc68c223c4 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -32,7 +32,7 @@ PATH=/bin:/usr/bin:/home/lrineau/bin 40 21 * * * cd $HOME/CGAL/releases-and-testsuites-with-cmake/CGAL-I/doc_tex; nice -19 $HOME/bin/cgal_manual -testsuite || true # Doxygen Test suite, at 9:05pm -0 21 * * * time $HOME/CGAL/python-3.3/bin/python3 testsuite.py --doxyassist $HOME/CGAL/doxyassist/doxyassist.py --doxygen $HOME/CGAL/doxygen-svn/bin/doxygen --documentation $HOME/CGAL/doxy-port-pmoeller/Documentation --publish /var/CGAL/www/Members/Doxygen_test/ --do-update --do-purge-rebuild +20 21 * * * time $HOME/CGAL/python-3.3/bin/python3 $HOME/CGAL/doxy-port-pmoeller/Documentation/testsuite.py --doxyassist $HOME/CGAL/doxyassist/doxyassist.py --doxygen $HOME/CGAL/doxygen-svn/bin/doxygen --documentation $HOME/CGAL/doxy-port-pmoeller/Documentation --publish /var/CGAL/www/Members/Doxygen_test/ --do-update --do-purge-rebuild # Dump the crontab to SVN every hour at minute 18 18 * * * * $HOME/bin/dump_crontab From 16cf477c273d778c713c75968f64c681e31b000b Mon Sep 17 00:00:00 2001 From: Ophir Setter Date: Wed, 10 Oct 2012 22:04:40 +0000 Subject: [PATCH 103/157] Copying examples from Arr_2 package. So that examples here match --- BGL/examples/BGL_arrangement_2/dual.cpp | 121 ++++++++++------------ BGL/examples/BGL_arrangement_2/primal.cpp | 50 +++++---- 2 files changed, 82 insertions(+), 89 deletions(-) diff --git a/BGL/examples/BGL_arrangement_2/dual.cpp b/BGL/examples/BGL_arrangement_2/dual.cpp index dbd473bbfe8..63dff41194e 100644 --- a/BGL/examples/BGL_arrangement_2/dual.cpp +++ b/BGL/examples/BGL_arrangement_2/dual.cpp @@ -1,3 +1,4 @@ +//! \file examples/Arrangement_on_surface_2/bgl_dual_adapter.cpp // Adapting the dual of an arrangement to a BGL graph. #include "arr_rational_nt.h" @@ -5,91 +6,79 @@ #include #include #include - -#include -#include - #include #include +#include +#include +#include + #include "arr_print.h" -typedef CGAL::Cartesian Kernel; -typedef CGAL::Arr_segment_traits_2 Traits_2; -typedef Traits_2::Point_2 Point_2; -typedef Traits_2::X_monotone_curve_2 Segment_2; -typedef CGAL::Arr_face_extended_dcel Dcel; -typedef CGAL::Arrangement_2 Arrangement_2; -typedef CGAL::Dual Dual_arrangement_2; - -// A BFS visitor class that associates each vertex with its discover time. -// In our case graph vertices represent arrangement faces. -template -class Discover_time_bfs_visitor : public boost::default_bfs_visitor -{ -private: - - const IndexMap *index_map; // Mapping vertices to indices. - unsigned int time; // The current time stamp. - +// A property map that reads/writes the information to/from the extended +// face. +template class Extended_face_property_map { public: + typedef typename Arrangement::Face_handle Face_handle; - // Constructor. - Discover_time_bfs_visitor (const IndexMap& imap) : - index_map (&imap), - time (0) - {} + // Boost property type definitions. + typedef boost::read_write_property_map_tag category; + typedef Type value_type; + typedef value_type& reference; + typedef Face_handle key_type; - // Write the discover time for a given vertex. - template - void discover_vertex (Vertex u, const Graph& ) - { - u->set_data (time); - time++; - } + // The get function is required by the property map concept. + friend reference get(const Extended_face_property_map& map, key_type key) + { return key->data(); } + + // The put function is required by the property map concept. + friend void put(const Extended_face_property_map& map, + key_type key, value_type val) + { key->set_data(val); } }; -int main () -{ - Arrangement_2 arr; +typedef CGAL::Cartesian Kernel; +typedef CGAL::Arr_segment_traits_2 Traits_2; +typedef CGAL::Arr_face_extended_dcel Dcel; +typedef CGAL::Arrangement_2 Ex_arrangement; +typedef CGAL::Dual Dual_arrangement; +typedef CGAL::Arr_face_index_map Face_index_map; +typedef Extended_face_property_map + Face_property_map; +typedef Kernel::Point_2 Point_2; +typedef Kernel::Segment_2 Segment_2; +int main() +{ // Construct an arrangement of seven intersecting line segments. - insert (arr, Segment_2 (Point_2 (1, 1), Point_2 (7, 1))); - insert (arr, Segment_2 (Point_2 (1, 1), Point_2 (3, 7))); - insert (arr, Segment_2 (Point_2 (1, 4), Point_2 (7, 1))); - insert (arr, Segment_2 (Point_2 (2, 2), Point_2 (9, 3))); - insert (arr, Segment_2 (Point_2 (2, 2), Point_2 (4, 4))); - insert (arr, Segment_2 (Point_2 (7, 1), Point_2 (9, 3))); - insert (arr, Segment_2 (Point_2 (3, 7), Point_2 (9, 3))); + Point_2 p1(1, 1), p2(1, 4), p3(2, 2), p4(3, 7), p5(4, 4), p6(7, 1), p7(9, 3); + Ex_arrangement arr; + insert(arr, Segment_2(p1, p6)); + insert(arr, Segment_2(p1, p4)); insert(arr, Segment_2(p2, p6)); + insert(arr, Segment_2(p3, p7)); insert(arr, Segment_2(p3, p5)); + insert(arr, Segment_2(p6, p7)); insert(arr, Segment_2(p4, p7)); // Create a mapping of the arrangement faces to indices. - CGAL::Arr_face_index_map index_map (arr); + Face_index_map index_map(arr); - // Perform breadth-first search from the unbounded face, and use the BFS + // Perform breadth-first search from the unbounded face, using the event // visitor to associate each arrangement face with its discover time. - Discover_time_bfs_visitor > - bfs_visitor (index_map); - Arrangement_2::Face_handle uf = arr.unbounded_face(); + unsigned int time = 0; + boost::breadth_first_search(Dual_arrangement(arr), arr.unbounded_face(), + boost::vertex_index_map(index_map).visitor + (boost::make_bfs_visitor + (stamp_times(Face_property_map(), time, + boost::on_discover_vertex())))); - boost::breadth_first_search (Dual_arrangement_2 (arr), uf, - boost::vertex_index_map (index_map). - visitor (bfs_visitor)); - - // Print the results: - Arrangement_2::Face_iterator fit; - - for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) - { + // Print the discover time of each arrangement face. + Ex_arrangement::Face_iterator fit; + for (fit = arr.faces_begin(); fit != arr.faces_end(); ++fit) { std::cout << "Discover time " << fit->data() << " for "; - if (fit != uf) - { + if (fit != arr.unbounded_face()) { std::cout << "face "; - print_ccb (fit->outer_ccb()); + print_ccb(fit->outer_ccb()); } - else - std::cout << "the unbounded face." << std::endl; + else std::cout << "the unbounded face." << std::endl; } - - return (0); + return 0; } diff --git a/BGL/examples/BGL_arrangement_2/primal.cpp b/BGL/examples/BGL_arrangement_2/primal.cpp index 74aa9cfeb67..86f064c8657 100644 --- a/BGL/examples/BGL_arrangement_2/primal.cpp +++ b/BGL/examples/BGL_arrangement_2/primal.cpp @@ -1,15 +1,21 @@ +//! \file examples/Arrangement_on_surface_2/bgl_primal_adapter.cpp // Adapting an arrangement to a BGL graph. #include "arr_rational_nt.h" #include #include #include +#include +#include #include #include -#include -#include +#if BOOST_VERSION > 104000 +#include +#else +#include +#endif typedef CGAL::Cartesian Kernel; typedef CGAL::Arr_segment_traits_2 Traits_2; @@ -28,7 +34,7 @@ public: typedef value_type reference; typedef Arrangement_2::Halfedge_handle key_type; - double operator() (Arrangement_2::Halfedge_handle e) const + double operator()(Arrangement_2::Halfedge_handle e) const { const double x1 = CGAL::to_double (e->source()->point().x()); const double y1 = CGAL::to_double (e->source()->point().y()); @@ -37,13 +43,13 @@ public: const double diff_x = x2 - x1; const double diff_y = y2 - y1; - return (std::sqrt (diff_x*diff_x + diff_y*diff_y)); + return std::sqrt(diff_x*diff_x + diff_y*diff_y); } }; -double get (Edge_length_func edge_length, Arrangement_2::Halfedge_handle e) +double get(Edge_length_func edge_length, Arrangement_2::Halfedge_handle e) { - return (edge_length (e)); + return edge_length(e); } /* The folowing is a workaround for a bug in the BGL upto and including version @@ -63,6 +69,7 @@ double get (Edge_length_func edge_length, Arrangement_2::Halfedge_handle e) * boost namespace, and is a simple derivation of the 1st parameter of the * CGAL::get() function. */ + namespace boost { template @@ -98,15 +105,15 @@ get(const boost::Arr_vertex_index_map_boost & index_map, } } - -int main () + +int main() { Arrangement_2 arr; - + // Construct an arrangement of seven intersecting line segments. // We keep a handle for the vertex v_0 that corresponds to the point (1,1). Arrangement_2::Halfedge_handle e = - insert_non_intersecting_curve (arr, Segment_2 (Point_2 (1, 1), + insert_non_intersecting_curve (arr, Segment_2 (Point_2 (1, 1), Point_2 (7, 1))); Arrangement_2::Vertex_handle v0 = e->source(); insert (arr, Segment_2 (Point_2 (1, 1), Point_2 (3, 7))); @@ -119,27 +126,24 @@ int main () // Create a mapping of the arrangement vertices to indices. CGAL::Arr_vertex_index_map index_map_tmp(arr); boost::Arr_vertex_index_map_boost index_map(index_map_tmp); - + // Perform Dijkstra's algorithm from the vertex v0. - Edge_length_func edge_length; - CGAL::Arr_vertex_property_map dist_map (index_map); - - boost::dijkstra_shortest_paths (arr, v0, - boost::vertex_index_map (index_map). - weight_map (edge_length). - distance_map (dist_map)); - + Edge_length_func edge_length; + + boost::vector_property_map > dist_map(arr.number_of_vertices(), index_map); + boost::dijkstra_shortest_paths(arr, v0, + boost::vertex_index_map(index_map). + weight_map(edge_length). + distance_map(dist_map)); + // Print the results: Arrangement_2::Vertex_iterator vit; std::cout << "The distances of the arrangement vertices from (" << v0->point() << ") :" << std::endl; for (vit = arr.vertices_begin(); vit != arr.vertices_end(); ++vit) - { std::cout << "(" << vit->point() << ") at distance " << dist_map[vit] << std::endl; - } - return (0); + return 0; } From 30669b8bf9a5c6a5d0f10a71fe85285ee8df0080 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 11 Oct 2012 10:18:02 +0000 Subject: [PATCH 104/157] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 1 + 1 file changed, 1 insertion(+) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index 1cc68c223c4..42e47569a0b 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -10,6 +10,7 @@ # * * * * * command to be executed PATH=/bin:/usr/bin:/home/lrineau/bin +LC_CTYPE=en_US.UTF-8 # Update testsuite result pages 5,15,25,35,45,55 * * * * cd $HOME/CGAL/collect_and_public_testresults; ./treat_result_collection From 6eb8e014380eba98ffae1e4710cb1d0a077f65ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20M=C3=B6ller?= Date: Thu, 11 Oct 2012 17:59:04 +0000 Subject: [PATCH 105/157] Fix linking on MacOS after the link_libraries change --- Mesh_3/demo/Mesh_3/CMakeLists.txt | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/Mesh_3/demo/Mesh_3/CMakeLists.txt b/Mesh_3/demo/Mesh_3/CMakeLists.txt index 5e595ec0643..a378373d890 100644 --- a/Mesh_3/demo/Mesh_3/CMakeLists.txt +++ b/Mesh_3/demo/Mesh_3/CMakeLists.txt @@ -43,6 +43,8 @@ find_package(OpenGL) # Find GLEW (for OpenGL-1.5 and OpenGL extensions) find_package(GLEW) +# Find everybodies darling +find_package(Boost COMPONENTS thread system) # Find QGLViewer if(QT4_FOUND) @@ -51,7 +53,7 @@ if(QT4_FOUND) endif(QT4_FOUND) -if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) +if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND Boost_FOUND) # Add directory containing implicit function plugin source files add_subdirectory("implicit_functions") @@ -131,7 +133,7 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) set(SCENE_SEGMENTED_IMAGE_ITEM_LIB "${MESH_3_LIB_PREFIX}scene_segmented_image_item") add_library(${SCENE_SEGMENTED_IMAGE_ITEM_LIB} SHARED Scene_segmented_image_item.cpp Scene_segmented_image_item.moc) - target_link_libraries(${SCENE_SEGMENTED_IMAGE_ITEM_LIB} ${SCENE_ITEM_LIB}) + target_link_libraries(${SCENE_SEGMENTED_IMAGE_ITEM_LIB} ${SCENE_ITEM_LIB} ${CGAL_LIBRARIES}) set_target_properties(${SCENE_SEGMENTED_IMAGE_ITEM_LIB} PROPERTIES DEFINE_SYMBOL scene_segmented_image_item_EXPORTS) if(GLEW_FOUND) @@ -141,19 +143,19 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) set(SCENE_POLYHEDRON_ITEM_LIB "${MESH_3_LIB_PREFIX}scene_polyhedron_item") add_library(${SCENE_POLYHEDRON_ITEM_LIB} SHARED Scene_polyhedron_item.cpp Scene_polyhedron_item.moc) - target_link_libraries(${SCENE_POLYHEDRON_ITEM_LIB} ${SCENE_ITEM_LIB}) + target_link_libraries(${SCENE_POLYHEDRON_ITEM_LIB} ${SCENE_ITEM_LIB} ${CGAL_LIBRARIES}) set_target_properties(${SCENE_POLYHEDRON_ITEM_LIB} PROPERTIES DEFINE_SYMBOL scene_polyhedron_item_EXPORTS) set(POLYGON_SOUP_LIB "${MESH_3_LIB_PREFIX}polygon_soup") add_library(${POLYGON_SOUP_LIB} SHARED Scene_polygon_soup.cpp Scene_polygon_soup.moc) - target_link_libraries(${POLYGON_SOUP_LIB} ${SCENE_ITEM_LIB}) + target_link_libraries(${POLYGON_SOUP_LIB} ${SCENE_ITEM_LIB} ${CGAL_LIBRARIES}) set_target_properties(${POLYGON_SOUP_LIB} PROPERTIES DEFINE_SYMBOL polygon_soup_EXPORTS) set(SCENE_C3T3_ITEM_LIB "${MESH_3_LIB_PREFIX}scene_c3t3_item") add_library(${SCENE_C3T3_ITEM_LIB} SHARED Scene_c3t3_item.cpp Scene_c3t3_item.moc) - target_link_libraries(${SCENE_C3T3_ITEM_LIB} ${SCENE_ITEM_LIB} ${QGLVIEWER_LIBRARIES} ${QT_LIBRARIES}) + target_link_libraries(${SCENE_C3T3_ITEM_LIB} ${SCENE_ITEM_LIB} ${QGLVIEWER_LIBRARIES} ${QT_LIBRARIES} ${CGAL_LIBRARIES} ${Boost_LIBRARIES}) set_target_properties(${SCENE_C3T3_ITEM_LIB} PROPERTIES DEFINE_SYMBOL scene_c3t3_item_EXPORTS) set(SCENE_IMPLICIT_FUNCTION_ITEM_LIB "${MESH_3_LIB_PREFIX}scene_implicit_function_item") @@ -289,7 +291,7 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) ${OPENGL_glu_LIBRARY}) -else (CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) +else (CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND Boost_FOUND) set(MESH_3_MISSING_DEPS "") @@ -309,9 +311,21 @@ else (CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) set(MESH_3_MISSING_DEPS "QGLViewer, ${MESH_3_MISSING_DEPS}") endif() + if(NOT QGLVIEWER_FOUND) + set(MESH_3_MISSING_DEPS "QGLViewer, ${MESH_3_MISSING_DEPS}") + endif() + + if(NOT QGLVIEWER_FOUND) + set(MESH_3_MISSING_DEPS "QGLViewer, ${MESH_3_MISSING_DEPS}") + endif() + + if(NOT Boost_FOUND) + set(MESH_3_MISSING_DEPS "Boost, ${MESH_3_MISSING_DEPS}") + endif() + message(STATUS "NOTICE: This demo requires ${MESH_3_MISSING_DEPS}and will not be compiled.") -endif (CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) +endif (CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND AND Boost_FOUND) From 4e04a6ee0d0c15a36551cc4ab6d56fff0c366236 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 11 Oct 2012 20:12:51 +0000 Subject: [PATCH 106/157] add deprecation notice --- Number_types/include/CGAL/Root_of_2.h | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Number_types/include/CGAL/Root_of_2.h b/Number_types/include/CGAL/Root_of_2.h index 3bca63d0c50..1f5cefa9259 100644 --- a/Number_types/include/CGAL/Root_of_2.h +++ b/Number_types/include/CGAL/Root_of_2.h @@ -21,6 +21,11 @@ #ifndef CGAL_ROOT_OF_2_H #define CGAL_ROOT_OF_2_H +#ifndef CGAL_NO_DEPRECATED_CODE + +#define CGAL_DEPRECATED_HEADER "" +#define CGAL_REPLACEMENT_HEADER "" +#include #include #include #include @@ -1378,4 +1383,6 @@ inline const Root_of_2& max BOOST_PREVENT_MACRO_SUBSTITUTION #undef CGAL_int #undef CGAL_double +#endif //CGAL_NO_DEPRECATED_CODE + #endif // CGAL_ROOT_OF_2_H From 98a68098adc2d534345b327efaac68586570c548 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Sun, 14 Oct 2012 09:00:58 +0000 Subject: [PATCH 107/157] updated email --- Maintenance/git/authors-file.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maintenance/git/authors-file.txt b/Maintenance/git/authors-file.txt index a0e31b23e71..30bb0af77c1 100644 --- a/Maintenance/git/authors-file.txt +++ b/Maintenance/git/authors-file.txt @@ -34,7 +34,7 @@ drussel = Daniel Russel dtyagi = Devashish Tyagi efif = Efi Fogel elip = Eli Packer -eric = Eric Berberich +eric = Eric Berberich estere = Ester Ezra eug = Eugene Lipovetsky fcacciola = Fernando Cacciola From 74170c8a758599547ab59bf14be6249eff966692 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Sun, 14 Oct 2012 10:48:26 +0000 Subject: [PATCH 108/157] fixed email adresses --- Maintenance/git/authors-file.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maintenance/git/authors-file.txt b/Maintenance/git/authors-file.txt index 30bb0af77c1..370b551e152 100644 --- a/Maintenance/git/authors-file.txt +++ b/Maintenance/git/authors-file.txt @@ -19,10 +19,10 @@ baruchzu = Baruch Zukerman bgalehouse = Ben Galehouse cbonetto = Carine Bonetto cdelage = Christophe Delage -cgal-web-admin = CGAL Web Admin +cgal-web-admin = CGAL Web Admin cggaurav = Gaurav Chandrashekar cjamin = Clément Jamin -cvs2svn = CVS2SVN tool +cvs2svn = CVS2SVN tool cwerner = Claudia Werner cwormser = Camille Wormser danha = Dan Halperin From e0a34e1dc83a684c4152460560ae1af1c32a832b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 15 Oct 2012 07:39:24 +0000 Subject: [PATCH 110/157] adding a specialization for Sqrt_extension for NT_converter and its test --- .../CGAL/Sqrt_extension/Sqrt_extension_type.h | 43 +++++++++++++++++++ .../test/Number_types/Sqrt_extension.cpp | 18 +++++++- 2 files changed, 59 insertions(+), 2 deletions(-) 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 e5c5ec41246..f4ed07f7742 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h +++ b/Number_types/include/CGAL/Sqrt_extension/Sqrt_extension_type.h @@ -40,6 +40,7 @@ #include #include #include +#include #define CGAL_int(T) typename First_if_different::Type @@ -672,6 +673,48 @@ Sqrt_extension square (const Sqrt_extension +struct NT_converter < Sqrt_extension , Sqrt_extension > + : public std::unary_function< NT1, NT2 > +{ + Sqrt_extension + operator()(const Sqrt_extension &a) const + { + if(!a.is_extended()) { + return Sqrt_extension(NT_converter()(a.a0())); + } else { + return Sqrt_extension + (NT_converter()(a.a0()), + NT_converter()(a.a1()), + NT_converter()(a.root())); + } + } +}; + +template +struct NT_converter < NT1 , Sqrt_extension > + : public std::unary_function< NT1, NT2 > +{ + Sqrt_extension + operator()(const NT1 &a) const + { + return Sqrt_extension(NT_converter()(a)); + } +}; + +//needed because it's a better match than the specialization +template +struct NT_converter < Sqrt_extension, Sqrt_extension > + : public std::unary_function< NT1, NT1 > +{ + const Sqrt_extension& + operator()(const Sqrt_extension &a) const + { + return a; + } +}; + // UNARY template Sqrt_extension operator + (const Sqrt_extension& p) { return p; } diff --git a/Number_types/test/Number_types/Sqrt_extension.cpp b/Number_types/test/Number_types/Sqrt_extension.cpp index e2a5fb1847b..52696fc389c 100644 --- a/Number_types/test/Number_types/Sqrt_extension.cpp +++ b/Number_types/test/Number_types/Sqrt_extension.cpp @@ -726,7 +726,20 @@ void sqrt_extension_test(){ scalar_factor_traits_test(); test_algebraic_extension_traits(); - test_get_arithmetic_kernel(); + test_get_arithmetic_kernel(); +} + +#include +void test_nt_converter() +{ + typedef CGAL::internal::Exact_type_selector::Type NT; + typedef CGAL::Sqrt_extension Source; + typedef CGAL::Sqrt_extension Target; + + CGAL::NT_converter converter; + + Source s; + Target t=converter(s); } int main(){ @@ -739,7 +752,8 @@ int main(){ sqrt_extension_test(); sqrt_extension_test(); #endif // CGAL_HAS_CORE_ARITHMETIC_KERNEL - return 0; + test_nt_converter(); + return 0; } From c4b1beb81fe2e7b1f81e3eb0066c81d432aee4d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Mon, 15 Oct 2012 09:56:22 +0000 Subject: [PATCH 112/157] *active intersection(Triangle_2,Iso_rectangle_2) already implemented (with a bug-fix in the implementation) *add do_intersect_2(Triangle_2,Iso_rectangle_2) *add test --- .../Triangle_2_Iso_rectangle_2_intersection.h | 88 +++++++++++++++++-- .../include/CGAL/intersection_2_2.h | 1 + .../Intersections_2/test_intersections_2.cpp | 22 +++++ 3 files changed, 103 insertions(+), 8 deletions(-) diff --git a/Intersections_2/include/CGAL/Triangle_2_Iso_rectangle_2_intersection.h b/Intersections_2/include/CGAL/Triangle_2_Iso_rectangle_2_intersection.h index 4cc9b6a4ba0..4d7221fa329 100644 --- a/Intersections_2/include/CGAL/Triangle_2_Iso_rectangle_2_intersection.h +++ b/Intersections_2/include/CGAL/Triangle_2_Iso_rectangle_2_intersection.h @@ -30,14 +30,15 @@ #include #include -namespace CGAL{ - template +namespace CGAL{ namespace internal{ + + template Object - intersection(const Triangle_2 &t, const Iso_rectangle_2 &r) + intersection(const typename K::Triangle_2 &t, const typename K::Iso_rectangle_2 &r, const K&) { - typedef typename R::FT FT; - typedef Segment_2 Segment; - typedef Point_2 Point; + typedef typename K::FT FT; + typedef typename K::Segment_2 Segment; + typedef typename K::Point_2 Point; FT xr1, yr1, xr2, yr2; bool position[3][4] = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}; @@ -252,7 +253,10 @@ namespace CGAL{ result.push_back(s[k].source()); } } - + //remove duplicated consecutive points + typename std::vector::iterator last = std::unique(result.begin(),result.end()); + result.erase(last,result.end()); + switch(result.size()){ case 0: return Object(); @@ -261,7 +265,7 @@ namespace CGAL{ case 2: return make_object(Segment(result[0], result[1])); case 3: - return make_object(Triangle_2(result[0], result[1], result[2])); + return make_object(typename K::Triangle_2(result[0], result[1], result[2])); default: return make_object(result); } @@ -269,6 +273,74 @@ namespace CGAL{ }//end if(intersection) return Object(); }//end intersection + + template + Object + inline intersection(const typename K::Iso_rectangle_2 &r, const typename K::Triangle_2 &t, const K& k) + { + return intersection(t,r,k); + } + + template + bool do_intersect( + const typename K::Triangle_2 &tr, + const typename K::Iso_rectangle_2 &ir, + const K& k) + { + //1) check if at least one vertex of tr is not outside ir + //2) if not, check if at least on vertex of tr is not outside tr + + typename K::Has_on_unbounded_side_2 unbounded_side=k.has_on_unbounded_side_2_object(); + typename K::Construct_vertex_2 vertex=k.construct_vertex_2_object(); + for (int i=0;i<3;++i) + if ( !unbounded_side( ir,vertex(tr,i) ) ) return true; + for (int i=0;i<4;++i) + if ( !unbounded_side( tr,vertex(ir,i) ) ) return true; + return false; + } + + template + inline bool do_intersect( + const typename K::Iso_rectangle_2 &ir, + const typename K::Triangle_2 &tr, + const K& k) + { + return do_intersect(tr,ir,k); + } + + } //namespace internal + + template + Object + inline intersection(const Iso_rectangle_2 &r, const Triangle_2 &t) + { + return typename K::Intersect_2()(r,t); + } + + template + Object + inline intersection(const Triangle_2 &t, const Iso_rectangle_2 &r) + { + return typename K::Intersect_2()(t,r); + } + + template + inline bool + do_intersect(const Iso_rectangle_2 & iso, + const Triangle_2 &tr) + { + typedef typename K::Do_intersect_2 Do_intersect; + return Do_intersect()(iso, tr); + } + + template + inline bool + do_intersect(const Triangle_2 &tr, const Iso_rectangle_2 &iso) + { + typedef typename K::Do_intersect_2 Do_intersect; + return Do_intersect()(tr, iso); + } + }//end namespace #endif diff --git a/Intersections_2/include/CGAL/intersection_2_2.h b/Intersections_2/include/CGAL/intersection_2_2.h index 470c966d748..d5b900b7b5b 100644 --- a/Intersections_2/include/CGAL/intersection_2_2.h +++ b/Intersections_2/include/CGAL/intersection_2_2.h @@ -36,5 +36,6 @@ #include #include #include +#include #endif diff --git a/Intersections_2/test/Intersections_2/test_intersections_2.cpp b/Intersections_2/test/Intersections_2/test_intersections_2.cpp index 606524f35b0..185da603d2e 100644 --- a/Intersections_2/test/Intersections_2/test_intersections_2.cpp +++ b/Intersections_2/test/Intersections_2/test_intersections_2.cpp @@ -111,6 +111,14 @@ struct Test { assert(CGAL::intersection(o1, o2).empty()); assert(!CGAL::do_intersect(o2, o1)); assert(CGAL::intersection(o2, o1).empty()); + + //check with the functors + typename CGAL::Kernel_traits::Kernel::Do_intersect_2 do_2; + typename CGAL::Kernel_traits::Kernel::Intersect_2 i_2; + assert(!do_2(o1, o2)); + assert(i_2(o1, o2).empty()); + assert(!do_2(o2, o1)); + assert(i_2(o2, o1).empty()); } template < typename Res, typename O1, typename O2 > @@ -304,6 +312,19 @@ struct Test { check_intersection (Rec(p( 10, 12), p(30, 40)), Rec(p( 25, 40), p( 26, 103)), Rec(P(25, 40), P(26, 40))); } + void T_Rec() + { + std::cout << "Triangle Iso_rectangle\n"; + check_no_intersection (Rec(p( 10, 12), p(30, 40)), T(p( 4, 0), p( 12, 4), p(-4, 8))); + check_intersection(Rec(p( 0, 0), p(1, 1)), T(p( -1, 0), p( -1, 2), p(2, 2))); + check_intersection(Rec(p( 0, 0), p(1, 1)), T(p( -1, 0), p(2, 2), p( -1, 2))); + check_intersection(Rec(p( 0, 0), p(1, 1)), T(p( -1, -2), p( -1, 2), p(5, 2))); + check_intersection(Rec(p( 0, 0), p(2, 2)), T(p( 0, 0), p( 1, 0), p(0, 1))); + check_intersection(Rec(p( 0, 0), p(3, 3)), T(p( 1, 1), p( 2, 1), p(1, 2))); + check_intersection

    (Rec(p( 0, 0), p(1, 1)), T(p( -1, 0), p( 0, 0), p(0, -1))); + check_intersection

    (Rec(p( 0, 0), p(1, 1)), T(p( 0, 0), p( -1, 0), p(0, -1))); + } + void run() { std::cout << "2D Intersection tests\n"; @@ -322,6 +343,7 @@ struct Test { R_Rec(); S_Rec(); Rec_Rec(); + T_Rec(); } }; From 672aa31883dc3a9f8b052ac1630a3cdfce4fdc4f Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Tue, 16 Oct 2012 10:17:31 +0000 Subject: [PATCH 113/157] template instantion of PT in partial specialization is ... weird --- .../CGAL/Polynomial/polynomial_gcd_ntl.h | 67 ++++++++++--------- 1 file changed, 35 insertions(+), 32 deletions(-) diff --git a/Polynomial/include/CGAL/Polynomial/polynomial_gcd_ntl.h b/Polynomial/include/CGAL/Polynomial/polynomial_gcd_ntl.h index 554e68091b2..691f6e92471 100644 --- a/Polynomial/include/CGAL/Polynomial/polynomial_gcd_ntl.h +++ b/Polynomial/include/CGAL/Polynomial/polynomial_gcd_ntl.h @@ -17,8 +17,9 @@ // // // Author(s) : Michael Kerber -// Dominik Huelse -// Michael Hemmer +// Dominik Huelse +// Michael Hemmer +// Eric Berberich // ============================================================================ /*! \file CGAL/Polynomial/polynomial_gcd_ntl.h @@ -28,38 +29,36 @@ #ifndef CGAL_POLYNOMIAL_GCD_NTL_H #define CGAL_POLYNOMIAL_GCD_NTL_H -#include +#include #ifndef CGAL_USE_NTL #warning This header file needs NTL installed in order to work properly. -#else // CGAL_USE_NTL - -#ifndef CGAL_USE_NTL_MODULAR_GCD -#define CGAL_USE_NTL_MODULAR_GCD 1 -#endif // CGAL_USE_NTL_MODULAR_GCD - -#if CGAL_USE_NTL_MODULAR_GCD - -#include -#include -#include - - -#include +#endif #ifdef CGAL_USE_LEDA -#include +#include #endif #ifdef CGAL_USE_CORE -#include +#include #endif +#include +#include +#include + +#include + +#include namespace CGAL{ template class Polynomial; // fwd + +template class Polynomial_traits_d; + } // namespace CGAL + // This part forms the bridge to NTL to use the modular gcd algorithm. If // NTL is not available, the usual strategy is applied. @@ -123,20 +122,27 @@ modular_NTL_gcd_for_univariate_integer_polynomials return g; } +template Polynomial +inline +canonical_modular_NTL_gcd_for_univariate_integer_polynomials + (Polynomial p1, Polynomial p2) { + // std::cout<<" NTL canonical GCD"< inline CGAL::Polynomial gcd_utcf_(const CGAL::Polynomial& p1, const CGAL::Polynomial& p2) { CGAL::Polynomial gcd = - internal::modular_NTL_gcd_for_univariate_integer_polynomials(p1,p2); - return CGAL::canonicalize(gcd); + internal::canonical_modular_NTL_gcd_for_univariate_integer_polynomials(p1,p2); + return gcd; } + template <> inline CGAL::Polynomial @@ -144,17 +150,20 @@ gcd_(const CGAL::Polynomial& p1, const CGAL::Polynomial& p2) { return internal::modular_NTL_gcd_for_univariate_integer_polynomials(p1,p2); } + #endif // CGAL_USE_LEDA #ifdef CGAL_USE_CORE + template <> inline Polynomial gcd_utcf_(const Polynomial& p1, const Polynomial& p2) { - Polynomial gcd = modular_NTL_gcd_for_univariate_integer_polynomials(p1,p2); - return CGAL::canonicalize(gcd); + Polynomial gcd = canonical_modular_NTL_gcd_for_univariate_integer_polynomials(p1,p2); + return gcd; } + template <> inline Polynomial @@ -162,19 +171,13 @@ gcd_(const Polynomial& p1, const Polynomial& p2) { return modular_NTL_gcd_for_univariate_integer_polynomials(p1,p2); } + #endif //CGAL_USE_CORE -//#endif //CGAL_USE_INTERNAL_MODULAR_GCD - - } // namespace internal } // namespace CGAL -#endif // CGAL_USE_NTL_MODULAR_GCD - -#endif // CGAL_USE_NTL - #endif // CGAL_POLYNOMIAL_GCD_NTL_H // EOF From b4c3b341ba2fed032e5dae6ad7048f6e77d92bc9 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 16 Oct 2012 14:46:46 +0000 Subject: [PATCH 115/157] Make Projection_traits_3 compatible with Mesh_2 And add one test. --- .../CGAL/internal/Projection_traits_3.h | 1141 +++++++++-------- Mesh_2/test/Mesh_2/test_mesh_terrain.cpp | 41 + 2 files changed, 626 insertions(+), 556 deletions(-) create mode 100644 Mesh_2/test/Mesh_2/test_mesh_terrain.cpp diff --git a/Kernel_23/include/CGAL/internal/Projection_traits_3.h b/Kernel_23/include/CGAL/internal/Projection_traits_3.h index bd759de091a..bc5c563733b 100644 --- a/Kernel_23/include/CGAL/internal/Projection_traits_3.h +++ b/Kernel_23/include/CGAL/internal/Projection_traits_3.h @@ -1,556 +1,585 @@ -// Copyright (c) 1997-2010 INRIA Sophia-Antipolis (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$ -// -// -// Author(s) : Mariette Yvinec, Sebastien Loriot - -#ifndef CGAL_INTERNAL_PROJECTION_TRAITS_3_H -#define CGAL_INTERNAL_PROJECTION_TRAITS_3_H - -#include - -#include -#include -#include - -#include - -namespace CGAL { - -namespace internal { - -//project Point_3 along coordinate dim -template -struct Projector; - -//project onto yz -template -struct Projector -{ - typedef typename R::Less_y_3 Less_x_2; - typedef typename R::Less_z_3 Less_y_2; - typedef typename R::Compare_y_3 Compare_x_2; - typedef typename R::Compare_z_3 Compare_y_2; - typedef typename R::Equal_y_3 Equal_x_2; - typedef typename R::Equal_z_3 Equal_y_2; - - static typename R::FT x(const typename R::Point_3& p) {return p.y();} - static typename R::FT y(const typename R::Point_3& p) {return p.z();} - static const int x_index=1; - static const int y_index=2; -}; -//project onto xz -template -struct Projector -{ - typedef typename R::Less_x_3 Less_x_2; - typedef typename R::Less_z_3 Less_y_2; - typedef typename R::Compare_x_3 Compare_x_2; - typedef typename R::Compare_z_3 Compare_y_2; - typedef typename R::Equal_x_3 Equal_x_2; - typedef typename R::Equal_z_3 Equal_y_2; - static typename R::FT x(const typename R::Point_3& p) {return p.x();} - static typename R::FT y(const typename R::Point_3& p) {return p.z();} - static const int x_index=0; - static const int y_index=2; -}; - -//project onto xy -template -struct Projector -{ - typedef typename R::Less_x_3 Less_x_2; - typedef typename R::Less_y_3 Less_y_2; - typedef typename R::Compare_x_3 Compare_x_2; - typedef typename R::Compare_y_3 Compare_y_2; - typedef typename R::Equal_x_3 Equal_x_2; - typedef typename R::Equal_y_3 Equal_y_2; - static typename R::FT x(const typename R::Point_3& p) {return p.x();} - static typename R::FT y(const typename R::Point_3& p) {return p.y();} - static const int x_index=0; - static const int y_index=1; -}; - - - -template -class Orientation_projected_3 -{ -public: - typedef typename R::Point_3 Point; - typename R::FT x(const Point &p) const { return Projector::x(p); } - typename R::FT y(const Point &p) const { return Projector::y(p); } - - typename R::Point_2 project(const Point& p) const - { - return typename R::Point_2(x(p),y(p)); - } - - CGAL::Orientation operator()(const Point& p, - const Point& q, - const Point& r) const - { - return CGAL::orientation(project(p), project(q), project(r)); - } -}; - -template -class Side_of_oriented_circle_projected_3 -{ -public: - typedef typename R::Point_3 Point; - typename R::FT x(const Point &p) const { return Projector::x(p); } - typename R::FT y(const Point &p) const { return Projector::y(p); } - - - typename R::Point_2 project(const Point& p) const - { - return typename R::Point_2(x(p),y(p)); - } - CGAL::Oriented_side operator() (const Point &p, - const Point &q, - const Point &r, - const Point &s) const - { - return CGAL::side_of_oriented_circle(project(p),project(q),project(r),project(s) ); - } -}; - -template -class Side_of_bounded_circle_projected_3 -{ -public: - typedef typename R::Point_3 Point; - typename R::FT x(const Point &p) const { return Projector::x(p); } - typename R::FT y(const Point &p) const { return Projector::y(p); } - - - typename R::Point_2 project(const Point& p) const - { - return typename R::Point_2(x(p),y(p)); - } - CGAL::Bounded_side operator() (const Point &p, - const Point &q, - const Point &r, - const Point &s) const - { - return CGAL::side_of_bounded_circle(project(p),project(q),project(r),project(s) ); - } - - CGAL::Bounded_side operator() (const Point &p, - const Point &q, - const Point &r) const - { - return CGAL::side_of_bounded_circle(project(p),project(q),project(r)); - } -}; - -template -class Compare_distance_projected_3 -{ -public: - typedef typename R::Point_3 Point_3; - typedef typename R::Point_2 Point_2; - typedef typename R::FT RT; - typename R::FT x(const Point_3 &p) const { return Projector::x(p); } - typename R::FT y(const Point_3 &p) const { return Projector::y(p); } - - Point_2 project(const Point_3& p) const - { - return Point_2(x(p),y(p)); - } - - Comparison_result operator()(const Point_3& p,const Point_3& q,const Point_3& r) const - { - Point_2 p2 = project(p); - Point_2 q2 = project(q); - Point_2 r2 = project(r); - return compare_distance_to_point(p2,q2,r2); - } -}; - -template -class Squared_distance_projected_3 -{ -public: - typedef typename R::Point_3 Point_3; - typedef typename R::Point_2 Point_2; - typedef typename R::Line_3 Line_3; - typedef typename R::Line_2 Line_2; - typedef typename R::FT RT; - typename R::FT x(const Point_3 &p) const { return Projector::x(p); } - typename R::FT y(const Point_3 &p) const { return Projector::y(p); } - - Point_2 project(const Point_3& p) const - { - return Point_2(x(p),y(p)); - } - - RT operator()(const Line_3& l, const Point_3& p) const - { - Point_2 p2(project(p)); - Line_2 l2(project(l.point(0)), project(l.point(1))); - return squared_distance(p2, l2); - } -}; - -template -class Intersect_projected_3 -{ -public: - typedef typename R::Point_3 Point_3; - typedef typename R::Segment_3 Segment_3; - typedef typename R::Point_2 Point_2; - typedef typename R::Vector_2 Vector_2; - typedef typename R::Segment_2 Segment_2; - typedef typename R::FT FT; - - typename R::FT x(const Point_3 &p) const { return Projector::x(p); } - typename R::FT y(const Point_3 &p) const { return Projector::y(p); } - - Point_2 project(const Point_3& p) const - { - return Point_2(x(p),y(p)); - } - - FT alpha(const Point_2& p, const Point_2& source, const Point_2& target) const - { - FT dx = target.x() - source.x(); - FT dy = target.y() - source.y(); - return (CGAL::abs(dx)>CGAL::abs(dy)) ? ( p.x()-source.x() ) / dx : (p.y()-source.y() ) / dy; - } - - Object operator()(const Segment_3& s1, const Segment_3& s2) const - { - Point_2 s1_source = project(s1.source()); - Point_2 s1_target = project(s1.target()); - Point_2 s2_source = project(s2.source()); - Point_2 s2_target = project(s2.target()); - Segment_2 s1_2(s1_source, s1_target); - Segment_2 s2_2(s2_source, s2_target); - CGAL_precondition(!s1_2.is_degenerate()); - CGAL_precondition(!s2_2.is_degenerate()); - - //compute intersection points in projected plane - //We know that none of the segment is degenerate - Object o = intersection(s1_2,s2_2); - const Point_2* pi=CGAL::object_cast(&o); - if (pi==NULL) { //case of segment or empty - const Segment_2* si=CGAL::object_cast(&o); - if (si==NULL) return Object(); - FT src[3],tgt[3]; - //the third coordinate is the midpoint between the points on s1 and s2 - FT z1 = s1.source()[dim] + ( alpha(si->source(), s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] )); - FT z2 = s2.source()[dim] + ( alpha(si->source(), s2_source, s2_target) * ( s2.target()[dim] - s2.source()[dim] )); - src[dim] = (z1+z2) / FT(2); - - - z1 = s1.source()[dim] + ( alpha(si->target(), s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] )); - z2 = s2.source()[dim] + ( alpha(si->target(), s2_source, s2_target) * ( s2.target()[dim] - s2.source()[dim] )); - - tgt[dim] = (z1+z2) / FT(2); - - - src[Projector::x_index] = si->source().x(); - src[Projector::y_index] = si->source().y(); - tgt[Projector::x_index] = si->target().x(); - tgt[Projector::y_index] = si->target().y(); - return make_object( Segment_3( Point_3(src[0],src[1],src[2]),Point_3(tgt[0],tgt[1],tgt[2]) ) ); - } - FT coords[3]; - //compute the third coordinate of the projected intersection point onto 3D segments - FT z1 = s1.source()[dim] + ( alpha(*pi, s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] )); - FT z2 = s2.source()[dim] + ( alpha(*pi, s2_source, s2_target) * ( s2.target()[dim] - s2.source()[dim] )); - - coords[dim] = (z1+z2) / FT(2); - coords[Projector::x_index] = pi->x(); - coords[Projector::y_index] = pi->y(); - - Point_3 res(coords[0],coords[1],coords[2]); - CGAL_assertion(x(res)==pi->x() && y(res)==pi->y()); - return make_object(res); - } -}; - -template -class Circumcenter_center_projected -{ - typedef typename R::Point_3 Point_3; - typedef typename R::Point_2 Point_2; - - typename R::FT x(const Point_3 &p) const { return Projector::x(p); } - typename R::FT y(const Point_3 &p) const { return Projector::y(p); } - - Point_2 project(const Point_3& p) const - { - return Point_2(x(p),y(p)); - } - - Point_3 embed (const Point_2& p) const - { - typename R::FT coords[3]; - coords[Projector::x_index]=p.x(); - coords[Projector::y_index]=p.y(); - coords[dim]=typename R::FT(0); - return Point_3(coords[0],coords[1],coords[2]); - } - -public: - Point_3 operator() (const Point_3& p1,const Point_3& p2) const - { - return embed( circumcenter(project(p1),project(p2)) ); - } - - Point_3 operator() (const Point_3& p1,const Point_3& p2,const Point_3& p3) const - { - return embed( circumcenter(project(p1),project(p2),project(p3)) ); - } -}; - -template -class Compute_area_projected -{ - typedef typename R::Point_3 Point_3; - typedef typename R::Point_2 Point_2; - - typename R::FT x(const Point_3 &p) const { return Projector::x(p); } - typename R::FT y(const Point_3 &p) const { return Projector::y(p); } - - Point_2 project(const Point_3& p) const - { - return Point_2(x(p),y(p)); - } - - -public: - typename R::FT operator() (const Point_3& p1,const Point_3& p2,const Point_3& p3) const - { - return R().compute_area_2_object() ( project(p1),project(p2),project(p3) ); - } -}; - -template -class Compute_squared_radius_projected -{ - typedef typename R::Point_3 Point_3; - typedef typename R::Point_2 Point_2; - - typename R::FT x(const Point_3 &p) const { return Projector::x(p); } - typename R::FT y(const Point_3 &p) const { return Projector::y(p); } - - Point_2 project(const Point_3& p) const - { - return Point_2(x(p),y(p)); - } - - -public: - typename R::FT operator() (const Point_3& p1,const Point_3& p2,const Point_3& p3) const - { - return R().compute_squared_radius_2_object() ( project(p1),project(p2),project(p3) ); - } - typename R::FT operator() (const Point_3& p1,const Point_3& p2) const - { - return R().compute_squared_radius_2_object() ( project(p1),project(p2) ); - } - - typename R::FT operator() (const Point_3& p1) const - { - return R().compute_squared_radius_2_object() ( project(p1) ); - } -}; - -template < class R, int dim > -class Projection_traits_3 { -public: - typedef Projection_traits_3 Traits; - typedef R Rp; - typedef typename R::FT FT; - typedef typename Rp::Point_3 Point_2; - typedef typename Rp::Segment_3 Segment_2; - typedef typename Rp::Triangle_3 Triangle_2; - typedef typename Rp::Line_3 Line_2; - - typedef typename Projector::Less_x_2 Less_x_2; - typedef typename Projector::Less_y_2 Less_y_2; - typedef typename Projector::Compare_x_2 Compare_x_2; - typedef typename Projector::Compare_y_2 Compare_y_2; - typedef Orientation_projected_3 Orientation_2; - typedef Side_of_oriented_circle_projected_3 Side_of_oriented_circle_2; - typedef Side_of_bounded_circle_projected_3 Side_of_bounded_circle_2; - typedef Compare_distance_projected_3 Compare_distance_2; - typedef Squared_distance_projected_3 Compute_squared_distance_2; - typedef Intersect_projected_3 Intersect_2; - typedef Compute_squared_radius_projected Compute_squared_radius_2; - typedef typename Rp::Construct_segment_3 Construct_segment_2; - typedef typename Rp::Construct_triangle_3 Construct_triangle_2; - typedef typename Rp::Construct_line_3 Construct_line_2; - - struct Less_xy_2 { - typedef bool result_type; - bool operator()(const Point_2& p, const Point_2& q) const - { - Compare_x_2 cx; - Comparison_result crx = cx(p,q); - if(crx == SMALLER){ return true;} - if(crx == LARGER){return false;} - Less_y_2 ly; - return ly(p,q); - } - }; - - - struct Less_yx_2 { - typedef bool result_type; - bool operator()(const Point_2& p, const Point_2& q) const - { - Compare_y_2 cy; - Comparison_result cry = cy(p,q); - if(cry == SMALLER){ return true;} - if(cry == LARGER){return false;} - Less_x_2 lx; - return lx(p,q); - } - }; - - struct Equal_2 { - typedef bool result_type; - bool operator()(const Point_2& p, const Point_2& q) const - { - - Equal_x_2 eqx; - Equal_y_2 eqy; - return eqx(p,q) & eqy(p,q); - } - }; - - struct Left_turn_2 { - typedef bool result_type; - bool operator()(const Point_2& p, const Point_2& q, const Point_2& r) const - { - - Orientation_2 ori; - return ori(p,q,r) == LEFT_TURN; - } - }; - - //for natural_neighbor_coordinates_2 - typedef typename Projector::Equal_x_2 Equal_x_2; - typedef typename Projector::Equal_y_2 Equal_y_2; - typedef Circumcenter_center_projected Construct_circumcenter_2; - typedef Compute_area_projected Compute_area_2; - Construct_circumcenter_2 construct_circumcenter_2_object () const {return Construct_circumcenter_2();} - Compute_area_2 compute_area_2_object () const {return Compute_area_2();} - - - // for compatibility with previous versions - typedef Point_2 Point; - typedef Segment_2 Segment; - typedef Triangle_2 Triangle; - - Projection_traits_3(){} - Projection_traits_3( - const Projection_traits_3&){} - Projection_traits_3 &operator=( - const Projection_traits_3&){return *this;} - - typename Rp::FT x(const Point_2 &p) const { return Projector::x(p); } - typename Rp::FT y(const Point_2 &p) const { return Projector::y(p); } - - - Equal_2 - equal_2_object() const - { return Equal_2();} - - Left_turn_2 - left_turn_2_object() const - { return Left_turn_2();} - - Less_x_2 - less_x_2_object() const - { return Less_x_2();} - - Less_xy_2 - less_xy_2_object() const - { return Less_xy_2();} - - Less_yx_2 - less_yx_2_object() const - { return Less_yx_2();} - - Less_y_2 - less_y_2_object() const - { return Less_y_2();} - Compare_x_2 - compare_x_2_object() const - { return Compare_x_2();} - - Compare_y_2 - compare_y_2_object() const - { return Compare_y_2();} - - Orientation_2 - orientation_2_object() const - { return Orientation_2();} - - Side_of_oriented_circle_2 - side_of_oriented_circle_2_object() const - {return Side_of_oriented_circle_2();} - - Side_of_bounded_circle_2 - side_of_bounded_circle_2_object() const - {return Side_of_bounded_circle_2();} - - Compare_distance_2 - compare_distance_2_object() const - { - return Compare_distance_2(); - } - - Compute_squared_distance_2 - compute_squared_distance_2_object () const - { - return Compute_squared_distance_2(); - } - - Compute_squared_radius_2 - compute_squared_radius_2_object () const - { - return Compute_squared_radius_2(); - } - - Intersect_2 - intersect_2_object () const - { - return Intersect_2(); - } - - Construct_segment_2 construct_segment_2_object() const - {return Construct_segment_2();} - - Construct_triangle_2 construct_triangle_2_object() const - {return Construct_triangle_2();} - - Construct_line_2 construct_line_2_object() const - {return Construct_line_2();} - -}; - - -} } //namespace CGAL::internal - -#endif // CGAL_INTERNAL_PROJECTION_TRAITS_3_H +// Copyright (c) 1997-2010 INRIA Sophia-Antipolis (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$ +// +// +// Author(s) : Mariette Yvinec, Sebastien Loriot + +#ifndef CGAL_INTERNAL_PROJECTION_TRAITS_3_H +#define CGAL_INTERNAL_PROJECTION_TRAITS_3_H + +#include + +#include +#include +#include + +#include + +namespace CGAL { + +namespace internal { + +//project Point_3 along coordinate dim +template +struct Projector; + +//project onto yz +template +struct Projector +{ + typedef typename R::Less_y_3 Less_x_2; + typedef typename R::Less_z_3 Less_y_2; + typedef typename R::Compare_y_3 Compare_x_2; + typedef typename R::Compare_z_3 Compare_y_2; + typedef typename R::Equal_y_3 Equal_x_2; + typedef typename R::Equal_z_3 Equal_y_2; + + static typename R::FT x(const typename R::Point_3& p) {return p.y();} + static typename R::FT y(const typename R::Point_3& p) {return p.z();} + static const int x_index=1; + static const int y_index=2; +}; +//project onto xz +template +struct Projector +{ + typedef typename R::Less_x_3 Less_x_2; + typedef typename R::Less_z_3 Less_y_2; + typedef typename R::Compare_x_3 Compare_x_2; + typedef typename R::Compare_z_3 Compare_y_2; + typedef typename R::Equal_x_3 Equal_x_2; + typedef typename R::Equal_z_3 Equal_y_2; + static typename R::FT x(const typename R::Point_3& p) {return p.x();} + static typename R::FT y(const typename R::Point_3& p) {return p.z();} + static const int x_index=0; + static const int y_index=2; +}; + +//project onto xy +template +struct Projector +{ + typedef typename R::Less_x_3 Less_x_2; + typedef typename R::Less_y_3 Less_y_2; + typedef typename R::Compare_x_3 Compare_x_2; + typedef typename R::Compare_y_3 Compare_y_2; + typedef typename R::Equal_x_3 Equal_x_2; + typedef typename R::Equal_y_3 Equal_y_2; + static typename R::FT x(const typename R::Point_3& p) {return p.x();} + static typename R::FT y(const typename R::Point_3& p) {return p.y();} + static const int x_index=0; + static const int y_index=1; +}; + + + +template +class Orientation_projected_3 +{ +public: + typedef typename R::Point_3 Point; + typename R::FT x(const Point &p) const { return Projector::x(p); } + typename R::FT y(const Point &p) const { return Projector::y(p); } + + typename R::Point_2 project(const Point& p) const + { + return typename R::Point_2(x(p),y(p)); + } + + CGAL::Orientation operator()(const Point& p, + const Point& q, + const Point& r) const + { + return CGAL::orientation(project(p), project(q), project(r)); + } +}; + +template +class Side_of_oriented_circle_projected_3 +{ +public: + typedef typename R::Point_3 Point; + typename R::FT x(const Point &p) const { return Projector::x(p); } + typename R::FT y(const Point &p) const { return Projector::y(p); } + + + typename R::Point_2 project(const Point& p) const + { + return typename R::Point_2(x(p),y(p)); + } + CGAL::Oriented_side operator() (const Point &p, + const Point &q, + const Point &r, + const Point &s) const + { + return CGAL::side_of_oriented_circle(project(p),project(q),project(r),project(s) ); + } +}; + +template +class Side_of_bounded_circle_projected_3 +{ +public: + typedef typename R::Point_3 Point; + typename R::FT x(const Point &p) const { return Projector::x(p); } + typename R::FT y(const Point &p) const { return Projector::y(p); } + + + typename R::Point_2 project(const Point& p) const + { + return typename R::Point_2(x(p),y(p)); + } + CGAL::Bounded_side operator() (const Point &p, + const Point &q, + const Point &r, + const Point &s) const + { + return CGAL::side_of_bounded_circle(project(p),project(q),project(r),project(s) ); + } + + CGAL::Bounded_side operator() (const Point &p, + const Point &q, + const Point &r) const + { + return CGAL::side_of_bounded_circle(project(p),project(q),project(r)); + } +}; + +template +class Compare_distance_projected_3 +{ +public: + typedef typename R::Point_3 Point_3; + typedef typename R::Point_2 Point_2; + typedef typename R::FT RT; + typename R::FT x(const Point_3 &p) const { return Projector::x(p); } + typename R::FT y(const Point_3 &p) const { return Projector::y(p); } + + Point_2 project(const Point_3& p) const + { + return Point_2(x(p),y(p)); + } + + Comparison_result operator()(const Point_3& p,const Point_3& q,const Point_3& r) const + { + Point_2 p2 = project(p); + Point_2 q2 = project(q); + Point_2 r2 = project(r); + return compare_distance_to_point(p2,q2,r2); + } +}; + +template +class Squared_distance_projected_3 +{ +public: + typedef typename R::Point_3 Point_3; + typedef typename R::Point_2 Point_2; + typedef typename R::Line_3 Line_3; + typedef typename R::Line_2 Line_2; + typedef typename R::FT RT; + typename R::FT x(const Point_3 &p) const { return Projector::x(p); } + typename R::FT y(const Point_3 &p) const { return Projector::y(p); } + + Point_2 project(const Point_3& p) const + { + return Point_2(x(p),y(p)); + } + + RT operator()(const Point_3& p, const Point_3& q) const + { + Point_2 p2(project(p)); + Point_2 q2(project(q)); + return squared_distance(p2, q2); + } + + RT operator()(const Line_3& l, const Point_3& p) const + { + Point_2 p2(project(p)); + Line_2 l2(project(l.point(0)), project(l.point(1))); + return squared_distance(p2, l2); + } +}; + +template +class Intersect_projected_3 +{ +public: + typedef typename R::Point_3 Point_3; + typedef typename R::Segment_3 Segment_3; + typedef typename R::Point_2 Point_2; + typedef typename R::Vector_2 Vector_2; + typedef typename R::Segment_2 Segment_2; + typedef typename R::FT FT; + + typename R::FT x(const Point_3 &p) const { return Projector::x(p); } + typename R::FT y(const Point_3 &p) const { return Projector::y(p); } + + Point_2 project(const Point_3& p) const + { + return Point_2(x(p),y(p)); + } + + FT alpha(const Point_2& p, const Point_2& source, const Point_2& target) const + { + FT dx = target.x() - source.x(); + FT dy = target.y() - source.y(); + return (CGAL::abs(dx)>CGAL::abs(dy)) ? ( p.x()-source.x() ) / dx : (p.y()-source.y() ) / dy; + } + + Object operator()(const Segment_3& s1, const Segment_3& s2) const + { + Point_2 s1_source = project(s1.source()); + Point_2 s1_target = project(s1.target()); + Point_2 s2_source = project(s2.source()); + Point_2 s2_target = project(s2.target()); + Segment_2 s1_2(s1_source, s1_target); + Segment_2 s2_2(s2_source, s2_target); + CGAL_precondition(!s1_2.is_degenerate()); + CGAL_precondition(!s2_2.is_degenerate()); + + //compute intersection points in projected plane + //We know that none of the segment is degenerate + Object o = intersection(s1_2,s2_2); + const Point_2* pi=CGAL::object_cast(&o); + if (pi==NULL) { //case of segment or empty + const Segment_2* si=CGAL::object_cast(&o); + if (si==NULL) return Object(); + FT src[3],tgt[3]; + //the third coordinate is the midpoint between the points on s1 and s2 + FT z1 = s1.source()[dim] + ( alpha(si->source(), s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] )); + FT z2 = s2.source()[dim] + ( alpha(si->source(), s2_source, s2_target) * ( s2.target()[dim] - s2.source()[dim] )); + src[dim] = (z1+z2) / FT(2); + + + z1 = s1.source()[dim] + ( alpha(si->target(), s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] )); + z2 = s2.source()[dim] + ( alpha(si->target(), s2_source, s2_target) * ( s2.target()[dim] - s2.source()[dim] )); + + tgt[dim] = (z1+z2) / FT(2); + + + src[Projector::x_index] = si->source().x(); + src[Projector::y_index] = si->source().y(); + tgt[Projector::x_index] = si->target().x(); + tgt[Projector::y_index] = si->target().y(); + return make_object( Segment_3( Point_3(src[0],src[1],src[2]),Point_3(tgt[0],tgt[1],tgt[2]) ) ); + } + FT coords[3]; + //compute the third coordinate of the projected intersection point onto 3D segments + FT z1 = s1.source()[dim] + ( alpha(*pi, s1_source, s1_target) * ( s1.target()[dim] - s1.source()[dim] )); + FT z2 = s2.source()[dim] + ( alpha(*pi, s2_source, s2_target) * ( s2.target()[dim] - s2.source()[dim] )); + + coords[dim] = (z1+z2) / FT(2); + coords[Projector::x_index] = pi->x(); + coords[Projector::y_index] = pi->y(); + + Point_3 res(coords[0],coords[1],coords[2]); + CGAL_assertion(x(res)==pi->x() && y(res)==pi->y()); + return make_object(res); + } +}; + +template +class Circumcenter_center_projected +{ + typedef typename R::Point_3 Point_3; + typedef typename R::Point_2 Point_2; + + typename R::FT x(const Point_3 &p) const { return Projector::x(p); } + typename R::FT y(const Point_3 &p) const { return Projector::y(p); } + + Point_2 project(const Point_3& p) const + { + return Point_2(x(p),y(p)); + } + + Point_3 embed (const Point_2& p) const + { + typename R::FT coords[3]; + coords[Projector::x_index]=p.x(); + coords[Projector::y_index]=p.y(); + coords[dim]=typename R::FT(0); + return Point_3(coords[0],coords[1],coords[2]); + } + +public: + Point_3 operator() (const Point_3& p1,const Point_3& p2) const + { + return embed( circumcenter(project(p1),project(p2)) ); + } + + Point_3 operator() (const Point_3& p1,const Point_3& p2,const Point_3& p3) const + { + return embed( circumcenter(project(p1),project(p2),project(p3)) ); + } +}; + +template +class Compute_area_projected +{ + typedef typename R::Point_3 Point_3; + typedef typename R::Point_2 Point_2; + + typename R::FT x(const Point_3 &p) const { return Projector::x(p); } + typename R::FT y(const Point_3 &p) const { return Projector::y(p); } + + Point_2 project(const Point_3& p) const + { + return Point_2(x(p),y(p)); + } + + +public: + typename R::FT operator() (const Point_3& p1,const Point_3& p2,const Point_3& p3) const + { + return R().compute_area_2_object() ( project(p1),project(p2),project(p3) ); + } +}; + +template +class Compute_squared_radius_projected +{ + typedef typename R::Point_3 Point_3; + typedef typename R::Point_2 Point_2; + + typename R::FT x(const Point_3 &p) const { return Projector::x(p); } + typename R::FT y(const Point_3 &p) const { return Projector::y(p); } + + Point_2 project(const Point_3& p) const + { + return Point_2(x(p),y(p)); + } + + +public: + typename R::FT operator() (const Point_3& p1,const Point_3& p2,const Point_3& p3) const + { + return R().compute_squared_radius_2_object() ( project(p1),project(p2),project(p3) ); + } + typename R::FT operator() (const Point_3& p1,const Point_3& p2) const + { + return R().compute_squared_radius_2_object() ( project(p1),project(p2) ); + } + + typename R::FT operator() (const Point_3& p1) const + { + return R().compute_squared_radius_2_object() ( project(p1) ); + } +}; + +template < class R, int dim > +class Projection_traits_3 { +public: + typedef Projection_traits_3 Traits; + typedef R Rp; + typedef typename R::FT FT; + typedef typename Rp::Point_3 Point_2; + typedef typename Rp::Segment_3 Segment_2; + typedef typename Rp::Vector_3 Vector_2; + typedef typename Rp::Triangle_3 Triangle_2; + typedef typename Rp::Line_3 Line_2; + + typedef typename Projector::Less_x_2 Less_x_2; + typedef typename Projector::Less_y_2 Less_y_2; + typedef typename Projector::Compare_x_2 Compare_x_2; + typedef typename Projector::Compare_y_2 Compare_y_2; + typedef Orientation_projected_3 Orientation_2; + typedef typename Rp::Angle_3 Angle_2; + typedef Side_of_oriented_circle_projected_3 Side_of_oriented_circle_2; + typedef Side_of_bounded_circle_projected_3 Side_of_bounded_circle_2; + typedef Compare_distance_projected_3 Compare_distance_2; + typedef Squared_distance_projected_3 Compute_squared_distance_2; + typedef Intersect_projected_3 Intersect_2; + typedef Compute_squared_radius_projected Compute_squared_radius_2; + typedef typename Rp::Construct_segment_3 Construct_segment_2; + typedef typename Rp::Construct_translated_point_3 Construct_translated_point_2; + typedef typename Rp::Construct_midpoint_3 Construct_midpoint_2; + typedef typename Rp::Construct_vector_3 Construct_vector_2; + typedef typename Rp::Construct_scaled_vector_3 Construct_scaled_vector_2; + typedef typename Rp::Construct_triangle_3 Construct_triangle_2; + typedef typename Rp::Construct_line_3 Construct_line_2; + + struct Less_xy_2 { + typedef bool result_type; + bool operator()(const Point_2& p, const Point_2& q) const + { + Compare_x_2 cx; + Comparison_result crx = cx(p,q); + if(crx == SMALLER){ return true;} + if(crx == LARGER){return false;} + Less_y_2 ly; + return ly(p,q); + } + }; + + + struct Less_yx_2 { + typedef bool result_type; + bool operator()(const Point_2& p, const Point_2& q) const + { + Compare_y_2 cy; + Comparison_result cry = cy(p,q); + if(cry == SMALLER){ return true;} + if(cry == LARGER){return false;} + Less_x_2 lx; + return lx(p,q); + } + }; + + struct Equal_2 { + typedef bool result_type; + bool operator()(const Point_2& p, const Point_2& q) const + { + + Equal_x_2 eqx; + Equal_y_2 eqy; + return eqx(p,q) & eqy(p,q); + } + }; + + struct Left_turn_2 { + typedef bool result_type; + bool operator()(const Point_2& p, const Point_2& q, const Point_2& r) const + { + + Orientation_2 ori; + return ori(p,q,r) == LEFT_TURN; + } + }; + + //for natural_neighbor_coordinates_2 + typedef typename Projector::Equal_x_2 Equal_x_2; + typedef typename Projector::Equal_y_2 Equal_y_2; + typedef Circumcenter_center_projected Construct_circumcenter_2; + typedef Compute_area_projected Compute_area_2; + Construct_circumcenter_2 construct_circumcenter_2_object () const {return Construct_circumcenter_2();} + Compute_area_2 compute_area_2_object () const {return Compute_area_2();} + + + // for compatibility with previous versions + typedef Point_2 Point; + typedef Segment_2 Segment; + typedef Triangle_2 Triangle; + + Projection_traits_3(){} + Projection_traits_3( + const Projection_traits_3&){} + Projection_traits_3 &operator=( + const Projection_traits_3&){return *this;} + + typename Rp::FT x(const Point_2 &p) const { return Projector::x(p); } + typename Rp::FT y(const Point_2 &p) const { return Projector::y(p); } + + + Equal_2 + equal_2_object() const + { return Equal_2();} + + Left_turn_2 + left_turn_2_object() const + { return Left_turn_2();} + + Less_x_2 + less_x_2_object() const + { return Less_x_2();} + + Less_xy_2 + less_xy_2_object() const + { return Less_xy_2();} + + Less_yx_2 + less_yx_2_object() const + { return Less_yx_2();} + + Less_y_2 + less_y_2_object() const + { return Less_y_2();} + Compare_x_2 + compare_x_2_object() const + { return Compare_x_2();} + Angle_2 + angle_2_object() const { + return Angle_2(); + } + + Compare_y_2 + compare_y_2_object() const + { return Compare_y_2();} + + Orientation_2 + orientation_2_object() const + { return Orientation_2();} + + Side_of_oriented_circle_2 + side_of_oriented_circle_2_object() const + {return Side_of_oriented_circle_2();} + + Side_of_bounded_circle_2 + side_of_bounded_circle_2_object() const + {return Side_of_bounded_circle_2();} + + Compare_distance_2 + compare_distance_2_object() const + { + return Compare_distance_2(); + } + + Compute_squared_distance_2 + compute_squared_distance_2_object () const + { + return Compute_squared_distance_2(); + } + + Compute_squared_radius_2 + compute_squared_radius_2_object () const + { + return Compute_squared_radius_2(); + } + + Intersect_2 + intersect_2_object () const + { + return Intersect_2(); + } + + Construct_segment_2 construct_segment_2_object() const + {return Construct_segment_2();} + + Construct_translated_point_2 construct_translated_point_2_object() const + {return Construct_translated_point_2();} + + Construct_midpoint_2 construct_midpoint_2_object() const + {return Construct_midpoint_2();} + + Construct_vector_2 construct_vector_2_object() const + {return Construct_vector_2();} + + Construct_scaled_vector_2 construct_scaled_vector_2_object() const + {return Construct_scaled_vector_2();} + + Construct_triangle_2 construct_triangle_2_object() const + {return Construct_triangle_2();} + + Construct_line_2 construct_line_2_object() const + {return Construct_line_2();} + +}; + + +} } //namespace CGAL::internal + +#endif // CGAL_INTERNAL_PROJECTION_TRAITS_3_H diff --git a/Mesh_2/test/Mesh_2/test_mesh_terrain.cpp b/Mesh_2/test/Mesh_2/test_mesh_terrain.cpp new file mode 100644 index 00000000000..617e6945e90 --- /dev/null +++ b/Mesh_2/test/Mesh_2/test_mesh_terrain.cpp @@ -0,0 +1,41 @@ +#include +#include +#include +#include +#include +#include + +#include + + +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef CGAL::Projection_traits_xy_3 Gt; +typedef CGAL::Triangulation_vertex_base_2 Vb; +typedef CGAL::Delaunay_mesh_face_base_2 Fb; +typedef CGAL::Triangulation_data_structure_2 TDS; +typedef CGAL::Constrained_Delaunay_triangulation_2 Delaunay; +typedef CGAL::Delaunay_mesh_size_criteria_2 Criteria; + +typedef K::Point_3 Point; + +int main() +{ + Delaunay dt; + typedef Delaunay::Vertex_handle Vertex_handle; + Vertex_handle va = dt.insert(Point(-4,0, 0)); + Vertex_handle vb = dt.insert(Point(0,-1, 0)); + Vertex_handle vc = dt.insert(Point(4,0, 0)); + Vertex_handle vd = dt.insert(Point(0,1,0)); + dt.insert(Point(2, 0.6, 0)); + + dt.insert_constraint(va, vb); + dt.insert_constraint(vb, vc); + dt.insert_constraint(vc, vd); + dt.insert_constraint(vd, va); + + CGAL::refine_Delaunay_mesh_2(dt, Criteria(0.125, 0.5)); + // dt.insert(begin, end); + std::cout << dt.number_of_vertices() << std::endl; + return 0; +} From 3ee271ea18a4b567efd82aa8cb75e58ec0f04ad8 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Tue, 16 Oct 2012 14:53:13 +0000 Subject: [PATCH 116/157] Add documentation that Projection_traits_xy_3 is a model of DelaunayMeshTraits_2 --- Kernel_23/doc_tex/Kernel_23_ref/Projection_traits_xy_3.tex | 3 ++- .../Mesh_2_ref/ConformingDelaunayTriangulationTraits_2.tex | 3 ++- Mesh_2/doc_tex/Mesh_2_ref/DelaunayMeshTraits_2.tex | 3 ++- 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/Kernel_23/doc_tex/Kernel_23_ref/Projection_traits_xy_3.tex b/Kernel_23/doc_tex/Kernel_23_ref/Projection_traits_xy_3.tex index 242e259ad95..870054641dd 100644 --- a/Kernel_23/doc_tex/Kernel_23_ref/Projection_traits_xy_3.tex +++ b/Kernel_23/doc_tex/Kernel_23_ref/Projection_traits_xy_3.tex @@ -35,7 +35,8 @@ of the concepts \ccc{PolygonTraits_2} and \ccc{ConvexHullTraits_2}. \ccRefConceptPage{DelaunayTriangulationTraits_2} \\ \ccRefConceptPage{ConstrainedTriangulationTraits_2} \\ \ccRefConceptPage{PolygonTraits_2} \\ -\ccRefConceptPage{ConvexHullTraits_2} +\ccRefConceptPage{ConvexHullTraits_2} \\ +\ccRefConceptPage{DelaunayMeshTraits_2} \ccTypes diff --git a/Mesh_2/doc_tex/Mesh_2_ref/ConformingDelaunayTriangulationTraits_2.tex b/Mesh_2/doc_tex/Mesh_2_ref/ConformingDelaunayTriangulationTraits_2.tex index 3c885c9b2d5..68431ba10f3 100644 --- a/Mesh_2/doc_tex/Mesh_2_ref/ConformingDelaunayTriangulationTraits_2.tex +++ b/Mesh_2/doc_tex/Mesh_2_ref/ConformingDelaunayTriangulationTraits_2.tex @@ -61,7 +61,8 @@ points on constrained edges. \ccMethod{Angle_2 angle_2_object();}{} \ccHasModels -Any model of \ccc{Kernel} concept. In particular, all \cgal\ kernels. +Any model of \ccc{Kernel} concept. In particular, all \cgal\ kernels.\\ +\ccc{Projection_traits_xy_3} \end{ccRefConcept} diff --git a/Mesh_2/doc_tex/Mesh_2_ref/DelaunayMeshTraits_2.tex b/Mesh_2/doc_tex/Mesh_2_ref/DelaunayMeshTraits_2.tex index 538356c76da..ed21282fcfb 100644 --- a/Mesh_2/doc_tex/Mesh_2_ref/DelaunayMeshTraits_2.tex +++ b/Mesh_2/doc_tex/Mesh_2_ref/DelaunayMeshTraits_2.tex @@ -36,7 +36,8 @@ object \ccc{Construct_circumcenter_2}. \ccMethod{Compute_area_2 compute_area_2_object();}{} \ccHasModels -Any model of the \ccc{Kernel} concept. In particular, all \cgal\ kernels. +Any model of the \ccc{Kernel} concept. In particular, all \cgal\ kernels.\\ +\ccc{Projection_traits_xy_3} \end{ccRefConcept} From 964f3a1767bb6a0a36050f9b0672ff04728f88d4 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 17 Oct 2012 08:02:04 +0000 Subject: [PATCH 117/157] Fix a warning on Windows x64: include\CGAL/GMP/Gmpfr_type.h(1013) : warning C4267: 'argument' : conversion from 'size_t' to 'CGAL::Gmpfr::Precision_type', possible loss of data --- Number_types/include/CGAL/GMP/Gmpfr_type.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Number_types/include/CGAL/GMP/Gmpfr_type.h b/Number_types/include/CGAL/GMP/Gmpfr_type.h index 9aaa9ab54b2..9812771eee4 100644 --- a/Number_types/include/CGAL/GMP/Gmpfr_type.h +++ b/Number_types/include/CGAL/GMP/Gmpfr_type.h @@ -1010,7 +1010,7 @@ std::pair Gmpfr::to_integer_exp()const{ CGAL_postcondition_code(if(e>=0)) CGAL_postcondition( - (*this)==(Gmpfr(z,z.bit_size())*CGAL::ipower(Gmpfr(2),e))); + (*this)==(Gmpfr(z,(mpfr_prec_t)z.bit_size())*CGAL::ipower(Gmpfr(2),e))); CGAL_postcondition_code(else) CGAL_postcondition(((*this)*(Gmpz(1)<<(-e)))==z); From 19330482993b1f1d259d7f11fbd5d3e6c53961cd Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 17 Oct 2012 12:33:10 +0000 Subject: [PATCH 118/157] New location of manual files --- Maintenance/public_release/scripts/prepare_release | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Maintenance/public_release/scripts/prepare_release b/Maintenance/public_release/scripts/prepare_release index 626db7922e6..0c149da5572 100755 --- a/Maintenance/public_release/scripts/prepare_release +++ b/Maintenance/public_release/scripts/prepare_release @@ -76,7 +76,7 @@ popd printf "Now use:\n" printf " cd ${DEST_DIR}\n" printf " mv cgal_manual.zip /var/CGAL/www/%s/Manual/\n" "${PUBLIC_RELEASE_NAME#CGAL-}" -printf " rsync --compress -av doc_html examples include %s:www.cgal.org/Manual/%s\n" \ +printf " rsync --compress -av doc_html examples include %s:/www/inf-websites/doc.cgal.org/Manual/%s\n" \ cgal@contact.mpi-inf.mpg.de \ "${PUBLIC_RELEASE_NAME#CGAL-}" From f70c98a99c9f02bae5dd94cbd21373ce8fd3792c Mon Sep 17 00:00:00 2001 From: Michael Hemmer Date: Wed, 17 Oct 2012 14:40:17 +0000 Subject: [PATCH 119/157] improve doc --- .../Algebraic_foundations_ref/EuclideanRing.tex | 6 +++--- .../doc_tex/Algebraic_foundations_ref/Field.tex | 2 +- .../FieldWithKthRoot.tex | 2 +- .../FieldWithRootOf.tex | 2 +- .../Algebraic_foundations_ref/FieldWithSqrt.tex | 2 +- .../Algebraic_foundations_ref/IntegralDomain.tex | 4 ++-- .../IntegralDomainWithoutDivision.tex | 10 +++++----- .../Algebraic_foundations_ref/RealEmbeddable.tex | 16 ++++++++-------- .../UniqueFactorizationDomain.tex | 2 +- 9 files changed, 23 insertions(+), 23 deletions(-) diff --git a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/EuclideanRing.tex b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/EuclideanRing.tex index 091376a9f04..e75369e59c3 100644 --- a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/EuclideanRing.tex +++ b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/EuclideanRing.tex @@ -13,9 +13,9 @@ Moreover, \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >} is a model of \ccc{AlgebraicStructureTraits} providing:\\ - \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Algebraic_type} derived from \ccc{Unique_factorization_domain_tag} \\ -- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Mod} \\ -- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Div} \\ -- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Div_mod}\\ +- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Mod} a model of \ccc{AlgebraicStructureTraits::Mod}\\ +- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Div} a model of \ccc{AlgebraicStructureTraits::Div}\\ +- \ccc{CGAL::Algebraic_structure_traits< EuclideanRing >::Div_mod} a model of \ccc{AlgebraicStructureTraits::DivMod}\\ diff --git a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/Field.tex b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/Field.tex index 64e92bceaef..090300a6c3f 100644 --- a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/Field.tex +++ b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/Field.tex @@ -13,7 +13,7 @@ operators / and /=. Moreover, \ccc{CGAL::Algebraic_structure_traits< Field >} is a model of \ccc{AlgebraicStructureTraits} providing:\\ - \ccc{CGAL::Algebraic_structure_traits< Field >::Algebraic_type} derived from \ccc{Field_tag} \\ -- \ccc{CGAL::Algebraic_structure_traits< FieldWithSqrt >::Inverse}\\ +- \ccc{CGAL::Algebraic_structure_traits< FieldWithSqrt >::Inverse} a model of \ccc{AlgebraicStructureTraits::Inverse}\\ \ccRefines diff --git a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/FieldWithKthRoot.tex b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/FieldWithKthRoot.tex index 50487b00056..e2f3c6793f3 100644 --- a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/FieldWithKthRoot.tex +++ b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/FieldWithKthRoot.tex @@ -6,7 +6,7 @@ A model of \ccc{FieldWithKthRoot} is a \ccc{FieldWithSqrt} that has operations t Moreover, \ccc{CGAL::Algebraic_structure_traits< FieldWithKthRoot >} is a model of \ccc{AlgebraicStructureTraits} providing:\\ - \ccc{CGAL::Algebraic_structure_traits< FieldWithKthRoot >::Algebraic_type} derived from \ccc{Field_with_kth_root_tag} \\ -- \ccc{CGAL::Algebraic_structure_traits< FieldWithKthRoot >::Kth_root}\\ +- \ccc{CGAL::Algebraic_structure_traits< FieldWithKthRoot >::Kth_root} a model of \ccc{AlgebraicStructureTraits::KthRoot}\\ \ccRefines \ccc{FieldWithSqrt} diff --git a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/FieldWithRootOf.tex b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/FieldWithRootOf.tex index bf795681872..57986204329 100644 --- a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/FieldWithRootOf.tex +++ b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/FieldWithRootOf.tex @@ -7,7 +7,7 @@ construct it as the root of a univariate polynomial. Moreover, \ccc{CGAL::Algebraic_structure_traits< FieldWithRootOf >} is a model of \ccc{AlgebraicStructureTraits} providing:\\ - \ccc{CGAL::Algebraic_structure_traits< FieldWithRootOf >::Algebraic_type} derived from \ccc{Field_with_kth_root_tag} \\ -- \ccc{CGAL::Algebraic_structure_traits< FieldWithRootOf >::Root_of}\\ +- \ccc{CGAL::Algebraic_structure_traits< FieldWithRootOf >::Root_of} model of \ccc{AlgebraicStructureTraits::RootOf}\\ \ccRefines \ccc{FieldWithKthRoot} diff --git a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/FieldWithSqrt.tex b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/FieldWithSqrt.tex index ea035ca0023..01e9cc92f71 100644 --- a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/FieldWithSqrt.tex +++ b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/FieldWithSqrt.tex @@ -6,7 +6,7 @@ A model of \ccc{FieldWithSqrt} is a \ccc{Field} that has operations to take squa Moreover, \ccc{CGAL::Algebraic_structure_traits< FieldWithSqrt >} is a model of \ccc{AlgebraicStructureTraits} providing:\\ - \ccc{CGAL::Algebraic_structure_traits< FieldWithSqrt >::Algebraic_type} derived from \ccc{Field_with_sqrt_tag} \\ -- \ccc{CGAL::Algebraic_structure_traits< FieldWithSqrt >::Sqrt}\\ +- \ccc{CGAL::Algebraic_structure_traits< FieldWithSqrt >::Sqrt} a model of \ccc{AlgebraicStructureTraits::Sqrt} \\ \ccRefines \ccc{Field} diff --git a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/IntegralDomain.tex b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/IntegralDomain.tex index 36734061a80..9dc94bb4d06 100644 --- a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/IntegralDomain.tex +++ b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/IntegralDomain.tex @@ -15,8 +15,8 @@ Moreover, \ccc{CGAL::Algebraic_structure_traits< IntegralDomain >} is a model of \ccc{AlgebraicStructureTraits} providing:\\ - \ccc{CGAL::Algebraic_structure_traits< IntegralDomain >::Algebraic_type} derived from \ccc{Integral_domain_tag} \\ -- \ccc{CGAL::Algebraic_structure_traits< IntegralDomain >::Integral_division}\\ -- \ccc{CGAL::Algebraic_structure_traits< IntegralDomain >::Divides}\\ +- \ccc{CGAL::Algebraic_structure_traits< IntegralDomain >::Integral_division} a model of \ccc{AlgebraicStructureTraits::IntegralDivision}\\ +- \ccc{CGAL::Algebraic_structure_traits< IntegralDomain >::Divides} a model of \ccc{AlgebraicStructureTraits::Divides}\\ \ccRefines \ccc{IntegralDomainWithoutDivision} diff --git a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/IntegralDomainWithoutDivision.tex b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/IntegralDomainWithoutDivision.tex index 5695bf4c492..523f4bf1ba3 100644 --- a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/IntegralDomainWithoutDivision.tex +++ b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/IntegralDomainWithoutDivision.tex @@ -20,11 +20,11 @@ implement the respective ring operations. Moreover, \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >} is a model of \ccc{AlgebraicStructureTraits} providing:\\ - \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Algebraic_type} derived from \ccc{Integral_domain_without_division_tag} \\ -- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Is_zero} \\ -- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Is_one} \\ -- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Square} \\ -- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Simplify} \\ -- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Unit_part} \\ +- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Is_zero} a model of \ccc{AlgebraicStructureTraits::IsZero}\\ +- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Is_one} a model of \ccc{AlgebraicStructureTraits::IsOne} \\ +- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Square} a model of \ccc{AlgebraicStructureTraits::Square} \\ +- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Simplify} a model of \ccc{AlgebraicStructureTraits::Simplify} \\ +- \ccc{CGAL::Algebraic_structure_traits< IntegralDomainWithoutDivision >::Unit_part} a model of \ccc{AlgebraicStructureTraits::UnitPart} \\ %{ \em \small FROM \exacus: \\ diff --git a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/RealEmbeddable.tex b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/RealEmbeddable.tex index 60b1ca3dc8a..cdd16b39098 100644 --- a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/RealEmbeddable.tex +++ b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/RealEmbeddable.tex @@ -11,14 +11,14 @@ Moreover, \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >} is a model of with:\\ - \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Is_real_embeddable} set to \ccc{Tag_true} \\ and functors :\\ -- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Is_zero} \\ -- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Abs} \\ -- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Sgn} \\ -- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Is_positive} \\ -- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Is_negative} \\ -- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Compare} \\ -- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::To_double} \\ -- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::To_interval} \\ +- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Is_zero} a model of \ccc{AlgebraicStructureTraits::IsZero} \\ +- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Abs} a model of \ccc{AlgebraicStructureTraits::Abs}\\ +- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Sgn} a model of \ccc{AlgebraicStructureTraits::Sgn}\\ +- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Is_positive} a model of \ccc{AlgebraicStructureTraits::IsPositive}\\ +- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Is_negative} a model of \ccc{AlgebraicStructureTraits::IsNegative}\\ +- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::Compare} a model of \ccc{AlgebraicStructureTraits::Compare} \\ +- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::To_double} a model of \ccc{AlgebraicStructureTraits::ToDouble} \\ +- \ccc{CGAL::Real_embeddable_traits< RealEmbeddable >::To_interval} a model of \ccc{AlgebraicStructureTraits::ToInterval} \\ Remark:\\ If a number type is a model of both \ccc{IntegralDomainWithoutDivision} and diff --git a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/UniqueFactorizationDomain.tex b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/UniqueFactorizationDomain.tex index 3b1805e0112..ae8e99bb299 100644 --- a/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/UniqueFactorizationDomain.tex +++ b/Algebraic_foundations/doc_tex/Algebraic_foundations_ref/UniqueFactorizationDomain.tex @@ -21,7 +21,7 @@ Moreover, \ccc{CGAL::Algebraic_structure_traits< UniqueFactorizationDomain >} is a model of \ccc{AlgebraicStructureTraits} providing:\\ - \ccc{CGAL::Algebraic_structure_traits< UniqueFactorizationDomain >::Algebraic_type} derived from \ccc{Unique_factorization_domain_tag} \\ -- \ccc{CGAL::Algebraic_structure_traits< UniqueFactorizationDomain >::Gcd}\\ +- \ccc{CGAL::Algebraic_structure_traits< UniqueFactorizationDomain >::Gcd} a model of \ccc{AlgebraicStructureTraits::Gcd}\\ From 89552556885ae3a067bb8a06e1e28d49ec28f61f Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 17 Oct 2012 16:18:03 +0000 Subject: [PATCH 121/157] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index 42e47569a0b..c48d2ef572a 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -21,9 +21,9 @@ LC_CTYPE=en_US.UTF-8 # "next" alone 0 21 * * Sat cd $HOME/CGAL/create_internal_release && $HOME/bin/create_release $HOME/CGAL/next --public --do-it # "next" + candidates -0 21 * * Mon,Tue,Wed,Thu,Fri cd $HOME/CGAL/create_internal_release && $HOME/bin/create_release $HOME/CGAL/next $HOME/CGAL/candidate-packages --public --do-it +0 21 * * Mon,Tue,Fri cd $HOME/CGAL/create_internal_release && $HOME/bin/create_release $HOME/CGAL/next $HOME/CGAL/candidate-packages --public --do-it # from branch 4.1 -0 21 * * Sun cd $HOME/CGAL/create_internal_release-4.1-branch && $HOME/bin/create_release $HOME/CGAL/CGAL-4.1-branch --public --do-it +0 21 * * Wed,Thu,Sun cd $HOME/CGAL/create_internal_release-4.1-branch && $HOME/bin/create_release $HOME/CGAL/CGAL-4.1-branch --public --do-it # Try to launch the test suite, every 10mn, from 21:00 to 22:50 From b2afce039a8742c2512da51b12804596138339db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Wed, 17 Oct 2012 16:18:07 +0000 Subject: [PATCH 122/157] add a mechanism to prevent a plugin to be loaded for example, adding in the config file plugin_blacklist=gocad_plugin| will prevent the gocad to be loaded --- Polyhedron/demo/Polyhedron/MainWindow.cpp | 30 ++++++++++++++++++++--- Polyhedron/demo/Polyhedron/MainWindow.h | 5 +++- 2 files changed, 30 insertions(+), 5 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index 16503f1b714..f7f16475a46 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -290,6 +290,8 @@ MainWindow::MainWindow(QWidget* parent) # endif #endif + readSettings(); // Among other things, the column widths are stored. + // Load plugins, and re-enable actions that need it. loadPlugins(); @@ -299,7 +301,6 @@ MainWindow::MainWindow(QWidget* parent) } ui->menuDockWindows->removeAction(ui->dummyAction); - readSettings(); // Among other things, the column widths are stored. #ifdef QT_SCRIPT_LIB // evaluate_script("print(plugins);"); @@ -417,14 +418,20 @@ void MainWindow::loadPlugins() qPrintable(pluginsDir.absolutePath())); Q_FOREACH (QString fileName, pluginsDir.entryList(QDir::Files)) { if(fileName.contains("plugin") && QLibrary::isLibrary(fileName)) { + //set plugin name + QString name = fileName; + name.remove(QRegExp("^lib")); + name.remove(QRegExp("\\..*")); + //do not load it if it is in the blacklist + if ( plugin_blacklist.contains(name) ){ + qDebug("### Ignoring plugin \"%s\".", qPrintable(fileName)); + continue; + } qDebug("### Loading \"%s\"...", qPrintable(fileName)); QPluginLoader loader; loader.setFileName(pluginsDir.absoluteFilePath(fileName)); QObject *obj = loader.instance(); if(obj) { - QString name = fileName; - name.remove(QRegExp("^lib")); - name.remove(QRegExp("\\..*")); obj->setObjectName(name); initPlugin(obj); initIOPlugin(obj); @@ -967,6 +974,11 @@ void MainWindow::readSettings() QSettings settings; // enable anti-aliasing ui->actionAntiAliasing->setChecked(settings.value("antialiasing", false).toBool()); + // read plugin blacklist + QString blacklist=settings.value("plugin_blacklist",QString()).toString(); + Q_FOREACH(QString name, blacklist.split("|") ) { + if ( !name.isEmpty() ) plugin_blacklist.insert(name); + } } this->readState("MainWindow", Size|State); } @@ -978,6 +990,16 @@ void MainWindow::writeSettings() QSettings settings; settings.setValue("antialiasing", ui->actionAntiAliasing->isChecked()); + //setting plugin blacklist + QString bl_value; + Q_FOREACH(QString name, plugin_blacklist) + { + //even after the last name we append a | but it does not matter as the reading + //takes this into account + bl_value.append(name).append('|'); + } + if ( !bl_value.isEmpty() ) + settings.setValue("plugin_blacklist",bl_value); } std::cerr << "Write setting... done.\n"; } diff --git a/Polyhedron/demo/Polyhedron/MainWindow.h b/Polyhedron/demo/Polyhedron/MainWindow.h index 54346cbbd5c..c44c03f7c7e 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.h +++ b/Polyhedron/demo/Polyhedron/MainWindow.h @@ -12,6 +12,7 @@ #include #include #include +#include class Scene; class Viewer; @@ -19,7 +20,6 @@ class QTreeView; class QMenu; class Polyhedron_demo_io_plugin_interface; class Polyhedron_demo_plugin_interface; - class Scene_item; namespace Ui { @@ -152,6 +152,9 @@ protected: private: QString strippedName(const QString &fullFileName); + /// plugin black-list + QSet plugin_blacklist; + Scene* scene; Viewer* viewer; QTreeView* sceneView; From 2935b5f9d984c52e3bf79d813c64cee10b94d2dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 18 Oct 2012 09:20:33 +0000 Subject: [PATCH 123/157] rename io_plugin --- .../demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp | 2 +- Polyhedron/demo/Polyhedron/Polyhedron_demo_gocad_plugin.cpp | 2 +- Polyhedron/demo/Polyhedron/Polyhedron_demo_io_nef_plugin.cpp | 2 +- Polyhedron/demo/Polyhedron/Polyhedron_demo_off_plugin.cpp | 2 +- .../demo/Polyhedron/Polyhedron_demo_off_to_nef_plugin.cpp | 2 +- .../demo/Polyhedron/Polyhedron_demo_off_to_xyz_plugin.cpp | 2 +- .../demo/Polyhedron/Polyhedron_demo_polylines_io_plugin.cpp | 2 +- Polyhedron/demo/Polyhedron/Polyhedron_demo_stl_plugin.cpp | 2 +- Polyhedron/demo/Polyhedron/Polyhedron_demo_xyz_plugin.cpp | 2 +- 9 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp index adb4b84015c..a139e30f9c6 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_camera_positions_plugin.cpp @@ -19,7 +19,7 @@ public: void init(QMainWindow* mainWindow, Scene_interface* scene_interface); QList actions() const; - QString name() const { return "Polyhedron_demo_camera_positions_plugin"; } + QString name() const { return "camera_positions_plugin"; } QString nameFilters() const { return "Camera positions (*.camera.txt)"; } bool canLoad() const { return true; } Scene_item* load(QFileInfo fileinfo) { cpl->load(fileinfo.filePath()); return 0; } diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_gocad_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_gocad_plugin.cpp index 22ad63f6d98..abd8a7e2021 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_gocad_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_gocad_plugin.cpp @@ -117,7 +117,7 @@ class Polyhedron_demo_gocad_plugin : public: QString nameFilters() const; - QString name() const { return "Polyhedron_demo_gocad_plugin"; } + QString name() const { return "gocad_plugin"; } bool canLoad() const; Scene_item* load(QFileInfo fileinfo); diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_io_nef_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_io_nef_plugin.cpp index 8138d9e5536..d5db71f7658 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_io_nef_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_io_nef_plugin.cpp @@ -12,7 +12,7 @@ class Polyhedron_demo_io_nef_plugin : public: QString nameFilters() const; - QString name() const { return "Polyhedron_demo_io_nef_plugin"; } + QString name() const { return "io_nef_plugin"; } bool canLoad() const; Scene_item* load(QFileInfo fileinfo); diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_off_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_off_plugin.cpp index b312fd627bb..44758bff0b8 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_off_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_off_plugin.cpp @@ -13,7 +13,7 @@ class Polyhedron_demo_off_plugin : Q_INTERFACES(Polyhedron_demo_io_plugin_interface) public: - QString name() const { return "Polyhedron_demo_off_plugin"; } + QString name() const { return "off_plugin"; } QString nameFilters() const { return "OFF files (*.off)"; } bool canLoad() const; Scene_item* load(QFileInfo fileinfo); diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_off_to_nef_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_off_to_nef_plugin.cpp index 263855ff58f..c16261c1b3e 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_off_to_nef_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_off_to_nef_plugin.cpp @@ -12,7 +12,7 @@ class Polyhedron_demo_off_to_nef_plugin : Q_INTERFACES(Polyhedron_demo_io_plugin_interface) public: - QString name() const { return "Polyhedron_demo_off_to_nef_plugin"; } + QString name() const { return "off_to_nef_plugin"; } QString nameFilters() const { return "OFF files, into nef (*.off)"; } bool canLoad() const; Scene_item* load(QFileInfo fileinfo); diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_off_to_xyz_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_off_to_xyz_plugin.cpp index 00e054eb0c1..188e07aefb1 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_off_to_xyz_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_off_to_xyz_plugin.cpp @@ -11,7 +11,7 @@ class Polyhedron_demo_off_to_xyz_plugin : Q_INTERFACES(Polyhedron_demo_io_plugin_interface) public: - QString name() const { return "Polyhedron_demo_off_to_xyz_plugin"; } + QString name() const { return "off_to_xyz_plugin"; } QString nameFilters() const { return "OFF files as Point set (*.off)"; } bool canLoad() const; Scene_item* load(QFileInfo fileinfo); diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_polylines_io_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_polylines_io_plugin.cpp index 1c34de1bf17..b96b840c940 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_polylines_io_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_polylines_io_plugin.cpp @@ -13,7 +13,7 @@ class Polyhedron_demo_polylines_io_plugin : Q_INTERFACES(Polyhedron_demo_io_plugin_interface) public: - QString name() const { return "Polyhedron_demo_polylines_io_plugin"; } + QString name() const { return "polylines_io_plugin"; } QString nameFilters() const { return "Polylines files (*.polylines.txt *.cgal)"; } bool canLoad() const; Scene_item* load(QFileInfo fileinfo); diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_stl_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_stl_plugin.cpp index 4298517a472..e33c7195677 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_stl_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_stl_plugin.cpp @@ -134,7 +134,7 @@ class Polyhedron_demo_stl_plugin : public: QString nameFilters() const; - QString name() const { return "Polyhedron_demo_stl_plugin"; } + QString name() const { return "stl_plugin"; } bool canLoad() const; Scene_item* load(QFileInfo fileinfo); diff --git a/Polyhedron/demo/Polyhedron/Polyhedron_demo_xyz_plugin.cpp b/Polyhedron/demo/Polyhedron/Polyhedron_demo_xyz_plugin.cpp index 447ef910190..f77ee9a6ad0 100644 --- a/Polyhedron/demo/Polyhedron/Polyhedron_demo_xyz_plugin.cpp +++ b/Polyhedron/demo/Polyhedron/Polyhedron_demo_xyz_plugin.cpp @@ -15,7 +15,7 @@ class Polyhedron_demo_xyz_plugin : Q_INTERFACES(Polyhedron_demo_io_plugin_interface) public: - QString name() const { return "Polyhedron_demo_xyz_plugin"; } + QString name() const { return "xyz_plugin"; } QString nameFilters() const { return "XYZ as Point Set (*.xyz);;Point Set with Normal (*.pwn)"; } bool canLoad() const; From 7afb39dab325eaf166ff8e6dd854066826038d5c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 18 Oct 2012 09:22:37 +0000 Subject: [PATCH 124/157] add a preference menu that for now only allow to edit blacklisted plugins --- Polyhedron/demo/Polyhedron/CMakeLists.txt | 3 +- Polyhedron/demo/Polyhedron/MainWindow.cpp | 55 +++++++++++++++++++++++ Polyhedron/demo/Polyhedron/MainWindow.h | 2 + Polyhedron/demo/Polyhedron/MainWindow.ui | 6 +++ 4 files changed, 65 insertions(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/CMakeLists.txt b/Polyhedron/demo/Polyhedron/CMakeLists.txt index 8dd42f0d224..a08ca0c47db 100644 --- a/Polyhedron/demo/Polyhedron/CMakeLists.txt +++ b/Polyhedron/demo/Polyhedron/CMakeLists.txt @@ -100,6 +100,7 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) qt4_wrap_ui( remeshingUI_FILES Remeshing_dialog.ui) qt4_wrap_ui( meshingUI_FILES Meshing_dialog.ui Meshing_pause_widget.ui ) qt4_wrap_ui( cameraUI_FILES Camera_positions_list.ui ) + qt4_wrap_ui( PreferencesUI_FILES Preferences.ui ) include(AddFileDependencies) @@ -216,7 +217,7 @@ if(CGAL_Qt4_FOUND AND QT4_FOUND AND OPENGL_FOUND AND QGLVIEWER_FOUND) # MainWindow_curvature_estimation.cpp MainWindow_moc.cpp # Viewer_moc.cpp - ${MainWindowUI_files} ${RESOURCE_FILES} ) + ${MainWindowUI_files} ${PreferencesUI_FILES} ${RESOURCE_FILES} ) add_to_cached_list( CGAL_EXECUTABLE_TARGETS Polyhedron_3 ) if(EIGEN3_FOUND OR TAUCS_FOUND) # add_executable( Polyhedron_3 Scene_tex_rendering.cpp Scene_tex_polyhedron_operations.cpp ) diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index f7f16475a46..bce50be5c05 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -24,6 +24,8 @@ #include #include #include +#include +#include #include @@ -38,6 +40,7 @@ #include "Polyhedron_demo_io_plugin_interface.h" #include "ui_MainWindow.h" +#include "ui_Preferences.h" #include "Show_point_dialog.h" @@ -1196,6 +1199,58 @@ void MainWindow::on_actionSetPolyhedronB_triggered() int i = getSelectedSceneItemIndex(); scene->setItemB(i); } +void MainWindow::on_actionPreferences_triggered() +{ + QDialog dialog(this); + Ui::PreferencesDialog prefdiag; + prefdiag.setupUi(&dialog); + + + QStandardItemModel* iStandardModel = new QStandardItemModel(this); + //add blacklisted plugins + Q_FOREACH(QString name, plugin_blacklist) + { + QStandardItem* item = new QStandardItem(name); + item->setCheckable(true); + item->setCheckState(Qt::Checked); + iStandardModel->appendRow(item); + } + + //add operations plugins + Q_FOREACH(PluginNamePair pair,plugins){ + QStandardItem* item = new QStandardItem(pair.second); + item->setCheckable(true); + iStandardModel->appendRow(item); + } + + //add io-plugins + Q_FOREACH(Polyhedron_demo_io_plugin_interface* plugin, io_plugins) + { + QStandardItem* item = new QStandardItem(plugin->name()); + item->setCheckable(true); + if ( plugin_blacklist.contains(plugin->name()) ) item->setCheckState(Qt::Checked); + iStandardModel->appendRow(item); + } + + //Setting the model + prefdiag.listView->setModel(iStandardModel); + + dialog.exec(); + + if ( dialog.result() ) + { + plugin_blacklist.clear(); + for (int k=0,k_end=iStandardModel->rowCount();kitem(k); + if (item->checkState()==Qt::Checked) + plugin_blacklist.insert(item->text()); + } + } + + for (int k=0,k_end=iStandardModel->rowCount();kitem(k); + delete iStandardModel; +} void MainWindow::on_actionSetBackgroundColor_triggered() { diff --git a/Polyhedron/demo/Polyhedron/MainWindow.h b/Polyhedron/demo/Polyhedron/MainWindow.h index c44c03f7c7e..cc8fd1575be 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.h +++ b/Polyhedron/demo/Polyhedron/MainWindow.h @@ -123,6 +123,8 @@ protected slots: void on_actionSetPolyhedronA_triggered(); void on_actionSetPolyhedronB_triggered(); + //Preferences edition + void on_actionPreferences_triggered(); // save as... void on_actionSaveAs_triggered(); void save(QString filename, Scene_item* item); diff --git a/Polyhedron/demo/Polyhedron/MainWindow.ui b/Polyhedron/demo/Polyhedron/MainWindow.ui index fdc4646a7d4..c7ce7a2d053 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.ui +++ b/Polyhedron/demo/Polyhedron/MainWindow.ui @@ -62,6 +62,7 @@ + @@ -633,6 +634,11 @@ Load &Script + + + Preferences + + From b190ab9cbecbd848e8da85f664705115fae3f2c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 18 Oct 2012 09:29:01 +0000 Subject: [PATCH 125/157] add missing file --- .gitattributes | 1 + Polyhedron/demo/Polyhedron/Preferences.ui | 94 +++++++++++++++++++++++ 2 files changed, 95 insertions(+) create mode 100644 Polyhedron/demo/Polyhedron/Preferences.ui diff --git a/.gitattributes b/.gitattributes index 9f2d6431a08..e2e066e2669 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3206,6 +3206,7 @@ Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_simplification_plugin.ui -t Polyhedron/demo/Polyhedron/Polyhedron_demo_point_set_smoothing_plugin.cpp -text Polyhedron/demo/Polyhedron/Polyhedron_demo_poisson_plugin.ui -text Polyhedron/demo/Polyhedron/Polyhedron_demo_transform_polyhedron_plugin.cpp -text +Polyhedron/demo/Polyhedron/Preferences.ui -text Polyhedron/demo/Polyhedron/Remeshing_dialog.ui -text Polyhedron/demo/Polyhedron/Scene_combinatorial_map_item.cpp -text Polyhedron/demo/Polyhedron/Scene_combinatorial_map_item.h -text diff --git a/Polyhedron/demo/Polyhedron/Preferences.ui b/Polyhedron/demo/Polyhedron/Preferences.ui new file mode 100644 index 00000000000..b0cd7d12667 --- /dev/null +++ b/Polyhedron/demo/Polyhedron/Preferences.ui @@ -0,0 +1,94 @@ + + + PreferencesDialog + + + + 0 + 0 + 377 + 503 + + + + Dialog + + + + + 20 + 440 + 131 + 61 + + + + Qt::Horizontal + + + QDialogButtonBox::Cancel|QDialogButtonBox::Ok + + + + + + 20 + 50 + 331 + 381 + + + + QAbstractItemView::NoSelection + + + + + + 30 + 10 + 321 + 31 + + + + Check plugin you don't want to load at start up + + + + + + + buttonBox + accepted() + PreferencesDialog + accept() + + + 248 + 254 + + + 157 + 274 + + + + + buttonBox + rejected() + PreferencesDialog + reject() + + + 316 + 260 + + + 286 + 274 + + + + + From 85061da82589acd7d3e04f752cda83408bee76b0 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 18 Oct 2012 09:34:30 +0000 Subject: [PATCH 126/157] Add a shortcut to &Preferences --- Polyhedron/demo/Polyhedron/MainWindow.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/MainWindow.ui b/Polyhedron/demo/Polyhedron/MainWindow.ui index c7ce7a2d053..82e34d9ea57 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.ui +++ b/Polyhedron/demo/Polyhedron/MainWindow.ui @@ -636,7 +636,7 @@ - Preferences + &Preferences From 418dccec73a20982b0eb883f88d6d2e43b12e1e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 18 Oct 2012 09:35:50 +0000 Subject: [PATCH 127/157] QSetting knows how to handle QListString --- Polyhedron/demo/Polyhedron/MainWindow.cpp | 18 +++++------------- 1 file changed, 5 insertions(+), 13 deletions(-) diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index bce50be5c05..74b071ab388 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -978,10 +978,8 @@ void MainWindow::readSettings() // enable anti-aliasing ui->actionAntiAliasing->setChecked(settings.value("antialiasing", false).toBool()); // read plugin blacklist - QString blacklist=settings.value("plugin_blacklist",QString()).toString(); - Q_FOREACH(QString name, blacklist.split("|") ) { - if ( !name.isEmpty() ) plugin_blacklist.insert(name); - } + QStringList blacklist=settings.value("plugin_blacklist",QStringList()).toStringList(); + Q_FOREACH(QString name,blacklist){ plugin_blacklist.insert(name); } } this->readState("MainWindow", Size|State); } @@ -994,15 +992,9 @@ void MainWindow::writeSettings() settings.setValue("antialiasing", ui->actionAntiAliasing->isChecked()); //setting plugin blacklist - QString bl_value; - Q_FOREACH(QString name, plugin_blacklist) - { - //even after the last name we append a | but it does not matter as the reading - //takes this into account - bl_value.append(name).append('|'); - } - if ( !bl_value.isEmpty() ) - settings.setValue("plugin_blacklist",bl_value); + QStringList blacklist; + Q_FOREACH(QString name,plugin_blacklist){ blacklist << name; } + if ( !blacklist.isEmpty() ) settings.setValue("plugin_blacklist",blacklist); } std::cerr << "Write setting... done.\n"; } From 8f00b09c93fffcdd8f98646227aee67bece3b0fc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 18 Oct 2012 09:47:10 +0000 Subject: [PATCH 128/157] fix english --- Polyhedron/demo/Polyhedron/Preferences.ui | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Polyhedron/demo/Polyhedron/Preferences.ui b/Polyhedron/demo/Polyhedron/Preferences.ui index b0cd7d12667..c623625068b 100644 --- a/Polyhedron/demo/Polyhedron/Preferences.ui +++ b/Polyhedron/demo/Polyhedron/Preferences.ui @@ -52,7 +52,7 @@ - Check plugin you don't want to load at start up + Tick plugins you don't want to load at start up From 94ab2269315cb71ded5053f40e4177d692e6753d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 18 Oct 2012 10:34:20 +0000 Subject: [PATCH 129/157] if the list is empty remove the entry --- Polyhedron/demo/Polyhedron/MainWindow.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/Polyhedron/demo/Polyhedron/MainWindow.cpp b/Polyhedron/demo/Polyhedron/MainWindow.cpp index 74b071ab388..73502aa0a9b 100644 --- a/Polyhedron/demo/Polyhedron/MainWindow.cpp +++ b/Polyhedron/demo/Polyhedron/MainWindow.cpp @@ -995,6 +995,7 @@ void MainWindow::writeSettings() QStringList blacklist; Q_FOREACH(QString name,plugin_blacklist){ blacklist << name; } if ( !blacklist.isEmpty() ) settings.setValue("plugin_blacklist",blacklist); + else settings.remove("plugin_blacklist"); } std::cerr << "Write setting... done.\n"; } From 091cd2ae8116326629e844a599bab1b5d930f2e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 18 Oct 2012 12:41:04 +0000 Subject: [PATCH 130/157] fix broken link --- Installation/doc_tex/Installation/installation.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/doc_tex/Installation/installation.tex b/Installation/doc_tex/Installation/installation.tex index b2b2f937b24..4ae428c09a4 100644 --- a/Installation/doc_tex/Installation/installation.tex +++ b/Installation/doc_tex/Installation/installation.tex @@ -686,7 +686,7 @@ In \cgal\ some 3D demos are based on libQGLViewer. It can be downloaded from \libqglviewerpage. -\subsection{\coin \label{thirdparty:Coin}} +\subsection{\coin \label{thirdparty:Coin3D}} \coin\ is an implementation of Open Inventor. From ba2b7aef6590348e98c3c39bc9dcaf564ce331ed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 18 Oct 2012 13:46:11 +0000 Subject: [PATCH 131/157] remove any reference to taucs --- Installation/doc_tex/Installation/installation.tex | 8 ++------ .../doc_tex/Jet_fitting_3/Jet_fitting_3_user.tex | 5 ++--- .../doc_tex/Jet_fitting_3/PkgDescription.tex | 2 +- .../Point_set_processing_3/PkgDescription.tex | 2 +- Ridges_3/doc_tex/Ridges_3/PkgDescription.tex | 2 +- Ridges_3/doc_tex/Ridges_3/Ridges_3_user.tex | 3 +-- .../Surface_mesh_parameterization/PkgDescription.tex | 2 +- .../Surface_mesh_parameterization/solvers.tex | 12 ++++++------ .../PkgDescription.tex | 2 +- .../doc_tex/Surface_reconstruction_points_3/main.tex | 2 +- 10 files changed, 17 insertions(+), 23 deletions(-) diff --git a/Installation/doc_tex/Installation/installation.tex b/Installation/doc_tex/Installation/installation.tex index 4ae428c09a4..d40fffd6351 100644 --- a/Installation/doc_tex/Installation/installation.tex +++ b/Installation/doc_tex/Installation/installation.tex @@ -162,7 +162,7 @@ contains the following subdirectories:\index{directories!structure} \gdef\lcTabularBorder{2} \begin{tabular}{|l|l|} \hline \textbf{directory} & \textbf{contents}\\\hline\hline - \texttt{auxiliary} & precompiled \gmp, \mpfr\ and \taucs\ for Windows\\\hline + \texttt{auxiliary} & precompiled \gmp and \mpfr\ for Windows\\\hline \texttt{cmake/modules} & modules for finding and using libraries\\\hline \texttt{config} & configuration files for install script\\\hline \texttt{demo} & demo programs (most of them need \qt, geomview or other third-party products)\\\hline @@ -607,14 +607,10 @@ It is recommended to install \ntl\ with support from \gmp. In \cgal, \eigen\ provides sparse linear solvers in the \ccRef[Surface Reconstruction from Point Sets]{Pkg:SurfaceReconstructionFromPointSets} and the \ccRef[Planar Parameterization of Triangulated Surface Meshes]{Pkg:SurfaceParameterization} packages. - Since \cgal\ version 4.0, \eigen\ is recommended over \taucs\ that is not longer maintained. - + In addition, \eigen\ also provides singular value decomposition for the \ccRef[Estimation of Local Differential Properties]{Pkg:Jet_fitting_3} and the \ccRef[Approximation of Ridges and Umbilics]{Pkg:Ridges_3} packages. - The usage of \eigen\ allows to remove \lapack, \blas\ and \taucs\ from the list of third party libraries - required by some \cgal\ packages. Note that the version 3.1 (or greater) of \eigen\ is required. - The \eigen\ web site is \eigenpage. % \subsection{\taucs \label{thirdparty:Taucs}} diff --git a/Jet_fitting_3/doc_tex/Jet_fitting_3/Jet_fitting_3_user.tex b/Jet_fitting_3/doc_tex/Jet_fitting_3/Jet_fitting_3_user.tex index d4a167b6ec6..bc95081ae30 100644 --- a/Jet_fitting_3/doc_tex/Jet_fitting_3/Jet_fitting_3_user.tex +++ b/Jet_fitting_3/doc_tex/Jet_fitting_3/Jet_fitting_3_user.tex @@ -19,9 +19,8 @@ This package allows the estimation of local differential quantities of a surface from a point sample, given either as a mesh or as point cloud. -Note that this package either needs the third party library -\ccThirdPartyEigen, or \ccThirdPartyLapack\ and \ccThirdPartyBlas\ -to be installed to compile the example code. +Note that this package needs the third party library +\ccThirdPartyEigen\ to be installed to compile the example code. %%%%%%%%%%%%%%%%%%%%%%% \section{Introduction\label{sec:intro}} diff --git a/Jet_fitting_3/doc_tex/Jet_fitting_3/PkgDescription.tex b/Jet_fitting_3/doc_tex/Jet_fitting_3/PkgDescription.tex index 80c3d89a458..e9c5f42ea7b 100644 --- a/Jet_fitting_3/doc_tex/Jet_fitting_3/PkgDescription.tex +++ b/Jet_fitting_3/doc_tex/Jet_fitting_3/PkgDescription.tex @@ -10,7 +10,7 @@ curvature lines, etc. This package allows the estimation of local differential quantities of a surface from a point sample.} % -\ccPkgDependsOn{Solvers as \ccThirdPartyEigen, or \ccThirdPartyLapack\ and \ccThirdPartyBlas} +\ccPkgDependsOn{Solvers from \ccThirdPartyEigen} \ccPkgIntroducedInCGAL{3.3} \ccPkgLicense{\ccLicenseGPL} %\ccPkgDemo{Operations on Polyhedra}{polyhedron_3.zip} diff --git a/Point_set_processing_3/doc_tex/Point_set_processing_3/PkgDescription.tex b/Point_set_processing_3/doc_tex/Point_set_processing_3/PkgDescription.tex index f2785a7fa51..1750f5361dd 100644 --- a/Point_set_processing_3/doc_tex/Point_set_processing_3/PkgDescription.tex +++ b/Point_set_processing_3/doc_tex/Point_set_processing_3/PkgDescription.tex @@ -4,7 +4,7 @@ The input is an unorganized point set, possibly with normal attributes (unoriented or oriented). The point set can be analyzed to measure its average spacing, and processed through functions devoted to the simplification, outlier removal, smoothing, normal estimation and normal orientation.} -\ccPkgDependsOn{\ccThirdPartyLapack} +\ccPkgDependsOn{Solvers from \ccThirdPartyEigen} \ccPkgIntroducedInCGAL{3.5} \ccPkgLicense{\ccLicenseGPL} \ccPkgDemo{Surface Reconstruction}{surface_reconstruction_points_3.zip} diff --git a/Ridges_3/doc_tex/Ridges_3/PkgDescription.tex b/Ridges_3/doc_tex/Ridges_3/PkgDescription.tex index dc36515c461..e45167018ff 100644 --- a/Ridges_3/doc_tex/Ridges_3/PkgDescription.tex +++ b/Ridges_3/doc_tex/Ridges_3/PkgDescription.tex @@ -10,7 +10,7 @@ mesh. Such curvature related features are curves: ridges or crests, and points: umbilics.} % - \ccPkgDependsOn{Solvers as \ccThirdPartyEigen, or \ccThirdPartyLapack\ and \ccThirdPartyBlas} + \ccPkgDependsOn{Solvers from \ccThirdPartyEigen} % \ccPkgIntroducedInCGAL{3.3} \ccPkgLicense{\ccLicenseGPL} \ccPkgIllustration{Ridges_3/RidgesMechPartDetail.png}{Ridges_3/mecanic-sub1_crestTweight1Tsharp7-jpg.png} diff --git a/Ridges_3/doc_tex/Ridges_3/Ridges_3_user.tex b/Ridges_3/doc_tex/Ridges_3/Ridges_3_user.tex index 12ce3131106..04a4e936fac 100644 --- a/Ridges_3/doc_tex/Ridges_3/Ridges_3_user.tex +++ b/Ridges_3/doc_tex/Ridges_3/Ridges_3_user.tex @@ -37,8 +37,7 @@ algorithms; such quantities may be computed by the package {\em Estimation of Local Differential Properties of Sampled Surfaces via Polynomial Fitting}. -Note that this package needs either the third party library \ccThirdPartyEigen, -or the third party libraries \ccThirdPartyLapack\ and \ccThirdPartyBlas\ for linear algebra operations. +Note that this package needs the third party library \ccThirdPartyEigen for linear algebra operations. \subsection{Overview} %%%%%%%%%%%%%%%%%%%%%% diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/PkgDescription.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/PkgDescription.tex index 71709464681..ba8638fd58f 100644 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/PkgDescription.tex +++ b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/PkgDescription.tex @@ -9,7 +9,7 @@ such as least squares conformal maps, discrete conformal map, discrete authalic parameterization, Floater mean value coordinates or Tutte barycentric mapping.} % -\ccPkgDependsOn{Solvers as \ccThirdPartyEigen\ or \ccThirdPartyOpenNL\ or \ccThirdPartyTaucs.} +\ccPkgDependsOn{Solvers from \ccThirdPartyEigen\.} \ccPkgIntroducedInCGAL{3.2} \ccPkgLicense{\ccLicenseGPL} \ccPkgDemo{Operations on Polyhedra}{polyhedron_3.zip} diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/solvers.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/solvers.tex index a7736ee780d..84f4c8ccdc1 100644 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/solvers.tex +++ b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/solvers.tex @@ -12,7 +12,7 @@ of the \ccc{SparseLinearAlgebraTraits_d} concept: \begin{itemize} \item - An interface to sparse solvers from the \ccThirdPartyOpenNL\ library \cite{cgal:l-nmdgp-05} is provided through classes + An interface to sparse solvers from the \opennl\ library \cite{cgal:l-nmdgp-05} is provided through classes \ccc{OpenNL::DefaultLinearSolverTraits} and \ccc{OpenNL::SymmetricLinearSolverTraits}. The OpenNL library version shipped with \cgal\ is a lightweight default sparse linear solver. It does not support large systems, but it is portable and @@ -23,11 +23,11 @@ of the \ccc{SparseLinearAlgebraTraits_d} concept: \ccc{CGAL::Eigen_solver_traits}. This solver traits class can be used for an iterative or a direct, symmetric or general sparse solvers. The \eigen\ solver to be used must be given as template parameter. -\item - An interface to sparse solvers from the\ccThirdPartyTaucs\ library is provided through the classes - \ccc{CGAL::Taucs_solver_traits} (out-of-core general sparse solver) and - \ccc{CGAL::Taucs_symmetric_solver_traits} (direct symmetric sparse solver). - \ccThirdPartyTaucs\ is no longer maintained and we recommend to use \ccThirdPartyEigen\ instead.\\ +% \item +% An interface to sparse solvers from the\ccThirdPartyTaucs\ library is provided through the classes +% \ccc{CGAL::Taucs_solver_traits} (out-of-core general sparse solver) and +% \ccc{CGAL::Taucs_symmetric_solver_traits} (direct symmetric sparse solver). +% \ccThirdPartyTaucs\ is no longer maintained and we recommend to use \ccThirdPartyEigen\ instead.\\ \end{itemize} diff --git a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/PkgDescription.tex b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/PkgDescription.tex index d2a19d5f902..04da4d59aa2 100644 --- a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/PkgDescription.tex +++ b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/PkgDescription.tex @@ -2,7 +2,7 @@ \ccPkgHowToCiteCgal{cgal:asg-srps-12} \ccPkgSummary{ This \cgal\ package implements a surface reconstruction method: Poisson Surface Reconstruction. It takes as input a set of points with oriented normals and computes an implicit function. The \cgal\ surface mesh generator can then be used to extract an iso-surface from this function. } % -\ccPkgDependsOn{\ccThirdPartyEigen\ or \ccThirdPartyTaucs} +\ccPkgDependsOn{\ccThirdPartyEigen} \ccPkgIntroducedInCGAL{3.5} \ccPkgLicense{\ccLicenseGPL} \ccPkgDemo{Surface Reconstruction}{surface_reconstruction_points_3.zip} diff --git a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/main.tex b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/main.tex index b5175370ed9..21253d788ad 100644 --- a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/main.tex +++ b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/main.tex @@ -13,4 +13,4 @@ \input{Surface_reconstruction_points_3/contouring} \input{Surface_reconstruction_points_3/output} \input{Surface_reconstruction_points_3/case_studies} -\input{Surface_reconstruction_points_3/performances} +% \input{Surface_reconstruction_points_3/performances} From 44f980f5c9cd3b889babd84cfe8daa4484bc3717 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 18 Oct 2012 14:10:30 +0000 Subject: [PATCH 132/157] remove last things mentionning taucs in the documentation --- .../extensions_and_reuse.tex | 2 +- .../introduction.tex | 2 +- .../Surface_mesh_parameterization/solvers.tex | 2 +- ...ular_border_arc_length_parameterizer_3.tex | 2 +- .../Matrix.tex | 2 - .../SparseLinearAlgebraTraits_d.tex | 2 - .../Taucs_matrix.tex | 166 ------------------ .../Taucs_solver_traits.tex | 135 -------------- .../Taucs_symmetric_matrix.tex | 131 -------------- .../Taucs_symmetric_solver_traits.tex | 132 -------------- .../Taucs_vector.tex | 144 --------------- .../Vector.tex | 1 - .../intro.tex | 6 - .../main.tex | 5 - .../Surface_reconstruction_points_3/main.tex | 1 - .../performances.tex | 155 ---------------- .../Poisson_reconstruction_function.tex | 3 +- 17 files changed, 5 insertions(+), 886 deletions(-) delete mode 100644 Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_matrix.tex delete mode 100644 Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_solver_traits.tex delete mode 100644 Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_symmetric_matrix.tex delete mode 100644 Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_symmetric_solver_traits.tex delete mode 100644 Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_vector.tex delete mode 100644 Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/performances.tex diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/extensions_and_reuse.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/extensions_and_reuse.tex index 2691afe22c9..8287b90d1a5 100644 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/extensions_and_reuse.tex +++ b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/extensions_and_reuse.tex @@ -15,7 +15,7 @@ It may be easily generalized. \subsection{Reusing Sparse Linear Algebra} The \ccc{SparseLinearAlgebraTraits_d} concept and the traits classes -for \eigen, OpenNL and {\sc Taucs} are independent of the rest of the +for \eigen\ and OpenNL are independent of the rest of the \ccc{Surface_mesh_parameterization} package, and may be reused by \cgal\ developers for other purposes. diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/introduction.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/introduction.tex index 76c1370eca5..795cd51f110 100644 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/introduction.tex +++ b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/introduction.tex @@ -29,7 +29,7 @@ data structure. Since parameterizing meshes require efficient representation of sparse matrices and efficient iterative or direct linear solvers, we provide -a unified interface to linear solver libraries (\eigen\ and {\sc Taucs}), +a unified interface to a linear solver library (\eigen), and propose a separate package devoted to OpenNL sparse linear solver. diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/solvers.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/solvers.tex index 84f4c8ccdc1..38d9b153203 100644 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/solvers.tex +++ b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization/solvers.tex @@ -2,7 +2,7 @@ Parameterizing triangle meshes requires both efficient representation of sparse matrices and efficient iterative or direct linear -solvers. We provide links to libraries (\eigen, {\sc Taucs}) +solvers. We provide links to \eigen\ library and include a separate package devoted to OpenNL sparse linear solver. \subsection{List of Solvers} diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Circular_border_arc_length_parameterizer_3.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Circular_border_arc_length_parameterizer_3.tex index 119da998f4e..928ff63a009 100644 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Circular_border_arc_length_parameterizer_3.tex +++ b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Circular_border_arc_length_parameterizer_3.tex @@ -114,7 +114,7 @@ Arc-length border parameterization: (u, v) values are proportional to the length \ccExample -See \ccc{Taucs_parameterization.cpp} example. +See \ccc{Eigen_parameterization.cpp} example. \end{ccRefClass} diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Matrix.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Matrix.tex index 304a11381fb..b21ca96489d 100644 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Matrix.tex +++ b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Matrix.tex @@ -117,10 +117,8 @@ Optimization: Caller can optimize this call by setting \ccc{new_coef} to true if % The section below is automatically generated. Do not edit! %START-AUTO(\ccHasModels) -\ccc{Taucs_matrix} \\ \ccc{Eigen_sparse_matrix} \\ \ccc{Eigen_sparse_symmetric_matrix}\\ -\ccc{Taucs_symmetric_matrix} \\ \ccc{OpenNL::SparseMatrix} in \ccc{OpenNL} package %END-AUTO(\ccHasModels) diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/SparseLinearAlgebraTraits_d.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/SparseLinearAlgebraTraits_d.tex index 5b3a3839ca3..78522ca0e8f 100644 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/SparseLinearAlgebraTraits_d.tex +++ b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/SparseLinearAlgebraTraits_d.tex @@ -93,8 +93,6 @@ A.\ccc{row_dimension}() == B.dimension(). A.\ccc{column_dimension}() == X.dimens \ccHasModels \ccRefIdfierPage{CGAL::Eigen_solver_traits} \\ -\ccRefIdfierPage{CGAL::Taucs_solver_traits} \\ -\ccRefIdfierPage{CGAL::Taucs_symmetric_solver_traits} \\ \ccc{OpenNL::DefaultLinearSolverTraits} in OpenNL package \\ \ccc{OpenNL::SymmetricLinearSolverTraits} in OpenNL package \\ diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_matrix.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_matrix.tex deleted file mode 100644 index e84081baed6..00000000000 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_matrix.tex +++ /dev/null @@ -1,166 +0,0 @@ -% +------------------------------------------------------------------------+ -% | Reference manual page: Taucs_matrix.tex -% +------------------------------------------------------------------------+ -% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy -% | Package: Surface_mesh_parameterization -% | -\RCSdef{\RCSTaucsmatrixRev}{$Id$} -\RCSdefDate{\RCSTaucsmatrixDate}{$Date$} -% | -\ccRefPageBegin -%%RefPage: end of header, begin of main body -% +------------------------------------------------------------------------+ - - -\begin{ccRefClass}{Taucs_matrix} - -%% \ccHtmlCrossLink{} %% add further rules for cross referencing links -%% \ccHtmlIndexC[class]{} %% add further index entries - - -\ccDefinition - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccDefinition) - -The class \ccc{Taucs_matrix} is a C++ wrapper around TAUCS' matrix type \ccc{taucs_ccs_matrix}. - -This kind of matrix can be either symmetric or not. Symmetric matrices store only the lower triangle. - -%END-AUTO(\ccDefinition) - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccInclude) - -\ccInclude{CGAL/Taucs_matrix.h} - -%END-AUTO(\ccInclude) - - -\ccIsModel - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccIsModel) - -Model of the \ccc{SparseLinearAlgebraTraits_d::Matrix} concept. - -%END-AUTO(\ccIsModel) - - -\ccParameters - -The full template declaration is: - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccParameters) - -template$<$class T$>$ \\ -struct \ccc{Taucs_matrix}; - -\ccCommentHeading{Parameters} \\ -\ccc{T}: Number type. Tested with T = \ccc{taucs_single} or \ccc{taucs_double}. May also work with T = \ccc{taucs_dcomplex} and \ccc{taucs_scomplex}. - -%END-AUTO(\ccParameters) - - -\ccTypes - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccTypes) - -\ccNestedType{NT} -{ -} -\ccGlue - -%END-AUTO(\ccTypes) - - -\ccCreation -\ccCreationVariable{M} %% choose variable name for \ccMethod - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccCreation) - -\ccConstructor{Taucs_matrix(int dim, bool is_symmetric = false);} -{ -Create a square matrix initialized with zeros. -\ccCommentHeading{Parameters} \\ -\ccc{dim}: Matrix dimension. \ccc{is_symmetric}: Symmetric/hermitian?. -} -\ccGlue -\ccConstructor{Taucs_matrix(int rows, int columns, bool is_symmetric = false);} -{ -Create a rectangular matrix initialized with zeros. -\ccPrecond rows == columns if \ccc{is_symmetric} is true. -\ccCommentHeading{Parameters} \\ -\ccc{rows}: Number of rows. \ccc{columns}: Number of columns. \ccc{is_symmetric}: Symmetric/hermitian?. -} -\ccGlue - -%END-AUTO(\ccCreation) - - -\ccOperations - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccOperations) - -\ccMethod{int row_dimension() const;} -{ -Return the matrix number of rows. -} -\ccGlue -\ccMethod{int column_dimension() const;} -{ -Return the matrix number of columns. -} -\ccGlue -\ccMethod{T get_coef(int i, int j) const;} -{ -Read access to a matrix coefficient. -\ccCommentHeading{Preconditions} \\ -0 $<$= i $<$ \ccc{row_dimension}(). 0 $<$= j $<$ \ccc{column_dimension}(). -} -\ccGlue -\ccMethod{void set_coef(int i, int j, T val, bool new_coef = false);} -{ -Write access to a matrix coefficient: \ccc{a_ij} $<$- val. \\ -Optimizations: For symmetric matrices, \ccc{Taucs_matrix} stores only the lower triangle \ccc{set_coef}() does nothing if (i, j) belongs to the upper triangle. Caller can optimize this call by setting \ccc{new_coef} to true if the coefficient does not already exist in the matrix. -\ccCommentHeading{Preconditions} \\ -0 $<$= i $<$ \ccc{row_dimension}(). 0 $<$= j $<$ \ccc{column_dimension}(). -} -\ccGlue -\ccMethod{void add_coef(int i, int j, T val);} -{ -Write access to a matrix coefficient: \ccc{a_ij} $<$- \ccc{a_ij} + val. \\ -Optimization: For symmetric matrices, \ccc{Taucs_matrix} stores only the lower triangle \ccc{add_coef}() does nothing if (i, j) belongs to the upper triangle. -\ccCommentHeading{Preconditions} \\ -0 $<$= i $<$ \ccc{row_dimension}(). 0 $<$= j $<$ \ccc{column_dimension}(). -} -\ccGlue -\ccMethod{const taucs_ccs_matrix* get_taucs_matrix() const;} -{ -Construct and return the TAUCS matrix wrapped by this object. The TAUCS matrix returned by this method is valid only until the next call to \ccc{get_coef}(), \ccc{set_coef}() or \ccc{add_coef}(). -} -\ccGlue - -%END-AUTO(\ccOperations) - - -\ccSeeAlso - -\ccRefIdfierPage{CGAL::Taucs_solver_traits} \\ -\ccRefIdfierPage{CGAL::Taucs_symmetric_solver_traits} \\ -\ccRefIdfierPage{CGAL::Taucs_symmetric_matrix} \\ -\ccRefIdfierPage{CGAL::Taucs_vector} \\ - - -\end{ccRefClass} - -% +------------------------------------------------------------------------+ -%%RefPage: end of main body, begin of footer -\ccRefPageEnd -% EOF -% +------------------------------------------------------------------------+ - diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_solver_traits.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_solver_traits.tex deleted file mode 100644 index b0d79ad112e..00000000000 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_solver_traits.tex +++ /dev/null @@ -1,135 +0,0 @@ -% +------------------------------------------------------------------------+ -% | Reference manual page: Taucs_solver_traits.tex -% +------------------------------------------------------------------------+ -% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy -% | Package: Surface_mesh_parameterization -% | -\RCSdef{\RCSTaucssolvertraitsRev}{$Id$} -\RCSdefDate{\RCSTaucssolvertraitsDate}{$Date$} -% | -\ccRefPageBegin -%%RefPage: end of header, begin of main body -% +------------------------------------------------------------------------+ - - -\begin{ccRefClass}{Taucs_solver_traits} - -%% \ccHtmlCrossLink{} %% add further rules for cross referencing links -%% \ccHtmlIndexC[class]{} %% add further index entries - - -\ccDefinition - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccDefinition) - -The class \ccc{Taucs_solver_traits} is a traits class for solving GENERAL (aka unsymmetric) sparse linear systems using TAUCS out-of-core LU factorization. - -%END-AUTO(\ccDefinition) - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccInclude) - -\ccInclude{CGAL/Taucs_solver_traits.h} - -%END-AUTO(\ccInclude) - - -\ccIsModel - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccIsModel) - -Model of the \ccc{SparseLinearAlgebraTraits_d} concept. - -%END-AUTO(\ccIsModel) - - -\ccParameters - -The full template declaration is: - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccParameters) - -template$<$class T$>$ \\ -class \ccc{Taucs_solver_traits}; - -%END-AUTO(\ccParameters) - - -\ccTypes - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccTypes) - -\ccNestedType{Matrix} -{ -} -\ccGlue -\ccNestedType{Vector} -{ -} -\ccGlue -\ccNestedType{NT} -{ -} -\ccGlue - -%END-AUTO(\ccTypes) - - -\ccCreation -\ccCreationVariable{solver} %% choose variable name for \ccMethod - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccCreation) - -\ccConstructor{Taucs_solver_traits();} -{ -Create a TAUCS sparse linear solver for GENERAL (aka unsymmetric) matrices. -} -\ccGlue - -%END-AUTO(\ccCreation) - - -\ccOperations - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccOperations) - -\ccMethod{bool linear_solver(const Matrix& A, const Vector& B, Vector& X, NT& D);} -{ -Solve the sparse linear system {\em A$\ast$X = B}. Return true on success. The solution is then (1/D) $\ast$ X. -\ccCommentHeading{Preconditions} \\ -A.\ccc{row_dimension}() == B.dimension(). A.\ccc{column_dimension}() == X.dimension(). -} -\ccGlue - -%END-AUTO(\ccOperations) - - -\ccSeeAlso - -\ccRefIdfierPage{CGAL::Taucs_symmetric_solver_traits} \\ -\ccRefIdfierPage{CGAL::Taucs_matrix} \\ -\ccRefIdfierPage{CGAL::Taucs_symmetric_matrix} \\ -\ccRefIdfierPage{CGAL::Taucs_vector} \\ -\ccc{OpenNL::DefaultLinearSolverTraits} in OpenNL package \\ -\ccc{OpenNL::SymmetricLinearSolverTraits} in OpenNL package \\ - - -\ccExample - -See \ccc{Taucs_parameterization.cpp} example. - - -\end{ccRefClass} - -% +------------------------------------------------------------------------+ -%%RefPage: end of main body, begin of footer -\ccRefPageEnd -% EOF -% +------------------------------------------------------------------------+ - diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_symmetric_matrix.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_symmetric_matrix.tex deleted file mode 100644 index f6e1d88dc76..00000000000 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_symmetric_matrix.tex +++ /dev/null @@ -1,131 +0,0 @@ -% +------------------------------------------------------------------------+ -% | Reference manual page: Taucs_symmetric_matrix.tex -% +------------------------------------------------------------------------+ -% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy -% | Package: Surface_mesh_parameterization -% | -\RCSdef{\RCSTaucssymmetricmatrixRev}{$Id$} -\RCSdefDate{\RCSTaucssymmetricmatrixDate}{$Date$} -% | -\ccRefPageBegin -%%RefPage: end of header, begin of main body -% +------------------------------------------------------------------------+ - - -\begin{ccRefClass}{Taucs_symmetric_matrix} - -%% \ccHtmlCrossLink{} %% add further rules for cross referencing links -%% \ccHtmlIndexC[class]{} %% add further index entries - - -\ccDefinition - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccDefinition) - -The class \ccc{Taucs_symmetric_matrix} is a C++ wrapper around a TAUCS {\bf symmetric} matrix (type \ccc{taucs_ccs_matrix}). - -Symmetric matrices store only the lower triangle. - -%END-AUTO(\ccDefinition) - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccInclude) - -\ccInclude{CGAL/Taucs_matrix.h} - -%END-AUTO(\ccInclude) - - -\ccInheritsFrom - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccInheritsFrom) - -\ccc{Taucs_matrix} - -%END-AUTO(\ccInheritsFrom) - - -\ccIsModel - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccIsModel) - -Model of the \ccc{SparseLinearAlgebraTraits_d::Matrix} concept. - -%END-AUTO(\ccIsModel) - - -\ccParameters - -The full template declaration is: - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccParameters) - -template$<$class T$>$ \\ -struct \ccc{Taucs_symmetric_matrix}; - -\ccCommentHeading{Parameters} \\ -\ccc{T}: Number type. Tested with T = \ccc{taucs_single} or \ccc{taucs_double}. May also work with T = \ccc{taucs_dcomplex} and \ccc{taucs_scomplex}. - -%END-AUTO(\ccParameters) - - -\ccTypes - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccTypes) - -\ccNestedType{NT} -{ -} -\ccGlue - -%END-AUTO(\ccTypes) - - -\ccCreation -\ccCreationVariable{M} %% choose variable name for \ccMethod - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccCreation) - -\ccConstructor{Taucs_symmetric_matrix(int dim);} -{ -Create a square {\bf symmetric} matrix initialized with zeros. -\ccCommentHeading{Parameters} \\ -\ccc{dim}: Matrix dimension. -} -\ccGlue -\ccConstructor{Taucs_symmetric_matrix(int rows, int columns);} -{ -Create a square {\bf symmetric} matrix initialized with zeros. -\ccPrecond rows == columns. -\ccCommentHeading{Parameters} \\ -\ccc{rows}: Number of rows. \ccc{columns}: Number of columns. -} -\ccGlue - -%END-AUTO(\ccCreation) - - -\ccSeeAlso - -\ccRefIdfierPage{CGAL::Taucs_solver_traits} \\ -\ccRefIdfierPage{CGAL::Taucs_symmetric_solver_traits} \\ -\ccRefIdfierPage{CGAL::Taucs_matrix} \\ -\ccRefIdfierPage{CGAL::Taucs_vector} \\ -\ccc{OpenNL::DefaultLinearSolverTraits} in OpenNL package \\ -\ccc{OpenNL::SymmetricLinearSolverTraits} in OpenNL package \\ - - -\end{ccRefClass} - -% +------------------------------------------------------------------------+ -%%RefPage: end of main body, begin of footer -\ccRefPageEnd -% EOF -% +------------------------------------------------------------------------+ - diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_symmetric_solver_traits.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_symmetric_solver_traits.tex deleted file mode 100644 index c14e6b2c573..00000000000 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_symmetric_solver_traits.tex +++ /dev/null @@ -1,132 +0,0 @@ -% +------------------------------------------------------------------------+ -% | Reference manual page: Taucs_symmetric_solver_traits.tex -% +------------------------------------------------------------------------+ -% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy -% | Package: Surface_mesh_parameterization -% | -\RCSdef{\RCSTaucssymmetricsolvertraitsRev}{$Id$} -\RCSdefDate{\RCSTaucssymmetricsolvertraitsDate}{$Date$} -% | -\ccRefPageBegin -%%RefPage: end of header, begin of main body -% +------------------------------------------------------------------------+ - - -\begin{ccRefClass}{Taucs_symmetric_solver_traits} - -%% \ccHtmlCrossLink{} %% add further rules for cross referencing links -%% \ccHtmlIndexC[class]{} %% add further index entries - - -\ccDefinition - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccDefinition) - -The class \ccc{Taucs_symmetric_solver_traits} is a traits class for solving symmetric positive definite sparse linear systems using TAUCS solvers family. The default solver is the Multifrontal Supernodal Cholesky Factorization. - -%END-AUTO(\ccDefinition) - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccInclude) - -\ccInclude{CGAL/Taucs_solver_traits.h} - -%END-AUTO(\ccInclude) - - -\ccIsModel - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccIsModel) - -Model of the \ccc{SparseLinearAlgebraTraits_d} concept. - -%END-AUTO(\ccIsModel) - - -\ccParameters - -The full template declaration is: - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccParameters) - -template$<$class T$>$ \\ -class \ccc{Taucs_symmetric_solver_traits}; - -%END-AUTO(\ccParameters) - - -\ccTypes - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccTypes) - -\ccNestedType{Matrix} -{ -} -\ccGlue -\ccNestedType{Vector} -{ -} -\ccGlue -\ccNestedType{NT} -{ -} -\ccGlue - -%END-AUTO(\ccTypes) - - -\ccCreation -\ccCreationVariable{solver} %% choose variable name for \ccMethod - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccCreation) - -\ccConstructor{Taucs_symmetric_solver_traits(const char * options[] = NULL, const void * arguments[] = NULL);} -{ -Create a TAUCS sparse linear solver for symmetric positive definite matrices. The default solver is the Multifrontal Supernodal Cholesky Factorization. See \ccc{taucs_linsolve}() documentation for the meaning of the \ccc{options} and \ccc{arguments} parameters. -\ccCommentHeading{Parameters} \\ -\ccc{options}: must be persistent. \ccc{arguments}: must be persistent. -} -\ccGlue - -%END-AUTO(\ccCreation) - - -\ccOperations - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccOperations) - -\ccMethod{bool linear_solver(const Matrix& A, const Vector& B, Vector& X, NT& D);} -{ -Solve the sparse linear system {\em A$\ast$X = B}. Return true on success. The solution is then (1/D) $\ast$ X. -\ccCommentHeading{Preconditions} \\ -A.\ccc{row_dimension}() == B.dimension(). A.\ccc{column_dimension}() == X.dimension(). -} -\ccGlue - -%END-AUTO(\ccOperations) - - -\ccSeeAlso - -\ccRefIdfierPage{CGAL::Taucs_solver_traits} \\ -\ccRefIdfierPage{CGAL::Taucs_matrix} \\ -\ccRefIdfierPage{CGAL::Taucs_symmetric_matrix} \\ -\ccRefIdfierPage{CGAL::Taucs_vector} \\ -\ccc{OpenNL::DefaultLinearSolverTraits} in OpenNL package \\ -\ccc{OpenNL::SymmetricLinearSolverTraits} in OpenNL package \\ - - -\end{ccRefClass} - -% +------------------------------------------------------------------------+ -%%RefPage: end of main body, begin of footer -\ccRefPageEnd -% EOF -% +------------------------------------------------------------------------+ - diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_vector.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_vector.tex deleted file mode 100644 index 7fdf9adf662..00000000000 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Taucs_vector.tex +++ /dev/null @@ -1,144 +0,0 @@ -% +------------------------------------------------------------------------+ -% | Reference manual page: Taucs_vector.tex -% +------------------------------------------------------------------------+ -% | 21.09.2005 Laurent Saboret, Pierre Alliez, Bruno Levy -% | Package: Surface_mesh_parameterization -% | -\RCSdef{\RCSTaucsvectorRev}{$Id$} -\RCSdefDate{\RCSTaucsvectorDate}{$Date$} -% | -\ccRefPageBegin -%%RefPage: end of header, begin of main body -% +------------------------------------------------------------------------+ - - -\begin{ccRefClass}{Taucs_vector} - -%% \ccHtmlCrossLink{} %% add further rules for cross referencing links -%% \ccHtmlIndexC[class]{} %% add further index entries - - -\ccDefinition - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccDefinition) - -The class \ccc{Taucs_vector} is a C++ wrapper around TAUCS' vector type, which is a simple array. - -%END-AUTO(\ccDefinition) - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccInclude) - -\ccInclude{CGAL/Taucs_vector.h} - -%END-AUTO(\ccInclude) - - -\ccIsModel - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccIsModel) - -Model of the \ccc{SparseLinearAlgebraTraits_d::Vector} concept. - -%END-AUTO(\ccIsModel) - - -\ccParameters - -The full template declaration is: - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccParameters) - -template$<$class T$>$ \\ -class \ccc{Taucs_vector}; - -%END-AUTO(\ccParameters) - - -\ccTypes - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccTypes) - -\ccNestedType{NT} -{ -} -\ccGlue - -%END-AUTO(\ccTypes) - - -\ccCreation -\ccCreationVariable{v} %% variable name for \ccMethod - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccCreation) - -\ccConstructor{Taucs_vector(int dimension);} -{ -Create a vector initialized with zeros. -} -\ccGlue -\ccConstructor{Taucs_vector(const Taucs_vector& toCopy);} -{ -Copy constructor. -} -\ccGlue - -%END-AUTO(\ccCreation) - - -\ccOperations - -% The section below is automatically generated. Do not edit! -%START-AUTO(\ccOperations) - -\ccMethod{int dimension() const;} -{ -Return the vector's number of coefficients. -} -\ccGlue -\ccMethod{T operator[](int i) const;} -{ -Read/write access to a vector coefficient. -\ccCommentHeading{Preconditions} 0 $<$= i $<$ dimension(). -} -\ccGlue -\ccMethod{T& operator[](int i);} -{ -} -\ccGlue -\ccMethod{const T* get_taucs_vector() const;} -{ -Get TAUCS vector wrapped by this object. -} -\ccGlue -\ccMethod{T* get_taucs_vector();} -{ -} -\ccGlue - -%END-AUTO(\ccOperations) - - -\ccSeeAlso - -\ccRefIdfierPage{CGAL::Taucs_solver_traits} \\ -\ccRefIdfierPage{CGAL::Taucs_symmetric_solver_traits} \\ -\ccRefIdfierPage{CGAL::Taucs_matrix} \\ -\ccRefIdfierPage{CGAL::Taucs_symmetric_matrix} \\ -\ccc{OpenNL::DefaultLinearSolverTraits} in OpenNL package \\ -\ccc{OpenNL::SymmetricLinearSolverTraits} in OpenNL package \\ - - -\end{ccRefClass} - -% +------------------------------------------------------------------------+ -%%RefPage: end of main body, begin of footer -\ccRefPageEnd -% EOF -% +------------------------------------------------------------------------+ - diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Vector.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Vector.tex index 69b31609a53..7fce3ffe31d 100644 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Vector.tex +++ b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/Vector.tex @@ -98,7 +98,6 @@ Read/write access to a vector coefficient. %START-AUTO(\ccHasModels) \ccc{Eigen_vector} \\ -\ccc{Taucs_vector} \\ \ccc{OpenNL::FullVector} in \ccc{OpenNL} package %END-AUTO(\ccHasModels) diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/intro.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/intro.tex index a34778fe19e..1ddc1339a70 100644 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/intro.tex +++ b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/intro.tex @@ -185,17 +185,11 @@ sparse linear solvers: \item \eigen\ 3.1 (or greater) is the library recommended by \cgal for solving sparse systems. \item OpenNL (authored by Bruno L{\'e}vy) is shipped with \cgal and is the default solver. -\item - {\sc Taucs} is a direct solver for sparse symmetric matrices. - It also includes an out-of-core general solver. \end{itemize} \ccc{OpenNL::DefaultLinearSolverTraits} in OpenNL package \\ \ccc{OpenNL::SymmetricLinearSolverTraits} in OpenNL package \\ \ccRefIdfierPage{CGAL::Eigen_solver_traits} \\ -\ccRefIdfierPage{CGAL::Taucs_solver_traits} \\ -\ccRefIdfierPage{CGAL::Taucs_symmetric_solver_traits} \\ - \ccHeading{Helper Classes} diff --git a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/main.tex b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/main.tex index 7cc523a4ea8..0f80f739d1e 100644 --- a/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/main.tex +++ b/Surface_mesh_parameterization/doc_tex/Surface_mesh_parameterization_ref/main.tex @@ -34,11 +34,6 @@ \input{Surface_mesh_parameterization_ref/Eigen_matrix.tex} \input{Surface_mesh_parameterization_ref/Eigen_vector.tex} \input{Surface_mesh_parameterization_ref/Eigen_solver_traits.tex} -\input{Surface_mesh_parameterization_ref/Taucs_matrix.tex} -\input{Surface_mesh_parameterization_ref/Taucs_solver_traits.tex} -\input{Surface_mesh_parameterization_ref/Taucs_symmetric_matrix.tex} -\input{Surface_mesh_parameterization_ref/Taucs_symmetric_solver_traits.tex} -\input{Surface_mesh_parameterization_ref/Taucs_vector.tex} \input{Surface_mesh_parameterization_ref/Two_vertices_parameterizer_3.tex} \input{Surface_mesh_parameterization_ref/Vector.tex} diff --git a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/main.tex b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/main.tex index 21253d788ad..68cc6577854 100644 --- a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/main.tex +++ b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/main.tex @@ -13,4 +13,3 @@ \input{Surface_reconstruction_points_3/contouring} \input{Surface_reconstruction_points_3/output} \input{Surface_reconstruction_points_3/case_studies} -% \input{Surface_reconstruction_points_3/performances} diff --git a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/performances.tex b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/performances.tex deleted file mode 100644 index 769d75b18a4..00000000000 --- a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3/performances.tex +++ /dev/null @@ -1,155 +0,0 @@ -\section{Performances} -\label{surface_reconstruction_section_performances} - -We provide some performance numbers for scanning data. We measure the Poisson implicit function computation time, the contouring time for a range of approximation distances, the memory occupancy as well as the influence of the point set simplification. The machine used is a PC running Linux 32 bits with an Intel CPU Core 2 processor clocked at 3 GHz and with 3 GB of RAM. The software is compiled with g++ 4.3.1 compiler with the 03 option which maximizes speed. All measurements were done using the \ccThirdPartyTaucs\ library even if we now recommend to use the \ccThirdPartyEigen\ library. - -\subsection{Poisson implicit function} - -The point set chosen for benchmarking the Poisson implicit function is the Bimba con Nastrino point set (1.6 million points) depicted by Figure~\ref{Surface_reconstruction_points_3-fig-poisson_bench}. We measure the Poisson implicit function computation (i.e., the call to \ccc{Poisson_reconstruction_function::compute_implicit_function()} denoted by Poisson solve hereafter) for this point set as well as for simplified versions obtained through random simplification. The following table provides Poisson solve computation times in seconds for an increasing number of points. - -\begin{tabular}{|c|c|} - \hline - Number of points (x1000) & Poisson solve duration (in s) \\ - \hline - 60 & 65 \\ - 120 & 137 \\ - 250 & 282 \\ - 500 & 566 \\ - 1,000 & 1,130 \\ - 1,500 & 1,777 \\ - 1,600 & 1,919 \\ - \hline -\end{tabular} - -% Insert image poisson_bench.jpg/.eps -\begin{center} - \begin{ccTexOnly} - \includegraphics[width=1.0\textwidth]{Surface_reconstruction_points_3/poisson_bench} - \end{ccTexOnly} - \begin{ccHtmlOnly} -

    - \end{ccHtmlOnly} - \begin{figure}[h] - \caption{Poisson implicit function computation duration (in s) - against the number of points for the Bimba con Nastrino - point set with 1.6M points (shown) - as well as for simplified versions.} - \label{Surface_reconstruction_points_3-fig-poisson_bench} - \end{figure} -\end{center} - - - -\subsection{Contouring} - -The point set chosen for benchmarking the contouring stage is the Bimba con Nastrino point set simplified to 120k points. We measure the contouring (i.e. the call to \ccc{make_surface_mesh()}) duration and the reconstruction error for a range of approximation distances. -The reconstruction error is expressed as the average distance from input points to the reconstructed surface in mm (the Bimba con Nastrino statue is 324 mm tall). - -\begin{tabular}{|c|c|c|} - \hline - Approx. distance (*average spacing) & Contouring duration (in s) & Reconstruction error (mm) \\ - \hline - 0.1 & 177 & 0.13 \\ - 0.25 & 47 & 0.155 \\ - 0.5 & 21 & 0.23 \\ - 1 & 10 & 0.4 \\ - 2 & 5 & 0.78 \\ - \hline -\end{tabular} - -% Insert image contouring_bench.jpg/.eps -\begin{center} - \begin{ccTexOnly} - \includegraphics[width=1.0\textwidth]{Surface_reconstruction_points_3/contouring_bench} - \end{ccTexOnly} - \begin{ccHtmlOnly} -

    - \end{ccHtmlOnly} - \begin{figure}[h] - \caption{Contouring duration (in s) and reconstruction error (mm) - against several approximation distance parameters - for the Bimba con Nastrino point set simplified to 120k points.} - \label{Surface_reconstruction_points_3-fig-contouring_bench} - \end{figure} -\end{center} - - - -\subsection{Memory} - -We measure the memory occupancy for the reconstruction of the full Bimba con Nastrino point set (3.8 millions points) as well as for simplified versions.\\ -The Poisson implicit function computation has a memory peak when solving the Poisson linear system using the {\sc Taucs} sparse linear solver. For large point sets, it may fail to allocate big chunks of memory due to memory fragmentation.\\ -The exact limit depends of the allocation scheme used by the compiler. In our experiments, a PC running Linux 32 bits can reconstruct the Bimba con Nastrino point set up to 1.6M points while Windows 32 bits is limited to 1.3M points.\\ - -\begin{tabular}{|c|c|} - \hline - Number of points (x1000) & Memory occupancy (MBytes) \\ - \hline - 60 & 330 \\ - 120 & 660 \\ - 250 & 630 \\ - 500 & 980 \\ - 1000 & 1570 \\ - 1200 & 1939 \\ - \hline -\end{tabular} - -% Insert image memory_bench.jpg/.eps -\begin{center} - \begin{ccTexOnly} - \includegraphics[width=1.0\textwidth]{Surface_reconstruction_points_3/memory_bench} - \end{ccTexOnly} - \begin{ccHtmlOnly} -

    - \end{ccHtmlOnly} - \begin{figure}[h] - \caption{Memory occupancy (in MBytes) against number of points - for the Bimba con Nastrino point set with 1.2M points - as well as for simplified versions. - The best fitting line is shown.} - \label{Surface_reconstruction_points_3-fig-memory_bench} - \end{figure} -\end{center} - - - -\subsection{Point Set Simplification} - -Due to the memory limitations described above, we recommend to simplify the point sets captured by laser scanners.\\ -We measure the reconstruction error for the Bimba con Nastrino point set (1.6M points) as well as for simplified versions. All reconstructions use the recommended contouring parameter approximation distance = 0.25 * the input point set's average spacing. -The reconstruction error is expressed as the average distance from input points to the reconstructed surface in mm (the Bimba con Nastrino statue is 324 mm tall). - -\begin{tabular}{|c|c|} - \hline - Number of points (x1000) & Reconstruction error (mm) \\ - \hline - 60 & 0.27 \\ - 120 & 0.15 \\ - 250 & 0.11 \\ - 500 & 0.079 \\ - 1,000 & 0.066 \\ - 1,500 & 0.061 \\ - 1,600 & 0.06 \\ - \hline -\end{tabular} - -% Insert image simplification_bench.jpg/.eps -\begin{center} - \begin{ccTexOnly} - \includegraphics[width=1.0\textwidth]{Surface_reconstruction_points_3/simplification_bench} - \end{ccTexOnly} - \begin{ccHtmlOnly} -

    - \end{ccHtmlOnly} - \begin{figure}[h] - \caption{Reconstruction error (mm) against number of points - for the Bimba con Nastrino point set with 1.6M points - as well as for simplified versions.} - \label{Surface_reconstruction_points_3-fig-simplification_bench} - \end{figure} -\end{center} - - - - - diff --git a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/Poisson_reconstruction_function.tex b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/Poisson_reconstruction_function.tex index c3cdfda0a12..3bd6ca7cdba 100644 --- a/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/Poisson_reconstruction_function.tex +++ b/Surface_reconstruction_points_3/doc_tex/Surface_reconstruction_points_3_ref/Poisson_reconstruction_function.tex @@ -136,8 +136,7 @@ Returns a sphere bounding the inferred surface. The function \ccc{compute_implicit_function}() must be called after the insertion of oriented points. It computes the piecewise linear scalar function operator() by: applying Delaunay refinement, solving for operator() at each vertex of the triangulation with a sparse linear solver, and shifting and orienting operator() such that it is 0 at all input points and negative inside the inferred surface. \ccCommentHeading{Template parameters} \\ \ccc{SparseLinearAlgebraTraits_d}: Symmetric definite positive sparse linear solver. -If \eigen\ 3.1 (or greater) is available and \ccc{CGAL_EIGEN3_ENABLED} is defined, the default solver is \ccc{Eigen::ConjugateGradient}, -otherwise, it is TAUCS Multifrontal Supernodal Cholesky Factorization. +If \eigen\ 3.1 (or greater) is available and \ccc{CGAL_EIGEN3_ENABLED} is defined, the default solver is \ccc{Eigen::ConjugateGradient}. \ccCommentHeading{Returns} false if the linear solver fails. \ccCommentHeading{Parameters} \\ \ccc{solver}: sparse linear solver. From 52ad8a136c87cc23ae22cbd99585bac864441a36 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Loriot?= Date: Thu, 18 Oct 2012 14:22:20 +0000 Subject: [PATCH 133/157] remove any reference to lapack in the doc --- Installation/doc_tex/Installation/usage.tex | 8 +-- .../doc_tex/Jet_fitting_3_ref/Lapack_svd.tex | 62 ------------------- .../Monge_via_jet_fitting.tex | 3 +- .../doc_tex/Jet_fitting_3_ref/SvdTraits.tex | 1 - .../doc_tex/Jet_fitting_3_ref/intro.tex | 1 - .../doc_tex/Jet_fitting_3_ref/main.tex | 1 - 6 files changed, 5 insertions(+), 71 deletions(-) delete mode 100644 Jet_fitting_3/doc_tex/Jet_fitting_3_ref/Lapack_svd.tex diff --git a/Installation/doc_tex/Installation/usage.tex b/Installation/doc_tex/Installation/usage.tex index 8ab0763da14..62d8c95ffd4 100644 --- a/Installation/doc_tex/Installation/usage.tex +++ b/Installation/doc_tex/Installation/usage.tex @@ -83,8 +83,8 @@ configuration. ``com2'') of \cgal\ to which the executable(s) should be linked. Valid components are \cgal's libraries (i.e.~``Core'', ``ImageIO'', ``Qt3'' and ``Qt4''; note that it only make sense to either pick ``Qt3'' or ``Qt4'') and all - preconfigured 3rd party software, such as ``MPFI'', ``RS3'', - or ``LAPACK''). An example is \texttt{-c Core:GMP:RS3:MPFI} + preconfigured 3rd party software, such as ``MPFI'' or ``RS3'' + ). An example is \texttt{-c Core:GMP:RS3:MPFI} \item [\texttt{-b boost1:boost2:...}] Lists components (``boost1'', ``boost2'') of \boost\ to which the executable(s) should be @@ -121,8 +121,8 @@ link with \cgal\ and essential third party libraries. Beyond, \texttt{find\_package} can demand for \texttt{COMPONENTS} of \cgal, that is, all \cgal\ libraries libCGAL\_Core (``Core''), libCGAL\_ImageIO (``ImageIO'') , libCGAL\_Qt3 (``Qt3'') and libCGAL\_Qt4 -(``Qt4'') or optional 3rd party software such as ``MPFI'', ``RS3'' or -``LAPACK''. A user is free to create the \texttt{CMakeLists.txt} +(``Qt4'') or optional 3rd party software such as ``MPFI'' or ``RS3''. +A user is free to create the \texttt{CMakeLists.txt} without calling the script (manual creation). diff --git a/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/Lapack_svd.tex b/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/Lapack_svd.tex deleted file mode 100644 index 19bc86ab9df..00000000000 --- a/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/Lapack_svd.tex +++ /dev/null @@ -1,62 +0,0 @@ -% +------------------------------------------------------------------------+ -% | Reference manual page: Lapack.tex -% +------------------------------------------------------------------------+ -% | 09.02.2006 Marc Pouget and Frédéric Cazals -% | Package: Jet_fitting_3 -% | -\RCSdef{\RCSLapackRev}{$Id$} -\RCSdefDate{\RCSLapackDate}{$Date$} -% | -%%RefPage: end of header, begin of main body -% +------------------------------------------------------------------------+ - -\begin{ccRefClass}{Lapack_svd} %%add template arg's if necessary - -%% \ccHtmlCrossLink{} %% add further rules for cross referencing links -%% \ccHtmlIndexC[class]{} %% add further index entries - -\ccDefinition - -The class \ccRefName\ provides an algorithm to solve in the least -square sense a linear system with a singular value decomposition. The -field type is \ccc{double}. - -\ccInclude{CGAL/Lapack/Linear_algebra_lapack.h} - -\ccIsModel -\ccc{SvdTraits} - -% \ccTypes -% % +-------------------------------------------------------------- -% %\ccNestedType{TYPE}{some nested types} -% \ccTypedef{ typedef double FT; }{} -% \ccNestedType{Vector}{} -% \ccNestedType{Matrix}{} -% %\ccTypedef{ typedef Lapack_vector Vector; }{} - -% \ccCreation -% % +-------------------------------------------------------------- -% \ccCreationVariable{lapack_svd} %% choose variable name - -% \ccConstructor{Lapack_svd();}{default constructor.} - -% \ccOperations -% % +-------------------------------------------------------------- -% \ccMemberFunction{ void solve(Matrix& M, Vector& B, FT& cond_nb); -% }{Solve MX=B using SVD and give the condition number of M. The -% solution is stored in B.} - -% \ccSeeAlso - -% \ccc{SvdTraits}\\ -% % -%\ccc{Lapack_matrix} -%\ccc{some_other_function}. - -\end{ccRefClass} - -% +------------------------------------------------------------------------+ -%%RefPage: end of main body, begin of footer -% EOF -% +------------------------------------------------------------------------+ - diff --git a/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/Monge_via_jet_fitting.tex b/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/Monge_via_jet_fitting.tex index ec8875189f1..f0142006840 100644 --- a/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/Monge_via_jet_fitting.tex +++ b/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/Monge_via_jet_fitting.tex @@ -31,7 +31,7 @@ for the polynomial fitting and for the Monge form. The default for the template \ccc{LocalKernel} is \ccc{Cartesian} and the default for \ccc{SvdTraits} is \ccc{Eigen_svd} if \ccc{CGAL_EIGEN3_ENABLED} -is defined and \ccc{Lapack_svd} otherwise. +is defined. \ccInclude{CGAL/Monge_via_jet_fitting.h} @@ -162,7 +162,6 @@ algebra algorithm required by the fitting method. \ccSeeAlso \ccc{Eigen_svd}, -\ccc{Lapack_svd}, \ccc{Monge_form} \end{ccRefClass} diff --git a/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/SvdTraits.tex b/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/SvdTraits.tex index 70f7b623c16..d043f249908 100644 --- a/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/SvdTraits.tex +++ b/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/SvdTraits.tex @@ -84,7 +84,6 @@ number of $M$. The solution is stored in $B$.} \ccHasModels % +------------------------------------------------------------------ \ccc{Eigen_svd}, -\ccc{Lapack_svd}. \ccSeeAlso % +------------------------------------------------------------------ diff --git a/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/intro.tex b/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/intro.tex index a14281edf9d..0ca9997cbb5 100644 --- a/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/intro.tex +++ b/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/intro.tex @@ -46,7 +46,6 @@ Surfaces via Polynomial Fitting\label{ref_chap:Jet_fitting_3}} \ccRefIdfierPage{CGAL::Monge_via_jet_fitting< DataKernel, LocalKernel, SvdTraits>::Monge_form}\\ \ccRefIdfierPage{CGAL::Monge_via_jet_fitting}\\ \ccRefIdfierPage{CGAL::Eigen_svd}\\ -\ccRefIdfierPage{CGAL::Lapack_svd}\\ \subsection*{Global Functions} The insert operator (\ccc{operator<<} ) is overloaded for the class diff --git a/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/main.tex b/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/main.tex index e027cd0e3cd..a2211ea65fb 100644 --- a/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/main.tex +++ b/Jet_fitting_3/doc_tex/Jet_fitting_3_ref/main.tex @@ -9,7 +9,6 @@ \input{Jet_fitting_3_ref/DataKernel.tex} \input{Jet_fitting_3_ref/Eigen_svd.tex} -\input{Jet_fitting_3_ref/Lapack_svd.tex} \input{Jet_fitting_3_ref/LocalKernel.tex} \input{Jet_fitting_3_ref/Monge_form.tex} \input{Jet_fitting_3_ref/Monge_via_jet_fitting.tex} From e90c2d375db53c0f1be33a61e32ae75b906f6d31 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20M=C3=B6ller?= Date: Fri, 19 Oct 2012 12:04:58 +0000 Subject: [PATCH 134/157] Fix the addresses of the mailing-lists hosted by inria *@lists-sop.inria.fr -> *@inria.fr --- .../doc_tex/Developers_manual/submission_process.tex | 4 ++-- Installation/auxiliary/cgal_create_cmake_script.1 | 2 +- .../public_release/announcement/where_to_announce | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/Developers_manual/doc_tex/Developers_manual/submission_process.tex b/Developers_manual/doc_tex/Developers_manual/submission_process.tex index 52d3e26bc6e..ca038394b58 100644 --- a/Developers_manual/doc_tex/Developers_manual/submission_process.tex +++ b/Developers_manual/doc_tex/Developers_manual/submission_process.tex @@ -32,8 +32,8 @@ editorial board for approval. The process is described in the and review rules}. % This can be done by sending mail to -% the \ccAnchor{mailto:cgal-editorial-board@lists-sop.inria.fr}{board} -% \lcTex{(\texttt{cgal-editorial-board@lists-sop.inria.fr})} indicating +% the \ccAnchor{mailto:cgal-editorial-board@inria.fr}{board} +% \lcTex{(\texttt{cgal-editorial-board@inria.fr})} indicating % where the (PDF) documentation and code can be found. After % some reasonable amount of time, you should receive feedback from % the board about the specification and what, if anything, needs to diff --git a/Installation/auxiliary/cgal_create_cmake_script.1 b/Installation/auxiliary/cgal_create_cmake_script.1 index 78fccf7e86c..b4487db06a4 100644 --- a/Installation/auxiliary/cgal_create_cmake_script.1 +++ b/Installation/auxiliary/cgal_create_cmake_script.1 @@ -35,7 +35,7 @@ Create a cmake script that is suited for the testsuite used by the CGAL develope .SH AUTHOR The CGAL project (http://www.cgal.org/). .SH "REPORTING BUGS" -Report bugs to (see http://www.cgal.org/ +Report bugs to (see http://www.cgal.org/ for further instructions). .SH "SEE ALSO" The full documentation for CGAL is available at http://www.cgal.org/ in PDF and diff --git a/Maintenance/public_release/announcement/where_to_announce b/Maintenance/public_release/announcement/where_to_announce index 965a16eb4b9..223152ccf70 100644 --- a/Maintenance/public_release/announcement/where_to_announce +++ b/Maintenance/public_release/announcement/where_to_announce @@ -6,17 +6,17 @@ and discuss lists. Mailing lists: ********************************************************************* - ** Note: add a Reply-To: cgal-discuss@lists-sop.inria.fr, to avoid ** + ** Note: add a Reply-To: cgal-discuss@inria.fr, to avoid ** ** cross-post replies. ** ********************************************************************* - cgal-develop@lists-sop.inria.fr (best sent as blind carbon copy) - cgal-discuss@lists-sop.inria.fr - cgal-announce@lists-sop.inria.fr + cgal-develop@inria.fr (best sent as blind carbon copy) + cgal-discuss@inria.fr + cgal-announce@inria.fr And only for feature releases (not bug-fixes): - compgeom-announce@lists-sop.inria.fr + compgeom-announce@inria.fr mesh@sandia.gov communaute@medicis.polytechnique.fr From 6276e88020d4c20c48703398b9ad635ea34db6e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20M=C3=B6ller?= Date: Fri, 19 Oct 2012 15:42:52 +0000 Subject: [PATCH 135/157] Add partial specializations for property_map that match const template arguments. This shouldn't be necessary, because it should never be called with const arguments, but this works around a BGL bug. Those changes don't fix the issues with the dijkstra example, as that would require adding partial specializations for boost::filtered_graph, which would be a little over the top. --- .../graph/graph_traits_Delaunay_triangulation_2.h | 9 +++++++++ .../CGAL/boost/graph/graph_traits_Triangulation_2.h | 9 +++++++++ BGL/include/CGAL/boost/graph/properties_Polyhedron_3.h | 10 ++++++++++ 3 files changed, 28 insertions(+) diff --git a/BGL/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h b/BGL/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h index 4fd8a41f53e..2673d28b85e 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h @@ -337,6 +337,15 @@ namespace boost { typedef typename map_gen::const_type const_type; }; + // see struct property_map in Polyehdron for an explanation + template + struct property_map, Tag> { + typedef typename + DT2_property_map::template bind_ map_gen; + typedef typename map_gen::type type; + typedef typename map_gen::const_type const_type; + }; + template inline typename boost::property_traits< diff --git a/BGL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h b/BGL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h index 9443772bb43..16bd53ce511 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h @@ -488,6 +488,15 @@ namespace boost { typedef typename map_gen::const_type const_type; }; + // see struct property_map in Polyehdron for an explanation + template + struct property_map, Tag> { + typedef typename + T2_property_map::template bind_ map_gen; + typedef typename map_gen::type type; + typedef typename map_gen::const_type const_type; + }; + template inline typename boost::property_traits< diff --git a/BGL/include/CGAL/boost/graph/properties_Polyhedron_3.h b/BGL/include/CGAL/boost/graph/properties_Polyhedron_3.h index 9e606e605f1..ad2d0eaeda1 100644 --- a/BGL/include/CGAL/boost/graph/properties_Polyhedron_3.h +++ b/BGL/include/CGAL/boost/graph/properties_Polyhedron_3.h @@ -377,6 +377,16 @@ struct property_map, Tag> typedef typename map_gen::const_type const_type; }; +// This partial specialization shouldn't be needed but is due to a bug in Boost 1.51. +template +struct property_map, Tag> +{ + typedef typename CGAL::Polyhedron_property_map:: + template bind_ map_gen; + typedef typename map_gen::type type; + typedef typename map_gen::const_type const_type; +}; + template inline typename property_traits,PropertyTag>::type>::reference From 2f503f7746de3895eb0638d09f69d6bfe323f6f4 Mon Sep 17 00:00:00 2001 From: Joachim Reichel Date: Sat, 20 Oct 2012 10:44:08 +0000 Subject: [PATCH 136/157] Update date and version. --- Installation/auxiliary/cgal_create_cmake_script.1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/auxiliary/cgal_create_cmake_script.1 b/Installation/auxiliary/cgal_create_cmake_script.1 index b4487db06a4..c2e36ddfee6 100644 --- a/Installation/auxiliary/cgal_create_cmake_script.1 +++ b/Installation/auxiliary/cgal_create_cmake_script.1 @@ -1,4 +1,4 @@ -.TH CGAL_CREATE_CMAKE_SCRIPT "1" "March 2012" "CGAL 4.0" "User Commands" +.TH CGAL_CREATE_CMAKE_SCRIPT "1" "October 2012" "CGAL 4.1" "User Commands" .SH NAME cgal_create_cmake_script \- create a cmake script for applications using CGAL .SH SYNOPSIS From d0c07c51b485943015d99d1bcac881c8876b80b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20M=C3=B6ller?= Date: Mon, 22 Oct 2012 09:53:28 +0000 Subject: [PATCH 137/157] remove duplicated const Follow-up to r73108 --- .../CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h | 2 +- BGL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h b/BGL/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h index 2673d28b85e..0945d88b309 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_Delaunay_triangulation_2.h @@ -339,7 +339,7 @@ namespace boost { // see struct property_map in Polyehdron for an explanation template - struct property_map, Tag> { + struct property_map, Tag> { typedef typename DT2_property_map::template bind_ map_gen; typedef typename map_gen::type type; diff --git a/BGL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h b/BGL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h index 16bd53ce511..b6674a82dc3 100644 --- a/BGL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h +++ b/BGL/include/CGAL/boost/graph/graph_traits_Triangulation_2.h @@ -490,7 +490,7 @@ namespace boost { // see struct property_map in Polyehdron for an explanation template - struct property_map, Tag> { + struct property_map, Tag> { typedef typename T2_property_map::template bind_ map_gen; typedef typename map_gen::type type; From 3529cf55ee22ecc1f23d4039961271edd2a4b4f4 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 22 Oct 2012 12:15:49 +0000 Subject: [PATCH 138/157] Proposal for announcement of CGAL 4.1 --- .gitattributes | 1 + .../public_release/announcement/CGAL-4.1 | 64 +++++++++++++++++++ 2 files changed, 65 insertions(+) create mode 100644 Maintenance/public_release/announcement/CGAL-4.1 diff --git a/.gitattributes b/.gitattributes index e2e066e2669..ed54ab894e7 100644 --- a/.gitattributes +++ b/.gitattributes @@ -2271,6 +2271,7 @@ Maintenance/public_release/announcement/CGAL-4.0 -text Maintenance/public_release/announcement/CGAL-4.0-beta1 -text Maintenance/public_release/announcement/CGAL-4.0.1 -text Maintenance/public_release/announcement/CGAL-4.0.2 -text +Maintenance/public_release/announcement/CGAL-4.1 -text Maintenance/public_release/announcement/CGAL-4.1-beta1 -text Maintenance/public_release/scripts/precompiled_demos_zips -text Maintenance/public_release/scripts/prepare_release -text diff --git a/Maintenance/public_release/announcement/CGAL-4.1 b/Maintenance/public_release/announcement/CGAL-4.1 new file mode 100644 index 00000000000..0210dc1ea41 --- /dev/null +++ b/Maintenance/public_release/announcement/CGAL-4.1 @@ -0,0 +1,64 @@ +Subject: CGAL 4.1 Released, Computational Geometry Algorithms Library +Body: + +The CGAL Open Source Project is pleased to announce the release 4.1 +of CGAL, the Computational Geometry Algorithms Library. + +Besides fixes to existing packages, the following has changed since +CGAL 4.1: + + o New compiler support + + The Apple Clang compiler versions 3.1 and 3.2 are now supported on + Mac OS X. + + +See http://www.cgal.org/releases.html for a complete list of changes. + + +Note that the release 4.1 of CGAL has known bugs that should be fixed soon +in a future release 4.1.1: + + - The packages "Triangulated Surface Mesh Simplification" and "CGAL and + the Boost Graph Library" do not compile with Boost versions 1.51 and + later. + + +The CGAL project is a collaborative effort to develop a robust, +easy-to-use, and efficient C++ software library of geometric data +structures and algorithms, like +- triangulations (2D constrained triangulations and Delaunay + triangulations in 2D and 3D, periodic triangulations), +- Voronoi diagrams (for 2D and 3D points, 2D additively weighted + Voronoi diagrams, and segment Voronoi diagrams), +- Boolean operations on polygons and polyhedra, +- regularized Boolean operations on polygons with curved arcs +- arrangements of curves, +- mesh generation (2D, 3D and surface mesh generation, + surface mesh subdivision and parametrization), +- alpha shapes (in 2D and 3D), +- convex hull algorithms (in 2D, 3D and dD), +- operations on polygons (straight skeleton and offset polygon), +- search structures (kd trees for nearest neighbor search, and + range and segment trees), +- interpolation (natural neighbor interpolation and placement of + streamlines), +- optimization algorithms (smallest enclosing sphere of points or + spheres, smallest enclosing ellipsoid of points, principal + component analysis), +- kinetic data structures + + + + +Some modules are distributed under the terms of the LGPL Open Source +license (GNU Lesser General Public License v3 or later versions). +Most modules are distributed under the terms of the GPL Open Source +license (GNU General Public License v3 or later versions). +If your intended usage does not meet the criteria of the +aforementioned licenses, a commercial license can be purchased from +GeometryFactory (http://www.geometryfactory.com/). + + +For further information and for downloading the library and its +documentation, please visit the CGAL web site: http://www.cgal.org/ From 34f278cab2bf2ed20af9f41b59de3c1714725aae Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 22 Oct 2012 12:18:02 +0000 Subject: [PATCH 139/157] updated crontab (automated commit) --- Maintenance/infrastructure/cgal.geometryfactory.com/crontab | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab index c48d2ef572a..7b37a666cb1 100644 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab @@ -21,9 +21,9 @@ LC_CTYPE=en_US.UTF-8 # "next" alone 0 21 * * Sat cd $HOME/CGAL/create_internal_release && $HOME/bin/create_release $HOME/CGAL/next --public --do-it # "next" + candidates -0 21 * * Mon,Tue,Fri cd $HOME/CGAL/create_internal_release && $HOME/bin/create_release $HOME/CGAL/next $HOME/CGAL/candidate-packages --public --do-it +0 21 * * Fri cd $HOME/CGAL/create_internal_release && $HOME/bin/create_release $HOME/CGAL/next $HOME/CGAL/candidate-packages --public --do-it # from branch 4.1 -0 21 * * Wed,Thu,Sun cd $HOME/CGAL/create_internal_release-4.1-branch && $HOME/bin/create_release $HOME/CGAL/CGAL-4.1-branch --public --do-it +0 21 * * Mon,Tue,Wed,Thu,Sun cd $HOME/CGAL/create_internal_release-4.1-branch && $HOME/bin/create_release $HOME/CGAL/CGAL-4.1-branch --public --do-it # Try to launch the test suite, every 10mn, from 21:00 to 22:50 From 8b2ca2a7472646b0507c6e55ce29e5db211bd5b9 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 22 Oct 2012 14:42:42 +0000 Subject: [PATCH 140/157] Prepare release scripts for Git --- .../cgal.geometryfactory.com/bin/create_release | 9 ++++++++- Scripts/developer_scripts/create_new_release | 8 +++++++- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_release b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_release index 379ad4c7383..5a5500543f9 100755 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_release +++ b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_release @@ -3,7 +3,14 @@ LC_ALL=POSIX; export LC_ALL -svn up "$1" +if [ -d "$1/.git" ]; then + pushd $1 + git pull + popd +else + svn up "$1" +fi + # Update the candidates branch, if any. [ -d "$2" ] && svn up "$2" diff --git a/Scripts/developer_scripts/create_new_release b/Scripts/developer_scripts/create_new_release index b0c262b30c9..10790f562a6 100755 --- a/Scripts/developer_scripts/create_new_release +++ b/Scripts/developer_scripts/create_new_release @@ -152,7 +152,13 @@ set -x cd ${TMPDIR} || return # Update the working copy -svn update ${SOURCES_DIR} +if [ -d "${SOURCES_DIR}/.git" ]; then + pushd "${SOURCES_DIR}" + git pull + popd +else + svn update ${SOURCES_DIR} +fi if [ -n "${CANDIDATES_DIR_HAS_BEEN_SET}" ]; then svn update ${CANDIDATES_DIR} fi From 274b390c1212922f257699d4ef74f1043b7877e4 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Mon, 22 Oct 2012 14:44:42 +0000 Subject: [PATCH 141/157] Update the path of the releases picture --- Installation/changes.html | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Installation/changes.html b/Installation/changes.html index 842bdfb8054..7373bf75444 100644 --- a/Installation/changes.html +++ b/Installation/changes.html @@ -96,7 +96,7 @@ Number of lines of code of CGAL
    (using David A. Wheeler's 'SLOCCount', restricted to the include/CGAL/ and src/ directories). -Releases size graph +Releases size graph From 3692d4bba7175a9d81fe49576358452ae22ce0ec Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Mon, 22 Oct 2012 14:52:39 +0000 Subject: [PATCH 142/157] remove a warning UseCGAL.cmake is not included if Qt4 and ImageIO are not found --- Surface_mesher/demo/Surface_mesher/CMakeLists.txt | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt index d3003b90255..86e1c27fd66 100644 --- a/Surface_mesher/demo/Surface_mesher/CMakeLists.txt +++ b/Surface_mesher/demo/Surface_mesher/CMakeLists.txt @@ -100,5 +100,9 @@ if ( CGAL_FOUND AND CGAL_Qt4_FOUND) message(STATUS "NOTICE: This demo needs libQGLViewer, and will not be compiled.") endif( QGLVIEWER_FOUND) else(CGAL_FOUND AND CGAL_Qt4_FOUND) + if(RUNNING_CGAL_AUTO_TEST) + # Just to avoid a warning from CMake if that variable is set on the command line... + endif() + message(STATUS "NOTICE: This demo needs Qt4, and will not be compiled.") endif(CGAL_FOUND AND CGAL_Qt4_FOUND) From fdb1dc64a056a9c09a9672ddac62b046fb4b1c8e Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Mon, 22 Oct 2012 14:53:39 +0000 Subject: [PATCH 143/157] remove a warning on RUNNING_CGAL_AUTO_TEST --- Surface_mesher/examples/Surface_mesher/CMakeLists.txt | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Surface_mesher/examples/Surface_mesher/CMakeLists.txt b/Surface_mesher/examples/Surface_mesher/CMakeLists.txt index 3c0f833d148..ea0a7f36771 100644 --- a/Surface_mesher/examples/Surface_mesher/CMakeLists.txt +++ b/Surface_mesher/examples/Surface_mesher/CMakeLists.txt @@ -24,8 +24,11 @@ if ( CGAL_FOUND AND CGAL_ImageIO_FOUND ) create_single_source_cgal_program( "mesh_an_implicit_function.cpp" ) else() + if(RUNNING_CGAL_AUTO_TEST) + # Just to avoid a warning from CMake if that variable is set on the command line... + endif() - message(STATUS "NOTICE: This program requires the CGAL and CGAL ImageIO libraries, and will not be compiled.") + message(STATUS "NOTICE: This program requires the CGAL and CGAL ImageIO libraries, and will not be compiled.") endif() From 4c75c1a88dc858f205d8d0ec036c945a5b8dabc1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20M=C3=B6ller?= Date: Mon, 22 Oct 2012 16:28:46 +0000 Subject: [PATCH 144/157] Implement compatibility between bgl_named_parameters for BOOST_VERSION >= 10510 The implementation of cgal_bgl_named_params (ab)uses internals of bgl_named_params. Those internals have been changed/removed in Boost 1.51 and I have added another implementation that (ab)uses the new internals. --- .../CGAL/boost/graph/named_function_params.h | 159 ++++++++++++++++-- 1 file changed, 144 insertions(+), 15 deletions(-) diff --git a/BGL/include/CGAL/boost/graph/named_function_params.h b/BGL/include/CGAL/boost/graph/named_function_params.h index f1baca36367..c8df45cdcb3 100644 --- a/BGL/include/CGAL/boost/graph/named_function_params.h +++ b/BGL/include/CGAL/boost/graph/named_function_params.h @@ -50,7 +50,16 @@ #include #include #include +#include +#include +// An explanation about the version hackery below: There is no real +// API to introduce custom properties to the Graph API and the +// internals have changed with Boost Version 1.51 and changes aren't +// backward compatible. To work around that we carry around two +// versions of cgal_bgl_named_params. One imitates the pre 1.51 +// bgl_named_params, the newer one hooks into the API through +// inheritance and addition of the some partial specializations. namespace CGAL { enum vertex_is_fixed_t { vertex_is_fixed } ; @@ -60,6 +69,105 @@ namespace CGAL { enum get_placement_policy_t { get_placement_policy } ; enum get_placement_policy_params_t { get_placement_policy_params } ; +#if BOOST_VERSION >= 105100 + template + struct cgal_bgl_named_params : boost::bgl_named_params + { + typedef boost::bgl_named_params base; + typedef cgal_bgl_named_params self; + + cgal_bgl_named_params(T v = T()) : base(v) {} + cgal_bgl_named_params(T v, const Base& b) : base(v, b) {} + + template + cgal_bgl_named_params + vertex_index_map(const IndexMap& p) const + { + typedef cgal_bgl_named_params Params; + return Params(p, *this); + } + + template + cgal_bgl_named_params + vertex_point_map(const PointMap& p) const + { + typedef cgal_bgl_named_params Params; + return Params(p, *this); + } + + template + cgal_bgl_named_params + vertex_is_fixed_map(const IsFixedMap& p) const + { + typedef cgal_bgl_named_params Params; + return Params(p, *this); + } + + template + cgal_bgl_named_params + edge_index_map(const IndexMap& p) const + { + typedef cgal_bgl_named_params Params; + return Params(p, *this); + } + + template + cgal_bgl_named_params + edge_is_border_map(const IsBorderMap& p) const + { + typedef cgal_bgl_named_params Params; + return Params(p, *this); + } + + template + cgal_bgl_named_params + visitor(const Visitor& p) const + { + typedef cgal_bgl_named_params Params; + return Params(p, *this); + } + + template + cgal_bgl_named_params + set_cache(const SetCache& p) const + { + typedef cgal_bgl_named_params Params; + return Params(p, *this); + } + + template + cgal_bgl_named_params + get_cost(const GetCost& p) const + { + typedef cgal_bgl_named_params Params; + return Params(p, *this); + } + + template + cgal_bgl_named_params + get_cost_params(const GetCostParams& p) const + { + typedef cgal_bgl_named_params Params; + return Params(p, *this); + } + + template + cgal_bgl_named_params + get_placement(const GetPlacement& p) const + { + typedef cgal_bgl_named_params Params; + return Params(p, *this); + } + + template + cgal_bgl_named_params + get_placement_params(const GetPlacementParams& p) const + { + typedef cgal_bgl_named_params Params; + return Params(p, *this); + } + }; +#else template struct cgal_bgl_named_params : public Base { @@ -164,6 +272,20 @@ namespace CGAL { } }; + template + inline + typename boost::property_value< cgal_bgl_named_params, Tag2>::type + get_param(const cgal_bgl_named_params& p, Tag2 tag2) + { + enum { match = boost::detail::same_property::value }; + typedef typename + boost::property_value< cgal_bgl_named_params, Tag2>::type T2; + T2* t2 = 0; + typedef boost::detail::property_value_dispatch Dispatcher; + return Dispatcher::const_get_value(p, t2, tag2); + } +#endif + template cgal_bgl_named_params vertex_index_map(IndexMap const& p) @@ -251,21 +373,28 @@ namespace CGAL { typedef cgal_bgl_named_params Params; return Params(p); } - - - template - inline - typename boost::property_value< cgal_bgl_named_params, Tag2>::type - get_param(const cgal_bgl_named_params& p, Tag2 tag2) - { - enum { match = boost::detail::same_property::value }; - typedef typename - boost::property_value< cgal_bgl_named_params, Tag2>::type T2; - T2* t2 = 0; - typedef boost::detail::property_value_dispatch Dispatcher; - return Dispatcher::const_get_value(p, t2, tag2); - } - } //namespace CGAL +#if BOOST_VERSION >= 105100 +// partial specializations hate inheritance and we need to repeat +// those here. this is rather fragile. +namespace boost { +template +struct lookup_named_param_def, Def> { + typedef T type; + static const type& get(const bgl_named_params& p, const Def&) { + return p.m_value; + } +}; + +template +struct lookup_named_param_def, Def> { + typedef typename lookup_named_param_def::type type; + static const type& get(const bgl_named_params& p, const Def& def) { + return lookup_named_param_def::get(p.m_base, def); + } +}; +} // boost +#endif + #endif // CGAL_BOOST_GRAPH_NAMED_FUNCTION_PARAMS_HPP From 25f3fb6e2e60f69175cb19e9e9d62e7daafa9690 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Mon, 22 Oct 2012 22:39:36 +0000 Subject: [PATCH 146/157] remove SVN, refactored SCM code to CGAL_SCM.cmake (plan is to reuse it UseCGAL.cmake) --- .gitattributes | 1 + CMakeLists.txt | 78 +------------------ .../cmake/modules/CGALConfig_binary.cmake.in | 2 + .../cmake/modules/CGALConfig_install.cmake.in | 2 + Installation/cmake/modules/CGAL_SCM.cmake | 29 +++++++ 5 files changed, 35 insertions(+), 77 deletions(-) create mode 100644 Installation/cmake/modules/CGAL_SCM.cmake diff --git a/.gitattributes b/.gitattributes index ed54ab894e7..2a8abfc7ada 100644 --- a/.gitattributes +++ b/.gitattributes @@ -1806,6 +1806,7 @@ Installation/cmake/modules/CGAL_CreateSingleSourceCGALProgramQt4.cmake -text Installation/cmake/modules/CGAL_GeneratorSpecificSettings.cmake -text Installation/cmake/modules/CGAL_Locate_CGAL_TAUCS.cmake -text Installation/cmake/modules/CGAL_Macros.cmake -text +Installation/cmake/modules/CGAL_SCM.cmake -text Installation/cmake/modules/CGAL_SetupBoost.cmake -text Installation/cmake/modules/CGAL_SetupDependencies.cmake -text Installation/cmake/modules/CGAL_SetupFlags.cmake -text diff --git a/CMakeLists.txt b/CMakeLists.txt index f8c4637b0b7..c60bbc8ee4a 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -14,83 +14,7 @@ endif() option( CGAL_BRANCH_BUILD "Create CGAL from branch" ON) mark_as_advanced( CGAL_BRANCH_BUILD ) -# search for some SCM - -# TODO - -if ( EXISTS ${CMAKE_SOURCE_DIR}/.svn ) - set ( CGAL_SCM_NAME "svn" ) -else () - if ( NOT EXISTS ${CMAKE_SOURCE_DIR}/.git ) - message( ERROR "Neither 'svn' nor 'git' as SCM found" ) - endif() - set ( CGAL_SCM_NAME "git" ) -endif() - -if ( ${CGAL_SCM_NAME} STREQUAL "svn" ) - - find_program(SVN_EXECUTABLE svn DOC "subversion command line client") - - function(Subversion_GET_INFO dir variable) - # use svnversion - execute_process(COMMAND "${SVN_EXECUTABLE}" info --xml - WORKING_DIRECTORY "${dir}" - OUTPUT_VARIABLE ${variable} - OUTPUT_STRIP_TRAILING_WHITESPACE - RESULT_VARIABLE svn_error) - if(svn_error) - message("Warning: `svn info --xml \"${dir}\"` returned an error!") - set(${variable} "") - endif() - set(${variable} ${${variable}} PARENT_SCOPE) - endfunction() - - function(Subversion_GET_REVISION dir variable) - Subversion_GET_INFO("${dir}" ${variable}) - string(REGEX REPLACE "^(.*\n)? revision=\"([^\n]+)\".*url.*" "\\2" ${variable} "${${variable}}") - if(NOT variable) - message("Warning: can not get the Subversion revision of directory ${dir}") - endif() - set(${variable} ${${variable}} PARENT_SCOPE) - endfunction(Subversion_GET_REVISION) - - function(Subversion_GET_URL dir variable) - Subversion_GET_INFO("${dir}" ${variable}) - string(REGEX REPLACE ".*([^<]+).*" "\\1" ${variable} "${${variable}}") - if(NOT variable) - message("Warning: can not get the Subversion URL of directory ${dir}") - endif() - set(${variable} ${${variable}} PARENT_SCOPE) - endfunction(Subversion_GET_URL) - - Subversion_GET_URL("${CMAKE_CURRENT_SOURCE_DIR}" CGAL_TMP_SVN_BRANCH_NAME) - # Remove the prefix of the URL "https://scm.gforge.inria.fr/". - string(REGEX REPLACE "[a-z+]+://[a-z0-9.]+" "" CGAL_TMP_SVN_BRANCH_NAME "${CGAL_TMP_SVN_BRANCH_NAME}") - - set ( CGAL_SCM_BRANCH_NAME "${CGAL_TMP_SVN_BRANCH_NAME}" ) -endif() - -if ( ${CGAL_SCM_NAME} STREQUAL "git" ) - - find_program(GIT_EXECUTABLE git DOC "git command line client") - -# EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} --git-dir=${CMAKE_SOURCE_DIR}/.git branch -# OUTPUT_VARIABLE CGAL_GIT_BRANCH_OUT -# OUTPUT_STRIP_TRAILING_WHITESPACE) -# #foreach (line IN ${CGAL_GIT_BRANCH_OUT}) -# # message (STATUS "Line: ${line}") -# if ( STRING( REGEX MATCH "* " CGAL_GIT_BRANCH_LINE -# ${CGAL_GIT_BRANCH_OUT} ) ) -# string ( REGEX REPLACE "# On branch " "" CGAL_GIT_BRANCH ${CGAL_GIT_BRANCH_LINE}) -# endif() -# #endforeach() - - message( STATUS "Git branch ${CGAL_GIT_BRANCH}") - - # TODO detect name - set ( CGAL_SCM_BRANCH_NAME "n/a" ) - -endif() +include(${CMAKE_SOURCE_DIR}/Installation/cmake/modules/CGAL_SCM.cmake) # add option for duplicate file detection option( CGAL_REPORT_DUPLICATE_FILES "Switch on to start (naive) detection of duplicate source- and headerfiles in packages" OFF) diff --git a/Installation/cmake/modules/CGALConfig_binary.cmake.in b/Installation/cmake/modules/CGALConfig_binary.cmake.in index 193bf8bbb89..bdd0e70037a 100644 --- a/Installation/cmake/modules/CGALConfig_binary.cmake.in +++ b/Installation/cmake/modules/CGALConfig_binary.cmake.in @@ -14,6 +14,8 @@ set(CGAL_CORE_PACKAGE_DIR "@CGAL_CORE_PACKAGE_DIR@") set(CGAL_MAJOR_VERSION "@CGAL_MAJOR_VERSION@" ) set(CGAL_MINOR_VERSION "@CGAL_MINOR_VERSION@" ) set(CGAL_BUILD_VERSION "@CGAL_BUILD_VERSION@" ) +set(CGAL_SCM_BRANCH_NAME "@CGAL_SCM_BRANCH_NAME@") +set(CGAL_GIT_SHA1 "@CGAL_GIT_SHA1@") set(CGAL_BUILD_SHARED_LIBS "@CGAL_BUILD_SHARED_LIBS@" ) set(CGAL_Boost_USE_STATIC_LIBS "@CGAL_Boost_USE_STATIC_LIBS@" ) diff --git a/Installation/cmake/modules/CGALConfig_install.cmake.in b/Installation/cmake/modules/CGALConfig_install.cmake.in index f86a4c97298..c180afe3c53 100644 --- a/Installation/cmake/modules/CGALConfig_install.cmake.in +++ b/Installation/cmake/modules/CGALConfig_install.cmake.in @@ -14,6 +14,8 @@ set(CGAL_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@") set(CGAL_MAJOR_VERSION "@CGAL_MAJOR_VERSION@" ) set(CGAL_MINOR_VERSION "@CGAL_MINOR_VERSION@" ) set(CGAL_BUILD_VERSION "@CGAL_BUILD_VERSION@" ) +set(CGAL_SCM_BRANCH_NAME "@CGAL_SCM_BRANCH_NAME@") +set(CGAL_GIT_SHA1 "@CGAL_GIT_SHA1@") set(CGAL_BUILD_SHARED_LIBS "@CGAL_BUILD_SHARED_LIBS@" ) set(CGAL_Boost_USE_STATIC_LIBS "@CGAL_Boost_USE_STATIC_LIBS@" ) diff --git a/Installation/cmake/modules/CGAL_SCM.cmake b/Installation/cmake/modules/CGAL_SCM.cmake new file mode 100644 index 00000000000..0ac592b5930 --- /dev/null +++ b/Installation/cmake/modules/CGAL_SCM.cmake @@ -0,0 +1,29 @@ +# Common settings for CGAL cmake scripts +if( NOT CGAL_SCM_FILE_INCLUDED ) + set(CGAL_SCM_FILE_INCLUDED 1 ) + +if ( EXISTS ${CMAKE_SOURCE_DIR}/.git ) + set ( CGAL_SCM_NAME "git" ) +else() + if ( EXISTS ${CMAKE_SOURCE_DIR}/.svn ) + set ( CGAL_SCM_NAME "svn" ) + else () + message( ERROR "Neither 'svn' nor 'git' as SCM found" ) + endif() +endif() + +if ( ${CGAL_SCM_NAME} STREQUAL "git" ) + + find_program(GIT_EXECUTABLE git DOC "git command line client") +EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} --git-dir=${CMAKE_SOURCE_DIR}/.git symbolic-ref HEAD + OUTPUT_VARIABLE CGAL_GIT_BRANCH_OUT + OUTPUT_STRIP_TRAILING_WHITESPACE) + + string ( REGEX REPLACE "refs/heads/" "" CGAL_GIT_BRANCH ${CGAL_GIT_BRANCH_OUT}) + message( STATUS "Git branch ${CGAL_GIT_BRANCH}") + + set ( CGAL_SCM_BRANCH_NAME "${CGAL_GIT_BRANCH}" ) + +endif() + +endif() From 358b8bb92b91d5a9e94d0d56ee56b972af50a5c3 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Mon, 22 Oct 2012 23:09:58 +0000 Subject: [PATCH 147/157] search for git parent dir + commented some verbosity --- Installation/cmake/modules/CGAL_SCM.cmake | 28 +++++++++++++++-------- 1 file changed, 19 insertions(+), 9 deletions(-) diff --git a/Installation/cmake/modules/CGAL_SCM.cmake b/Installation/cmake/modules/CGAL_SCM.cmake index 0ac592b5930..e7a8bdeaa52 100644 --- a/Installation/cmake/modules/CGAL_SCM.cmake +++ b/Installation/cmake/modules/CGAL_SCM.cmake @@ -2,25 +2,35 @@ if( NOT CGAL_SCM_FILE_INCLUDED ) set(CGAL_SCM_FILE_INCLUDED 1 ) -if ( EXISTS ${CMAKE_SOURCE_DIR}/.git ) - set ( CGAL_SCM_NAME "git" ) -else() - if ( EXISTS ${CMAKE_SOURCE_DIR}/.svn ) - set ( CGAL_SCM_NAME "svn" ) - else () - message( ERROR "Neither 'svn' nor 'git' as SCM found" ) +set(GIT_PARENT_DIR "${CMAKE_SOURCE_DIR}") +set(GIT_DIR "${GIT_PARENT_DIR}/.git") +while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories + set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}") + get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) + if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT) + # We have reached the root directory, we are not in git + set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE) + set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE) + else() + set(GIT_DIR "${GIT_PARENT_DIR}/.git") endif() + endwhile() + +if ( NOT "${_refspecvar}" STREQUAL "GITDIR-NOTFOUND" ) + set ( CGAL_SCM_NAME "git" ) endif() +#message ("GPD: ${GIT_PARENT_DIR}") + if ( ${CGAL_SCM_NAME} STREQUAL "git" ) find_program(GIT_EXECUTABLE git DOC "git command line client") -EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} --git-dir=${CMAKE_SOURCE_DIR}/.git symbolic-ref HEAD + EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} --git-dir=${GIT_PARENT_DIR}/.git symbolic-ref HEAD OUTPUT_VARIABLE CGAL_GIT_BRANCH_OUT OUTPUT_STRIP_TRAILING_WHITESPACE) string ( REGEX REPLACE "refs/heads/" "" CGAL_GIT_BRANCH ${CGAL_GIT_BRANCH_OUT}) - message( STATUS "Git branch ${CGAL_GIT_BRANCH}") + # message( STATUS "Git branch ${CGAL_GIT_BRANCH}") set ( CGAL_SCM_BRANCH_NAME "${CGAL_GIT_BRANCH}" ) From fc6d74c399b5e240b471d2264b8051adde8d03e2 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Mon, 22 Oct 2012 23:10:57 +0000 Subject: [PATCH 148/157] raise a CMake AUTHOR_WARNING if current branch does not match branch used to install cgal --- Installation/cmake/modules/UseCGAL.cmake | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/Installation/cmake/modules/UseCGAL.cmake b/Installation/cmake/modules/UseCGAL.cmake index af05b46b0e1..ea83979f2a1 100644 --- a/Installation/cmake/modules/UseCGAL.cmake +++ b/Installation/cmake/modules/UseCGAL.cmake @@ -19,6 +19,17 @@ if(NOT USE_CGAL_FILE_INCLUDED) include(CGAL_GeneratorSpecificSettings) include(CGAL_TweakFindBoost) + set(CGAL_INSTALLED_SCM_BRANCH_NAME ${CGAL_SCM_BRANCH_NAME}) + + if( NOT "${CGAL_INSTALLED_SCM_BRANCH_NAME}" STREQUAL "" ) + include(CGAL_SCM) + message ( STATUS "Code taken from Git branch: ${CGAL_SCM_BRANCH_NAME}") + if ( NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "" AND + NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "${CGAL_INSTALLED_SCM_BRANCH_NAME}") + message (AUTHOR_WARNING "Branch '${CGAL_SCM_BRANCH_NAME}' does not match branch '${CGAL_INSTALLED_SCM_BRANCH_NAME}' from which CGAL has been installed. Please consider to rebuild CGAL from this branch.") + endif() + endif() + set( CGAL_LIBRARIES ) foreach ( component ${CGAL_REQUESTED_COMPONENTS} ) From fe43dd017108af59a0c1b16be0c201d924d5e776 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Mon, 22 Oct 2012 23:38:25 +0000 Subject: [PATCH 149/157] better handling if source of executable is not in a git repo --- Installation/cmake/modules/CGAL_SCM.cmake | 25 +++++++++++++---------- Installation/cmake/modules/UseCGAL.cmake | 10 +++++---- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/Installation/cmake/modules/CGAL_SCM.cmake b/Installation/cmake/modules/CGAL_SCM.cmake index e7a8bdeaa52..2ef29af82f6 100644 --- a/Installation/cmake/modules/CGAL_SCM.cmake +++ b/Installation/cmake/modules/CGAL_SCM.cmake @@ -2,27 +2,30 @@ if( NOT CGAL_SCM_FILE_INCLUDED ) set(CGAL_SCM_FILE_INCLUDED 1 ) +#message ("-----CSD: ${CMAKE_SOURCE_DIR}") + set(GIT_PARENT_DIR "${CMAKE_SOURCE_DIR}") set(GIT_DIR "${GIT_PARENT_DIR}/.git") while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}") get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) - if(GIT_PARENT_DIR STREQUAL GIT_PREVIOUS_PARENT) + #message ("-----GPD1: ${GIT_PARENT_DIR}") + #message ("-----PPD1: ${GIT_PREVIOUS_PARENT}") + if( "${GIT_PARENT_DIR}" STREQUAL "${GIT_PREVIOUS_PARENT}" ) # We have reached the root directory, we are not in git - set(${_refspecvar} "GITDIR-NOTFOUND" PARENT_SCOPE) - set(${_hashvar} "GITDIR-NOTFOUND" PARENT_SCOPE) + set(_refspecvar "GITDIR-NOTFOUND") + set(_hashvar "GITDIR-NOTFOUND") + set ( CGAL_SCM_NAME "" ) + break() else() - set(GIT_DIR "${GIT_PARENT_DIR}/.git") + set( GIT_DIR "${GIT_PARENT_DIR}/.git" ) + set( CGAL_SCM_NAME "git" ) endif() - endwhile() +endwhile() -if ( NOT "${_refspecvar}" STREQUAL "GITDIR-NOTFOUND" ) - set ( CGAL_SCM_NAME "git" ) -endif() -#message ("GPD: ${GIT_PARENT_DIR}") - -if ( ${CGAL_SCM_NAME} STREQUAL "git" ) +if ( "${CGAL_SCM_NAME}" STREQUAL "git" ) + #message ("====GPD: ${GIT_PARENT_DIR}") find_program(GIT_EXECUTABLE git DOC "git command line client") EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} --git-dir=${GIT_PARENT_DIR}/.git symbolic-ref HEAD diff --git a/Installation/cmake/modules/UseCGAL.cmake b/Installation/cmake/modules/UseCGAL.cmake index ea83979f2a1..cdddaef0937 100644 --- a/Installation/cmake/modules/UseCGAL.cmake +++ b/Installation/cmake/modules/UseCGAL.cmake @@ -20,13 +20,15 @@ if(NOT USE_CGAL_FILE_INCLUDED) include(CGAL_TweakFindBoost) set(CGAL_INSTALLED_SCM_BRANCH_NAME ${CGAL_SCM_BRANCH_NAME}) + set(CGAL_SCM_BRANCH_NAME "") if( NOT "${CGAL_INSTALLED_SCM_BRANCH_NAME}" STREQUAL "" ) include(CGAL_SCM) - message ( STATUS "Code taken from Git branch: ${CGAL_SCM_BRANCH_NAME}") - if ( NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "" AND - NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "${CGAL_INSTALLED_SCM_BRANCH_NAME}") - message (AUTHOR_WARNING "Branch '${CGAL_SCM_BRANCH_NAME}' does not match branch '${CGAL_INSTALLED_SCM_BRANCH_NAME}' from which CGAL has been installed. Please consider to rebuild CGAL from this branch.") + if ( NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "" ) + message ( STATUS "Code taken from Git branch: ${CGAL_SCM_BRANCH_NAME}") + if ( NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "${CGAL_INSTALLED_SCM_BRANCH_NAME}") + message (AUTHOR_WARNING "Branch '${CGAL_SCM_BRANCH_NAME}' does not match branch '${CGAL_INSTALLED_SCM_BRANCH_NAME}' from which CGAL has been installed. Please consider to rebuild CGAL from this branch.") + endif() endif() endif() From d087b87fa2bb3f6b19af477da6a01841666ecb1f Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Tue, 23 Oct 2012 23:24:28 +0000 Subject: [PATCH 150/157] removed from prepare branch --- .gitattributes | 1 - Scripts/developer_scripts/cgal_git_svn_clone | 239 ------------------- 2 files changed, 240 deletions(-) delete mode 100755 Scripts/developer_scripts/cgal_git_svn_clone diff --git a/.gitattributes b/.gitattributes index 2a8abfc7ada..9dd2f5bf2e2 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3576,7 +3576,6 @@ Scripts/developer_scripts/autotest_cgal_with_cmake -text Scripts/developer_scripts/cgal_build -text Scripts/developer_scripts/cgal_generate_cmake_script -text Scripts/developer_scripts/cgal_generate_cmake_script.cmake -text -Scripts/developer_scripts/cgal_git_svn_clone -text Scripts/developer_scripts/cgal_header_clean_up.py -text Scripts/developer_scripts/cgal_test_with_cmake eol=lf Scripts/developer_scripts/check_library_uses_no_gpl_files -text diff --git a/Scripts/developer_scripts/cgal_git_svn_clone b/Scripts/developer_scripts/cgal_git_svn_clone deleted file mode 100755 index 13eafddd243..00000000000 --- a/Scripts/developer_scripts/cgal_git_svn_clone +++ /dev/null @@ -1,239 +0,0 @@ -#!/bin/bash - -### Usage - -# TODO remove -g xor -c and replace by last argument? - -usage() -{ - echo "Usage: `basename $0` [-u userName] [-e userEmail] [-l userLogin] [-c cloneLocation] [-v] [-h] [-g gitname=cgal.git]" >&2 - echo >&2 - echo " -v the version" >&2 - echo " -h this info screen" >&2 - echo >&2 -} - -# TODO write cloneLocation to config(file) - -# echo " -m svnLocation -# echo " -r gives revision to start from. Other options than a number: LAST, BASE" >&2 -# echo " -f skip fetch" >&2 -# echo " -t skip tags" >&2 - -### Config - -userName="Eric Berberich" -userEmail=eric@mpi-inf.mpg.de -userLogin=eric -svnGforge=svn+ssh://$userLogin@scm.gforge.inria.fr/svn/cgal -#fromSvn=file://$HOME/CGAL/gforge/cgal-m -fromSvn=$svnGforge -fromRev=1 -gitName=cgal.git -skipTags=0 -skipFetch=0 -cloneLocation= - -# parse command line arguments -while getopts "u:e:l:r:m:g:c:fth" OPT; do - case "$OPT" in - -# for developers - u) userName=$OPTARG - ;; - - e) userEmail=$OPTARG - ;; - - l) userLogin=$OPTARG - ;; - - c) cloneLocation=$OPTARG - ;; - - g) gitName=$OPTARG - ;; - - h) usage - exit 0 - ;; - - v) echo "`basename $0` version 0.1" - exit 0 - ;; - -# for svn2git cloners - m) fromSvn=$OPTARG - ;; - - r) fromRev=$OPTARG - ;; - - f) skipFetch=1 - ;; - - t) skipTags=1 - ;; - -# for all - - \?) # getopts issues an error message - usage - exit 1 - ;; - esac -done - -#shift `expr $OPTIND - 1` - -if [ "$userName" = "" ]; then - echo "No username with -u parameter given" - exit 1 -fi - -if [ "$userEmail" = "" ]; then - echo "No useremail with -e parameter given" - exit 1 -fi - -if [ "$userLogin" = "" ]; then - echo "No userlogin with -l parameter given" - exit 1 -fi - -### Create repo - -echo "Create new directory $gitname" -rm -fr ./$gitName -mkdir ./$gitName -echo - -if [ "$cloneLocation" != "" ]; then - - echo "Cloning repo with svn-remotes from $cloneLocation" - git clone $cloneLocation $gitName - -fi - -cd $gitName - -# rewrite root -rewriteRoot=--rewrite-root=$svnGforge -#rewriteRoot= - - -# TODO tags; define behavior for developers, maybe as own svn-remote of git-remote that can be deleted and, if needed, reintegrated; OR: Convert to GIT tags? - -internalReleasesTags="--tags tags/internal-releases" -internalReleasesTags= - -debianTags="--tags tags/debian" -debianTags= - -# git svn init -echo "git svn init repository:" -git svn init $fromSvn $rewriteRoot --prefix=svn/next/ --trunk branches/next -git svn init $fromSvn $rewriteRoot --prefix=svn/ --trunk trunk -git svn init $fromSvn $rewriteRoot --prefix=svn/features/ --branches branches/features -git svn init $fromSvn $rewriteRoot --prefix=svn/releases/ --branches branches/releases -# rename refs -# TODO remove 'stable' for developers? -sed -e 's|next/trunk|next|g' -e 's|svn/trunk|svn/stable|g' -i "" .git/config -if [ $skipTags = 0 ]; then - git svn init $fromSvn $rewriteRoot --prefix=svn/tags/releases/ --tags tags/releases - sed -e 's|tags/releases/tags|tags/releases|g' -i "" .git/config - if [ "$internalReleasesTags" != "" ]; then - git svn init $fromSvn $rewriteRoot --prefix=svn/tags/internal-releases/ $internalReleasesTags - sed -e 's|tags/internal-releases/tags|tags/internal-releases|g' -i "" .git/config - fi - if [ "$debianTags" != "" ]; then - git svn init $fromSvn $rewriteRoot --prefix=svn/tags/debian/ $debianTags - sed -e 's|tags/debian/tags|tags/debian|g' -i "" .git/config - fi -fi -echo - -# add author -echo "Add author to $gitName/.git/config" -git config user.name "$userName" -git config user.email "$userEmail" -echo - -echo "Using config $gitName/.git/config:" -cat .git/config - -### git svn fetch - -if [ $skipFetch = 0 ]; then - - if [ "$cloneLocation" != "" ]; then - - # git config svn.authorsfile $(basename $(pwd))/git-authors - - echo "Rsyncing svn" - rsync -arpP --progress $cloneLocation/.git/svn .git/ - - echo "Fetching svn-branches" - git fetch $cloneLocation refs/remotes/svn/stable:refs/remotes/svn/stable refs/remotes/svn/next:refs/remotes/svn/next - for branch in `svn ls $fromSvn/branches/features`; do - git fetch $cloneLocation refs/remotes/svn/features/${branch%/}:refs/remotes/svn/features/${branch%/} - done; - - for branch in `svn ls $fromSvn/branches/releases`; do - git fetch $cloneLocation refs/remotes/svn/releases/${branch%/}:refs/remotes/svn/releases/${branch%/} - done; - - # TODO new tags! - - git remote rm origin # TODO remove line? - - git svn fetch # TODO --authors-file=/tmp/cgal-authors-file.txt - - git branch -a - git checkout master - git branch -D local-svn/next - - git svn rebase --all - - git checkout -b local-svn/next remotes/svn/next - git branch -D master - - git branch -a - - else - - ### Authors file - echo "Get authors file with svn" - svn cat $fromSvn/branches/next/Maintenance/git/authors-file.txt > /tmp/cgal-authors-file.txt - echo - - ### fetch from svn server - echo "Fetch from SVN repository: git svn fetch -r$fromRev:HEAD " - if [ "$fromRev" = "LAST" ]; then - # last revision on next - fromRev=$(svn info $fromSvn/branches/next | grep "Last Changed Rev: " | tr -d 'Last Changed Rev: ') - echo "Last Revision: $fromRev" - fi - git svn fetch --authors-file=/tmp/cgal-authors-file.txt -r$fromRev:HEAD - echo - - rm -f /tmp/cgal-authors-files.txt - - ### Tags - - # TODO - - - ### Branch names - - # rename master next - echo "Rename main branch to local/next" - git branch -m master local/next - - fi - -fi - -# What about? -### http://translate.org.za/blogs/wynand/en/content/changing-your-svn-repository-address-git-svn-setup -## unhandled.log (which lists all svn properties, such as svn:eol, that has not been converted). \ No newline at end of file From 03ac16f07172a3a7f37e61380e229c4d831d9334 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Tue, 23 Oct 2012 23:27:34 +0000 Subject: [PATCH 151/157] whitespace for git --- Installation/cmake/modules/CGALConfig_binary.cmake.in | 4 ++-- Installation/cmake/modules/CGALConfig_install.cmake.in | 4 ++-- Installation/cmake/modules/CGAL_SCM.cmake | 6 +++--- Installation/cmake/modules/UseCGAL.cmake | 4 ++-- 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/Installation/cmake/modules/CGALConfig_binary.cmake.in b/Installation/cmake/modules/CGALConfig_binary.cmake.in index bdd0e70037a..e7d0e9b0c1c 100644 --- a/Installation/cmake/modules/CGALConfig_binary.cmake.in +++ b/Installation/cmake/modules/CGALConfig_binary.cmake.in @@ -14,8 +14,8 @@ set(CGAL_CORE_PACKAGE_DIR "@CGAL_CORE_PACKAGE_DIR@") set(CGAL_MAJOR_VERSION "@CGAL_MAJOR_VERSION@" ) set(CGAL_MINOR_VERSION "@CGAL_MINOR_VERSION@" ) set(CGAL_BUILD_VERSION "@CGAL_BUILD_VERSION@" ) -set(CGAL_SCM_BRANCH_NAME "@CGAL_SCM_BRANCH_NAME@") -set(CGAL_GIT_SHA1 "@CGAL_GIT_SHA1@") +set(CGAL_SCM_BRANCH_NAME "@CGAL_SCM_BRANCH_NAME@") +set(CGAL_GIT_SHA1 "@CGAL_GIT_SHA1@") set(CGAL_BUILD_SHARED_LIBS "@CGAL_BUILD_SHARED_LIBS@" ) set(CGAL_Boost_USE_STATIC_LIBS "@CGAL_Boost_USE_STATIC_LIBS@" ) diff --git a/Installation/cmake/modules/CGALConfig_install.cmake.in b/Installation/cmake/modules/CGALConfig_install.cmake.in index c180afe3c53..09082b15732 100644 --- a/Installation/cmake/modules/CGALConfig_install.cmake.in +++ b/Installation/cmake/modules/CGALConfig_install.cmake.in @@ -14,8 +14,8 @@ set(CGAL_INSTALL_PREFIX "@CMAKE_INSTALL_PREFIX@") set(CGAL_MAJOR_VERSION "@CGAL_MAJOR_VERSION@" ) set(CGAL_MINOR_VERSION "@CGAL_MINOR_VERSION@" ) set(CGAL_BUILD_VERSION "@CGAL_BUILD_VERSION@" ) -set(CGAL_SCM_BRANCH_NAME "@CGAL_SCM_BRANCH_NAME@") -set(CGAL_GIT_SHA1 "@CGAL_GIT_SHA1@") +set(CGAL_SCM_BRANCH_NAME "@CGAL_SCM_BRANCH_NAME@") +set(CGAL_GIT_SHA1 "@CGAL_GIT_SHA1@") set(CGAL_BUILD_SHARED_LIBS "@CGAL_BUILD_SHARED_LIBS@" ) set(CGAL_Boost_USE_STATIC_LIBS "@CGAL_Boost_USE_STATIC_LIBS@" ) diff --git a/Installation/cmake/modules/CGAL_SCM.cmake b/Installation/cmake/modules/CGAL_SCM.cmake index 2ef29af82f6..3f9f8f42530 100644 --- a/Installation/cmake/modules/CGAL_SCM.cmake +++ b/Installation/cmake/modules/CGAL_SCM.cmake @@ -28,15 +28,15 @@ if ( "${CGAL_SCM_NAME}" STREQUAL "git" ) #message ("====GPD: ${GIT_PARENT_DIR}") find_program(GIT_EXECUTABLE git DOC "git command line client") - EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} --git-dir=${GIT_PARENT_DIR}/.git symbolic-ref HEAD + EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} --git-dir=${GIT_PARENT_DIR}/.git symbolic-ref HEAD OUTPUT_VARIABLE CGAL_GIT_BRANCH_OUT OUTPUT_STRIP_TRAILING_WHITESPACE) string ( REGEX REPLACE "refs/heads/" "" CGAL_GIT_BRANCH ${CGAL_GIT_BRANCH_OUT}) - # message( STATUS "Git branch ${CGAL_GIT_BRANCH}") + # message( STATUS "Git branch ${CGAL_GIT_BRANCH}") set ( CGAL_SCM_BRANCH_NAME "${CGAL_GIT_BRANCH}" ) endif() - + endif() diff --git a/Installation/cmake/modules/UseCGAL.cmake b/Installation/cmake/modules/UseCGAL.cmake index cdddaef0937..c473904b2e1 100644 --- a/Installation/cmake/modules/UseCGAL.cmake +++ b/Installation/cmake/modules/UseCGAL.cmake @@ -24,8 +24,8 @@ if(NOT USE_CGAL_FILE_INCLUDED) if( NOT "${CGAL_INSTALLED_SCM_BRANCH_NAME}" STREQUAL "" ) include(CGAL_SCM) - if ( NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "" ) - message ( STATUS "Code taken from Git branch: ${CGAL_SCM_BRANCH_NAME}") + if ( NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "" ) + message ( STATUS "Code taken from Git branch: ${CGAL_SCM_BRANCH_NAME}" ) if ( NOT "${CGAL_SCM_BRANCH_NAME}" STREQUAL "${CGAL_INSTALLED_SCM_BRANCH_NAME}") message (AUTHOR_WARNING "Branch '${CGAL_SCM_BRANCH_NAME}' does not match branch '${CGAL_INSTALLED_SCM_BRANCH_NAME}' from which CGAL has been installed. Please consider to rebuild CGAL from this branch.") endif() From 7937e731d841d455b4e304fe40916322271b7c18 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Tue, 13 Nov 2012 15:51:37 +0100 Subject: [PATCH 152/157] removed svn part, and added dummy SVN_CREATED_SVN_REVISION to be 99999 --- Installation/CMakeLists.txt | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index c12c568e84c..419ed508b27 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -153,21 +153,15 @@ if ( CGAL_BRANCH_BUILD ) set(CGAL_CREATED_VERSION_NR "1${CGAL_TMP_MAJOR}${CGAL_TMP_MINOR}${CGAL_BUGFIX_VERSION}${CGAL_TMP_BUILD}") message(STATUS "CGAL_VERSION_NR is ${CGAL_CREATED_VERSION_NR}") - if ( ${CGAL_SCM_NAME} STREQUAL "svn" ) - - # The function Subversion_GET_REVISION is defined in ../CMakeLists.txt - Subversion_GET_REVISION("${CMAKE_SOURCE_DIR}" CGAL_TMP_REVISION) - set(CGAL_CREATED_SVN_REVISION "${CGAL_TMP_REVISION}") - message(STATUS "CGAL_SVN_REVISION is ${CGAL_TMP_REVISION}") - - endif() - if ( ${CGAL_SCM_NAME} STREQUAL "git" ) ### TODO EBEB GIT_NR? set(CGAL_GIT_HASH "n/a") + set(CGAL_CREATED_SVN_REVISION "99999") message(STATUS "CGAL_GIT_HASH is ${CGAL_GIT_HASH}") + message(STATUS "CGAL_CREATED_SVN_REVISION is ${CGAL_CREATED_SVN_REVISION} (dummy)") + endif() file(REMOVE ${CMAKE_BINARY_DIR}/include/CGAL/version.h) From ddd4ca95da328e5cc4bd4be90020025c57d3e5bf Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Tue, 13 Nov 2012 16:20:07 +0100 Subject: [PATCH 153/157] fix if git dir is already given dir --- Installation/cmake/modules/CGAL_SCM.cmake | 40 +++++++++++++---------- 1 file changed, 23 insertions(+), 17 deletions(-) diff --git a/Installation/cmake/modules/CGAL_SCM.cmake b/Installation/cmake/modules/CGAL_SCM.cmake index 3f9f8f42530..09e4dc383b1 100644 --- a/Installation/cmake/modules/CGAL_SCM.cmake +++ b/Installation/cmake/modules/CGAL_SCM.cmake @@ -6,26 +6,32 @@ if( NOT CGAL_SCM_FILE_INCLUDED ) set(GIT_PARENT_DIR "${CMAKE_SOURCE_DIR}") set(GIT_DIR "${GIT_PARENT_DIR}/.git") -while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories - set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}") - get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) - #message ("-----GPD1: ${GIT_PARENT_DIR}") - #message ("-----PPD1: ${GIT_PREVIOUS_PARENT}") - if( "${GIT_PARENT_DIR}" STREQUAL "${GIT_PREVIOUS_PARENT}" ) - # We have reached the root directory, we are not in git - set(_refspecvar "GITDIR-NOTFOUND") - set(_hashvar "GITDIR-NOTFOUND") - set ( CGAL_SCM_NAME "" ) - break() - else() - set( GIT_DIR "${GIT_PARENT_DIR}/.git" ) - set( CGAL_SCM_NAME "git" ) - endif() -endwhile() +#message ("-----GD: ${GIT_DIR}") +if (EXISTS "${GIT_DIR}") + set( CGAL_SCM_NAME "git" ) +else() + while(NOT EXISTS "${GIT_DIR}") # .git dir not found, search parent directories + set(GIT_PREVIOUS_PARENT "${GIT_PARENT_DIR}") + get_filename_component(GIT_PARENT_DIR ${GIT_PARENT_DIR} PATH) + #message ("-----GPD1: ${GIT_PARENT_DIR}") + #message ("-----PPD1: ${GIT_PREVIOUS_PARENT}") + if( "${GIT_PARENT_DIR}" STREQUAL "${GIT_PREVIOUS_PARENT}" ) + # We have reached the root directory, we are not in git + set(_refspecvar "GITDIR-NOTFOUND") + set(_hashvar "GITDIR-NOTFOUND") + set ( CGAL_SCM_NAME "" ) + break() + else() + set( GIT_DIR "${GIT_PARENT_DIR}/.git" ) + set( CGAL_SCM_NAME "git" ) + endif() + endwhile() +endif() +#message ("====GPD1: ${GIT_PARENT_DIR}") if ( "${CGAL_SCM_NAME}" STREQUAL "git" ) - #message ("====GPD: ${GIT_PARENT_DIR}") + #message ("====GPD2: ${GIT_PARENT_DIR}") find_program(GIT_EXECUTABLE git DOC "git command line client") EXECUTE_PROCESS(COMMAND ${GIT_EXECUTABLE} --git-dir=${GIT_PARENT_DIR}/.git symbolic-ref HEAD From 6c9e66f1d57b28b4e45e405e996b2284bcf97ba1 Mon Sep 17 00:00:00 2001 From: Eric Berberich Date: Wed, 14 Nov 2012 12:07:28 +0100 Subject: [PATCH 154/157] added script from master branch --- .gitattributes | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitattributes b/.gitattributes index 9dd2f5bf2e2..667aadaa4b8 100644 --- a/.gitattributes +++ b/.gitattributes @@ -3576,6 +3576,7 @@ Scripts/developer_scripts/autotest_cgal_with_cmake -text Scripts/developer_scripts/cgal_build -text Scripts/developer_scripts/cgal_generate_cmake_script -text Scripts/developer_scripts/cgal_generate_cmake_script.cmake -text +Scripts/developer_scripts/cgal_git_update_hooks_for_client -text Scripts/developer_scripts/cgal_header_clean_up.py -text Scripts/developer_scripts/cgal_test_with_cmake eol=lf Scripts/developer_scripts/check_library_uses_no_gpl_files -text From 4413cdb5c346b1590ef04869531e53990f39e873 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 14 Nov 2012 15:24:43 +0100 Subject: [PATCH 155/157] New file: global gitignore file, to use with git config core.excludesfile ./Maintenance/git/global-gitignore --- Maintenance/git/global-gitignore | 84 ++++++++++++++++++++++++++++++++ 1 file changed, 84 insertions(+) create mode 100644 Maintenance/git/global-gitignore diff --git a/Maintenance/git/global-gitignore b/Maintenance/git/global-gitignore new file mode 100644 index 00000000000..4b336031f29 --- /dev/null +++ b/Maintenance/git/global-gitignore @@ -0,0 +1,84 @@ +*.bak +*.bk? +*.old +.DS_Store +*.a +*.o +*.lib +*.dll +*.exe +*.so +*.so.* +debug +release +Debug +Release +x64 +*.blg +*.cgallog +*.aux +*.maf +*.hax +*.hlg +*.ilg +*.pdflg +*.log + +*.toc +*.cgallog.tmp* +*.inc +*.dvi +*.mtc* +*.idx +ProgramOutput* +ErrorOutput* +CompilerOutput* +error.txt +*.ncb +*.suo +contents.obv +.xvpics +semantic.cache +doc_ps +doc_html +doc_pdf +*.moc +.*~ +*~ +.#* +*.user +*.aps +doc_doxygen +CMakeCache.txt +CMakeFiles +cmake_install.cmake +Doxyfile +*.dir +ALL_BUILD.vcproj +ZERO_CHECK.vcproj +gmon.* +.qglviewer.xml +*.moc_parameters +*.cpp_parameters +*_moc.cpp +ui_*.h +qrc_*.cxx +*.sbr +.dir-locals.el +*.tmp +*.ilk +*.pdb +*.exe.* +Makefile +*.cpp.noheader +*.h.noheader +*.h.filename +*.cpp.filename +.scm-urls +*.exp +*.resource.txt +*.manifest +*.manifest.res +*.vcproj +*.sln +*.depends From 5deb7b6cf7346537fae3bd4442ceb683e7727728 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Wed, 14 Nov 2012 16:07:15 +0100 Subject: [PATCH 156/157] Merge the file Maintenance/git/global-gitignore into .gitignore That is simpler to use: no need of a call to git-config. --- .gitignore | 84 ++++++++++++++++++++++++++++++++ Maintenance/git/global-gitignore | 84 -------------------------------- 2 files changed, 84 insertions(+), 84 deletions(-) delete mode 100644 Maintenance/git/global-gitignore diff --git a/.gitignore b/.gitignore index 7c1fe6399f1..5c65fd6323f 100644 --- a/.gitignore +++ b/.gitignore @@ -1422,3 +1422,87 @@ Triangulation_3/test/Triangulation_3/test_triangulation_3 Triangulation_3/test/Triangulation_3/test_triangulation_tds Triangulation_3/test/Triangulation_3/test_triangulation_tds_3 /build* +*.bak +*.bk? +*.old +.DS_Store +*.a +*.o +*.lib +*.dll +*.exe +*.so +*.so.* +debug +release +Debug +Release +x64 +*.blg +*.cgallog +*.aux +*.maf +*.hax +*.hlg +*.ilg +*.pdflg +*.log + +*.toc +*.cgallog.tmp* +*.inc +*.dvi +*.mtc* +*.idx +ProgramOutput* +ErrorOutput* +CompilerOutput* +error.txt +*.ncb +*.suo +contents.obv +.xvpics +semantic.cache +doc_ps +doc_html +doc_pdf +*.moc +.*~ +*~ +.#* +*.user +*.aps +doc_doxygen +CMakeCache.txt +CMakeFiles +cmake_install.cmake +Doxyfile +*.dir +ALL_BUILD.vcproj +ZERO_CHECK.vcproj +gmon.* +.qglviewer.xml +*.moc_parameters +*.cpp_parameters +*_moc.cpp +ui_*.h +qrc_*.cxx +*.sbr +.dir-locals.el +*.tmp +*.ilk +*.pdb +*.exe.* +Makefile +*.cpp.noheader +*.h.noheader +*.h.filename +*.cpp.filename +.scm-urls +*.exp +*.resource.txt +*.manifest +*.manifest.res +*.vcproj +*.sln +*.depends diff --git a/Maintenance/git/global-gitignore b/Maintenance/git/global-gitignore deleted file mode 100644 index 4b336031f29..00000000000 --- a/Maintenance/git/global-gitignore +++ /dev/null @@ -1,84 +0,0 @@ -*.bak -*.bk? -*.old -.DS_Store -*.a -*.o -*.lib -*.dll -*.exe -*.so -*.so.* -debug -release -Debug -Release -x64 -*.blg -*.cgallog -*.aux -*.maf -*.hax -*.hlg -*.ilg -*.pdflg -*.log - -*.toc -*.cgallog.tmp* -*.inc -*.dvi -*.mtc* -*.idx -ProgramOutput* -ErrorOutput* -CompilerOutput* -error.txt -*.ncb -*.suo -contents.obv -.xvpics -semantic.cache -doc_ps -doc_html -doc_pdf -*.moc -.*~ -*~ -.#* -*.user -*.aps -doc_doxygen -CMakeCache.txt -CMakeFiles -cmake_install.cmake -Doxyfile -*.dir -ALL_BUILD.vcproj -ZERO_CHECK.vcproj -gmon.* -.qglviewer.xml -*.moc_parameters -*.cpp_parameters -*_moc.cpp -ui_*.h -qrc_*.cxx -*.sbr -.dir-locals.el -*.tmp -*.ilk -*.pdb -*.exe.* -Makefile -*.cpp.noheader -*.h.noheader -*.h.filename -*.cpp.filename -.scm-urls -*.exp -*.resource.txt -*.manifest -*.manifest.res -*.vcproj -*.sln -*.depends From 14221e947f5e73166be09b384a57240cce446926 Mon Sep 17 00:00:00 2001 From: Laurent Rineau Date: Thu, 15 Nov 2012 16:32:22 +0100 Subject: [PATCH 157/157] Display the branch name in all test result pages --- Testsuite/test/collect_cgal_testresults_from_cmake | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Testsuite/test/collect_cgal_testresults_from_cmake b/Testsuite/test/collect_cgal_testresults_from_cmake index 905a3d4d804..918323d3cea 100755 --- a/Testsuite/test/collect_cgal_testresults_from_cmake +++ b/Testsuite/test/collect_cgal_testresults_from_cmake @@ -298,6 +298,9 @@ for DIR in $TEST_DIRECTORIES ; do echo " Test files from:" >> "$TEST_REPORT" cat .scm-urls >> "$TEST_REPORT" echo >> "$TEST_REPORT" + elif [ -f ../../.scm-branch ]; then + cat ../../.scm-branch >> "$TEST_REPORT" + echo >> "$TEST_REPORT" fi if [ ! -f ErrorOutput_${CGAL_TEST_PLATFORM} ] ; then