mirror of https://github.com/CGAL/cgal
Merge branch 'master' into Scripts-simplify_user_scripts-GF
This commit is contained in:
commit
a6514fdfad
18
.travis.yml
18
.travis.yml
|
|
@ -33,14 +33,14 @@ env:
|
||||||
- PACKAGE='OpenNL Optimal_transportation_reconstruction_2 Optimisation_basic '
|
- PACKAGE='OpenNL Optimal_transportation_reconstruction_2 Optimisation_basic '
|
||||||
- PACKAGE='Partition_2 Periodic_2_triangulation_2 Periodic_3_mesh_3 '
|
- 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='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='Point_set_3 Point_set_processing_3 Poisson_surface_reconstruction_3 '
|
||||||
- PACKAGE='Poisson_surface_reconstruction_3 Polygon Polygon_mesh_processing '
|
- PACKAGE='Polygon Polygon_mesh_processing Polyhedron '
|
||||||
- PACKAGE='Polyhedron Polyhedron_IO Polyline_simplification_2 '
|
- PACKAGE='Polyhedron_IO Polyline_simplification_2 Polynomial '
|
||||||
- PACKAGE='Polynomial Polytope_distance_d Principal_component_analysis '
|
- PACKAGE='Polytope_distance_d Principal_component_analysis Principal_component_analysis_LGPL '
|
||||||
- PACKAGE='Principal_component_analysis_LGPL Profiling_tools Property_map '
|
- PACKAGE='Profiling_tools Property_map QP_solver '
|
||||||
- PACKAGE='QP_solver Random_numbers Ridges_3 '
|
- PACKAGE='Random_numbers Ridges_3 Scale_space_reconstruction_3 '
|
||||||
- PACKAGE='Scale_space_reconstruction_3 Scripts SearchStructures '
|
- PACKAGE='Scripts SearchStructures Segment_Delaunay_graph_2 '
|
||||||
- PACKAGE='Segment_Delaunay_graph_2 Segment_Delaunay_graph_Linf_2 Set_movable_separability_2 '
|
- PACKAGE='Segment_Delaunay_graph_Linf_2 Set_movable_separability_2 Shape_detection '
|
||||||
- PACKAGE='Skin_surface_3 Snap_rounding_2 Solver_interface '
|
- PACKAGE='Skin_surface_3 Snap_rounding_2 Solver_interface '
|
||||||
- PACKAGE='Spatial_searching Spatial_sorting STL_Extension '
|
- PACKAGE='Spatial_searching Spatial_sorting STL_Extension '
|
||||||
- PACKAGE='Straight_skeleton_2 Stream_lines_2 Stream_support '
|
- PACKAGE='Straight_skeleton_2 Stream_lines_2 Stream_support '
|
||||||
|
|
@ -55,7 +55,7 @@ env:
|
||||||
compiler: clang
|
compiler: clang
|
||||||
install:
|
install:
|
||||||
- echo "$PWD"
|
- 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
|
- /usr/bin/time -f 'Spend time of %C -- %E (real)' bash .travis/install.sh
|
||||||
- export CXX=clang++ CC=clang;
|
- export CXX=clang++ CC=clang;
|
||||||
before_script:
|
before_script:
|
||||||
|
|
|
||||||
|
|
@ -12,7 +12,7 @@ function build_examples {
|
||||||
mkdir -p build-travis
|
mkdir -p build-travis
|
||||||
cd build-travis
|
cd build-travis
|
||||||
mytime cmake -DCGAL_DIR="/usr/local/lib/cmake/CGAL" -DCMAKE_CXX_FLAGS="${CXX_FLAGS}" ..
|
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 {
|
function build_tests {
|
||||||
|
|
@ -29,7 +29,7 @@ function build_demo {
|
||||||
;;
|
;;
|
||||||
esac
|
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 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
|
old_IFS=$IFS
|
||||||
IFS=$' '
|
IFS=$' '
|
||||||
|
|
@ -116,7 +116,7 @@ cd $ROOT
|
||||||
fi
|
fi
|
||||||
IFS=$old_IFS
|
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
|
DO_IGNORE=FALSE
|
||||||
. $ROOT/.travis/test_package.sh "$ROOT" "$ARG"
|
. $ROOT/.travis/test_package.sh "$ROOT" "$ARG"
|
||||||
echo "DO_IGNORE is $DO_IGNORE"
|
echo "DO_IGNORE is $DO_IGNORE"
|
||||||
|
|
|
||||||
|
|
@ -81,7 +81,6 @@ Periodic_4_hyperbolic_triangulation_2
|
||||||
Point_set_2
|
Point_set_2
|
||||||
Point_set_3
|
Point_set_3
|
||||||
Point_set_processing_3
|
Point_set_processing_3
|
||||||
Point_set_shape_detection_3
|
|
||||||
Poisson_surface_reconstruction_3
|
Poisson_surface_reconstruction_3
|
||||||
Polygon
|
Polygon
|
||||||
Polygon_mesh_processing
|
Polygon_mesh_processing
|
||||||
|
|
@ -103,6 +102,7 @@ SearchStructures
|
||||||
Segment_Delaunay_graph_2
|
Segment_Delaunay_graph_2
|
||||||
Segment_Delaunay_graph_Linf_2
|
Segment_Delaunay_graph_Linf_2
|
||||||
Set_movable_separability_2
|
Set_movable_separability_2
|
||||||
|
Shape_detection
|
||||||
Skin_surface_3
|
Skin_surface_3
|
||||||
Snap_rounding_2
|
Snap_rounding_2
|
||||||
Solver_interface
|
Solver_interface
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ env:
|
||||||
compiler: clang
|
compiler: clang
|
||||||
install:
|
install:
|
||||||
- echo "$PWD"
|
- 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
|
- /usr/bin/time -f 'Spend time of %C -- %E (real)' bash .travis/install.sh
|
||||||
- export CXX=clang++ CC=clang;
|
- export CXX=clang++ CC=clang;
|
||||||
before_script:
|
before_script:
|
||||||
|
|
|
||||||
|
|
@ -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.
|
Let's have a look at the figure below.
|
||||||
\cgalFigureBegin{figAFSRplausible,wedges.png}
|
\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
|
\cgalFigureEnd
|
||||||
|
|
||||||
\f$ \alpha_\mathrm{sliver}\f$ corresponds to the red wedge. The algorithm will never select triangle `t1`
|
\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
|
\cgalCite{cgal:la-srpss-13}. Two other algorithms available in \cgal
|
||||||
must be applied first as a preprocessing to the point set:
|
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":
|
- \ref Point_set_processing_3Structuring "Point set structuring":
|
||||||
resample the planar sections and edges and corners detected among
|
resample the planar sections and edges and corners detected among
|
||||||
|
|
|
||||||
|
|
@ -10,5 +10,5 @@ Triangulation_3
|
||||||
Number_types
|
Number_types
|
||||||
Surface_mesh
|
Surface_mesh
|
||||||
Polyhedron
|
Polyhedron
|
||||||
Point_set_shape_detection_3
|
Shape_detection
|
||||||
Point_set_processing_3
|
Point_set_processing_3
|
||||||
|
|
@ -4,7 +4,7 @@
|
||||||
|
|
||||||
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
|
||||||
#include <CGAL/Point_with_normal_3.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/structure_point_set.h>
|
||||||
#include <CGAL/Delaunay_triangulation_3.h>
|
#include <CGAL/Delaunay_triangulation_3.h>
|
||||||
#include <CGAL/Triangulation_vertex_base_with_info_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;
|
typedef CGAL::Second_of_pair_property_map<Point_with_normal> Normal_map;
|
||||||
|
|
||||||
// Efficient RANSAC types
|
// 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;
|
<Kernel, Pwn_vector, Point_map, Normal_map> Traits;
|
||||||
typedef CGAL::Shape_detection_3::Efficient_RANSAC<Traits> Efficient_ransac;
|
typedef CGAL::Shape_detection::Efficient_RANSAC<Traits> Efficient_ransac;
|
||||||
typedef CGAL::Shape_detection_3::Plane<Traits> Plane;
|
typedef CGAL::Shape_detection::Plane<Traits> Plane;
|
||||||
|
|
||||||
// Point set structuring type
|
// Point set structuring type
|
||||||
typedef CGAL::Point_set_with_structure<Kernel> Structure;
|
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 CGAL::Delaunay_triangulation_3<Kernel,Tds> Triangulation_3;
|
||||||
typedef Triangulation_3::Vertex_handle Vertex_handle;
|
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
|
// 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
|
op.cluster_epsilon, // Same parameter as RANSAC
|
||||||
CGAL::parameters::point_map (Point_map()).
|
CGAL::parameters::point_map (Point_map()).
|
||||||
normal_map (Normal_map()).
|
normal_map (Normal_map()).
|
||||||
plane_map (CGAL::Shape_detection_3::Plane_map<Traits>()).
|
plane_map (CGAL::Shape_detection::Plane_map<Traits>()).
|
||||||
plane_index_map(CGAL::Shape_detection_3::Point_to_shape_index_map<Traits>(points, planes)));
|
plane_index_map(CGAL::Shape_detection::Point_to_shape_index_map<Traits>(points, planes)));
|
||||||
|
|
||||||
|
|
||||||
for (std::size_t i = 0; i < pss.size(); ++ i)
|
for (std::size_t i = 0; i < pss.size(); ++ i)
|
||||||
|
|
|
||||||
|
|
@ -145,7 +145,7 @@ but does not provide any arithmetic operations.
|
||||||
|
|
||||||
As for algebraic structures this concept is also traits class oriented.
|
As for algebraic structures this concept is also traits class oriented.
|
||||||
The main functionality related to `RealEmbeddable` is gathered in
|
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
|
tag `Is_real_embeddable` indicating whether a type is a model of
|
||||||
`RealEmbeddable`. The comparison operators are required to be realized via
|
`RealEmbeddable`. The comparison operators are required to be realized via
|
||||||
\cpp operator overloading.
|
\cpp operator overloading.
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@
|
||||||
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
\ingroup PkgAlgebraicFoundationsAlgebraicStructuresConcepts
|
||||||
\cgalConcept
|
\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,
|
A model `IntegralDomainWithoutDivision` represents an integral domain,
|
||||||
i.e.\ commutative ring with 0, 1, +, * and unity free of zero divisors.
|
i.e.\ commutative ring with 0, 1, +, * and unity free of zero divisors.
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@
|
||||||
#ifndef CGAL_SCALAR_FACTOR_TRAITS_H
|
#ifndef CGAL_SCALAR_FACTOR_TRAITS_H
|
||||||
#define CGAL_SCALAR_FACTOR_TRAITS_H
|
#define CGAL_SCALAR_FACTOR_TRAITS_H
|
||||||
|
|
||||||
|
#include <CGAL/assertions.h>
|
||||||
#include <CGAL/Algebraic_structure_traits.h>
|
#include <CGAL/Algebraic_structure_traits.h>
|
||||||
|
|
||||||
/*! \file NiX/Scalar_factor_traits.h
|
/*! \file NiX/Scalar_factor_traits.h
|
||||||
|
|
|
||||||
|
|
@ -28,10 +28,10 @@
|
||||||
|
|
||||||
// within this file AS ^= Type
|
// within this file AS ^= Type
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/Algebraic_structure_traits.h>
|
#include <CGAL/Algebraic_structure_traits.h>
|
||||||
//#include <CGAL/Real_embeddable_traits.h>
|
//#include <CGAL/Real_embeddable_traits.h>
|
||||||
|
|
||||||
|
#include <CGAL/number_utils.h>
|
||||||
#include <CGAL/assertions.h>
|
#include <CGAL/assertions.h>
|
||||||
#include <CGAL/use.h>
|
#include <CGAL/use.h>
|
||||||
#include <boost/type_traits.hpp>
|
#include <boost/type_traits.hpp>
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
// within this file FT ^= Fraction_traits<T>
|
// within this file FT ^= Fraction_traits<T>
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <CGAL/to_rational.h>
|
#include <CGAL/to_rational.h>
|
||||||
#include <CGAL/use.h>
|
#include <CGAL/use.h>
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
// within this file FT ^= Fraction_traits<T>
|
// within this file FT ^= Fraction_traits<T>
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <CGAL/to_rational.h>
|
#include <CGAL/to_rational.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,6 @@
|
||||||
// \brief provides test functions for the \c RealEmbeddable concept of
|
// \brief provides test functions for the \c RealEmbeddable concept of
|
||||||
// number types.
|
// number types.
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <CGAL/assertions.h>
|
#include <CGAL/assertions.h>
|
||||||
#include <boost/type_traits.hpp>
|
#include <boost/type_traits.hpp>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/use.h>
|
#include <CGAL/use.h>
|
||||||
#include <CGAL/Algebraic_extension_traits.h>
|
#include <CGAL/Algebraic_extension_traits.h>
|
||||||
#include <CGAL/Sqrt_extension.h>
|
#include <CGAL/Sqrt_extension.h>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/use.h>
|
#include <CGAL/use.h>
|
||||||
#include <CGAL/Algebraic_structure_traits.h>
|
#include <CGAL/Algebraic_structure_traits.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
// ----------------------------------------------------------------------------
|
// ----------------------------------------------------------------------------
|
||||||
//
|
//
|
||||||
// Library : CGAL
|
// Library : CGAL
|
||||||
// File : test/Chinese_remaminder_test.C
|
// File : test/Chinese_remaminder_traits.cpp
|
||||||
// CGAL_release : $Name: $
|
// CGAL_release : $Name: $
|
||||||
// Revision : $Revision$
|
// Revision : $Revision$
|
||||||
// Revision_date : $Date$
|
// Revision_date : $Date$
|
||||||
|
|
@ -29,7 +29,6 @@
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
#undef NDEBUG
|
#undef NDEBUG
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/Chinese_remainder_traits.h>
|
#include <CGAL/Chinese_remainder_traits.h>
|
||||||
#include <CGAL/Arithmetic_kernel.h>
|
#include <CGAL/Arithmetic_kernel.h>
|
||||||
#include <CGAL/CORE_arithmetic_kernel.h>
|
#include <CGAL/CORE_arithmetic_kernel.h>
|
||||||
|
|
@ -171,7 +170,7 @@ int main(){
|
||||||
|
|
||||||
#ifdef CGAL_USE_CORE
|
#ifdef CGAL_USE_CORE
|
||||||
test_CR<CGAL::CORE_arithmetic_kernel>();
|
test_CR<CGAL::CORE_arithmetic_kernel>();
|
||||||
#endif // Lis_HAVE_CORE
|
#endif // CGAL_USE_CORE
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/use.h>
|
#include <CGAL/use.h>
|
||||||
|
#include <CGAL/assertions.h>
|
||||||
#include <CGAL/Coercion_traits.h>
|
#include <CGAL/Coercion_traits.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
int main(){
|
int main(){
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/use.h>
|
#include <CGAL/use.h>
|
||||||
#include <CGAL/Real_embeddable_traits.h>
|
#include <CGAL/Real_embeddable_traits.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/use.h>
|
#include <CGAL/use.h>
|
||||||
|
#include <CGAL/int.h>
|
||||||
#include <CGAL/Scalar_factor_traits.h>
|
#include <CGAL/Scalar_factor_traits.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
//
|
//
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/Arithmetic_kernel.h>
|
#include <CGAL/Arithmetic_kernel.h>
|
||||||
#include <CGAL/Algebraic_structure_traits.h>
|
#include <CGAL/Algebraic_structure_traits.h>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
//
|
//
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <CGAL/ipower.h>
|
#include <CGAL/ipower.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -110,7 +110,7 @@ namespace CGAL {
|
||||||
|
|
||||||
int pos_next_factor;
|
int pos_next_factor;
|
||||||
|
|
||||||
// Unsuccessfull shear factors
|
// Unsuccessful shear factors
|
||||||
std::set<Int> bad_shears;
|
std::set<Int> bad_shears;
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
#define CGAL_AK_ENABLE_DEPRECATED_INTERFACE 1
|
#define CGAL_AK_ENABLE_DEPRECATED_INTERFACE 1
|
||||||
|
|
||||||
#include <CGAL/Algebraic_kernel_d/flags.h>
|
#include <CGAL/Algebraic_kernel_d/flags.h>
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
#include <CGAL/Arithmetic_kernel.h>
|
#include <CGAL/Arithmetic_kernel.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
#define CGAL_TEST_ALL_AK_VARIANTS 1
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/Algebraic_kernel_d_1.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_bfi.h>
|
||||||
#include <CGAL/Algebraic_kernel_d/Algebraic_real_rep.h>
|
#include <CGAL/Algebraic_kernel_d/Algebraic_real_rep.h>
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,6 @@
|
||||||
//#define CGAL_AK_ENABLE_DEPRECATED_INTERFACE 1
|
//#define CGAL_AK_ENABLE_DEPRECATED_INTERFACE 1
|
||||||
|
|
||||||
#include <CGAL/Algebraic_kernel_d/flags.h>
|
#include <CGAL/Algebraic_kernel_d/flags.h>
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
#include <CGAL/Arithmetic_kernel.h>
|
#include <CGAL/Arithmetic_kernel.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,8 +18,6 @@
|
||||||
This is the test file for the class NiX::Algebraic_real_d_1.
|
This is the test file for the class NiX::Algebraic_real_d_1.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#include <CGAL/Arithmetic_kernel.h>
|
#include <CGAL/Arithmetic_kernel.h>
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,6 @@
|
||||||
|
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
// include these traits here by 'hand', since not in release 3.3
|
// include these traits here by 'hand', since not in release 3.3
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -19,8 +19,6 @@
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
// include these traits here by 'hand', since not in release 3.3
|
// include these traits here by 'hand', since not in release 3.3
|
||||||
#include <CGAL/Algebraic_extension_traits.h>
|
#include <CGAL/Algebraic_extension_traits.h>
|
||||||
#include <CGAL/Scalar_factor_traits.h>
|
#include <CGAL/Scalar_factor_traits.h>
|
||||||
|
|
|
||||||
|
|
@ -24,7 +24,6 @@
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/Algebraic_kernel_d/Real_embeddable_extension.h>
|
#include <CGAL/Algebraic_kernel_d/Real_embeddable_extension.h>
|
||||||
#include <CGAL/Get_arithmetic_kernel.h>
|
#include <CGAL/Get_arithmetic_kernel.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,8 +13,6 @@
|
||||||
|
|
||||||
#include <CGAL/Algebraic_kernel_d/flags.h>
|
#include <CGAL/Algebraic_kernel_d/flags.h>
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <CGAL/Arithmetic_kernel.h>
|
#include <CGAL/Arithmetic_kernel.h>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/config.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#ifdef CGAL_HAS_CORE_ARITHMETIC_KERNEL
|
#ifdef CGAL_HAS_CORE_ARITHMETIC_KERNEL
|
||||||
|
|
|
||||||
|
|
@ -21,10 +21,12 @@
|
||||||
//
|
//
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/use.h>
|
||||||
#include <cassert>
|
#include <CGAL/IO/io.h>
|
||||||
|
|
||||||
|
#include <cassert>
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
//#include <CGAL/_test_basic.h>
|
|
||||||
|
|
||||||
#ifndef CGAL_TEST_ALGEBRAIC_CURVE_KERNEL_2_H
|
#ifndef CGAL_TEST_ALGEBRAIC_CURVE_KERNEL_2_H
|
||||||
#define CGAL_TEST_ALGEBRAIC_CURVE_KERNEL_2_H
|
#define CGAL_TEST_ALGEBRAIC_CURVE_KERNEL_2_H
|
||||||
|
|
|
||||||
|
|
@ -21,7 +21,6 @@
|
||||||
//
|
//
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <CGAL/use.h>
|
#include <CGAL/use.h>
|
||||||
#include <CGAL/Test/_test_real_embeddable.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++) {
|
c0i != coeffs.end(); c0i++) {
|
||||||
for (typename std::vector< int >::const_iterator c2i = coeffs.begin();
|
for (typename std::vector< int >::const_iterator c2i = coeffs.begin();
|
||||||
c2i != coeffs.end(); c2i++) {
|
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).
|
// 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));
|
||||||
Polynomial_1 poly((*c2i*x*x - *c0i) * (c*x-1));
|
Polynomial_1 poly((*c2i*x*x - *c0i) * (c*x-1));
|
||||||
|
|
|
||||||
|
|
@ -20,7 +20,6 @@
|
||||||
//
|
//
|
||||||
// ============================================================================
|
// ============================================================================
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -24,8 +24,6 @@
|
||||||
|
|
||||||
// #include <CGAL/Algebraic_curve_kernel_2/flags.h>
|
// #include <CGAL/Algebraic_curve_kernel_2/flags.h>
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
#include <sstream>
|
#include <sstream>
|
||||||
#include <CGAL/Arithmetic_kernel.h>
|
#include <CGAL/Arithmetic_kernel.h>
|
||||||
#include <CGAL/Algebraic_kernel_d/Real_embeddable_extension.h>
|
#include <CGAL/Algebraic_kernel_d/Real_embeddable_extension.h>
|
||||||
|
|
|
||||||
|
|
@ -31,12 +31,8 @@
|
||||||
#ifndef CGAL_TEST_REAL_COMPARABLE_H
|
#ifndef CGAL_TEST_REAL_COMPARABLE_H
|
||||||
#define CGAL_TEST_REAL_COMPARABLE_H
|
#define CGAL_TEST_REAL_COMPARABLE_H
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <CGAL/tags.h>
|
#include <CGAL/tags.h>
|
||||||
/*#include <NiX/basic.h>
|
|
||||||
#include <NiX/NT_traits.h>
|
|
||||||
#include <NiX/number_type_utils.h>*/
|
|
||||||
#include <cstddef>
|
#include <cstddef>
|
||||||
#include <CGAL/assertions.h>
|
#include <CGAL/assertions.h>
|
||||||
#include <boost/type_traits.hpp>
|
#include <boost/type_traits.hpp>
|
||||||
|
|
|
||||||
|
|
@ -23,7 +23,6 @@
|
||||||
// TODO: The comments are all original EXACUS comments and aren't adapted. So
|
// TODO: The comments are all original EXACUS comments and aren't adapted. So
|
||||||
// they may be wrong now.
|
// they may be wrong now.
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -5,10 +5,8 @@
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
#if defined CGAL_USE_LEDA
|
#if defined(CGAL_USE_CORE) || defined(CGAL_USE_LEDA)
|
||||||
# include <CGAL/leda_real.h>
|
# include <CGAL/Exact_algebraic.h>
|
||||||
#elif defined CGAL_USE_CORE
|
|
||||||
# include <CGAL/CORE_Expr.h>
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// *** WARNING ***
|
// *** WARNING ***
|
||||||
|
|
@ -18,13 +16,10 @@
|
||||||
// benchmarking the Apollonius_graph_filtered_traits_2<> class should
|
// benchmarking the Apollonius_graph_filtered_traits_2<> class should
|
||||||
// be used.
|
// 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
|
// 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
|
// Otherwise if CORE is present use CORE's Expr as the exact number type
|
||||||
typedef CORE::Expr NT;
|
typedef CGAL::Exact_algebraic NT;
|
||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -386,7 +386,7 @@ public:
|
||||||
|
|
||||||
// both circles exist
|
// 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)
|
// of the form (a, b) or (-oo, a) U (b, +oo)
|
||||||
Bitangent_line bl_12(p1, p2);
|
Bitangent_line bl_12(p1, p2);
|
||||||
|
|
||||||
|
|
@ -524,7 +524,7 @@ public:
|
||||||
|
|
||||||
// both circles exist
|
// 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)
|
// of the form (a, b) or (-oo, a) U (b, +oo)
|
||||||
Bitangent_line bl_12(p1, p2);
|
Bitangent_line bl_12(p1, p2);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -383,7 +383,7 @@ public:
|
||||||
|
|
||||||
// both circles exist
|
// 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)
|
// of the form (a, b) or (-oo, a) U (b, +oo)
|
||||||
Bitangent_line bl_12(p1, p2);
|
Bitangent_line bl_12(p1, p2);
|
||||||
|
|
||||||
|
|
@ -507,7 +507,7 @@ public:
|
||||||
|
|
||||||
// both circles exist
|
// 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)
|
// of the form (a, b) or (-oo, a) U (b, +oo)
|
||||||
Bitangent_line bl_12(p1, p2);
|
Bitangent_line bl_12(p1, p2);
|
||||||
|
|
||||||
|
|
@ -581,7 +581,7 @@ public:
|
||||||
|
|
||||||
// both circles exist
|
// 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)
|
// of the form (a, b) or (-oo, a) U (b, +oo)
|
||||||
|
|
||||||
return !b;
|
return !b;
|
||||||
|
|
|
||||||
|
|
@ -60,9 +60,20 @@ protected:
|
||||||
// }
|
// }
|
||||||
|
|
||||||
inline static
|
inline static
|
||||||
FT divide(const FT& x, const FT& y) {
|
FT divide(const FT& x, const FT& y, Integral_domain_without_division_tag) {
|
||||||
return CGAL::integral_division(x,y);
|
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
|
inline static
|
||||||
FT sqrt(const FT& x, Integral_domain_without_division_tag) {
|
FT sqrt(const FT& x, Integral_domain_without_division_tag) {
|
||||||
return CGAL::sqrt(CGAL::to_double(x));
|
return CGAL::sqrt(CGAL::to_double(x));
|
||||||
|
|
@ -97,7 +108,8 @@ protected:
|
||||||
{
|
{
|
||||||
return sqrt( distance2(p1, p2) );
|
return sqrt( distance2(p1, p2) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
inline static
|
inline static
|
||||||
FT distance(const Point_2& p, const Line_2& l)
|
FT distance(const Point_2& p, const Line_2& l)
|
||||||
{
|
{
|
||||||
|
|
@ -105,6 +117,8 @@ protected:
|
||||||
sqrt( CGAL::square(l.a()) + CGAL::square(l.b()) ) );
|
sqrt( CGAL::square(l.a()) + CGAL::square(l.b()) ) );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// instance stuff
|
// instance stuff
|
||||||
Point_2 c;
|
Point_2 c;
|
||||||
Line_2 l;
|
Line_2 l;
|
||||||
|
|
@ -136,8 +150,8 @@ protected:
|
||||||
|
|
||||||
std::vector< Point_2 > p;
|
std::vector< Point_2 > p;
|
||||||
|
|
||||||
if ( l.a() == ZERO ) {
|
if ( l.a() == FT(0) ) {
|
||||||
FT y = d2 * CGAL::sign(l.b()) - divide(l.c(), l.b());
|
FT y = d2 * int(CGAL::sign(l.b())) - divide(l.c(), l.b());
|
||||||
|
|
||||||
FT C = CGAL::square(y) - FT(2) * c.y() * y +
|
FT C = CGAL::square(y) - FT(2) * c.y() * y +
|
||||||
CGAL::square(c.x()) + CGAL::square(c.y()) - d1;
|
CGAL::square(c.x()) + CGAL::square(c.y()) - d1;
|
||||||
|
|
|
||||||
|
|
@ -26,8 +26,6 @@
|
||||||
#ifndef CGAL_NULL_OUTPUT_STREAM_H
|
#ifndef CGAL_NULL_OUTPUT_STREAM_H
|
||||||
#define CGAL_NULL_OUTPUT_STREAM_H
|
#define CGAL_NULL_OUTPUT_STREAM_H
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#ifndef CGAL_APOLLONIUS_GRAPH_2_TEST_H
|
#ifndef CGAL_APOLLONIUS_GRAPH_2_TEST_H
|
||||||
#define CGAL_APOLLONIUS_GRAPH_2_TEST_H
|
#define CGAL_APOLLONIUS_GRAPH_2_TEST_H
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <CGAL/enum.h>
|
#include <CGAL/enum.h>
|
||||||
#include <CGAL/use.h>
|
#include <CGAL/use.h>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/Arithmetic_kernel.h>
|
#include <CGAL/Arithmetic_kernel.h>
|
||||||
|
|
||||||
#if defined(CGAL_HAS_DEFAULT_ARITHMETIC_KERNEL)
|
#if defined(CGAL_HAS_DEFAULT_ARITHMETIC_KERNEL)
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,4 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
#include <CGAL/CORE_arithmetic_kernel.h>
|
#include <CGAL/CORE_arithmetic_kernel.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/GMPXX_arithmetic_kernel.h>
|
#include <CGAL/GMPXX_arithmetic_kernel.h>
|
||||||
|
|
||||||
#ifdef CGAL_USE_GMPXX
|
#ifdef CGAL_USE_GMPXX
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/GMP_arithmetic_kernel.h>
|
#include <CGAL/GMP_arithmetic_kernel.h>
|
||||||
|
|
||||||
#ifdef CGAL_HAS_GMP_ARITHMETIC_KERNEL
|
#ifdef CGAL_HAS_GMP_ARITHMETIC_KERNEL
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/Arithmetic_kernel.h>
|
#include <CGAL/Arithmetic_kernel.h>
|
||||||
#include <CGAL/Get_arithmetic_kernel.h>
|
#include <CGAL/Get_arithmetic_kernel.h>
|
||||||
#include <CGAL/use.h>
|
#include <CGAL/use.h>
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,5 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/LEDA_arithmetic_kernel.h>
|
#include <CGAL/LEDA_arithmetic_kernel.h>
|
||||||
|
|
||||||
#ifdef CGAL_HAS_LEDA_ARITHMETIC_KERNEL
|
#ifdef CGAL_HAS_LEDA_ARITHMETIC_KERNEL
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@
|
||||||
#ifndef CGAL_TEST_ARITHMETIC_KERNEL_H
|
#ifndef CGAL_TEST_ARITHMETIC_KERNEL_H
|
||||||
#define CGAL_TEST_ARITHMETIC_KERNEL_H
|
#define CGAL_TEST_ARITHMETIC_KERNEL_H
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/Test/_test_coercion_traits.h>
|
#include <CGAL/Test/_test_coercion_traits.h>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
|
|
|
||||||
|
|
@ -125,7 +125,7 @@
|
||||||
pair of begin/end functions can be changed, so that they return a range of
|
pair of begin/end functions can be changed, so that they return a range of
|
||||||
objects that represent either edges or vertices.
|
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
|
to the arrangement with history. The top layer represent the split of
|
||||||
general curves into x-monotone curves, and the one below represents the
|
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
|
split at intersection points. As a response to a user request for the items
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ Curve_analyser INPUT "P[6(0,P[6(0,34186452217925)(1,-47333108912824)(2,859012718
|
||||||
// Same with some content
|
// 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)])]"
|
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)])]
|
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 ?
|
Maldenbrot's curve: 0 segments ?
|
||||||
|
|
|
||||||
|
|
@ -782,7 +782,7 @@ ability to answer such queries effectively.
|
||||||
The `Arrangement_2` class template does not support point-location
|
The `Arrangement_2` class template does not support point-location
|
||||||
queries directly, as the arrangement representation is decoupled from
|
queries directly, as the arrangement representation is decoupled from
|
||||||
the geometric algorithms that operate on it. The <I>2D Arrangements</I>
|
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
|
answering such queries; all are models of the concept
|
||||||
`ArrangementPointLocation_2`. Each model employs a different
|
`ArrangementPointLocation_2`. Each model employs a different
|
||||||
algorithm or <I>strategy</I> for answering queries. A model of this
|
algorithm or <I>strategy</I> for answering queries. A model of this
|
||||||
|
|
|
||||||
|
|
@ -43,6 +43,8 @@
|
||||||
#include <boost/variant.hpp>
|
#include <boost/variant.hpp>
|
||||||
#include <CGAL/Arr_tags.h>
|
#include <CGAL/Arr_tags.h>
|
||||||
|
|
||||||
|
#include <vector>
|
||||||
|
|
||||||
namespace CGAL {
|
namespace CGAL {
|
||||||
namespace VariantFunctors{
|
namespace VariantFunctors{
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -590,7 +590,7 @@ private:
|
||||||
* \param cache Caches the vertical tangency points and intersection points.
|
* \param cache Caches the vertical tangency points and intersection points.
|
||||||
* \param ipts Output: A vector of intersection points + multiplicities.
|
* \param ipts Output: A vector of intersection points + multiplicities.
|
||||||
* \param ovlp_cv Output: An overlapping subcurve (if exists).
|
* \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,
|
bool _intersect (const Self& cv,
|
||||||
Intersection_map& inter_map,
|
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))
|
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.
|
// parameter is between the source and target parameters.
|
||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((p_lt_ps && p_lt_pt) || (p_gt_ps && p_gt_pt))
|
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
|
// as its parameter is smaller than both source and target parameter
|
||||||
// (or greater than both of them).
|
// (or greater than both of them).
|
||||||
return (false);
|
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))
|
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.
|
// parameter is between the source and target parameters.
|
||||||
return (true);
|
return (true);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ((p_lt_ps && p_lt_pt) || (p_gt_ps && p_gt_pt))
|
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
|
// as its parameter is smaller than both source and target parameter
|
||||||
// (or greater than both of them).
|
// (or greater than both of them).
|
||||||
return (false);
|
return (false);
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@ namespace CGAL {
|
||||||
|
|
||||||
/*! \class
|
/*! \class
|
||||||
* A class that answers nearest neighbor queries.
|
* 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.
|
* Given a query point, it finds the closest point to the query.
|
||||||
*/
|
*/
|
||||||
template <typename Arrangement_>
|
template <typename Arrangement_>
|
||||||
|
|
|
||||||
|
|
@ -719,7 +719,7 @@ public:
|
||||||
m_traits->construct_min_vertex_2_object()( ce2.cv()) :
|
m_traits->construct_min_vertex_2_object()( ce2.cv()) :
|
||||||
m_traits->construct_max_vertex_2_object()( ce2.cv()) ),
|
m_traits->construct_max_vertex_2_object()( ce2.cv()) ),
|
||||||
ce1.cv(), ce1.ce());
|
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
|
// the curve ends in a reverse order
|
||||||
if (res != EQUAL)
|
if (res != EQUAL)
|
||||||
return (res == SMALLER) ? LARGER : SMALLER;
|
return (res == SMALLER) ? LARGER : SMALLER;
|
||||||
|
|
|
||||||
|
|
@ -1899,7 +1899,7 @@ public:
|
||||||
return old;
|
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
|
// It is currently not in use, since the guarantees are constantly checked in O(1) time
|
||||||
bool needs_update()
|
bool needs_update()
|
||||||
{
|
{
|
||||||
|
|
|
||||||
|
|
@ -878,7 +878,7 @@ public:
|
||||||
// The left point of the current subcurve of one polycurve
|
// The left point of the current subcurve of one polycurve
|
||||||
// coincides with the current subcurve of the other polycurve.
|
// coincides with the current subcurve of the other polycurve.
|
||||||
if (left_overlap) {
|
if (left_overlap) {
|
||||||
// An overlap occured at the previous iteration:
|
// An overlap occurred at the previous iteration:
|
||||||
// Output the overlapping polycurve.
|
// Output the overlapping polycurve.
|
||||||
CGAL_assertion(ocv.number_of_subcurves() > 0);
|
CGAL_assertion(ocv.number_of_subcurves() > 0);
|
||||||
*oi++ = make_object(ocv);
|
*oi++ = make_object(ocv);
|
||||||
|
|
@ -887,7 +887,7 @@ public:
|
||||||
else {
|
else {
|
||||||
// The left point of the current subcurve of one
|
// The left point of the current subcurve of one
|
||||||
// polycurve coincides with the current subcurve of the
|
// 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
|
// previous iteration: Output the intersection
|
||||||
// point. The derivative of at least one of the
|
// point. The derivative of at least one of the
|
||||||
// polycurves is not defined at this point, so we give
|
// polycurves is not defined at this point, so we give
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ public:
|
||||||
if (is_vertical(xcv1)) return (is_vertical(xcv2)) ? EQUAL : SMALLER;
|
if (is_vertical(xcv1)) return (is_vertical(xcv2)) ? EQUAL : SMALLER;
|
||||||
else if (is_vertical(xcv2)) return (LARGER);
|
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.
|
// endpoints.
|
||||||
if (has_left1 && has_left2) {
|
if (has_left1 && has_left2) {
|
||||||
// Obtain the left endpoints of xcv1 and xcv2.
|
// Obtain the left endpoints of xcv1 and xcv2.
|
||||||
|
|
|
||||||
|
|
@ -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
|
/*! Insert a range of x-monotone curves into an empty arrangement
|
||||||
* \param arr the resulting 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
|
* \param end past-the-end curve range
|
||||||
*/
|
*/
|
||||||
template <typename GeometryTraits_2, typename TopologyTraits,
|
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
|
/*! Insert a range of x-monotone curves and a range of isolated points into
|
||||||
* an empty arrangement
|
* an empty arrangement
|
||||||
* \param arr the resulting 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 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
|
* \param end_points past-the-end point range
|
||||||
*/
|
*/
|
||||||
template <typename GeometryTraits_2, typename TopologyTraits,
|
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
|
/*! Insert a range of x-monotone curves into a non-empty arrangement
|
||||||
* \param arr the resulting 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
|
* \param end past-the-end curve range
|
||||||
*/
|
*/
|
||||||
template <typename GeometryTraits_2, typename TopologyTraits,
|
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
|
/*! Insert a range of x-monotone curves into an empty arrangement
|
||||||
* \param arr the resulting 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
|
* \param end past-the-end curve range
|
||||||
*/
|
*/
|
||||||
template <typename GeometryTraits_2, typename TopologyTraits,
|
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
|
/*! Insert a range of x-monotone curves into an empty arrangement
|
||||||
* \param arr the resulting 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
|
* \param end past-the-end curve range
|
||||||
*/
|
*/
|
||||||
template <typename GeometryTraits_2, typename TopologyTraits,
|
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
|
/*! Insert a range of x-monotone curves into a non-empty arrangement
|
||||||
* \param arr the resulting 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
|
* \param end past-the-end curve range
|
||||||
*/
|
*/
|
||||||
template <typename GeometryTraits_2, typename TopologyTraits,
|
template <typename GeometryTraits_2, typename TopologyTraits,
|
||||||
|
|
|
||||||
|
|
@ -1791,7 +1791,7 @@ Arrangement_on_surface_2<GeomTraits, TopTraits>::
|
||||||
remove_edge(Halfedge_handle e, bool remove_source, bool remove_target)
|
remove_edge(Halfedge_handle e, bool remove_source, bool remove_target)
|
||||||
{
|
{
|
||||||
// Comment EBEB 2012-08-06: this has become a simple forwarding function
|
// 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
|
// has been moved to _remove_edge itself, as additional computed
|
||||||
// data is reused there
|
// 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;
|
DInner_ccb* hole2 = (prev2->is_on_inner_ccb()) ? prev2->inner_ccb() : NULL;
|
||||||
|
|
||||||
if ((hole1 == hole2) && (hole1 != 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
|
// take place
|
||||||
|
|
||||||
// EBEB 2012-07-26 the following code enables optimizations:
|
// EBEB 2012-07-26 the following code enables optimizations:
|
||||||
|
|
@ -4245,7 +4245,7 @@ _remove_edge(DHalfedge* e, bool remove_source, bool remove_target)
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
// If f1 == f2 (same_face-case), then we consider two loops that occur when
|
// 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
|
// 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
|
// 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
|
// 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
|
// As the outer CCB of f1 may be represented by any of the
|
||||||
// halfedges in between he1 -> ... -> he2 (the halfedges in between
|
// halfedges in between he1 -> ... -> he2 (the halfedges in between
|
||||||
// are on the new outer CCB we have just created), we represent the
|
// 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);
|
oc1->set_halfedge(prev1);
|
||||||
|
|
||||||
// Notify the observers that a new outer CCB has been formed.
|
// Notify the observers that a new outer CCB has been formed.
|
||||||
|
|
|
||||||
|
|
@ -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 >
|
template < class CurvedKernelViaAnalysis_2, class FunctorBase >
|
||||||
class Intersect_2 :
|
class Intersect_2 :
|
||||||
public FunctorBase::Intersect_2 {
|
public FunctorBase::Intersect_2 {
|
||||||
|
|
|
||||||
|
|
@ -1200,7 +1200,7 @@ Lexit:
|
||||||
} // while(!s_stack.empty())
|
} // while(!s_stack.empty())
|
||||||
|
|
||||||
std::reverse(rev_points.begin(), rev_points.end());
|
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();
|
unsigned rsize = rev_points.size();
|
||||||
rev_points.resize(rsize + points.size());
|
rev_points.resize(rsize + points.size());
|
||||||
std::copy(points.begin(), points.end(), rev_points.begin() + rsize);
|
std::copy(points.begin(), points.end(), rev_points.begin() + rsize);
|
||||||
|
|
|
||||||
|
|
@ -251,7 +251,7 @@ namespace CGAL {
|
||||||
{
|
{
|
||||||
formatter.read_face_begin();
|
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).
|
// is valid (non-fictitious).
|
||||||
DFace* new_f = m_arr_access.new_face();
|
DFace* new_f = m_arr_access.new_face();
|
||||||
const bool is_unbounded = (formatter.read_vertex_index() != 0);
|
const bool is_unbounded = (formatter.read_vertex_index() != 0);
|
||||||
|
|
|
||||||
|
|
@ -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).
|
* polylines, circular arcs or splines).
|
||||||
*/
|
*/
|
||||||
Fig_arrow_mode arrow_mode () const
|
Fig_arrow_mode arrow_mode () const
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,6 @@
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/Arr_batched_point_location.h>
|
#include <CGAL/Arr_batched_point_location.h>
|
||||||
#include <CGAL/Arr_point_location_result.h>
|
#include <CGAL/Arr_point_location_result.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/Timer.h>
|
#include <CGAL/Timer.h>
|
||||||
#include <CGAL/Arr_tags.h>
|
#include <CGAL/Arr_tags.h>
|
||||||
#include <CGAL/Arrangement_on_surface_2.h>
|
#include <CGAL/Arrangement_on_surface_2.h>
|
||||||
|
|
|
||||||
|
|
@ -6,7 +6,7 @@
|
||||||
#include <string>
|
#include <string>
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/Timer.h>
|
#include <CGAL/Timer.h>
|
||||||
#include <CGAL/Arrangement_on_surface_2.h>
|
#include <CGAL/Arrangement_on_surface_2.h>
|
||||||
#include <CGAL/Arr_overlay_2.h>
|
#include <CGAL/Arr_overlay_2.h>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#ifndef CGAL_POINT_LOCATION_DYNAMIC_TEST_H
|
#ifndef CGAL_POINT_LOCATION_DYNAMIC_TEST_H
|
||||||
#define CGAL_POINT_LOCATION_DYNAMIC_TEST_H
|
#define CGAL_POINT_LOCATION_DYNAMIC_TEST_H
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
#include "Point_location_test.h"
|
#include "Point_location_test.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,6 @@
|
||||||
|
|
||||||
#include <vector>
|
#include <vector>
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/Timer.h>
|
#include <CGAL/Timer.h>
|
||||||
#include <CGAL/Arrangement_on_surface_2.h>
|
#include <CGAL/Arrangement_on_surface_2.h>
|
||||||
#include <CGAL/Arr_naive_point_location.h>
|
#include <CGAL/Arr_naive_point_location.h>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#ifndef SEGMENT_READER_H
|
#ifndef SEGMENT_READER_H
|
||||||
#define SEGMENT_READER_H
|
#define SEGMENT_READER_H
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/Bbox_2.h>
|
#include <CGAL/Bbox_2.h>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#ifndef CGAL_TRAITS_BASE_TEST_H
|
#ifndef CGAL_TRAITS_BASE_TEST_H
|
||||||
#define CGAL_TRAITS_BASE_TEST_H
|
#define CGAL_TRAITS_BASE_TEST_H
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#ifndef CGAL_TRAITS_TEST_H
|
#ifndef CGAL_TRAITS_TEST_H
|
||||||
#define CGAL_TRAITS_TEST_H
|
#define CGAL_TRAITS_TEST_H
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <fstream>
|
#include <fstream>
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
#include <list>
|
#include <list>
|
||||||
#include <utility>
|
#include <utility>
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <CGAL/Arr_vertical_decomposition_2.h>
|
#include <CGAL/Arr_vertical_decomposition_2.h>
|
||||||
#include <CGAL/Arr_point_location_result.h>
|
#include <CGAL/Arr_point_location_result.h>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,11 @@ set(CGAL_GMPZ_NT 14)
|
||||||
set(CORE_INT_NT 15)
|
set(CORE_INT_NT 15)
|
||||||
set(CORE_RAT_NT 16)
|
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.")
|
message(STATUS "GMP is disable. Try to use LEDA instead.")
|
||||||
set(GMPZ_NT ${LEDA_INT_NT})
|
set(GMPZ_NT ${LEDA_INT_NT})
|
||||||
set(QUOTIENT_CGAL_GMPZ_NT ${LEDA_RAT_NT})
|
set(QUOTIENT_CGAL_GMPZ_NT ${LEDA_RAT_NT})
|
||||||
|
|
@ -894,7 +898,7 @@ endfunction()
|
||||||
#---------------------------------------------------------------------#
|
#---------------------------------------------------------------------#
|
||||||
function(test_polycurve_conic_traits)
|
function(test_polycurve_conic_traits)
|
||||||
# echo polycurve test starting
|
# 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")
|
MESSAGE(STATUS "test_polycurve_conic_traits requires CORE and will not be executed")
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -965,7 +969,7 @@ endfunction()
|
||||||
# polycurve bezier traits
|
# polycurve bezier traits
|
||||||
#---------------------------------------------------------------------#
|
#---------------------------------------------------------------------#
|
||||||
function(test_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")
|
MESSAGE(STATUS "test_polycurve_bezier_traits requires CORE and will not be executed")
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -1074,7 +1078,7 @@ endfunction()
|
||||||
# conic traits
|
# conic traits
|
||||||
#---------------------------------------------------------------------#
|
#---------------------------------------------------------------------#
|
||||||
function(test_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")
|
MESSAGE(STATUS "test_conic_traits requires CORE and will not be executed")
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -1205,7 +1209,7 @@ endfunction()
|
||||||
# bezier traits
|
# bezier traits
|
||||||
#---------------------------------------------------------------------#
|
#---------------------------------------------------------------------#
|
||||||
function(test_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")
|
MESSAGE(STATUS "test_bezier_traits requires CORE and will not be executed")
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -1252,7 +1256,7 @@ endfunction()
|
||||||
# rational arc traits
|
# rational arc traits
|
||||||
#---------------------------------------------------------------------#
|
#---------------------------------------------------------------------#
|
||||||
function(test_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")
|
MESSAGE(STATUS "test_rational_arc_traits requires CORE and will not be executed")
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
@ -1277,7 +1281,10 @@ endfunction()
|
||||||
#---------------------------------------------------------------------#
|
#---------------------------------------------------------------------#
|
||||||
function(test_algebraic_traits_gmp)
|
function(test_algebraic_traits_gmp)
|
||||||
#TODO: Adapt
|
#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(nt ${CGAL_GMPZ_NT})
|
||||||
set(kernel ${UNIVARIATE_ALGEBRAIC_KERNEL})
|
set(kernel ${UNIVARIATE_ALGEBRAIC_KERNEL})
|
||||||
set(geom_traits ${ALGEBRAIC_GEOM_TRAITS})
|
set(geom_traits ${ALGEBRAIC_GEOM_TRAITS})
|
||||||
|
|
@ -1316,7 +1323,7 @@ endfunction()
|
||||||
#---------------------------------------------------------------------#
|
#---------------------------------------------------------------------#
|
||||||
function(test_algebraic_traits_core)
|
function(test_algebraic_traits_core)
|
||||||
#TODO: Adapt
|
#TODO: Adapt
|
||||||
if($ENV{CGAL_DISABLE_GMP})
|
if(CGAL_DISABLE_GMP)
|
||||||
MESSAGE(STATUS "test_algebraic_traits_core requires CORE and will not be executed")
|
MESSAGE(STATUS "test_algebraic_traits_core requires CORE and will not be executed")
|
||||||
return()
|
return()
|
||||||
endif()
|
endif()
|
||||||
|
|
|
||||||
|
|
@ -1751,7 +1751,7 @@ compile_and_run test_io
|
||||||
|
|
||||||
compile_and_run test_sgm
|
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
|
if [ -f $FULL_ERROR_DESCRIPTION_FILE ] ; then
|
||||||
echo "******************** appending all error outputs ********************" >> $ERRORFILE
|
echo "******************** appending all error outputs ********************" >> $ERRORFILE
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
// Constructing an arrangement of polycurves.
|
// Constructing an arrangement of polycurves.
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/config.h>
|
||||||
#ifndef CGAL_USE_CORE
|
#ifndef CGAL_USE_CORE
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
int main()
|
int main()
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/config.h>
|
||||||
|
|
||||||
#include "test_configuration.h"
|
#include "test_configuration.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/config.h>
|
||||||
|
|
||||||
#ifndef CGAL_USE_CORE
|
#ifndef CGAL_USE_CORE
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,7 @@
|
||||||
|
|
||||||
// Constructing an arrangement of polycurves.
|
// Constructing an arrangement of polycurves.
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/config.h>
|
||||||
#ifndef CGAL_USE_CORE
|
#ifndef CGAL_USE_CORE
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
int main ()
|
int main ()
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
// Testing the do_equal function
|
// Testing the do_equal function
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/config.h>
|
||||||
#ifndef CGAL_USE_CORE
|
#ifndef CGAL_USE_CORE
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
int main()
|
int main()
|
||||||
|
|
|
||||||
|
|
@ -5,7 +5,7 @@
|
||||||
|
|
||||||
#include "test_configuration.h"
|
#include "test_configuration.h"
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/config.h>
|
||||||
|
|
||||||
#if ((TEST_GEOM_TRAITS == CORE_CONIC_GEOM_TRAITS) || \
|
#if ((TEST_GEOM_TRAITS == CORE_CONIC_GEOM_TRAITS) || \
|
||||||
(TEST_GEOM_TRAITS == BEZIER_GEOM_TRAITS) || \
|
(TEST_GEOM_TRAITS == BEZIER_GEOM_TRAITS) || \
|
||||||
|
|
|
||||||
|
|
@ -32,7 +32,7 @@
|
||||||
|
|
||||||
#include "test_configuration.h"
|
#include "test_configuration.h"
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/config.h>
|
||||||
|
|
||||||
#if ((TEST_GEOM_TRAITS == CORE_CONIC_GEOM_TRAITS) || \
|
#if ((TEST_GEOM_TRAITS == CORE_CONIC_GEOM_TRAITS) || \
|
||||||
(TEST_GEOM_TRAITS == BEZIER_GEOM_TRAITS) || \
|
(TEST_GEOM_TRAITS == BEZIER_GEOM_TRAITS) || \
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "test_configuration.h"
|
#include "test_configuration.h"
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/config.h>
|
||||||
|
|
||||||
#if ((TEST_GEOM_TRAITS == CORE_CONIC_GEOM_TRAITS) || \
|
#if ((TEST_GEOM_TRAITS == CORE_CONIC_GEOM_TRAITS) || \
|
||||||
(TEST_GEOM_TRAITS == BEZIER_GEOM_TRAITS) || \
|
(TEST_GEOM_TRAITS == BEZIER_GEOM_TRAITS) || \
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
#include "test_configuration.h"
|
#include "test_configuration.h"
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/config.h>
|
||||||
|
|
||||||
#if ((TEST_GEOM_TRAITS == CORE_CONIC_GEOM_TRAITS) || \
|
#if ((TEST_GEOM_TRAITS == CORE_CONIC_GEOM_TRAITS) || \
|
||||||
(TEST_GEOM_TRAITS == BEZIER_GEOM_TRAITS) || \
|
(TEST_GEOM_TRAITS == BEZIER_GEOM_TRAITS) || \
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/config.h>
|
||||||
|
|
||||||
#if !defined(CGAL_USE_CORE)
|
#if !defined(CGAL_USE_CORE)
|
||||||
int main()
|
int main()
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include "test_configuration.h"
|
#include "test_configuration.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include "test_configuration.h"
|
#include "test_configuration.h"
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,3 @@
|
||||||
#include <CGAL/basic.h>
|
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <cassert>
|
#include <cassert>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
* Thus, a special treatment is required.
|
* Thus, a special treatment is required.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/config.h>
|
||||||
|
|
||||||
#ifndef CGAL_USE_CORE
|
#ifndef CGAL_USE_CORE
|
||||||
#include <iostream>
|
#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;
|
if (result < 0) return result;
|
||||||
|
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@
|
||||||
* Thus, a special treatment is required.
|
* Thus, a special treatment is required.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
#include <CGAL/config.h>
|
||||||
|
|
||||||
#ifndef CGAL_USE_CORE
|
#ifndef CGAL_USE_CORE
|
||||||
#include <iostream>
|
#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;
|
if (result < 0) return result;
|
||||||
|
|
||||||
std::cout << std::endl;
|
std::cout << std::endl;
|
||||||
|
|
|
||||||
|
|
@ -1,7 +1,6 @@
|
||||||
#include <iostream>
|
#include <iostream>
|
||||||
#include <boost/lexical_cast.hpp>
|
#include <boost/lexical_cast.hpp>
|
||||||
|
|
||||||
#include <CGAL/basic.h>
|
|
||||||
|
|
||||||
#include "test_configuration.h"
|
#include "test_configuration.h"
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -358,152 +358,174 @@ bool is_valid_face_descriptor( typename boost::graph_traits<FaceGraph>::face_des
|
||||||
/*!
|
/*!
|
||||||
\ingroup PkgBGLHelperFct
|
\ingroup PkgBGLHelperFct
|
||||||
* \brief checks the integrity of `g`.
|
* \brief checks the integrity of `g`.
|
||||||
*
|
*
|
||||||
* `g` is valid if it follows the rules of the `HalfedgeListGraph` concept,
|
* `g` is valid if it follows the rules of the `HalfedgeListGraph` concept,
|
||||||
* and all of its associations are reciprocal.
|
* and all of its associations are reciprocal.
|
||||||
* For example, `prev(next(h, g), g)` must be `h`,
|
* For example, `prev(next(h, g), g)` must be `h`,
|
||||||
* and `next(prev(h, g), g)` must be `h`.
|
* and `next(prev(h, g), g)` must be `h`.
|
||||||
* \param g the `Graph` to test.
|
* \param g the `Graph` to test.
|
||||||
* \param verb : if `true`, the details of the check will be written in the standard output.
|
* \param verb : if `true`, the details of the check will be written in the standard output.
|
||||||
*
|
*
|
||||||
* \tparam `Graph` a model of `HalfedgeListGraph`
|
* \tparam `Graph` a model of `HalfedgeListGraph`
|
||||||
* \return `true` if `g` is valid, `false` otherwise.
|
* \return `true` if `g` is valid, `false` otherwise.
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template<typename Graph>
|
template<typename Graph>
|
||||||
bool is_valid_halfedge_graph(const Graph& g, bool verb = false)
|
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>::vertex_descriptor vertex_descriptor;
|
||||||
typedef typename boost::graph_traits<Graph>::vertices_size_type vertex_size_type;
|
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;
|
typedef typename boost::graph_traits<Graph>::halfedges_size_type halfedges_size_type;
|
||||||
|
|
||||||
Verbose_ostream verr(verb);
|
Verbose_ostream verr(verb);
|
||||||
std::size_t num_v(std::distance(boost::begin(vertices(g)), boost::end(vertices(g)))),
|
std::size_t num_v(std::distance(boost::begin(vertices(g)), boost::end(vertices(g)))),
|
||||||
num_h(std::distance(boost::begin(halfedges(g)), boost::end(halfedges(g))));
|
num_e(std::distance(boost::begin(edges(g)), boost::end(edges(g)))),
|
||||||
bool valid = ( 1 != (num_h& 1));
|
num_h(std::distance(boost::begin(halfedges(g)), boost::end(halfedges(g))));
|
||||||
if ( ! valid)
|
|
||||||
|
bool valid = (1 != (num_h&1) && (2*num_e == num_h));
|
||||||
|
if(!valid)
|
||||||
verr << "number of halfedges is odd." << std::endl;
|
verr << "number of halfedges is odd." << std::endl;
|
||||||
|
|
||||||
// All halfedges.
|
// All halfedges.
|
||||||
|
halfedges_size_type n = 0;
|
||||||
halfedges_size_type n = 0;
|
for(halfedge_descriptor begin : halfedges(g))
|
||||||
for(halfedge_descriptor begin : halfedges(g)) {
|
{
|
||||||
if(!valid)
|
if(!valid)
|
||||||
break;
|
break;
|
||||||
verr << "halfedge " << n << std::endl;
|
|
||||||
// Pointer integrity.
|
// Pointer integrity.
|
||||||
valid = valid && ( next(begin, g) != boost::graph_traits<Graph>::null_halfedge());
|
valid = valid && (next(begin, g) != boost::graph_traits<Graph>::null_halfedge());
|
||||||
valid = valid && ( opposite(begin, g) != boost::graph_traits<Graph>::null_halfedge());
|
valid = valid && (opposite(begin, g) != boost::graph_traits<Graph>::null_halfedge());
|
||||||
if ( ! valid) {
|
if(!valid)
|
||||||
verr << " pointer integrity corrupted (ptr==0)."
|
{
|
||||||
<< std::endl;
|
verr << "halfedge " << n << " next / opposite halfedges are null." << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
//edge integrity
|
|
||||||
valid = valid && ( halfedge(edge(begin, g), g) == begin);
|
// edge integrity
|
||||||
|
valid = valid && (halfedge(edge(begin, g), g) == begin);
|
||||||
|
|
||||||
// opposite integrity.
|
// opposite integrity.
|
||||||
valid = valid && ( opposite(begin, g) != begin);
|
valid = valid && (opposite(begin, g) != begin);
|
||||||
valid = valid && ( opposite(opposite(begin, g), g) == begin);
|
valid = valid && (opposite(opposite(begin, g), g) == begin);
|
||||||
if ( ! valid) {
|
if(!valid)
|
||||||
verr << " opposite pointer integrity corrupted."
|
{
|
||||||
<< std::endl;
|
verr << "halfedge " << n << " invalid halfedge opposite()." << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// previous integrity.
|
// previous integrity.
|
||||||
valid = valid && ( prev(next(begin, g), g) == begin);
|
valid = valid && (prev(next(begin, g), g) == begin);
|
||||||
valid = valid && ( next(prev(begin, g), g) == begin);
|
valid = valid && (next(prev(begin, g), g) == begin);
|
||||||
if ( ! valid) {
|
if(!valid)
|
||||||
verr << " previous pointer integrity corrupted."
|
{
|
||||||
<< std::endl;
|
verr << "halfedge " << n << " prev(next(hd)) != hd OR next(prev(hd)) != hd" << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// vertex integrity.
|
// vertex integrity.
|
||||||
valid = valid && ( target(begin, g) != boost::graph_traits<Graph>::null_vertex());
|
valid = valid && (target(begin, g) != boost::graph_traits<Graph>::null_vertex());
|
||||||
if ( ! valid) {
|
if(!valid)
|
||||||
verr << " vertex pointer integrity corrupted."
|
{
|
||||||
<< std::endl;
|
verr << "halfedge " << n << " target of halfedge is the null vertex." << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
valid = valid && ( target(begin, g) ==
|
|
||||||
target(opposite(next(begin, g), g), g));
|
valid = valid && (target(begin, g) == target(opposite(next(begin, g), g), g));
|
||||||
if ( ! valid) {
|
if(!valid)
|
||||||
verr << " vertex pointer integrity2 corrupted."
|
{
|
||||||
<< std::endl;
|
verr << "halfedge " << n << " target(hd) != source(next(hd))." << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
++n;
|
++n;
|
||||||
}
|
}
|
||||||
if ( valid && n != num_h)
|
|
||||||
|
if(valid && n != num_h)
|
||||||
verr << "counting halfedges failed." << std::endl;
|
verr << "counting halfedges failed." << std::endl;
|
||||||
|
|
||||||
// All vertices.
|
// All vertices.
|
||||||
vertex_size_type v = 0;
|
vertex_size_type v = 0;
|
||||||
n = 0;
|
n = 0;
|
||||||
for(vertex_descriptor vbegin : vertices(g)){
|
for(vertex_descriptor vbegin : vertices(g))
|
||||||
|
{
|
||||||
if(!valid)
|
if(!valid)
|
||||||
break;
|
break;
|
||||||
verr << "vertex " << v << std::endl;
|
|
||||||
// Pointer integrity.
|
// Pointer integrity.
|
||||||
if ( halfedge(vbegin, g) != boost::graph_traits<Graph>::null_halfedge())
|
if(halfedge(vbegin, g) != boost::graph_traits<Graph>::null_halfedge())
|
||||||
valid = valid && (
|
valid = valid && (target(halfedge(vbegin, g), g) == vbegin);
|
||||||
target( halfedge(vbegin, g), g) == vbegin);
|
|
||||||
else
|
else
|
||||||
valid = false;
|
valid = false;
|
||||||
if ( ! valid) {
|
|
||||||
verr << " halfedge pointer in vertex corrupted."
|
if(!valid)
|
||||||
<< std::endl;
|
{
|
||||||
|
verr << "vertex " << v << " halfedge incident to vertex is the null halfedge." << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// cycle-around-vertex test.
|
// cycle-around-vertex test.
|
||||||
halfedge_descriptor h = halfedge(vbegin, g);
|
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;
|
halfedge_descriptor ge = h;
|
||||||
do {
|
do
|
||||||
verr << " halfedge " << n << std::endl;
|
{
|
||||||
++n;
|
++n;
|
||||||
h = opposite(next(h, g), g);
|
h = opposite(next(h, g), g);
|
||||||
valid = valid && ( n <= num_h && n!=0);
|
valid = valid && (n <= num_h && n!=0);
|
||||||
if ( ! valid)
|
if(!valid)
|
||||||
verr << " too many halfedges around vertices."
|
{
|
||||||
<< std::endl;
|
verr << "vertex " << v << " too many halfedges around vertex." << std::endl;
|
||||||
} while ( valid && (h != ge));
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while (valid && (h != ge));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(!valid)
|
||||||
|
break;
|
||||||
|
|
||||||
++v;
|
++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);
|
|
||||||
|
|
||||||
|
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);
|
||||||
|
|
||||||
// All halfedges.
|
// All halfedges.
|
||||||
n = 0;
|
n = 0;
|
||||||
for(halfedge_descriptor i : halfedges(g)){
|
for(halfedge_descriptor i : halfedges(g))
|
||||||
verr << "halfedge " << n << std::endl;
|
{
|
||||||
// At least triangular facets and distinct geometry.
|
// At least triangular facets and distinct geometry.
|
||||||
valid = valid && ( next(i, g) != i);
|
valid = valid && (next(i, g) != i);
|
||||||
valid = valid && ( target(i, g) != target(opposite(i, g), g));
|
valid = valid && (target(i, g) != target(opposite(i, g), g));
|
||||||
if ( ! valid) {
|
if(!valid)
|
||||||
verr << " pointer validity corrupted."
|
{
|
||||||
<< std::endl;
|
verr << "halfedge " << n << " pointer validity corrupted." << std::endl;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
++n;
|
|
||||||
}
|
|
||||||
valid = valid && (n == num_h);
|
|
||||||
if ( n != num_h)
|
|
||||||
verr << "counting halfedges failed." << std::endl;
|
|
||||||
|
|
||||||
verr << "structure is "
|
++n;
|
||||||
<< ( valid ? "valid." : "NOT VALID.") << std::endl;
|
}
|
||||||
return valid;
|
|
||||||
|
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;
|
||||||
|
|
||||||
|
return valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup PkgBGLHelperFct
|
\ingroup PkgBGLHelperFct
|
||||||
* \brief checks the integrity of `g`.
|
* \brief checks the integrity of `g`.
|
||||||
*
|
*
|
||||||
* `g` is valid if it is a valid `HalfedgeListGraph`, if it follows the rules
|
* `g` is valid if it is a valid `HalfedgeListGraph`, if it follows the rules
|
||||||
* of the `FaceListGraph` concept, and all of its associations are reciprocal.
|
* of the `FaceListGraph` concept, and all of its associations are reciprocal.
|
||||||
* For example, `face(halfedge(f,g),g)` must be `f`.
|
* For example, `face(halfedge(f,g),g)` must be `f`.
|
||||||
|
|
@ -513,134 +535,159 @@ return valid;
|
||||||
*
|
*
|
||||||
* \tparam `Graph` a model of `FaceListGraph`
|
* \tparam `Graph` a model of `FaceListGraph`
|
||||||
* \return `true` if `g` is valid, `false` otherwise.
|
* \return `true` if `g` is valid, `false` otherwise.
|
||||||
*
|
*
|
||||||
* \see `is_valid_halfedge_graph()`
|
* \see `is_valid_halfedge_graph()`
|
||||||
*/
|
*/
|
||||||
template<typename Graph>
|
template<typename Graph>
|
||||||
bool is_valid_face_graph(const Graph& g, bool verb = false)
|
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>::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>::face_descriptor face_descriptor;
|
||||||
typedef typename boost::graph_traits<Graph>::faces_size_type faces_size_type;
|
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)))),
|
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))));
|
num_h(std::distance(boost::begin(halfedges(g)), boost::end(halfedges(g))));
|
||||||
|
|
||||||
//is valid halfedge_graph ?
|
//is valid halfedge_graph ?
|
||||||
bool valid=is_valid_halfedge_graph(g, verb);
|
bool valid = is_valid_halfedge_graph(g, verb);
|
||||||
if ( ! valid) {
|
if(!valid)
|
||||||
return false;
|
return false;
|
||||||
}
|
|
||||||
Verbose_ostream verr(verb);
|
Verbose_ostream verr(verb);
|
||||||
|
|
||||||
// All faces.
|
// All faces.
|
||||||
faces_size_type f = 0;
|
faces_size_type f = 0;
|
||||||
std::size_t n = 0;
|
std::size_t n = 0;
|
||||||
halfedges_size_type nb = 0;
|
halfedges_size_type nb = 0;
|
||||||
for(face_descriptor fbegin : faces(g)){
|
|
||||||
|
for(face_descriptor fbegin : faces(g))
|
||||||
|
{
|
||||||
if(!valid)
|
if(!valid)
|
||||||
break;
|
break;
|
||||||
verr << "face " << f << std::endl;
|
|
||||||
// Pointer integrity.
|
// Pointer integrity.
|
||||||
if ( halfedge(fbegin, g) != boost::graph_traits<Graph>::null_halfedge())
|
if(halfedge(fbegin, g) != boost::graph_traits<Graph>::null_halfedge())
|
||||||
valid = valid && (
|
valid = valid && (face(halfedge(fbegin, g), g) == fbegin);
|
||||||
face(halfedge(fbegin, g), g) == fbegin);
|
|
||||||
else
|
else
|
||||||
valid = false;
|
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;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// cycle-around-face test.
|
// cycle-around-face test.
|
||||||
halfedge_descriptor h = halfedge( fbegin, g);
|
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;
|
halfedge_descriptor ge = h;
|
||||||
do {
|
do
|
||||||
verr << " halfedge " << n << std::endl;
|
{
|
||||||
++n;
|
++n;
|
||||||
h = next(h, g);
|
h = next(h, g);
|
||||||
valid = valid && ( n <= num_h && n!=0);
|
valid = valid && (n <= num_h && n != 0);
|
||||||
if ( ! valid)
|
if(!valid)
|
||||||
verr << " too many halfedges around faces."
|
{
|
||||||
<< std::endl;
|
verr << "face " << f << " too many halfedges around face." << std::endl;
|
||||||
} while ( valid && (h != ge));
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
while(valid && (h != ge));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(! valid)
|
||||||
|
break;
|
||||||
|
|
||||||
++f;
|
++f;
|
||||||
}
|
}
|
||||||
if ( valid && f != num_f)
|
|
||||||
|
if(valid && f != num_f)
|
||||||
verr << "counting faces failed." << std::endl;
|
verr << "counting faces failed." << std::endl;
|
||||||
|
|
||||||
for(halfedge_descriptor i : halfedges(g)){
|
std::size_t hn = 0;
|
||||||
|
for(halfedge_descriptor i : halfedges(g))
|
||||||
|
{
|
||||||
|
++hn;
|
||||||
|
|
||||||
//counting borders
|
//counting borders
|
||||||
if ( is_border(i, g))
|
if(is_border(i, g))
|
||||||
++nb;
|
++nb;
|
||||||
|
|
||||||
// face integrity.
|
// face integrity.
|
||||||
|
valid = valid && (face(i, g) == face(next(i, g), g));
|
||||||
valid = valid && ( face(i, g) == face(next(i, g), g));
|
if(!valid)
|
||||||
if ( ! valid) {
|
{
|
||||||
verr << " face pointer integrity2 corrupted."
|
verr << "halfedge " << hn << " face(hd) != face(next(hd))." << std::endl;
|
||||||
<< std::endl;
|
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
verr << "sum border halfedges (2*nb) = " << 2 * nb << std::endl;
|
verr << "sum border halfedges (2*nb) = " << 2 * nb << std::endl;
|
||||||
if ( valid && n + nb != num_h)
|
if(valid && n + nb != num_h)
|
||||||
verr << "counting halfedges via faces failed." << std::endl;
|
verr << "counting halfedges via faces failed." << std::endl;
|
||||||
valid = valid && ( f == num_f);
|
|
||||||
valid = valid && ( n + nb == num_h);
|
valid = valid && (f == num_f);
|
||||||
verr << "is_valid(): structure is " << ( valid ? "valid." :
|
valid = valid && (n + nb == num_h);
|
||||||
"NOT VALID.") << std::endl;
|
verr << "Face Graph Structure is " << (valid ? "valid." : "NOT VALID.") << std::endl;
|
||||||
|
|
||||||
return valid;
|
return valid;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup PkgBGLHelperFct
|
\ingroup PkgBGLHelperFct
|
||||||
* \brief checks the integrity of `g`.
|
* \brief checks the integrity of `g`.
|
||||||
*
|
*
|
||||||
* `g` is valid if it is a valid `FaceListGraph` and it has distinct faces on each side of an edge.
|
* `g` is valid if it is a valid `FaceListGraph` and it has distinct faces on each side of an edge.
|
||||||
* calls `is_valid_face_graph()`.
|
* calls `is_valid_face_graph()`.
|
||||||
*
|
*
|
||||||
* \param g the `Mesh` to test.
|
* \param g the `Mesh` to test.
|
||||||
* \param verb : if `true`, the details of the check will be written in the standard output.
|
* \param verb : if `true`, the details of the check will be written in the standard output.
|
||||||
*
|
*
|
||||||
* \tparam Mesh a model of `FaceListGraph` and `HalfedgeListGraph`, and follows
|
* \tparam Mesh a model of `FaceListGraph` and `HalfedgeListGraph`, and follows
|
||||||
* the definition of a \ref PMPDef "PolygonMesh"
|
* the definition of a \ref PMPDef "PolygonMesh"
|
||||||
* \return `true` if `g` is valid, `false` otherwise.
|
* \return `true` if `g` is valid, `false` otherwise.
|
||||||
*
|
*
|
||||||
* \see `is_valid_face_graph()`
|
* \see `is_valid_face_graph()`
|
||||||
* \see `is_valid_halfedge_graph()`
|
* \see `is_valid_halfedge_graph()`
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
template <typename Mesh>
|
template <typename Mesh>
|
||||||
bool is_valid_polygon_mesh(const Mesh& g, bool verb = false)
|
bool is_valid_polygon_mesh(const Mesh& g, bool verb = false)
|
||||||
{
|
{
|
||||||
typedef typename boost::graph_traits<Mesh>::halfedge_descriptor halfedge_descriptor;
|
typedef typename boost::graph_traits<Mesh>::halfedge_descriptor halfedge_descriptor;
|
||||||
Verbose_ostream verr(verb);
|
|
||||||
bool valid=is_valid_face_graph(g, verb);
|
|
||||||
//test for 2-manifoldness
|
|
||||||
// Distinct facets on each side of an halfedge.
|
|
||||||
for(halfedge_descriptor i : halfedges(g)){
|
|
||||||
valid = valid && (face(i, g) != face(opposite(i, g), g));
|
|
||||||
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;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
if ( ! valid) {
|
|
||||||
verr << " incident facet is not at least a triangle."
|
|
||||||
<< std::endl;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return valid;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
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))
|
||||||
|
{
|
||||||
|
valid = valid && (face(i, g) != face(opposite(i, g), g));
|
||||||
|
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;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
verr << "Polygon Mesh Structure is " << (valid ? "valid." : "NOT VALID.") << std::endl;
|
||||||
|
|
||||||
|
return valid;
|
||||||
|
}
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
\ingroup PkgBGLHelperFct
|
\ingroup PkgBGLHelperFct
|
||||||
|
|
|
||||||
|
|
@ -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(face_normal_t, face_normal, face_normal_map)
|
||||||
CGAL_add_named_parameter(random_seed_t, random_seed, random_seed)
|
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(do_project_t, do_project, do_project)
|
||||||
|
CGAL_add_named_parameter(tolerance_map_t, tolerance_map, tolerance_map)
|
||||||
|
|
||||||
//internal
|
//internal
|
||||||
CGAL_add_named_parameter(weight_calculator_t, weight_calculator, weight_calculator)
|
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
Loading…
Reference in New Issue