Merge branch 'master' into Scripts-simplify_user_scripts-GF

This commit is contained in:
Laurent Rineau 2019-06-06 10:11:23 +02:00
commit a6514fdfad
706 changed files with 166869 additions and 9932 deletions

View File

@ -33,14 +33,14 @@ env:
- PACKAGE='OpenNL Optimal_transportation_reconstruction_2 Optimisation_basic '
- PACKAGE='Partition_2 Periodic_2_triangulation_2 Periodic_3_mesh_3 '
- PACKAGE='Periodic_3_triangulation_3 Periodic_4_hyperbolic_triangulation_2 Point_set_2 '
- PACKAGE='Point_set_3 Point_set_processing_3 Point_set_shape_detection_3 '
- PACKAGE='Poisson_surface_reconstruction_3 Polygon Polygon_mesh_processing '
- PACKAGE='Polyhedron Polyhedron_IO Polyline_simplification_2 '
- PACKAGE='Polynomial Polytope_distance_d Principal_component_analysis '
- PACKAGE='Principal_component_analysis_LGPL Profiling_tools Property_map '
- PACKAGE='QP_solver Random_numbers Ridges_3 '
- PACKAGE='Scale_space_reconstruction_3 Scripts SearchStructures '
- PACKAGE='Segment_Delaunay_graph_2 Segment_Delaunay_graph_Linf_2 Set_movable_separability_2 '
- PACKAGE='Point_set_3 Point_set_processing_3 Poisson_surface_reconstruction_3 '
- PACKAGE='Polygon Polygon_mesh_processing Polyhedron '
- PACKAGE='Polyhedron_IO Polyline_simplification_2 Polynomial '
- PACKAGE='Polytope_distance_d Principal_component_analysis Principal_component_analysis_LGPL '
- PACKAGE='Profiling_tools Property_map QP_solver '
- PACKAGE='Random_numbers Ridges_3 Scale_space_reconstruction_3 '
- PACKAGE='Scripts SearchStructures Segment_Delaunay_graph_2 '
- PACKAGE='Segment_Delaunay_graph_Linf_2 Set_movable_separability_2 Shape_detection '
- PACKAGE='Skin_surface_3 Snap_rounding_2 Solver_interface '
- PACKAGE='Spatial_searching Spatial_sorting STL_Extension '
- PACKAGE='Straight_skeleton_2 Stream_lines_2 Stream_support '
@ -55,7 +55,7 @@ env:
compiler: clang
install:
- echo "$PWD"
- if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi
- if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi
- /usr/bin/time -f 'Spend time of %C -- %E (real)' bash .travis/install.sh
- export CXX=clang++ CC=clang;
before_script:

View File

@ -12,7 +12,7 @@ function build_examples {
mkdir -p build-travis
cd build-travis
mytime cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" ..
mytime make -j2
mytime make -j2 VERBOSE=1
}
function build_tests {
@ -29,7 +29,7 @@ function build_demo {
;;
esac
mytime cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=ON -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${EXTRA_CXX_FLAGS}" ..
mytime make -j2
mytime make -j2 VERBOSE=1
}
old_IFS=$IFS
IFS=$' '
@ -116,7 +116,7 @@ cd $ROOT
fi
IFS=$old_IFS
if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$ARG" != Polyhedron_demo ]; then
if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ] && [ "$ARG" != Polyhedron_demo ]; then
DO_IGNORE=FALSE
. $ROOT/.travis/test_package.sh "$ROOT" "$ARG"
echo "DO_IGNORE is $DO_IGNORE"

View File

@ -81,7 +81,6 @@ Periodic_4_hyperbolic_triangulation_2
Point_set_2
Point_set_3
Point_set_processing_3
Point_set_shape_detection_3
Poisson_surface_reconstruction_3
Polygon
Polygon_mesh_processing
@ -103,6 +102,7 @@ SearchStructures
Segment_Delaunay_graph_2
Segment_Delaunay_graph_Linf_2
Set_movable_separability_2
Shape_detection
Skin_surface_3
Snap_rounding_2
Solver_interface

View File

@ -10,7 +10,7 @@ env:
compiler: clang
install:
- echo "$PWD"
- if [ -n "$TRAVIS_PULL_REQUEST" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi
- if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi
- /usr/bin/time -f 'Spend time of %C -- %E (real)' bash .travis/install.sh
- export CXX=clang++ CC=clang;
before_script:

View File

@ -130,7 +130,7 @@ We define the *plausibility* grade \f$ p(t) \f$ as \f$ 1/r_t \f$, if
Let's have a look at the figure below.
\cgalFigureBegin{figAFSRplausible,wedges.png}
Plausibility. Triangle `t'` and incidident triangles sharing edge `e` seen from the side.
Plausibility. Triangle `t'` and incident triangles sharing edge `e` seen from the side.
\cgalFigureEnd
\f$ \alpha_\mathrm{sliver}\f$ corresponds to the red wedge. The algorithm will never select triangle `t1`
@ -277,7 +277,7 @@ provide piecewise-planar or hybrid reconstruction as described in
\cgalCite{cgal:la-srpss-13}. Two other algorithms available in \cgal
must be applied first as a preprocessing to the point set:
- \ref Chapter_Point_Set_Shape_Detection "Shape detection": detect planar sections of the input.
- \ref Chapter_Shape_Detection "Shape detection": detect planar sections of the input.
- \ref Point_set_processing_3Structuring "Point set structuring":
resample the planar sections and edges and corners detected among

View File

@ -10,5 +10,5 @@ Triangulation_3
Number_types
Surface_mesh
Polyhedron
Point_set_shape_detection_3
Shape_detection
Point_set_processing_3

View File

@ -4,7 +4,7 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Point_with_normal_3.h>
#include <CGAL/Shape_detection_3.h>
#include <CGAL/Shape_detection/Efficient_RANSAC.h>
#include <CGAL/structure_point_set.h>
#include <CGAL/Delaunay_triangulation_3.h>
#include <CGAL/Triangulation_vertex_base_with_info_3.h>
@ -22,10 +22,10 @@ typedef CGAL::First_of_pair_property_map<Point_with_normal> Point_map;
typedef CGAL::Second_of_pair_property_map<Point_with_normal> Normal_map;
// Efficient RANSAC types
typedef CGAL::Shape_detection_3::Shape_detection_traits
typedef CGAL::Shape_detection::Efficient_RANSAC_traits
<Kernel, Pwn_vector, Point_map, Normal_map> Traits;
typedef CGAL::Shape_detection_3::Efficient_RANSAC<Traits> Efficient_ransac;
typedef CGAL::Shape_detection_3::Plane<Traits> Plane;
typedef CGAL::Shape_detection::Efficient_RANSAC<Traits> Efficient_ransac;
typedef CGAL::Shape_detection::Plane<Traits> Plane;
// Point set structuring type
typedef CGAL::Point_set_with_structure<Kernel> Structure;
@ -37,7 +37,7 @@ typedef CGAL::Triangulation_data_structure_3<LVb,LCb> Tds;
typedef CGAL::Delaunay_triangulation_3<Kernel,Tds> Triangulation_3;
typedef Triangulation_3::Vertex_handle Vertex_handle;
typedef std::array<std::size_t,3> Facet;
typedef CGAL::cpp11::array<std::size_t,3> Facet;
// Functor to init the advancing front algorithm with indexed points
@ -151,8 +151,8 @@ int main (int argc, char* argv[])
op.cluster_epsilon, // Same parameter as RANSAC
CGAL::parameters::point_map (Point_map()).
normal_map (Normal_map()).
plane_map (CGAL::Shape_detection_3::Plane_map<Traits>()).
plane_index_map(CGAL::Shape_detection_3::Point_to_shape_index_map<Traits>(points, planes)));
plane_map (CGAL::Shape_detection::Plane_map<Traits>()).
plane_index_map(CGAL::Shape_detection::Point_to_shape_index_map<Traits>(points, planes)));
for (std::size_t i = 0; i < pss.size(); ++ i)

View File

@ -145,7 +145,7 @@ but does not provide any arithmetic operations.
As for algebraic structures this concept is also traits class oriented.
The main functionality related to `RealEmbeddable` is gathered in
the class `Real_embeddable_traits`. In particular, it porivdes the boolean
the class `Real_embeddable_traits`. In particular, it provides the boolean
tag `Is_real_embeddable` indicating whether a type is a model of
`RealEmbeddable`. The comparison operators are required to be realized via
\cpp operator overloading.

View File

@ -3,7 +3,7 @@
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
\cgalConcept
This is the most basic concept for algebraic structures considered within CGAL.
This is the most basic concept for algebraic structures considered within \cgal.
A model `IntegralDomainWithoutDivision` represents an integral domain,
i.e.\ commutative ring with 0, 1, +, * and unity free of zero divisors.

View File

@ -27,6 +27,7 @@
#ifndef CGAL_SCALAR_FACTOR_TRAITS_H
#define CGAL_SCALAR_FACTOR_TRAITS_H
#include <CGAL/assertions.h>
#include <CGAL/Algebraic_structure_traits.h>
/*! \file NiX/Scalar_factor_traits.h

View File

@ -28,10 +28,10 @@
// within this file AS ^= Type
#include <CGAL/basic.h>
#include <CGAL/Algebraic_structure_traits.h>
//#include <CGAL/Real_embeddable_traits.h>
#include <CGAL/number_utils.h>
#include <CGAL/assertions.h>
#include <CGAL/use.h>
#include <boost/type_traits.hpp>

View File

@ -24,7 +24,6 @@
// within this file FT ^= Fraction_traits<T>
#include <CGAL/basic.h>
#include <cassert>
#include <CGAL/to_rational.h>
#include <CGAL/use.h>

View File

@ -24,7 +24,6 @@
// within this file FT ^= Fraction_traits<T>
#include <CGAL/basic.h>
#include <cassert>
#include <CGAL/to_rational.h>

View File

@ -24,8 +24,6 @@
// \brief provides test functions for the \c RealEmbeddable concept of
// number types.
#include <CGAL/basic.h>
#include <cstddef>
#include <CGAL/assertions.h>
#include <boost/type_traits.hpp>

View File

@ -1,4 +1,3 @@
#include <CGAL/basic.h>
#include <CGAL/use.h>
#include <CGAL/Algebraic_extension_traits.h>
#include <CGAL/Sqrt_extension.h>

View File

@ -1,4 +1,3 @@
#include <CGAL/basic.h>
#include <CGAL/use.h>
#include <CGAL/Algebraic_structure_traits.h>
#include <cassert>

View File

@ -17,7 +17,7 @@
// ----------------------------------------------------------------------------
//
// Library : CGAL
// File : test/Chinese_remaminder_test.C
// File : test/Chinese_remaminder_traits.cpp
// CGAL_release : $Name: $
// Revision : $Revision$
// Revision_date : $Date$
@ -29,7 +29,6 @@
// ============================================================================
#undef NDEBUG
#include <CGAL/basic.h>
#include <CGAL/Chinese_remainder_traits.h>
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/CORE_arithmetic_kernel.h>
@ -171,7 +170,7 @@ int main(){
#ifdef CGAL_USE_CORE
test_CR<CGAL::CORE_arithmetic_kernel>();
#endif // Lis_HAVE_CORE
#endif // CGAL_USE_CORE
return 0;
}

View File

@ -1,5 +1,5 @@
#include <CGAL/basic.h>
#include <CGAL/use.h>
#include <CGAL/assertions.h>
#include <CGAL/Coercion_traits.h>
#include <cassert>
int main(){

View File

@ -1,4 +1,3 @@
#include <CGAL/basic.h>
#include <CGAL/use.h>
#include <CGAL/Real_embeddable_traits.h>
#include <cassert>

View File

@ -1,5 +1,5 @@
#include <CGAL/basic.h>
#include <CGAL/use.h>
#include <CGAL/int.h>
#include <CGAL/Scalar_factor_traits.h>
#include <cassert>

View File

@ -20,7 +20,6 @@
//
// ============================================================================
#include <CGAL/basic.h>
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Algebraic_structure_traits.h>
#include <cassert>

View File

@ -21,7 +21,6 @@
//
// ============================================================================
#include <CGAL/basic.h>
#include <cassert>
#include <CGAL/ipower.h>

View File

@ -110,7 +110,7 @@ namespace CGAL {
int pos_next_factor;
// Unsuccessfull shear factors
// Unsuccessful shear factors
std::set<Int> bad_shears;
};

View File

@ -18,7 +18,6 @@
#define CGAL_AK_ENABLE_DEPRECATED_INTERFACE 1
#include <CGAL/Algebraic_kernel_d/flags.h>
#include <CGAL/basic.h>
#include <CGAL/Arithmetic_kernel.h>

View File

@ -16,7 +16,6 @@
#define CGAL_TEST_ALL_AK_VARIANTS 1
#include <CGAL/basic.h>
#include <CGAL/Algebraic_kernel_d_1.h>
#include <CGAL/Algebraic_kernel_d/Algebraic_real_rep_bfi.h>
#include <CGAL/Algebraic_kernel_d/Algebraic_real_rep.h>

View File

@ -18,7 +18,6 @@
//#define CGAL_AK_ENABLE_DEPRECATED_INTERFACE 1
#include <CGAL/Algebraic_kernel_d/flags.h>
#include <CGAL/basic.h>
#include <CGAL/Arithmetic_kernel.h>

View File

@ -18,8 +18,6 @@
This is the test file for the class NiX::Algebraic_real_d_1.
*/
#include <CGAL/basic.h>
#include <cassert>
#include <CGAL/Arithmetic_kernel.h>

View File

@ -19,7 +19,6 @@
*/
#include <CGAL/basic.h>
#include <cassert>
// include these traits here by 'hand', since not in release 3.3

View File

@ -21,7 +21,6 @@
#endif
#endif
#include <CGAL/basic.h>
#include <sstream>

View File

@ -19,8 +19,6 @@
*/
#include <CGAL/basic.h>
// include these traits here by 'hand', since not in release 3.3
#include <CGAL/Algebraic_extension_traits.h>
#include <CGAL/Scalar_factor_traits.h>

View File

@ -24,7 +24,6 @@
#include <CGAL/basic.h>
#include <CGAL/Algebraic_kernel_d/Real_embeddable_extension.h>
#include <CGAL/Get_arithmetic_kernel.h>

View File

@ -13,8 +13,6 @@
#include <CGAL/Algebraic_kernel_d/flags.h>
#include <CGAL/basic.h>
#include <vector>
#include <CGAL/Arithmetic_kernel.h>

View File

@ -1,5 +1,5 @@
#include <CGAL/basic.h>
#include <CGAL/config.h>
#include <iostream>
#ifdef CGAL_HAS_CORE_ARITHMETIC_KERNEL

View File

@ -21,10 +21,12 @@
//
// ============================================================================
#include <CGAL/basic.h>
#include <cassert>
#include <CGAL/use.h>
#include <CGAL/IO/io.h>
#include <cassert>
#include <vector>
//#include <CGAL/_test_basic.h>
#ifndef CGAL_TEST_ALGEBRAIC_CURVE_KERNEL_2_H
#define CGAL_TEST_ALGEBRAIC_CURVE_KERNEL_2_H

View File

@ -21,7 +21,6 @@
//
// ============================================================================
#include <CGAL/basic.h>
#include <cassert>
#include <CGAL/use.h>
#include <CGAL/Test/_test_real_embeddable.h>
@ -339,7 +338,7 @@ void test_algebraic_kernel_1(const AlgebraicKernel_d_1& ak_1){
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
// we basically test a quadratic polynomial (with chosen 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));

View File

@ -20,7 +20,6 @@
//
// ============================================================================
#include <CGAL/basic.h>
#include <cassert>
#include <algorithm>

View File

@ -24,8 +24,6 @@
// #include <CGAL/Algebraic_curve_kernel_2/flags.h>
#include <CGAL/basic.h>
#include <sstream>
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Algebraic_kernel_d/Real_embeddable_extension.h>

View File

@ -31,12 +31,8 @@
#ifndef CGAL_TEST_REAL_COMPARABLE_H
#define CGAL_TEST_REAL_COMPARABLE_H
#include <CGAL/basic.h>
#include <cassert>
#include <CGAL/tags.h>
/*#include <NiX/basic.h>
#include <NiX/NT_traits.h>
#include <NiX/number_type_utils.h>*/
#include <cstddef>
#include <CGAL/assertions.h>
#include <boost/type_traits.hpp>

View File

@ -23,7 +23,6 @@
// TODO: The comments are all original EXACUS comments and aren't adapted. So
// they may be wrong now.
#include <CGAL/basic.h>
#include <cassert>
#include <vector>

View File

@ -5,10 +5,8 @@
#include <fstream>
#include <cassert>
#if defined CGAL_USE_LEDA
# include <CGAL/leda_real.h>
#elif defined CGAL_USE_CORE
# include <CGAL/CORE_Expr.h>
#if defined(CGAL_USE_CORE) || defined(CGAL_USE_LEDA)
# include <CGAL/Exact_algebraic.h>
#endif
// *** WARNING ***
@ -18,13 +16,10 @@
// benchmarking the Apollonius_graph_filtered_traits_2<> class should
// be used.
#if defined CGAL_USE_LEDA
#if defined(CGAL_USE_CORE) || defined(CGAL_USE_LEDA)
// If LEDA is present use leda_real as the exact number type
typedef leda_real NT;
#elif defined CGAL_USE_CORE
// Otherwise if CORE is present use CORE's Expr as the exact number type
typedef CORE::Expr NT;
typedef CGAL::Exact_algebraic NT;
#else

View File

@ -386,7 +386,7 @@ public:
// both circles exist
// check whether the shadow region is connected, i.e., wether it is
// check whether the shadow region is connected, i.e., whether it is
// of the form (a, b) or (-oo, a) U (b, +oo)
Bitangent_line bl_12(p1, p2);
@ -524,7 +524,7 @@ public:
// both circles exist
// check whether the shadow region is connected, i.e., wether it is
// check whether the shadow region is connected, i.e., whether it is
// of the form (a, b) or (-oo, a) U (b, +oo)
Bitangent_line bl_12(p1, p2);

View File

@ -383,7 +383,7 @@ public:
// both circles exist
// check whether the shadow region is connected, i.e., wether it is
// check whether the shadow region is connected, i.e., whether it is
// of the form (a, b) or (-oo, a) U (b, +oo)
Bitangent_line bl_12(p1, p2);
@ -507,7 +507,7 @@ public:
// both circles exist
// check whether the shadow region is connected, i.e., wether it is
// check whether the shadow region is connected, i.e., whether it is
// of the form (a, b) or (-oo, a) U (b, +oo)
Bitangent_line bl_12(p1, p2);
@ -581,7 +581,7 @@ public:
// both circles exist
// check whether the shadow region is connected, i.e., wether it is
// check whether the shadow region is connected, i.e., whether it is
// of the form (a, b) or (-oo, a) U (b, +oo)
return !b;

View File

@ -60,9 +60,20 @@ protected:
// }
inline static
FT divide(const FT& x, const FT& y) {
return CGAL::integral_division(x,y);
FT divide(const FT& x, const FT& y, Integral_domain_without_division_tag) {
return FT(CGAL::to_double(x) / CGAL::to_double(y));
}
inline static
FT divide(const FT& x, const FT& y, Field_tag) {
return x / y;
}
inline static
FT divide(const FT& x, const FT& y) {
return divide(x,y, typename AST::Algebraic_category());
}
inline static
FT sqrt(const FT& x, Integral_domain_without_division_tag) {
return CGAL::sqrt(CGAL::to_double(x));
@ -98,6 +109,7 @@ protected:
return sqrt( distance2(p1, p2) );
}
inline static
FT distance(const Point_2& p, const Line_2& l)
{
@ -105,6 +117,8 @@ protected:
sqrt( CGAL::square(l.a()) + CGAL::square(l.b()) ) );
}
// instance stuff
Point_2 c;
Line_2 l;
@ -136,8 +150,8 @@ protected:
std::vector< Point_2 > p;
if ( l.a() == ZERO ) {
FT y = d2 * CGAL::sign(l.b()) - divide(l.c(), l.b());
if ( l.a() == FT(0) ) {
FT y = d2 * int(CGAL::sign(l.b())) - divide(l.c(), l.b());
FT C = CGAL::square(y) - FT(2) * c.y() * y +
CGAL::square(c.x()) + CGAL::square(c.y()) - d1;

View File

@ -26,8 +26,6 @@
#ifndef CGAL_NULL_OUTPUT_STREAM_H
#define CGAL_NULL_OUTPUT_STREAM_H
#include <CGAL/basic.h>
namespace CGAL {

View File

@ -1,7 +1,6 @@
#ifndef CGAL_APOLLONIUS_GRAPH_2_TEST_H
#define CGAL_APOLLONIUS_GRAPH_2_TEST_H
#include <CGAL/basic.h>
#include <cassert>
#include <CGAL/enum.h>
#include <CGAL/use.h>

View File

@ -1,4 +1,3 @@
#include <CGAL/basic.h>
#include <iostream>
#include <fstream>

View File

@ -1,4 +1,3 @@
#include <CGAL/basic.h>
#include <iostream>
#include <fstream>

View File

@ -1,5 +1,5 @@
#include <iostream>
#include <CGAL/basic.h>
#include <CGAL/Arithmetic_kernel.h>
#if defined(CGAL_HAS_DEFAULT_ARITHMETIC_KERNEL)

View File

@ -1,5 +1,4 @@
#include <iostream>
#include <CGAL/basic.h>
#include <CGAL/CORE_arithmetic_kernel.h>

View File

@ -1,5 +1,5 @@
#include <iostream>
#include <CGAL/basic.h>
#include <CGAL/GMPXX_arithmetic_kernel.h>
#ifdef CGAL_USE_GMPXX

View File

@ -1,5 +1,5 @@
#include <iostream>
#include <CGAL/basic.h>
#include <CGAL/GMP_arithmetic_kernel.h>
#ifdef CGAL_HAS_GMP_ARITHMETIC_KERNEL

View File

@ -1,6 +1,6 @@
#include <iostream>
#include <CGAL/basic.h>
#include <CGAL/Arithmetic_kernel.h>
#include <CGAL/Get_arithmetic_kernel.h>
#include <CGAL/use.h>

View File

@ -1,5 +1,5 @@
#include <iostream>
#include <CGAL/basic.h>
#include <CGAL/LEDA_arithmetic_kernel.h>
#ifdef CGAL_HAS_LEDA_ARITHMETIC_KERNEL

View File

@ -26,7 +26,7 @@
#ifndef CGAL_TEST_ARITHMETIC_KERNEL_H
#define CGAL_TEST_ARITHMETIC_KERNEL_H
#include <CGAL/basic.h>
#include <CGAL/Test/_test_coercion_traits.h>
namespace CGAL {

View File

@ -125,7 +125,7 @@
pair of begin/end functions can be changed, so that they return a range of
objects that represent either edges or vertices.
The second problem can be fixed by introducing a heirarchy of 2 layers
The second problem can be fixed by introducing a hierarchy of 2 layers
to the arrangement with history. The top layer represent the split of
general curves into x-monotone curves, and the one below represents the
split at intersection points. As a response to a user request for the items

View File

@ -7,7 +7,7 @@ Curve_analyser INPUT "P[6(0,P[6(0,34186452217925)(1,-47333108912824)(2,859012718
// Same with some content
Curve_analyser INPUT "P[6(0,P[10(0,239305165525475)(1,-433891119043543)(2,-105547852922974)(3,544084567642102)(4,-168636318668897)(5,-121992740815323)(6,34879008294620)(7,11799206430140)(8,-36175872)(9,85786624)(10,33947648)])(1,P[9(0,-54239848065004)(1,99913497126828)(2,19760931822856)(3,-122064771317912)(4,42619705096452)(5,24317888697724)(6,-8140916911648)(7,-2166674406544)(8,128057344)(9,59899904)])(2,P[8(0,7433741935312)(1,-9062611931072)(2,-7038911122368)(3,10741692910944)(4,-394721728272)(5,-1679188229536)(6,-164069376)(7,107249664)(8,54984704)])(3,P[7(0,-218665076224)(1,264879835136)(2,207970109440)(3,-313676665856)(4,10561338880)(5,48743222272)(6,133627904)(7,53608448)])(4,P[6(0,68812800)(1,23724032)(2,52953088)(3,-109314048)(4,-168689664)(5,85590016)(6,46923776)])(5,P[5(1,219054080)(2,-93880320)(3,-281640960)(4,93880320)(5,62586880)])(6,P[4(0,28672000)(1,-12288000)(2,-36864000)(3,12288000)(4,8192000)])]"
hmm smth realy heavy...
hmm smth really heavy...
P[34(0,P[34(0,12952101536523102192492711540000000)(1,-84147098480789650665250232160000000)(2,-69088664533801811202671946450000000)(3,-12990598879942044092505125010000000)(4,27052642714728288021127698670000000)(5,26683266093731013401148721880000000)(6,5372171464167151111739335793000000)(7,-8934425711222817088377016721000000)(8,-8465742196405103553796952613000000)(9,-1737345552069859077855633714000000)(10,2393898184518898797964635987000000)(11,2234406641615936885853597509000000)(12,479873852041504440602579852100000)(13,-547557654615450328195988452500000)(14,-514849404082170848294946339800000)(15,-115417366169449334489378073500000)(16,113234224818672992436814644400000)(17,107962164812116405549461548900000)(18,25135425283858380820959007860000)(19,-21694664362506393046334314800000)(20,-21025627462526285456489755280000)(21,-5057323915115735386146156273000)(22,3901460484323335482987702100000)(23,3846534854318572165730297444000)(24,950752053910955172204451437900)(25,-665241246757279897517641949200)(26,-666960287213849591322741077200)(27,-168596633306616989111809611900)(28,108415065221291211390422093200)(29,110420084629074642463546936400)(30,28431730759059073988652406240)(31,-16992776198434916741021022360)(32,-17557477656685153453414375500)(33,-4588689239444215584479993393)(34,2574250362779616822482848012)])(2,P[0(0,-123917486647761741318703576800000000)])(4,P[0(0,79246903881551255661144190100000000)])(6,P[0(0,2186663392639010037975810829000000)])(8,P[0(0,-30912413603643981961132659450000000)])(10,P[0(0,22784177877224038711887972820000000)])(12,P[0(0,-8699274014787859551101246025000000)])(14,P[0(0,836940561843498171726587625200000)])(16,P[0(0,1367060050733175030564444040000000)])(18,P[0(0,-1171114486352462799313004128000000)])(20,P[0(0,567955949125204086770735562700000)])(22,P[0(0,-181911283701056707932126214300000)])(24,P[0(0,25732945948997554536421517900000)])(26,P[0(0,13209567106923403694087544950000)])(28,P[0(0,-13184322903675827636908029720000)])(30,P[0(0,6798109015505303221533146500000)])(32,P[0(0,-2528588426392935931038968129000)])(34,P[0(0,669962430844565364862639688900)])]
Maldenbrot's curve: 0 segments ?

View File

@ -782,7 +782,7 @@ ability to answer such queries effectively.
The `Arrangement_2` class template does not support point-location
queries directly, as the arrangement representation is decoupled from
the geometric algorithms that operate on it. The <I>2D Arrangements</I>
package includes a set of classe templates that are capable of
package includes a set of class templates that are capable of
answering such queries; all are models of the concept
`ArrangementPointLocation_2`. Each model employs a different
algorithm or <I>strategy</I> for answering queries. A model of this

View File

@ -43,6 +43,8 @@
#include <boost/variant.hpp>
#include <CGAL/Arr_tags.h>
#include <vector>
namespace CGAL {
namespace VariantFunctors{

View File

@ -590,7 +590,7 @@ private:
* \param cache Caches the vertical tangency points and intersection points.
* \param ipts Output: A vector of intersection points + multiplicities.
* \param ovlp_cv Output: An overlapping subcurve (if exists).
* \return Whether an overlap has occured.
* \return Whether an overlap has occurred.
*/
bool _intersect (const Self& cv,
Intersection_map& inter_map,
@ -1488,14 +1488,14 @@ bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_is_in_range
if ((p_gt_ps && p_lt_pt) || (p_lt_ps && p_gt_pt))
{
// The point p is definately in the x-range of the subcurve, as its
// The point p is definitely in the x-range of the subcurve, as its
// parameter is between the source and target parameters.
return (true);
}
if ((p_lt_ps && p_lt_pt) || (p_gt_ps && p_gt_pt))
{
// The point p is definately not in the x-range of the subcurve,
// The point p is definitely not in the x-range of the subcurve,
// as its parameter is smaller than both source and target parameter
// (or greater than both of them).
return (false);
@ -1562,14 +1562,14 @@ bool _Bezier_x_monotone_2<RatKer, AlgKer, NtTrt, BndTrt>::_is_in_range
if ((p_gt_ps && p_lt_pt) || (p_lt_ps && p_gt_pt))
{
// The point p is definately in the x-range of the subcurve, as its
// The point p is definitely in the x-range of the subcurve, as its
// parameter is between the source and target parameters.
return (true);
}
if ((p_lt_ps && p_lt_pt) || (p_gt_ps && p_gt_pt))
{
// The point p is definately not in the x-range of the subcurve,
// The point p is definitely not in the x-range of the subcurve,
// as its parameter is smaller than both source and target parameter
// (or greater than both of them).
return (false);

View File

@ -42,7 +42,7 @@ namespace CGAL {
/*! \class
* A class that answers nearest neighbor queries.
* It recieves a set of points, and builds a kd-tree for them.
* It receives a set of points, and builds a kd-tree for them.
* Given a query point, it finds the closest point to the query.
*/
template <typename Arrangement_>

View File

@ -719,7 +719,7 @@ public:
m_traits->construct_min_vertex_2_object()( ce2.cv()) :
m_traits->construct_max_vertex_2_object()( ce2.cv()) ),
ce1.cv(), ce1.ce());
//need to return the opposite because the function recieved
//need to return the opposite because the function received
// the curve ends in a reverse order
if (res != EQUAL)
return (res == SMALLER) ? LARGER : SMALLER;

View File

@ -1899,7 +1899,7 @@ public:
return old;
}
//This method occasionaly(!) checks the guarantees
//This method occasionally(!) checks the guarantees
// It is currently not in use, since the guarantees are constantly checked in O(1) time
bool needs_update()
{

View File

@ -878,7 +878,7 @@ public:
// The left point of the current subcurve of one polycurve
// coincides with the current subcurve of the other polycurve.
if (left_overlap) {
// An overlap occured at the previous iteration:
// An overlap occurred at the previous iteration:
// Output the overlapping polycurve.
CGAL_assertion(ocv.number_of_subcurves() > 0);
*oi++ = make_object(ocv);
@ -887,7 +887,7 @@ public:
else {
// The left point of the current subcurve of one
// polycurve coincides with the current subcurve of the
// other polycurve, and no overlap occured at the
// other polycurve, and no overlap occurred at the
// previous iteration: Output the intersection
// point. The derivative of at least one of the
// polycurves is not defined at this point, so we give

View File

@ -251,7 +251,7 @@ public:
if (is_vertical(xcv1)) return (is_vertical(xcv2)) ? EQUAL : SMALLER;
else if (is_vertical(xcv2)) return (LARGER);
// Perform the comparison based on the existance of bounded left
// Perform the comparison based on the existence of bounded left
// endpoints.
if (has_left1 && has_left2) {
// Obtain the left endpoints of xcv1 and xcv2.

View File

@ -240,7 +240,7 @@ void insert(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
/*! Insert a range of x-monotone curves into an empty arrangement
* \param arr the resulting arrangement
* \param begin the begining of the curve range
* \param begin the beginning of the curve range
* \param end past-the-end curve range
*/
template <typename GeometryTraits_2, typename TopologyTraits,
@ -292,9 +292,9 @@ insert_empty(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>& arr,
/*! Insert a range of x-monotone curves and a range of isolated points into
* an empty arrangement
* \param arr the resulting arrangement
* \param begin_xcurves the begining of the curve range
* \param begin_xcurves the beginning of the curve range
* \param end_xcurves past-the-end curve range
* \param begin_points the begining of the point range
* \param begin_points the beginning of the point range
* \param end_points past-the-end point range
*/
template <typename GeometryTraits_2, typename TopologyTraits,
@ -346,7 +346,7 @@ void insert_empty(Arrangement_on_surface_2<GeometryTraits_2, TopologyTraits>&
/*! Insert a range of x-monotone curves into a non-empty arrangement
* \param arr the resulting arrangement
* \param begin the begining of the curve range
* \param begin the beginning of the curve range
* \param end past-the-end curve range
*/
template <typename GeometryTraits_2, typename TopologyTraits,
@ -837,7 +837,7 @@ insert_non_intersecting_curve
/*! Insert a range of x-monotone curves into an empty arrangement
* \param arr the resulting arrangement
* \param begin the begining of the curve range
* \param begin the beginning of the curve range
* \param end past-the-end curve range
*/
template <typename GeometryTraits_2, typename TopologyTraits,
@ -886,7 +886,7 @@ void non_intersecting_insert_empty(Arrangement_on_surface_2<GeometryTraits_2,
/*! Insert a range of x-monotone curves into an empty arrangement
* \param arr the resulting arrangement
* \param begin the begining of the curve range
* \param begin the beginning of the curve range
* \param end past-the-end curve range
*/
template <typename GeometryTraits_2, typename TopologyTraits,
@ -937,7 +937,7 @@ void non_intersecting_insert_empty(Arrangement_on_surface_2<GeometryTraits_2,
/*! Insert a range of x-monotone curves into a non-empty arrangement
* \param arr the resulting arrangement
* \param begin the begining of the curve range
* \param begin the beginning of the curve range
* \param end past-the-end curve range
*/
template <typename GeometryTraits_2, typename TopologyTraits,

View File

@ -1791,7 +1791,7 @@ Arrangement_on_surface_2<GeomTraits, TopTraits>::
remove_edge(Halfedge_handle e, bool remove_source, bool remove_target)
{
// Comment EBEB 2012-08-06: this has become a simple forwarding function
// the intelligence of wether to swap he with he->opposite()
// the intelligence of whether to swap he with he->opposite()
// has been moved to _remove_edge itself, as additional computed
// data is reused there
@ -2495,7 +2495,7 @@ _insert_at_vertices(DHalfedge* he_to,
DInner_ccb* hole2 = (prev2->is_on_inner_ccb()) ? prev2->inner_ccb() : NULL;
if ((hole1 == hole2) && (hole1 != NULL)) {
// .. only in this special case, we have to check wether swapping should
// .. only in this special case, we have to check whether swapping should
// take place
// EBEB 2012-07-26 the following code enables optimizations:
@ -4245,7 +4245,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
}
else {
// If f1 == f2 (same_face-case), then we consider two loops that occur when
// he1 and he2 get removed; if f1 != f2, then he1 and he2 seperates the two
// he1 and he2 get removed; if f1 != f2, then he1 and he2 separates the two
// faces that will be merged upon their removal---here both he1 and he2
// belong to a full cycle, and THAT IS WHY we give the f1 == f2 test to
// determine whether end of loop should be he1->opposite() and
@ -4753,7 +4753,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
// As the outer CCB of f1 may be represented by any of the
// halfedges in between he1 -> ... -> he2 (the halfedges in between
// are on the new outer CCB we have just created), we represent the
// former outer CCB by prev1, which definately stays on it.
// former outer CCB by prev1, which definitely stays on it.
oc1->set_halfedge(prev1);
// Notify the observers that a new outer CCB has been formed.

View File

@ -511,7 +511,7 @@ public:
};
//! checks wether and how two arcs are intersection - with first filtering
//! checks whether and how two arcs are intersection - with first filtering
template < class CurvedKernelViaAnalysis_2, class FunctorBase >
class Intersect_2 :
public FunctorBase::Intersect_2 {

View File

@ -1200,7 +1200,7 @@ Lexit:
} // while(!s_stack.empty())
std::reverse(rev_points.begin(), rev_points.end());
// resize rev_points to accomodate the size of points vector
// resize rev_points to accommodate the size of points vector
unsigned rsize = rev_points.size();
rev_points.resize(rsize + points.size());
std::copy(points.begin(), points.end(), rev_points.begin() + rsize);

View File

@ -251,7 +251,7 @@ namespace CGAL {
{
formatter.read_face_begin();
// Allocate a new face and determine whether it is unbounded and wether it
// Allocate a new face and determine whether it is unbounded and whether it
// is valid (non-fictitious).
DFace* new_f = m_arr_access.new_face();
const bool is_unbounded = (formatter.read_vertex_index() != 0);

View File

@ -514,7 +514,7 @@ public:
}
/*!
* Get the arrow drawing mode (this mode is relevent when drawing segments,
* Get the arrow drawing mode (this mode is relevant when drawing segments,
* polylines, circular arcs or splines).
*/
Fig_arrow_mode arrow_mode () const

View File

@ -5,7 +5,6 @@
#include <list>
#include <utility>
#include <CGAL/basic.h>
#include <CGAL/Arr_batched_point_location.h>
#include <CGAL/Arr_point_location_result.h>

View File

@ -6,7 +6,7 @@
#include <string>
#include <algorithm>
#include <CGAL/basic.h>
#include <CGAL/Timer.h>
#include <CGAL/Arr_tags.h>
#include <CGAL/Arrangement_on_surface_2.h>

View File

@ -6,7 +6,7 @@
#include <string>
#include <algorithm>
#include <CGAL/basic.h>
#include <CGAL/Timer.h>
#include <CGAL/Arrangement_on_surface_2.h>
#include <CGAL/Arr_overlay_2.h>

View File

@ -1,7 +1,6 @@
#ifndef CGAL_POINT_LOCATION_DYNAMIC_TEST_H
#define CGAL_POINT_LOCATION_DYNAMIC_TEST_H
#include <CGAL/basic.h>
#include "Point_location_test.h"

View File

@ -16,7 +16,6 @@
#include <vector>
#include <CGAL/basic.h>
#include <CGAL/Timer.h>
#include <CGAL/Arrangement_on_surface_2.h>
#include <CGAL/Arr_naive_point_location.h>

View File

@ -1,7 +1,6 @@
#ifndef SEGMENT_READER_H
#define SEGMENT_READER_H
#include <CGAL/basic.h>
#include <CGAL/Bbox_2.h>
#include <iostream>
#include <fstream>

View File

@ -1,7 +1,6 @@
#ifndef CGAL_TRAITS_BASE_TEST_H
#define CGAL_TRAITS_BASE_TEST_H
#include <CGAL/basic.h>
#include <iostream>
#include <fstream>

View File

@ -1,7 +1,6 @@
#ifndef CGAL_TRAITS_TEST_H
#define CGAL_TRAITS_TEST_H
#include <CGAL/basic.h>
#include <iostream>
#include <fstream>

View File

@ -5,7 +5,7 @@
#include <list>
#include <utility>
#include <CGAL/basic.h>
#include <CGAL/Arr_vertical_decomposition_2.h>
#include <CGAL/Arr_point_location_result.h>

View File

@ -70,7 +70,11 @@ set(CGAL_GMPZ_NT 14)
set(CORE_INT_NT 15)
set(CORE_RAT_NT 16)
if($ENV{CGAL_DISABLE_GMP})
if(CGAL_DISABLE_GMP)
set(CGAL_DISABLE_GMP ON)
endif()
if(CGAL_DISABLE_GMP)
message(STATUS "GMP is disable. Try to use LEDA instead.")
set(GMPZ_NT ${LEDA_INT_NT})
set(QUOTIENT_CGAL_GMPZ_NT ${LEDA_RAT_NT})
@ -894,7 +898,7 @@ endfunction()
#---------------------------------------------------------------------#
function(test_polycurve_conic_traits)
# echo polycurve test starting
if($ENV{CGAL_DISABLE_GMP})
if(CGAL_DISABLE_GMP)
MESSAGE(STATUS "test_polycurve_conic_traits requires CORE and will not be executed")
return()
endif()
@ -965,7 +969,7 @@ endfunction()
# polycurve bezier traits
#---------------------------------------------------------------------#
function(test_polycurve_bezier_traits)
if($ENV{CGAL_DISABLE_GMP})
if(CGAL_DISABLE_GMP)
MESSAGE(STATUS "test_polycurve_bezier_traits requires CORE and will not be executed")
return()
endif()
@ -1074,7 +1078,7 @@ endfunction()
# conic traits
#---------------------------------------------------------------------#
function(test_conic_traits)
if($ENV{CGAL_DISABLE_GMP})
if(CGAL_DISABLE_GMP)
MESSAGE(STATUS "test_conic_traits requires CORE and will not be executed")
return()
endif()
@ -1205,7 +1209,7 @@ endfunction()
# bezier traits
#---------------------------------------------------------------------#
function(test_bezier_traits)
if($ENV{CGAL_DISABLE_GMP})
if(CGAL_DISABLE_GMP)
MESSAGE(STATUS "test_bezier_traits requires CORE and will not be executed")
return()
endif()
@ -1252,7 +1256,7 @@ endfunction()
# rational arc traits
#---------------------------------------------------------------------#
function(test_rational_arc_traits)
if($ENV{CGAL_DISABLE_GMP})
if(CGAL_DISABLE_GMP)
MESSAGE(STATUS "test_rational_arc_traits requires CORE and will not be executed")
return()
endif()
@ -1277,7 +1281,10 @@ endfunction()
#---------------------------------------------------------------------#
function(test_algebraic_traits_gmp)
#TODO: Adapt
if(CGAL_DISABLE_GMP)
MESSAGE(STATUS "test_traits_algebraic_traits_gmp requires GMP and will not be executed")
return()
endif()
set(nt ${CGAL_GMPZ_NT})
set(kernel ${UNIVARIATE_ALGEBRAIC_KERNEL})
set(geom_traits ${ALGEBRAIC_GEOM_TRAITS})
@ -1316,7 +1323,7 @@ endfunction()
#---------------------------------------------------------------------#
function(test_algebraic_traits_core)
#TODO: Adapt
if($ENV{CGAL_DISABLE_GMP})
if(CGAL_DISABLE_GMP)
MESSAGE(STATUS "test_algebraic_traits_core requires CORE and will not be executed")
return()
endif()

View File

@ -1751,7 +1751,7 @@ compile_and_run test_io
compile_and_run test_sgm
# if any error occured then append the full error description file to error file
# if any error occurred then append the full error description file to error file
if [ -f $FULL_ERROR_DESCRIPTION_FILE ] ; then
echo "******************** appending all error outputs ********************" >> $ERRORFILE

View File

@ -1,7 +1,7 @@
// Constructing an arrangement of polycurves.
#include <CGAL/basic.h>
#include <CGAL/config.h>
#ifndef CGAL_USE_CORE
#include <iostream>
int main()

View File

@ -1,7 +1,7 @@
#include <iostream>
#include <boost/lexical_cast.hpp>
#include <CGAL/basic.h>
#include <CGAL/config.h>
#include "test_configuration.h"

View File

@ -1,4 +1,4 @@
#include <CGAL/basic.h>
#include <CGAL/config.h>
#ifndef CGAL_USE_CORE
#include <iostream>

View File

@ -1,7 +1,7 @@
// Constructing an arrangement of polycurves.
#include <CGAL/basic.h>
#include <CGAL/config.h>
#ifndef CGAL_USE_CORE
#include <iostream>
int main ()

View File

@ -1,6 +1,6 @@
// Testing the do_equal function
#include <CGAL/basic.h>
#include <CGAL/config.h>
#ifndef CGAL_USE_CORE
#include <iostream>
int main()

View File

@ -5,7 +5,7 @@
#include "test_configuration.h"
#include <CGAL/basic.h>
#include <CGAL/config.h>
#if ((TEST_GEOM_TRAITS == CORE_CONIC_GEOM_TRAITS) || \
(TEST_GEOM_TRAITS == BEZIER_GEOM_TRAITS) || \

View File

@ -32,7 +32,7 @@
#include "test_configuration.h"
#include <CGAL/basic.h>
#include <CGAL/config.h>
#if ((TEST_GEOM_TRAITS == CORE_CONIC_GEOM_TRAITS) || \
(TEST_GEOM_TRAITS == BEZIER_GEOM_TRAITS) || \

View File

@ -2,7 +2,7 @@
#include "test_configuration.h"
#include <CGAL/basic.h>
#include <CGAL/config.h>
#if ((TEST_GEOM_TRAITS == CORE_CONIC_GEOM_TRAITS) || \
(TEST_GEOM_TRAITS == BEZIER_GEOM_TRAITS) || \

View File

@ -2,7 +2,7 @@
#include "test_configuration.h"
#include <CGAL/basic.h>
#include <CGAL/config.h>
#if ((TEST_GEOM_TRAITS == CORE_CONIC_GEOM_TRAITS) || \
(TEST_GEOM_TRAITS == BEZIER_GEOM_TRAITS) || \

View File

@ -1,6 +1,6 @@
#include <iostream>
#include <CGAL/basic.h>
#include <CGAL/config.h>
#if !defined(CGAL_USE_CORE)
int main()

View File

@ -1,4 +1,4 @@
#include <CGAL/basic.h>
#include <cassert>
#include <iostream>

View File

@ -1,4 +1,4 @@
#include <CGAL/basic.h>
#include "test_configuration.h"
#include <iostream>

View File

@ -1,4 +1,4 @@
#include <CGAL/basic.h>
#include "test_configuration.h"
#include <iostream>

View File

@ -1,4 +1,3 @@
#include <CGAL/basic.h>
#include <iostream>
#include <cassert>

View File

@ -17,7 +17,7 @@
* Thus, a special treatment is required.
*/
#include <CGAL/basic.h>
#include <CGAL/config.h>
#ifndef CGAL_USE_CORE
#include <iostream>
@ -107,7 +107,7 @@ int main()
}
}
// If a failure has already occured, abort.
// If a failure has already occurred, abort.
if (result < 0) return result;
std::cout << std::endl;

View File

@ -17,7 +17,7 @@
* Thus, a special treatment is required.
*/
#include <CGAL/basic.h>
#include <CGAL/config.h>
#ifndef CGAL_USE_CORE
#include <iostream>
@ -106,7 +106,7 @@ int main()
}
}
// If a failure has already occured, abort.
// If a failure has already occurred, abort.
if (result < 0) return result;
std::cout << std::endl;

View File

@ -1,7 +1,6 @@
#include <iostream>
#include <boost/lexical_cast.hpp>
#include <CGAL/basic.h>
#include "test_configuration.h"

View File

@ -373,130 +373,152 @@ bool is_valid_face_descriptor( typename boost::graph_traits<FaceGraph>::face_des
template<typename Graph>
bool is_valid_halfedge_graph(const Graph& g, bool verb = false)
{
typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
typedef typename boost::graph_traits<Graph>::vertex_descriptor vertex_descriptor;
typedef typename boost::graph_traits<Graph>::vertices_size_type vertex_size_type;
typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
typedef typename boost::graph_traits<Graph>::halfedges_size_type halfedges_size_type;
Verbose_ostream verr(verb);
std::size_t num_v(std::distance(boost::begin(vertices(g)), boost::end(vertices(g)))),
num_e(std::distance(boost::begin(edges(g)), boost::end(edges(g)))),
num_h(std::distance(boost::begin(halfedges(g)), boost::end(halfedges(g))));
bool valid = ( 1 != (num_h& 1));
bool valid = (1 != (num_h&1) && (2*num_e == num_h));
if(!valid)
verr << "number of halfedges is odd." << std::endl;
// All halfedges.
halfedges_size_type n = 0;
for(halfedge_descriptor begin : halfedges(g)) {
for(halfedge_descriptor begin : halfedges(g))
{
if(!valid)
break;
verr << "halfedge " << n << std::endl;
// Pointer integrity.
valid = valid && (next(begin, g) != boost::graph_traits<Graph>::null_halfedge());
valid = valid && (opposite(begin, g) != boost::graph_traits<Graph>::null_halfedge());
if ( ! valid) {
verr << " pointer integrity corrupted (ptr==0)."
<< std::endl;
if(!valid)
{
verr << "halfedge " << n << " next / opposite halfedges are null." << std::endl;
break;
}
// edge integrity
valid = valid && (halfedge(edge(begin, g), g) == begin);
// opposite integrity.
valid = valid && (opposite(begin, g) != begin);
valid = valid && (opposite(opposite(begin, g), g) == begin);
if ( ! valid) {
verr << " opposite pointer integrity corrupted."
<< std::endl;
if(!valid)
{
verr << "halfedge " << n << " invalid halfedge opposite()." << std::endl;
break;
}
// previous integrity.
valid = valid && (prev(next(begin, g), g) == begin);
valid = valid && (next(prev(begin, g), g) == begin);
if ( ! valid) {
verr << " previous pointer integrity corrupted."
<< std::endl;
if(!valid)
{
verr << "halfedge " << n << " prev(next(hd)) != hd OR next(prev(hd)) != hd" << std::endl;
break;
}
// vertex integrity.
valid = valid && (target(begin, g) != boost::graph_traits<Graph>::null_vertex());
if ( ! valid) {
verr << " vertex pointer integrity corrupted."
<< std::endl;
if(!valid)
{
verr << "halfedge " << n << " target of halfedge is the null vertex." << std::endl;
break;
}
valid = valid && ( target(begin, g) ==
target(opposite(next(begin, g), g), g));
if ( ! valid) {
verr << " vertex pointer integrity2 corrupted."
<< std::endl;
valid = valid && (target(begin, g) == target(opposite(next(begin, g), g), g));
if(!valid)
{
verr << "halfedge " << n << " target(hd) != source(next(hd))." << std::endl;
break;
}
++n;
}
if(valid && n != num_h)
verr << "counting halfedges failed." << std::endl;
// All vertices.
vertex_size_type v = 0;
n = 0;
for(vertex_descriptor vbegin : vertices(g)){
for(vertex_descriptor vbegin : vertices(g))
{
if(!valid)
break;
verr << "vertex " << v << std::endl;
// Pointer integrity.
if(halfedge(vbegin, g) != boost::graph_traits<Graph>::null_halfedge())
valid = valid && (
target( halfedge(vbegin, g), g) == vbegin);
valid = valid && (target(halfedge(vbegin, g), g) == vbegin);
else
valid = false;
if ( ! valid) {
verr << " halfedge pointer in vertex corrupted."
<< std::endl;
if(!valid)
{
verr << "vertex " << v << " halfedge incident to vertex is the null halfedge." << std::endl;
break;
}
// cycle-around-vertex test.
halfedge_descriptor h = halfedge(vbegin, g);
if ( h != boost::graph_traits<Graph>::null_halfedge()) {
if(h != boost::graph_traits<Graph>::null_halfedge())
{
halfedge_descriptor ge = h;
do {
verr << " halfedge " << n << std::endl;
do
{
++n;
h = opposite(next(h, g), g);
valid = valid && (n <= num_h && n!=0);
if(!valid)
verr << " too many halfedges around vertices."
<< std::endl;
} while ( valid && (h != ge));
{
verr << "vertex " << v << " too many halfedges around vertex." << std::endl;
break;
}
}
while (valid && (h != ge));
}
if(!valid)
break;
++v;
}
if(valid && v != num_v)
verr << "counting vertices failed." << std::endl;
if(valid && (n != num_h))
verr << "counting halfedges via vertices failed." << std::endl;
valid = valid && ( v == num_v);
valid = valid && (v == num_v);
// All halfedges.
n = 0;
for(halfedge_descriptor i : halfedges(g)){
verr << "halfedge " << n << std::endl;
for(halfedge_descriptor i : halfedges(g))
{
// At least triangular facets and distinct geometry.
valid = valid && (next(i, g) != i);
valid = valid && (target(i, g) != target(opposite(i, g), g));
if ( ! valid) {
verr << " pointer validity corrupted."
<< std::endl;
if(!valid)
{
verr << "halfedge " << n << " pointer validity corrupted." << std::endl;
break;
}
++n;
}
valid = valid && (n == num_h);
if(n != num_h)
verr << "counting halfedges failed." << std::endl;
verr << "Halfedge Graph Structure is " << (valid ? "valid." : "NOT VALID.") << std::endl;
verr << "structure is "
<< ( valid ? "valid." : "NOT VALID.") << std::endl;
return valid;
}
@ -520,78 +542,99 @@ template<typename Graph>
bool is_valid_face_graph(const Graph& g, bool verb = false)
{
typedef typename boost::graph_traits<Graph>::halfedge_descriptor halfedge_descriptor;
typedef typename boost::graph_traits<Graph>::halfedges_size_type halfedges_size_type;
typedef typename boost::graph_traits<Graph>::face_descriptor face_descriptor;
typedef typename boost::graph_traits<Graph>::faces_size_type faces_size_type;
typedef typename boost::graph_traits<Graph>::halfedges_size_type halfedges_size_type;
std::size_t num_f(std::distance(boost::begin(faces(g)), boost::end(faces(g)))),
num_h(std::distance(boost::begin(halfedges(g)), boost::end(halfedges(g))));
//is valid halfedge_graph ?
bool valid = is_valid_halfedge_graph(g, verb);
if ( ! valid) {
if(!valid)
return false;
}
Verbose_ostream verr(verb);
// All faces.
faces_size_type f = 0;
std::size_t n = 0;
halfedges_size_type nb = 0;
for(face_descriptor fbegin : faces(g)){
for(face_descriptor fbegin : faces(g))
{
if(!valid)
break;
verr << "face " << f << std::endl;
// Pointer integrity.
if(halfedge(fbegin, g) != boost::graph_traits<Graph>::null_halfedge())
valid = valid && (
face(halfedge(fbegin, g), g) == fbegin);
valid = valid && (face(halfedge(fbegin, g), g) == fbegin);
else
valid = false;
if ( ! valid) {
verr << " halfedge pointer in face corrupted." << std::endl;
if(! valid)
{
verr << "face " << f << " halfedge incident to face is the null halfedge." << std::endl;
break;
}
// cycle-around-face test.
halfedge_descriptor h = halfedge( fbegin, g);
if (h != boost::graph_traits<Graph>::null_halfedge()) {
if(h != boost::graph_traits<Graph>::null_halfedge())
{
halfedge_descriptor ge = h;
do {
verr << " halfedge " << n << std::endl;
do
{
++n;
h = next(h, g);
valid = valid && (n <= num_h && n != 0);
if(!valid)
verr << " too many halfedges around faces."
<< std::endl;
} while ( valid && (h != ge));
}
++f;
}
if ( valid && f != num_f)
verr << "counting faces failed." << std::endl;
for(halfedge_descriptor i : halfedges(g)){
//counting borders
if ( is_border(i, g))
++nb;
// face integrity.
valid = valid && ( face(i, g) == face(next(i, g), g));
if ( ! valid) {
verr << " face pointer integrity2 corrupted."
<< std::endl;
{
verr << "face " << f << " too many halfedges around face." << std::endl;
break;
}
}
while(valid && (h != ge));
}
if(! valid)
break;
++f;
}
if(valid && f != num_f)
verr << "counting faces failed." << std::endl;
std::size_t hn = 0;
for(halfedge_descriptor i : halfedges(g))
{
++hn;
//counting borders
if(is_border(i, g))
++nb;
// face integrity.
valid = valid && (face(i, g) == face(next(i, g), g));
if(!valid)
{
verr << "halfedge " << hn << " face(hd) != face(next(hd))." << std::endl;
break;
}
}
verr << "sum border halfedges (2*nb) = " << 2 * nb << std::endl;
if(valid && n + nb != num_h)
verr << "counting halfedges via faces failed." << std::endl;
valid = valid && (f == num_f);
valid = valid && (n + nb == num_h);
verr << "is_valid(): structure is " << ( valid ? "valid." :
"NOT VALID.") << std::endl;
verr << "Face Graph Structure is " << (valid ? "valid." : "NOT VALID.") << std::endl;
return valid;
}
/*!
\ingroup PkgBGLHelperFct
* \brief checks the integrity of `g`.
@ -614,33 +657,37 @@ template <typename Mesh>
bool is_valid_polygon_mesh(const Mesh& g, bool verb = false)
{
typedef typename boost::graph_traits<Mesh>::halfedge_descriptor halfedge_descriptor;
Verbose_ostream verr(verb);
bool valid = is_valid_face_graph(g, verb);
if(!valid)
return false;
// test for 2-manifoldness
// Distinct facets on each side of an halfedge.
for(halfedge_descriptor i : halfedges(g)){
for(halfedge_descriptor i : halfedges(g))
{
valid = valid && (face(i, g) != face(opposite(i, g), g));
if ( ! valid) {
if(!valid)
{
verr << " both incident facets are equal." << std::endl;
break;
}
valid = valid && (next(next(i, g), g) != i);
valid = valid && (target(i, g) != target(next(i, g), g));
valid = valid && (target(i, g) != target(next(next(i, g), g), g));
if ( ! valid) {
verr << " incident facet is not at least a triangle."
<< std::endl;
if(!valid)
{
verr << " incident facet is not at least a triangle." << std::endl;
break;
}
if ( ! valid) {
verr << " incident facet is not at least a triangle."
<< std::endl;
break;
}
}
return valid;
}
verr << "Polygon Mesh Structure is " << (valid ? "valid." : "NOT VALID.") << std::endl;
return valid;
}
/*!
\ingroup PkgBGLHelperFct

View File

@ -91,6 +91,7 @@ CGAL_add_named_parameter(get_placement_policy_t, get_placement_policy, get_place
CGAL_add_named_parameter(face_normal_t, face_normal, face_normal_map)
CGAL_add_named_parameter(random_seed_t, random_seed, random_seed)
CGAL_add_named_parameter(do_project_t, do_project, do_project)
CGAL_add_named_parameter(tolerance_map_t, tolerance_map, tolerance_map)
//internal
CGAL_add_named_parameter(weight_calculator_t, weight_calculator, weight_calculator)

Some files were not shown because too many files have changed in this diff Show More