diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml
index 4956425db38..c02f87dcbe2 100644
--- a/.github/workflows/build_doc.yml
+++ b/.github/workflows/build_doc.yml
@@ -50,7 +50,7 @@ jobs:
run: |
set -x
sudo apt-get update && sudo apt-get install -y graphviz ssh bibtex2html
- sudo pip install lxml
+ sudo pip install lxml
sudo pip install 'pyquery==1.4.1' # it seems to be the last py2 compatible version
wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen/build_1_8_13/bin/doxygen
sudo mv doxygen_exe /usr/bin/doxygen
@@ -92,7 +92,7 @@ jobs:
egrep -v " ${PR_NUMBER}\." index.html > tmp.html || true
echo "
Manual for PR ${PR_NUMBER} ($ROUND)." >> ./tmp.html
mv tmp.html index.html
- git add ${PR_NUMBER}/$ROUND && git commit -q --amend -m "base commit" && git push -q -f -u origin master
+ git add ${PR_NUMBER}/$ROUND index.html && git commit -q --amend -m "base commit" && git push -q -f -u origin master
else
exit 1
fi
diff --git a/.github/workflows/delete_doc.yml b/.github/workflows/delete_doc.yml
index 1304a7895c9..d648a601e91 100644
--- a/.github/workflows/delete_doc.yml
+++ b/.github/workflows/delete_doc.yml
@@ -26,7 +26,7 @@ jobs:
git rm -r ${PR_NUMBER}
fi
#git diff exits with 1 if there is a diff
- if !git diff --quiet; then
+ if ! git diff --quiet; then
git commit -a --amend -m"base commit" && git push -f -u origin master
fi
diff --git a/.travis.yml b/.travis.yml
deleted file mode 100644
index ad59dd4d765..00000000000
--- a/.travis.yml
+++ /dev/null
@@ -1,79 +0,0 @@
-language: cpp
-dist: bionic
-sudo: required
-git:
- depth: 3
-env:
- matrix:
- - PACKAGE='CHECK'
- - PACKAGE='AABB_tree Advancing_front_surface_reconstruction Algebraic_foundations '
- - PACKAGE='Algebraic_kernel_d Algebraic_kernel_for_circles Algebraic_kernel_for_spheres '
- - PACKAGE='Alpha_shapes_2 Alpha_shapes_3 Apollonius_graph_2 '
- - PACKAGE='Arithmetic_kernel Arrangement_on_surface_2 BGL '
- - PACKAGE='Barycentric_coordinates_2 Boolean_set_operations_2 Bounding_volumes '
- - PACKAGE='Box_intersection_d CGAL_Core CGAL_ImageIO '
- - PACKAGE='CGAL_ipelets Cartesian_kernel Circular_kernel_2 '
- - PACKAGE='Circular_kernel_3 Circulator Classification '
- - PACKAGE='Combinatorial_map Cone_spanners_2 Convex_decomposition_3 '
- - PACKAGE='Convex_hull_2 Convex_hull_3 Convex_hull_d '
- - PACKAGE='Distance_2 Distance_3 Envelope_2 '
- - PACKAGE='Envelope_3 Filtered_kernel Generalized_map '
- - PACKAGE='Generator Geomview GraphicsView '
- - PACKAGE='HalfedgeDS Hash_map Heat_method_3 '
- - PACKAGE='Homogeneous_kernel Hyperbolic_triangulation_2 Inscribed_areas '
- - PACKAGE='Installation Interpolation Intersections_2 '
- - PACKAGE='Intersections_3 Interval_skip_list Interval_support '
- - PACKAGE='Jet_fitting_3 Kernel_23 Kernel_d '
- - PACKAGE='LEDA Linear_cell_complex MacOSX '
- - PACKAGE='Maintenance Matrix_search Mesh_2 '
- - PACKAGE='Mesh_3 Mesher_level Minkowski_sum_2 '
- - PACKAGE='Minkowski_sum_3 Modifier Modular_arithmetic '
- - PACKAGE='Nef_2 Nef_3 Nef_S2 '
- - PACKAGE='NewKernel_d Number_types OpenNL '
- - PACKAGE='Optimal_bounding_box Optimal_transportation_reconstruction_2 Optimisation_basic '
- - PACKAGE='Partition_2 Periodic_2_triangulation_2 Periodic_3_mesh_3 '
- - PACKAGE='Periodic_3_triangulation_3 Periodic_4_hyperbolic_triangulation_2 Point_set_2 '
- - PACKAGE='Point_set_3 Point_set_processing_3 Poisson_surface_reconstruction_3 '
- - PACKAGE='Polygon Polygon_mesh_processing Polygonal_surface_reconstruction '
- - PACKAGE='Polyhedron Polyline_simplification_2 Polynomial '
- - PACKAGE='Polytope_distance_d Principal_component_analysis Principal_component_analysis_LGPL '
- - PACKAGE='Profiling_tools Property_map QP_solver '
- - PACKAGE='Random_numbers Ridges_3 STL_Extension '
- - PACKAGE='Scale_space_reconstruction_3 Scripts SearchStructures '
- - PACKAGE='Segment_Delaunay_graph_2 Segment_Delaunay_graph_Linf_2 Set_movable_separability_2 '
- - PACKAGE='Shape_detection Skin_surface_3 Snap_rounding_2 '
- - PACKAGE='Solver_interface Spatial_searching Spatial_sorting '
- - PACKAGE='Straight_skeleton_2 Stream_lines_2 Stream_support '
- - PACKAGE='Subdivision_method_3 Surface_mesh Surface_mesh_approximation '
- - PACKAGE='Surface_mesh_deformation Surface_mesh_parameterization Surface_mesh_segmentation '
- - PACKAGE='Surface_mesh_shortest_path Surface_mesh_simplification Surface_mesh_skeletonization '
- - PACKAGE='Surface_mesh_topology Surface_mesher Surface_sweep_2 '
- - PACKAGE='TDS_2 TDS_3 Testsuite '
- - PACKAGE='Tetrahedral_remeshing Three Triangulation '
- - PACKAGE='Triangulation_2 Triangulation_3 Union_find '
- - PACKAGE='Visibility_2 Voronoi_diagram_2 wininst '
-compiler: clang
-install:
- - echo "$PWD"
- - if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi
- - /usr/bin/time -f 'Spend time of %C -- %E (real)' bash .travis/install.sh
- - export CXX=clang++-10 CC=clang-10;
-before_script:
- - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe
- - sudo mv doxygen_exe /usr/bin/doxygen
- - sudo chmod +x /usr/bin/doxygen
- - mkdir -p build
- - cd build
- - /usr/bin/time -f 'Spend time of %C -- %E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++1y" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON ..
- - /usr/bin/time -f 'Spend time of %C -- %E (real)' make
- - /usr/bin/time -f 'Spend time of %C -- %E (real)' sudo make install &>/dev/null
- - cd ..
-script:
- - cd ./.travis
- - /usr/bin/time -f 'Spend time of %C -- %E (real)' bash ./build_package.sh $PACKAGE
-notifications:
- email:
- on_success: change
- # default: always
- on_failure: always
- # default: always
diff --git a/.travis/build_package.sh b/.travis/build_package.sh
deleted file mode 100755
index dc41aa16dd1..00000000000
--- a/.travis/build_package.sh
+++ /dev/null
@@ -1,144 +0,0 @@
-#!/bin/bash
-set -e
-[ -n "$CGAL_DEBUG_TRAVIS" ] && set -x
-
-CXX_FLAGS="-DCGAL_NDEBUG -ftemplate-backtrace-limit=0"
-
-function mytime {
- /usr/bin/time -f "Spend time of %C: %E (real)" "$@"
-}
-old_IFS=$IFS
-IFS=$' '
-ROOT="$PWD/.."
-for ARG in $(echo "$@")
-do
-#skip package maintenance
- if [ "$ARG" = "Maintenance" ]; then
- continue
- fi
-cd $ROOT
-
-#install openmesh only if necessary
- if [ "$ARG" = "CHECK" ] || [ "$ARG" = BGL ] || [ "$ARG" = Convex_hull_3 ] ||\
- [ "$ARG" = Polygon_mesh_processing ] || [ "$ARG" = Property_map ] ||\
- [ "$ARG" = Surface_mesh_deformation ] || [ "$ARG" = Surface_mesh_shortest_path ] ||\
- [ "$ARG" = Surface_mesh_simplification ]; then
- mytime sudo bash .travis/install_openmesh.sh
- fi
-
-
- if [ "$ARG" = "CHECK" ]
- then
- cd .travis
- mytime ./generate_travis.sh --check
- cd ..
- IFS=$old_IFS
- mytime zsh $ROOT/Scripts/developer_scripts/test_merge_of_branch HEAD
- #test dependencies
- cd $ROOT
- mytime bash Scripts/developer_scripts/cgal_check_dependencies.sh --check_headers /usr/bin/doxygen
-
- cd .travis
- #parse current matrix and check that no package has been forgotten
-
- IFS=$'\n'
- COPY=0
- MATRIX=()
- for LINE in $(cat "$PWD/packages.txt")
- do
- MATRIX+="$LINE "
- done
-
- PACKAGES=()
- cd ..
- for f in *
- do
- if [ -d "$f/package_info/$f" ]
- then
- PACKAGES+="$f "
- fi
- done
-
- DIFFERENCE=$(echo ${MATRIX[@]} ${PACKAGES[@]} | tr ' ' '\n' | sort | uniq -u)
- IFS=$' '
- if [ "${DIFFERENCE[0]}" != "" ]
- then
- echo "The matrix and the actual package list differ : ."
- echo ${DIFFERENCE[*]}
- echo "You should run generate_travis.sh."
- exit 1
- fi
- echo "Matrix is up to date."
- #check if non standard cgal installation works
- cd $ROOT
- mkdir build_test
- cd build_test
- mytime cmake -DCMAKE_INSTALL_PREFIX=install/ -DCGAL_BUILD_THREE_DOC=TRUE ..
- mytime make install
- # test install with minimal downstream example
- mkdir installtest
- cd installtest
- touch main.cpp
- mkdir build
- echo 'project(Example)' >> CMakeLists.txt
- echo 'set(PROJECT_SRCS ${PROJECT_SOURCE_DIR}/main.cpp)' >> CMakeLists.txt
- echo 'find_package(CGAL REQUIRED)' >> CMakeLists.txt
- echo 'add_executable(${PROJECT_NAME} ${PROJECT_SRCS})' >> CMakeLists.txt
- echo 'target_link_libraries(${PROJECT_NAME} CGAL::CGAL)' >> CMakeLists.txt
- echo '#include "CGAL/remove_outliers.h"' >> main.cpp
- cd build
- mytime cmake -DCMAKE_INSTALL_PREFIX=../../install -DCGAL_BUILD_THREE_DOC=TRUE ..
- exit 0
- fi
-
- if [ "$ARG" = "Installation" ]
- then
- mkdir build_dir
- cd build_dir
- cmake -DWITH_tests=ON -DBUILD_TESTING=ON ..
- ctest -j2 -L CGAL_cmake_testsuite --output-on-failure
- cd ..
- rm -rf ./build_dir
- #==-- configure all CGAL with -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON, and then launch CTest on a few labels. --==
- mkdir config_dir
- cd config_dir
- cmake -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON -DBUILD_TESTING=ON ..
- ctest -j2 -L AABB_tree --output-on-failure
- cd ..
- rm -rf ./config_dir
- exit 0
- fi
-
- IFS=$old_IFS
-
- if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ]; then
- DO_IGNORE=FALSE
- . $ROOT/.travis/test_package.sh "$ROOT" "$ARG"
- echo "DO_IGNORE is $DO_IGNORE"
- if [ "$DO_IGNORE" = "TRUE" ]; then
- continue
- fi
- fi
- IFS=$' '
- mkdir -p build-travis
- cd build-travis
- WITHDEMOS=ON
- if [ "$ARG" = "Polyhedron" ]; then
- WITHDEMOS=OFF
- fi
- EXTRA_CXX_FLAGS=
- case "$CC" in
- clang*)
- EXTRA_CXX_FLAGS="-Werror=inconsistent-missing-override"
- ;;
- esac
-
-
- mytime cmake -DCMAKE_CXX_FLAGS="${CXX_FLAGS} ${EXTRA_CXX_FLAGS}" -DCGAL_DONT_OVERRIDE_CMAKE_FLAGS:BOOL=ON -DBUILD_TESTING=ON -DWITH_tests=ON -DWITH_examples=ON -DWITH_demos=$WITHDEMOS ..
- mytime ctest -j2 -L $ARG'([_][A-Z]|$)' -E execution___of__ --output-on-failure
-done
-IFS=$old_IFS
-# Local Variables:
-# tab-width: 2
-# sh-basic-offset: 2
-# End:
diff --git a/.travis/generate_travis.sh b/.travis/generate_travis.sh
deleted file mode 100755
index cef9ff07c49..00000000000
--- a/.travis/generate_travis.sh
+++ /dev/null
@@ -1,94 +0,0 @@
-#!/bin/bash
-
-CHECK=
-case $1 in
- --check) CHECK=y;;
-esac
-
-set -e
-cd ../
-
-if [ -f "$PWD/.travis/packages.txt" ]
-then
- rm "$PWD/.travis/packages.txt"
-fi
-
-#find all the packages
-PACKAGES=()
-INDEX=0
-i=0
-for f in *
-do
- if [ -d "$f/package_info/$f" ]
- then
- echo "$f" >> ./tmp.txt
- fi
-done
- LC_ALL=C sort ./tmp.txt > ./.travis/packages.txt
- rm ./tmp.txt
- while read p; do
- PACKAGES[$INDEX]+="$p "
- i=$[i+1]
- if [ $i = 3 ]
- then
- i=0
- INDEX=$[INDEX+1]
- fi
-done <./.travis/packages.txt
-if [ -f ".travis.yml" ]
-then
- #copy the current .travis.yml for later check
- mv ./.travis.yml ./.travis.old
-fi
-#writes the first part of the file
-old_IFS=$IFS
-IFS=$'\n'
-for LINE in $(cat "$PWD/.travis/template.txt")
-do
- if [ "$LINE" != " matrix:" ]
- then
- echo "$LINE" >> .travis.yml
- else
- break
- fi
-done
-echo " matrix:" >> .travis.yml
-#writes the matrix
-echo " - PACKAGE='CHECK'" >> .travis.yml
-for package in ${PACKAGES[@]}
-do
-echo " - PACKAGE='$package'" >> .travis.yml
-done
-
-#writes the end of the file
-COPY=0
-for LINE in $(cat "$PWD/.travis/template.txt")
-do
- if [ "$LINE" = "compiler: clang" ]
- then
- COPY=1
- fi
- if [ $COPY = 1 ]
- then
- echo "$LINE" >> .travis.yml
- fi
-done
-IFS=$' '
-#check if there are differences between the files
-if ! cmp -s ./.travis.yml ./.travis.old;
-then
- echo ".travis.yml has changed : "
- diff ./.travis.yml ./.travis.old
- if [ -n "$CHECK" ]; then
- echo "You should modify the file .travis/template.txt"
- exit 1
- fi
-fi
-#erase old travis
-rm ./.travis.old
-IFS=$old_IFS
-
-# Local Variables:
-# tab-width: 2
-# sh-basic-offset: 2
-# End:
diff --git a/.travis/install.sh b/.travis/install.sh
deleted file mode 100644
index ec1791b750e..00000000000
--- a/.travis/install.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-
-[ -n "$CGAL_DEBUG_TRAVIS" ] && set -x
-DONE=0
-sudo add-apt-repository ppa:mikhailnov/pulseeffects -y
-sudo apt-get update
-
-while [ $DONE = 0 ]
-do
- DONE=1 && sudo -E apt-get -yq --no-install-suggests --no-install-recommends --force-yes install clang-10 zsh \
-flex bison cmake graphviz libgmp-dev libmpfr-dev libmpfi-dev zlib1g-dev libeigen3-dev \
-qtbase5-dev libqt5sql5-sqlite libqt5opengl5-dev qtscript5-dev libqt5svg5-dev qttools5-dev qttools5-dev-tools qml-module-qtgraphicaleffects libopencv-dev mesa-common-dev libmetis-dev libglu1-mesa-dev \
-libboost1.72-dev || DONE=0 && sudo apt-get update
-done
-exit 0
-
diff --git a/.travis/install_openmesh.sh b/.travis/install_openmesh.sh
deleted file mode 100644
index 9b7a4f8e890..00000000000
--- a/.travis/install_openmesh.sh
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/bin/bash
-mkdir -p openmesh
-cd openmesh
-wget -O openmesh.tar.gz https://www.openmesh.org/media/Releases/6.3/OpenMesh-6.3.tar.gz
-tar xf openmesh.tar.gz --strip-components=1
-sed -i '94i #include ' src/OpenMesh/Tools/Utils/conio.cc
-
-mkdir build
-cd build
-cmake -DBUILD_APPS=FALSE ..
-make -j2
-sudo make -j2 install &>/dev/null
-
-#clean up
-cd ../..
-rm -rf ./openmesh
diff --git a/.travis/packages.txt b/.travis/packages.txt
deleted file mode 100644
index b4874d76f4a..00000000000
--- a/.travis/packages.txt
+++ /dev/null
@@ -1,138 +0,0 @@
-AABB_tree
-Advancing_front_surface_reconstruction
-Algebraic_foundations
-Algebraic_kernel_d
-Algebraic_kernel_for_circles
-Algebraic_kernel_for_spheres
-Alpha_shapes_2
-Alpha_shapes_3
-Apollonius_graph_2
-Arithmetic_kernel
-Arrangement_on_surface_2
-BGL
-Barycentric_coordinates_2
-Boolean_set_operations_2
-Bounding_volumes
-Box_intersection_d
-CGAL_Core
-CGAL_ImageIO
-CGAL_ipelets
-Cartesian_kernel
-Circular_kernel_2
-Circular_kernel_3
-Circulator
-Classification
-Combinatorial_map
-Cone_spanners_2
-Convex_decomposition_3
-Convex_hull_2
-Convex_hull_3
-Convex_hull_d
-Distance_2
-Distance_3
-Envelope_2
-Envelope_3
-Filtered_kernel
-Generalized_map
-Generator
-Geomview
-GraphicsView
-HalfedgeDS
-Hash_map
-Heat_method_3
-Homogeneous_kernel
-Hyperbolic_triangulation_2
-Inscribed_areas
-Installation
-Interpolation
-Intersections_2
-Intersections_3
-Interval_skip_list
-Interval_support
-Jet_fitting_3
-Kernel_23
-Kernel_d
-LEDA
-Linear_cell_complex
-MacOSX
-Maintenance
-Matrix_search
-Mesh_2
-Mesh_3
-Mesher_level
-Minkowski_sum_2
-Minkowski_sum_3
-Modifier
-Modular_arithmetic
-Nef_2
-Nef_3
-Nef_S2
-NewKernel_d
-Number_types
-OpenNL
-Optimal_bounding_box
-Optimal_transportation_reconstruction_2
-Optimisation_basic
-Partition_2
-Periodic_2_triangulation_2
-Periodic_3_mesh_3
-Periodic_3_triangulation_3
-Periodic_4_hyperbolic_triangulation_2
-Point_set_2
-Point_set_3
-Point_set_processing_3
-Poisson_surface_reconstruction_3
-Polygon
-Polygon_mesh_processing
-Polygonal_surface_reconstruction
-Polyhedron
-Polyline_simplification_2
-Polynomial
-Polytope_distance_d
-Principal_component_analysis
-Principal_component_analysis_LGPL
-Profiling_tools
-Property_map
-QP_solver
-Random_numbers
-Ridges_3
-STL_Extension
-Scale_space_reconstruction_3
-Scripts
-SearchStructures
-Segment_Delaunay_graph_2
-Segment_Delaunay_graph_Linf_2
-Set_movable_separability_2
-Shape_detection
-Skin_surface_3
-Snap_rounding_2
-Solver_interface
-Spatial_searching
-Spatial_sorting
-Straight_skeleton_2
-Stream_lines_2
-Stream_support
-Subdivision_method_3
-Surface_mesh
-Surface_mesh_approximation
-Surface_mesh_deformation
-Surface_mesh_parameterization
-Surface_mesh_segmentation
-Surface_mesh_shortest_path
-Surface_mesh_simplification
-Surface_mesh_skeletonization
-Surface_mesh_topology
-Surface_mesher
-Surface_sweep_2
-TDS_2
-TDS_3
-Testsuite
-Tetrahedral_remeshing
-Three
-Triangulation
-Triangulation_2
-Triangulation_3
-Union_find
-Visibility_2
-Voronoi_diagram_2
-wininst
diff --git a/.travis/template.txt b/.travis/template.txt
deleted file mode 100644
index 3b99af1ff13..00000000000
--- a/.travis/template.txt
+++ /dev/null
@@ -1,34 +0,0 @@
-language: cpp
-dist: bionic
-sudo: required
-git:
- depth: 3
-env:
- matrix:
- PACKAGES_MATRIX
-
-compiler: clang
-install:
- - echo "$PWD"
- - if [ -n "$TRAVIS_PULL_REQUEST_BRANCH" ] && [ "$PACKAGE" != CHECK ]; then DO_IGNORE=FALSE; for ARG in $(echo "$PACKAGE");do if [ "$ARG" = "Maintenance" ]; then continue; fi; . $PWD/.travis/test_package.sh "$PWD" "$ARG"; echo "DO_IGNORE is $DO_IGNORE"; if [ "$DO_IGNORE" = "FALSE" ]; then break; fi; done; if [ "$DO_IGNORE" = "TRUE" ]; then travis_terminate 0; fi;fi
- - /usr/bin/time -f 'Spend time of %C -- %E (real)' bash .travis/install.sh
- - export CXX=clang++-10 CC=clang-10;
-before_script:
- - wget -O doxygen_exe https://cgal.geometryfactory.com/~mgimeno/doxygen_exe
- - sudo mv doxygen_exe /usr/bin/doxygen
- - sudo chmod +x /usr/bin/doxygen
- - mkdir -p build
- - cd build
- - /usr/bin/time -f 'Spend time of %C -- %E (real)' cmake -DCMAKE_CXX_FLAGS="-std=c++1y" -DCGAL_HEADER_ONLY=ON -DCMAKE_CXX_FLAGS_RELEASE=-DCGAL_NDEBUG -DWITH_examples=ON -DWITH_demos=ON -DWITH_tests=ON ..
- - /usr/bin/time -f 'Spend time of %C -- %E (real)' make
- - /usr/bin/time -f 'Spend time of %C -- %E (real)' sudo make install &>/dev/null
- - cd ..
-script:
- - cd ./.travis
- - /usr/bin/time -f 'Spend time of %C -- %E (real)' bash ./build_package.sh $PACKAGE
-notifications:
- email:
- on_success: change
- # default: always
- on_failure: always
- # default: always
diff --git a/.travis/test_package.sh b/.travis/test_package.sh
deleted file mode 100644
index 7b01d24ceb4..00000000000
--- a/.travis/test_package.sh
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/bin/bash
-
-#Will cd $1 and test package named $2
-#to find out if it or one of its dependencies has changed in the current branch
-
-DO_IGNORE=FALSE
-cd $1
-
-if [ ! -d "$2" ]; then
- echo "$2 : MISSING PACKAGE. Ignoring."
- DO_IGNORE=TRUE
- exit 1
-fi
-
-
-if [ ! -f "$2/package_info/$2/dependencies" ];then
- echo "No dependencies found for $2"
- bash Scripts/developer_scripts/cgal_check_dependencies.sh --check_headers /usr/bin/doxygen
- exit 1
-fi
-LIST_OF_FILES=$(git diff --name-only origin/master... |cut -d/ -f1 |uniq |sort)
-LIST_OF_DEPS=$(cat "$2/package_info/$2/dependencies")
-echo "$LIST_OF_DEPS"
-for flie in $LIST_OF_DEPS
-do
- [[ $LIST_OF_FILES =~ (^|[[:space:]])$flie($|[[:space:]]) ]] && return
-done
-echo "Package ignored because none of its dependencies has been modified."
-DO_IGNORE=TRUE
-
diff --git a/.travis/windows.h b/.travis/windows.h
deleted file mode 100644
index a774a068df3..00000000000
--- a/.travis/windows.h
+++ /dev/null
@@ -1,12 +0,0 @@
-#define MAX(a,b) (((a) > (b)) ? (a) : (b))
-#define max(a,b) (((a) > (b)) ? (a) : (b))
-
-#define MIN(a,b) (((a) < (b)) ? (a) : (b))
-#define min(a,b) (((a) < (b)) ? (a) : (b))
-
-
-#define FAR #error named reserved in windows.h
-#define far #error named reserved in windows.h
-
-#define Polyline #error named reserved in windows.h
-#define Polygon #error named reserved in windows.h
diff --git a/AABB_tree/demo/AABB_tree/AABB_demo.cpp b/AABB_tree/demo/AABB_tree/AABB_demo.cpp
index c69f7aa1281..018e0f69c14 100644
--- a/AABB_tree/demo/AABB_tree/AABB_demo.cpp
+++ b/AABB_tree/demo/AABB_tree/AABB_demo.cpp
@@ -19,18 +19,16 @@
#include
#include
#include
-
+#include
int main(int argc, char **argv)
{
+
+ CGAL::Qt::init_ogl_context(4,3);
QApplication app(argc, argv);
app.setOrganizationDomain("inria.fr");
app.setOrganizationName("INRIA");
app.setApplicationName("AABB tree demo");
- //for windows
-#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0))
- app.setAttribute(Qt::AA_UseDesktopOpenGL);
-#endif
// Import resources from libCGALQt (Qt5).
CGAL_QT_INIT_RESOURCES;
diff --git a/AABB_tree/demo/AABB_tree/CMakeLists.txt b/AABB_tree/demo/AABB_tree/CMakeLists.txt
index 7c006dec292..4ee33e3e45f 100644
--- a/AABB_tree/demo/AABB_tree/CMakeLists.txt
+++ b/AABB_tree/demo/AABB_tree/CMakeLists.txt
@@ -23,7 +23,7 @@ include_directories(BEFORE ./ ./include)
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5)
# Find Qt5 itself
-find_package(Qt5 QUIET COMPONENTS Xml Script OpenGL Gui Svg)
+find_package(Qt5 QUIET COMPONENTS Script OpenGL Gui Svg)
if(CGAL_Qt5_FOUND AND Qt5_FOUND)
@@ -54,7 +54,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
#${CGAL_Qt5_MOC_FILES}
)
# Link with Qt libraries
- target_link_libraries(AABB_demo PRIVATE Qt5::OpenGL Qt5::Gui Qt5::Xml
+ target_link_libraries(AABB_demo PRIVATE Qt5::OpenGL Qt5::Gui
CGAL::CGAL CGAL::CGAL_Qt5)
add_to_cached_list(CGAL_EXECUTABLE_TARGETS AABB_demo)
diff --git a/AABB_tree/demo/AABB_tree/MainWindow.cpp b/AABB_tree/demo/AABB_tree/MainWindow.cpp
index c5d00c638bb..bde07b1b29f 100644
--- a/AABB_tree/demo/AABB_tree/MainWindow.cpp
+++ b/AABB_tree/demo/AABB_tree/MainWindow.cpp
@@ -22,8 +22,6 @@ MainWindow::MainWindow(QWidget* parent)
// saves some pointers from ui, for latter use.
m_pViewer = ui->viewer;
- // does not save the state of the viewer
- m_pViewer->setStateFileName(QString());
// accepts drop events
setAcceptDrops(true);
@@ -45,6 +43,7 @@ MainWindow::MainWindow(QWidget* parent)
MainWindow::~MainWindow()
{
+ m_pViewer->makeCurrent();
delete ui;
}
diff --git a/AABB_tree/demo/AABB_tree/Scene.cpp b/AABB_tree/demo/AABB_tree/Scene.cpp
index 69ba683a21b..b86be7ca292 100644
--- a/AABB_tree/demo/AABB_tree/Scene.cpp
+++ b/AABB_tree/demo/AABB_tree/Scene.cpp
@@ -91,8 +91,8 @@ void Scene::compile_shaders()
//Vertex source code
const char vertex_source[] =
{
- "#version 120 \n"
- "attribute highp vec4 vertex;\n"
+ "#version 150 \n"
+ "in highp vec4 vertex;\n"
"uniform highp mat4 mvp_matrix;\n"
"uniform highp mat4 f_matrix;\n"
"void main(void)\n"
@@ -103,10 +103,11 @@ void Scene::compile_shaders()
//Vertex source code
const char fragment_source[] =
{
- "#version 120 \n"
+ "#version 150 \n"
"uniform highp vec4 color; \n"
+ "out highp vec4 out_color; \n"
"void main(void) { \n"
- "gl_FragColor = color; \n"
+ "out_color = color; \n"
"} \n"
"\n"
};
@@ -139,26 +140,27 @@ void Scene::compile_shaders()
//Vertex source code
const char tex_vertex_source[] =
{
- "#version 120 \n"
- "attribute highp vec4 vertex;\n"
- "attribute highp vec2 tex_coord; \n"
+ "#version 150 \n"
+ "in highp vec4 vertex;\n"
+ "in highp vec2 tex_coord; \n"
"uniform highp mat4 mvp_matrix;\n"
"uniform highp mat4 f_matrix;\n"
- "varying highp vec2 texc;\n"
+ "out highp vec2 texc;\n"
"void main(void)\n"
"{\n"
" gl_Position = mvp_matrix * f_matrix * vertex;\n"
- " texc = tex_coord;\n"
+ " texc = tex_coord;\n"
"}"
};
//Vertex source code
const char tex_fragment_source[] =
{
- "#version 120 \n"
- "uniform sampler2D texture;\n"
- "varying highp vec2 texc;\n"
+ "#version 150 \n"
+ "uniform sampler2D s_texture;\n"
+ "in highp vec2 texc;\n"
+ "out highp vec4 out_color; \n"
"void main(void) { \n"
- "gl_FragColor = texture2D(texture, texc.st);\n"
+ "out_color = vec4(texture(s_texture, texc));\n"
"} \n"
"\n"
};
@@ -1319,12 +1321,8 @@ void Scene::deactivate_cutting_plane()
}
void Scene::initGL()
{
- gl = new QOpenGLFunctions_2_1();
- if(!gl->initializeOpenGLFunctions())
- {
- qFatal("ERROR : OpenGL Functions not initialized. Check your OpenGL Verison (should be >=3.3)");
- exit(1);
- }
+ gl = new QOpenGLFunctions();
+ gl->initializeOpenGLFunctions();
gl->glGenTextures(1, &textureId);
compile_shaders();
diff --git a/AABB_tree/demo/AABB_tree/Scene.h b/AABB_tree/demo/AABB_tree/Scene.h
index 95ea74cdc33..44d7b8239ce 100644
--- a/AABB_tree/demo/AABB_tree/Scene.h
+++ b/AABB_tree/demo/AABB_tree/Scene.h
@@ -86,7 +86,7 @@ public:
private:
// member data
- QOpenGLFunctions_2_1 *gl;
+ QOpenGLFunctions *gl;
Bbox m_bbox;
Polyhedron *m_pPolyhedron;
std::list m_points;
diff --git a/AABB_tree/include/CGAL/AABB_traits.h b/AABB_tree/include/CGAL/AABB_traits.h
index 470420162a7..e443e08a522 100644
--- a/AABB_tree/include/CGAL/AABB_traits.h
+++ b/AABB_tree/include/CGAL/AABB_traits.h
@@ -26,7 +26,6 @@
#include
#include
-#include
/// \file AABB_traits.h
@@ -274,13 +273,13 @@ public:
switch(Traits::longest_axis(bbox))
{
case AT::CGAL_AXIS_X: // sort along x
- std::nth_element(first, middle, beyond, boost::bind(Traits::less_x,_1,_2,m_traits));
+ std::nth_element(first, middle, beyond, [this](const Primitive& p1, const Primitive& p2){ return Traits::less_x(p1, p2, this->m_traits); });
break;
case AT::CGAL_AXIS_Y: // sort along y
- std::nth_element(first, middle, beyond, boost::bind(Traits::less_y,_1,_2,m_traits));
+ std::nth_element(first, middle, beyond, [this](const Primitive& p1, const Primitive& p2){ return Traits::less_y(p1, p2, this->m_traits); });
break;
case AT::CGAL_AXIS_Z: // sort along z
- std::nth_element(first, middle, beyond, boost::bind(Traits::less_z,_1,_2,m_traits));
+ std::nth_element(first, middle, beyond, [this](const Primitive& p1, const Primitive& p2){ return Traits::less_z(p1, p2, this->m_traits); });
break;
default:
CGAL_error();
@@ -429,6 +428,11 @@ public:
Closest_point closest_point_object() const {return Closest_point(*this);}
Compare_distance compare_distance_object() const {return Compare_distance();}
+ typedef enum { CGAL_AXIS_X = 0,
+ CGAL_AXIS_Y = 1,
+ CGAL_AXIS_Z = 2} Axis;
+
+ static Axis longest_axis(const Bounding_box& bbox);
private:
/**
@@ -447,13 +451,6 @@ private:
return internal::Primitive_helper::get_datum(pr,*this).bbox();
}
-
- typedef enum { CGAL_AXIS_X = 0,
- CGAL_AXIS_Y = 1,
- CGAL_AXIS_Z = 2} Axis;
-
- static Axis longest_axis(const Bounding_box& bbox);
-
/// Comparison functions
static bool less_x(const Primitive& pr1, const Primitive& pr2,const AABB_traits& traits)
{
diff --git a/AABB_tree/include/CGAL/AABB_tree.h b/AABB_tree/include/CGAL/AABB_tree.h
index 5f0521e219f..1bb4d0b2d17 100644
--- a/AABB_tree/include/CGAL/AABB_tree.h
+++ b/AABB_tree/include/CGAL/AABB_tree.h
@@ -126,7 +126,7 @@ namespace CGAL {
Self& operator=(const Self&) = delete;
/**
- * @brief Builds the datastructure from a sequence of primitives.
+ * @brief Builds the data structure from a sequence of primitives.
* @param first iterator over first primitive to insert
* @param beyond past-the-end iterator
*
diff --git a/Advancing_front_surface_reconstruction/doc/Advancing_front_surface_reconstruction/Concepts/AdvancingFrontSurfaceReconstructionTraits_3.h b/Advancing_front_surface_reconstruction/doc/Advancing_front_surface_reconstruction/Concepts/AdvancingFrontSurfaceReconstructionTraits_3.h
new file mode 100644
index 00000000000..458f63668af
--- /dev/null
+++ b/Advancing_front_surface_reconstruction/doc/Advancing_front_surface_reconstruction/Concepts/AdvancingFrontSurfaceReconstructionTraits_3.h
@@ -0,0 +1,159 @@
+
+/*!
+\ingroup PkgAdvancingFrontSurfaceReconstructionRef
+\cgalConcept
+
+The concept `AdvancingFrontSurfaceReconstructionTraits_3` describes the requirements
+for the the geometric traits of the class `CGAL::Delaunay_triangulation_3`
+used in the class `CGAL::Advancing_front_surface_reconstruction`.
+It defines the geometric objects (points, segments...) forming the triangulation
+together with a few geometric predicates and constructions on these objects.
+
+\cgalRefines `DelaunayTriangulationTraits_3`
+
+\cgalHasModel All models of `Kernel`.
+*/
+class AdvancingFrontSurfaceReconstructionTraits_3
+{
+public:
+
+/// \name Types
+/// @{
+
+/*!
+The coordinate type.
+*/
+typedef unspecified_type FT;
+
+/*!
+The vector type.
+*/
+typedef unspecified_type Vector_3;
+
+/*!
+The sphere type.
+*/
+typedef unspecified_type Sphere_3;
+
+/*!
+A constructor object that must provide the function operator
+
+`Vector_3 operator()(Point_3 p, Point_3 q)`,
+
+which constructs the vector `q-p`.
+*/
+typedef unspecified_type Construct_vector_3;
+
+/*!
+A constructor object that must provide the function operator
+
+`Vector_3 operator()(Vector_3 v, Vector_3 w)`,
+
+which returns the cross product of `v` and `w`.
+*/
+typedef unspecified_type Construct_cross_product_vector_3;
+
+/*!
+A constructor object that must provide the function operator
+
+`FT operator()(Vector_3 v, Vector_3 w)`,
+
+which returns the scalar (inner) product of `v` and `w`.
+*/
+typedef unspecified_type Compute_scalar_product_3;
+
+/*!
+A constructor object that must provide the function operator
+
+`Sphere_3 operator()(Point_3 p, Point_3 q, Point_3 r)`,
+
+which constructs a sphere initialized to the smallest sphere which passes
+through the points `p`, `q`, and `r`.
+*/
+typedef unspecified_type Construct_sphere_3;
+
+/*!
+A constructor object that must provide the function operator
+
+`Point_3 operator()(Sphere_3 s)`,
+
+which returns the center of the sphere `s`.
+*/
+typedef unspecified_type Construct_center_3;
+
+/*!
+A constructor object that must provide the function operators
+
+`FT operator()(Point_3 p, Point_3 q, Point_3 r, Point_3 s)`,
+
+which returns the squared radius of the sphere passing through `p`, `q` and `r`,
+and whose center is in the plane defined by these three points.
+
+and
+
+`FT operator()(Point_3 p, Point_3 q, Point_3 r, Point_3 s)`,
+
+which returns the squared radius of the sphere passing through `p`, `q`, `r`, and `s`.
+
+and
+
+`FT operator()(Sphere_3 s)`,
+
+which returns the squared radius of the sphere `s`.
+*/
+typedef unspecified_type Compute_squared_radius_3;
+
+/*!
+A constructor object that must provide the function operator
+
+`FT operator()(Point_3 p, Point_3 q)`,
+
+which returns the squared distance between the points `p` and `q`.
+*/
+typedef unspecified_type Compute_squared_distance_3;
+
+/// @}
+
+/// \name Operations
+/// The following functions give access to the predicate and construction objects:
+/// @{
+
+/*!
+gives access to the `Construct_vector_3` construction.
+*/
+Construct_vector_3 construct_vector_3_object();
+
+/*!
+gives access to the `Construct_cross_product_vector_3` construction.
+*/
+Construct_cross_product_vector_3 construct_cross_product_vector_3_object();
+
+/*!
+gives access to the `Compute_scalar_product_3` construction.
+*/
+Compute_scalar_product_3 compute_scalar_product_3_object();
+
+/*!
+gives access to the `Construct_sphere_3` construction.
+*/
+Construct_sphere_3 construct_sphere_3_object();
+
+/*!
+gives access to the `Construct_center_3` construction.
+*/
+Construct_center_3 construct_center_3_object();
+
+/*!
+gives access to the `Compute_squared_radius_3` construction.
+*/
+Compute_squared_radius_3 compute_squared_radius_3_object();
+
+/*!
+gives access to the `Compute_squared_distance_3` construction.
+*/
+Compute_squared_distance_3 compute_squared_distance_3_object();
+
+/// @}
+
+}; /* end AdvancingFrontSurfaceReconstructionTraits_3 */
+
diff --git a/Advancing_front_surface_reconstruction/doc/Advancing_front_surface_reconstruction/PackageDescription.txt b/Advancing_front_surface_reconstruction/doc/Advancing_front_surface_reconstruction/PackageDescription.txt
index 1adb33ca94e..5d50c10442c 100644
--- a/Advancing_front_surface_reconstruction/doc/Advancing_front_surface_reconstruction/PackageDescription.txt
+++ b/Advancing_front_surface_reconstruction/doc/Advancing_front_surface_reconstruction/PackageDescription.txt
@@ -1,5 +1,8 @@
/// \defgroup PkgAdvancingFrontSurfaceReconstructionRef Advancing Front Surface Reconstruction Reference
+/// \defgroup PkgAdvancingFrontSurfaceReconstructionRefConcepts Concepts
+/// \ingroup PkgAdvancingFrontSurfaceReconstructionRef
+
/*!
\addtogroup PkgAdvancingFrontSurfaceReconstructionRef
@@ -25,6 +28,10 @@ of topological singularities. }
\cgalClassifedRefPages
+\cgalCRPSection{Concepts}
+
+- `AdvancingFrontSurfaceReconstructionTraits_3`
+
\cgalCRPSection{Classes}
- `CGAL::Advancing_front_surface_reconstruction`
diff --git a/Advancing_front_surface_reconstruction/doc/Advancing_front_surface_reconstruction/dependencies b/Advancing_front_surface_reconstruction/doc/Advancing_front_surface_reconstruction/dependencies
index 9b91259b814..69d8724660e 100644
--- a/Advancing_front_surface_reconstruction/doc/Advancing_front_surface_reconstruction/dependencies
+++ b/Advancing_front_surface_reconstruction/doc/Advancing_front_surface_reconstruction/dependencies
@@ -5,6 +5,7 @@ Algebraic_foundations
Circulator
Stream_support
TDS_2
+TDS_3
Triangulation_2
Triangulation_3
Number_types
diff --git a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h
index e997bd55870..a54eaf9db24 100644
--- a/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h
+++ b/Advancing_front_surface_reconstruction/include/CGAL/Advancing_front_surface_reconstruction.h
@@ -175,23 +175,42 @@ namespace CGAL {
store handles to the vertices and faces of the 3D triangulation, which enables the user to explore the
2D as well as 3D neighborhood of vertices and facets of the surface.
- \tparam Dt must be a `Delaunay_triangulation_3` with
- `Advancing_front_surface_reconstruction_vertex_base_3` and `Advancing_front_surface_reconstruction_cell_base_3` blended into the vertex and cell type.
- The default uses the `Exact_predicates_inexact_constructions_kernel` as geometric traits class.
+ \tparam Dt must be a `Delaunay_triangulation_3` whose `Traits` template parameter must be a model of
+ `AdvancingFrontSurfaceReconstructionTraits_3` and whose `Tds` template parameter must be
+ a model of `TriangulationDataStructure_3` with `Advancing_front_surface_reconstruction_vertex_base_3` and
+ `Advancing_front_surface_reconstruction_cell_base_3` blended into the vertex and cell type, respectively.
+ The default value is:
+ \code
+ CGAL::Delaunay_triangulation_3,
+ CGAL::Advancing_front_surface_reconstruction_cell_base_3<
+ CGAL::Exact_predicates_inexact_constructions_kernel> > >`
+ \endcode
- \tparam P must be a functor with `double operator()(AdvancingFront,Cell_handle,int)` returning the
- priority of the facet `(Cell_handle,int)`. This functor enables the user to choose how candidate
- triangles are prioritized. If a facet should not appear in the output,
+ \tparam P must be a functor offering
+ \code
+ FT operator()(Advancing_front_surface_reconstruction,Cell_handle,int)
+ \endcode
+ returning the priority of the facet `(Cell_handle,int)`. This functor enables the user
+ to choose how candidate triangles are prioritized. If a facet should not appear in the output,
`infinity()` must be returned. It defaults to a functor that returns the
`smallest_radius_delaunay_sphere()`.
*/
- template <
- class Dt = Default,
- class P = Default>
- class Advancing_front_surface_reconstruction {
-
- typedef typename Default::Get, Advancing_front_surface_reconstruction_cell_base_3 > > >::type Triangulation;
+ template
+ class Advancing_front_surface_reconstruction
+ {
+ typedef typename Default::Get,
+ Advancing_front_surface_reconstruction_cell_base_3<
+ Exact_predicates_inexact_constructions_kernel> > > >::type Triangulation;
typedef typename Default::Get::type Priority;
public:
@@ -202,9 +221,9 @@ namespace CGAL {
/*!
The type of the 2D triangulation data structure describing the reconstructed surface, being a model of `TriangulationDataStructure_2`.
- The type `Triangulation_data_structure_2::Vertex` is model of the concept `TriangulationDataStructure_2::Vertex` and has additionally the
- method `vertex_3()` that returns a `#Vertex_handle` to the associated 3D vertex.
+ method `vertex_3()` that returns a `Vertex_handle` to the associated 3D vertex.
- The type `Triangulation_data_structure_2::Face` is model of the concept `TriangulationDataStructure_2::Face` and has additionally the
- method `facet()` that returns the associated `#Facet`, and a method `bool is_on_surface()`
+ method `facet()` that returns the associated `Facet`, and a method `bool is_on_surface()`
for testing if a face is part of the reconstructed surface or a face incident to a boundary edge.
In case the surface has boundaries, the 2D surface has one vertex which is associated to the infinite
@@ -213,15 +232,20 @@ namespace CGAL {
typedef unspecified_type Triangulation_data_structure_2;
/*!
- The type of the 3D triangulation.
+ The type of the 3D Delaunay triangulation (the first template parameter).
*/
typedef unspecified_type Triangulation_3;
/*!
- The type of the facet priority functor.
+ The type of the facet priority functor (the second template parameter).
*/
typedef unspecified_type Priority;
+ /*!
+ The number type.
+ */
+ typedef typename Triangulation_3::Geom_traits::FT FT;
+
/*!
The point type.
*/
@@ -245,21 +269,21 @@ namespace CGAL {
/*!
A bidirectional iterator range which enables to enumerate all points that were removed
from the 3D Delaunay triangulation during the surface reconstruction. The value type
- of the iterator is `#Point`.
+ of the iterator is `Point`.
*/
typedef unspecified_type Outlier_range;
+ /*!
+ A bidirectional iterator range which enables to visit all vertices on a boundary.
+ The value type of the iterator is `Vertex_handle`.
+ */
+ typedef unspecified_type Vertex_on_boundary_range;
+
/*!
A bidirectional iterator range which enables to visit all boundaries.
The value type of the iterator is `Vertex_on_boundary_range`.
*/
typedef unspecified_type Boundary_range;
-
- /*!
- A bidirectional iterator range which enables to visit all vertices on a boundary.
- The value type of the iterator is `#Vertex_handle`
- */
- typedef unspecified_type Vertex_on_boundary_range;
/// @}
#endif
@@ -268,6 +292,7 @@ namespace CGAL {
typedef Advancing_front_surface_reconstruction
Extract;
typedef typename Triangulation_3::Geom_traits Geom_traits;
+ typedef typename Kernel::FT FT;
typedef typename Kernel::FT coord_type;
typedef typename Kernel::Point_3 Point;
@@ -377,7 +402,23 @@ namespace CGAL {
std::list nbe_pool;
std::list ist_pool;
+ public:
+ Vector construct_vector(const Point& p, const Point& q) const
+ {
+ return T.geom_traits().construct_vector_3_object()(p, q);
+ }
+ Vector construct_cross_product(const Vector& v, const Vector& w) const
+ {
+ return T.geom_traits().construct_cross_product_vector_3_object()(v, w);
+ }
+
+ FT compute_scalar_product(const Vector& v, const Vector& w) const
+ {
+ return T.geom_traits().compute_scalar_product_3_object()(v, w);
+ }
+
+ private:
Intern_successors_type* new_border()
{
nbe_pool.resize(nbe_pool.size()+1);
@@ -679,12 +720,14 @@ namespace CGAL {
++it;
}while(collinear(p,q,it->point()));
const Point& r = it->point();
- Vector u = q-r;
- Vector v = q-p;
- Vector w = r-p;
- Vector vw = cross_product(v,w);
- double len = (std::max)(u*u,(std::max)(v*v,w*w));
- Point s = p + 10* len * (vw/(vw*vw));
+ Vector u = construct_vector(r, q);
+ Vector v = construct_vector(p, q);
+ Vector w = construct_vector(p, r);
+ Vector vw = construct_cross_product(v,w);
+ double len = (std::max)(compute_scalar_product(u,u),
+ (std::max)(compute_scalar_product(v,v),
+ compute_scalar_product(w,w)));
+ Point s = p + 10 * len * (vw/compute_scalar_product(vw,vw));
added_vertex = T.insert(s);
}
}
@@ -736,9 +779,9 @@ namespace CGAL {
\param radius_ratio_bound candidates incident to surface triangles which are not in the beta-wedge
are discarded, if the ratio of their radius and the radius of the surface triangle is larger than `radius_ratio_bound`.
- Described in Section \ref AFSR_Boundaries
+ Described in Section \ref AFSR_Boundaries.
\param beta half the angle of the wedge in which only the radius of triangles counts for the plausibility of candidates.
- Described in Section \ref AFSR_Selection
+ Described in Section \ref AFSR_Selection.
*/
void run(double radius_ratio_bound=5, double beta= 0.52)
@@ -1186,7 +1229,7 @@ namespace CGAL {
\param index index of the facet in `c`
*/
- coord_type
+ FT
smallest_radius_delaunay_sphere(const Cell_handle& c,
const int& index) const
{
@@ -1249,16 +1292,16 @@ namespace CGAL {
const Point& pp2 = cc->vertex(i2)->point();
const Point& pp3 = cc->vertex(i3)->point();
- Sphere facet_sphere(pp1, pp2, pp3);
- if (squared_distance(facet_sphere.center(), pp0) <
- facet_sphere.squared_radius())
+ Sphere facet_sphere = T.geom_traits().construct_sphere_3_object()(pp1, pp2, pp3);
+ if (squared_distance(T.geom_traits().construct_center_3_object()(facet_sphere), pp0) <
+ T.geom_traits().compute_squared_radius_3_object()(facet_sphere))
{
#ifdef AFSR_LAZY
value = lazy_squared_radius(cc);
#else
// qualified with CGAL, to avoid a compilation error with clang
if(volume(pp0, pp1, pp2, pp3) != 0){
- value = CGAL::squared_radius(pp0, pp1, pp2, pp3);
+ value = T.geom_traits().compute_squared_radius_3_object()(pp0, pp1, pp2, pp3);
} else {
typedef Exact_predicates_exact_constructions_kernel EK;
Cartesian_converter to_exact;
@@ -1280,26 +1323,30 @@ namespace CGAL {
cc = lazy_circumcenter(c);
cn = lazy_circumcenter(n);
#else
- cc = CGAL::circumcenter(cp0, cp1, cp2, cp3);
- cn = CGAL::circumcenter(np0, np1, np2, np3);
+ cc = T.geom_traits().construct_circumcenter_3_object()(cp0, cp1, cp2, cp3);
+ cn = T.geom_traits().construct_circumcenter_3_object()(np0, np1, np2, np3);
#endif
// computation of the distance of cp1 to the dual segment cc, cn...
- Vector V(cc - cn), Vc(cc - cp1), Vn(cp1 - cn);
- coord_type ac(V * Vc), an(V * Vn), norm_V(V * V);
+ Vector V = construct_vector(cn, cc),
+ Vc = construct_vector(cp1, cc),
+ Vn = construct_vector(cn, cp1);
+ coord_type ac = compute_scalar_product(V, Vc),
+ an = compute_scalar_product(V, Vn),
+ norm_V = compute_scalar_product(V, V);
if ((ac > 0) && (an > 0))
{
- value = (Vc*Vc) - ac*ac/norm_V;
+ value = compute_scalar_product(Vc, Vc) - ac*ac/norm_V;
if ((value < 0)||(norm_V > inv_eps_2)){
// qualified with CGAL, to avoid a compilation error with clang
- value = CGAL::squared_radius(cp1, cp2, cp3);
+ value = T.geom_traits().compute_squared_radius_3_object()(cp1, cp2, cp3);
}
}
else
{
if (ac <= 0)
- value = squared_distance(cc, cp1);
+ value = T.geom_traits().compute_squared_distance_3_object()(cc, cp1);
else // (an <= 0)
- value = squared_distance(cn, cp1);
+ value = T.geom_traits().compute_squared_distance_3_object()(cn, cp1);
}
}
}
@@ -1314,7 +1361,7 @@ namespace CGAL {
returns the infinite floating value that prevents a facet to be used.
*/
- coord_type infinity() const { return std::numeric_limits::infinity(); }
+ FT infinity() const { return std::numeric_limits::infinity(); }
/// @}
//---------------------------------------------------------------------
@@ -1341,9 +1388,9 @@ namespace CGAL {
const Point& p2 = c->vertex(i2)->point();
const Point& pc = c->vertex(i3)->point();
- Vector P2P1 = p1-p2, P2Pn, PnP1;
+ Vector P2P1 = construct_vector(p2, p1), P2Pn, PnP1;
- Vector v2, v1 = cross_product(pc-p2, P2P1);
+ Vector v2, v1 = construct_cross_product(construct_vector(p2, pc), P2P1);
coord_type norm, norm1 = v1*v1;
coord_type norm12 = P2P1*P2P1;
@@ -1375,12 +1422,12 @@ namespace CGAL {
{
const Point& pn = neigh->vertex(n_i3)->point();
- P2Pn = pn-p2;
- v2 = cross_product(P2P1,P2Pn);
+ P2Pn = construct_vector(p2, pn);
+ v2 = construct_cross_product(P2P1,P2Pn);
//pas necessaire de normer pour un bon echantillon:
// on peut alors tester v1*v2 >= 0
- norm = sqrt(norm1 * (v2*v2));
+ norm = sqrt(norm1 * compute_scalar_product(v2,v2));
pscal = v1*v2;
// check if the triangle will produce a sliver on the surface
bool sliver_facet = (pscal <= COS_ALPHA_SLIVER*norm);
@@ -1394,10 +1441,9 @@ namespace CGAL {
// We skip triangles having an internal angle along e
// whose cosinus is smaller than -DELTA
// that is the angle is larger than arcos(-DELTA)
- border_facet = !((P2P1*P2Pn >=
- -DELTA*sqrt(norm12*(P2Pn*P2Pn)))&&
- (P2P1*PnP1 >=
- -DELTA*sqrt(norm12*(PnP1*PnP1))));
+ border_facet =
+ !((P2P1*P2Pn >= -DELTA*sqrt(norm12*compute_scalar_product(P2Pn,P2Pn))) &&
+ (P2P1*PnP1 >= -DELTA*sqrt(norm12*compute_scalar_product(PnP1,PnP1))));
// \todo investigate why we simply do not skip this triangle
// but continue looking for a better candidate
// if (!border_facet){
@@ -1569,9 +1615,11 @@ namespace CGAL {
int n_i3 = (6 - n_ind - n_i1 - n_i2);
const Point& pn = neigh->vertex(n_i3)->point();
- Vector v1 = cross_product(pc-p2,p1-p2),
- v2 = cross_product(p1-p2,pn-p2);
- coord_type norm = sqrt((v1*v1)*(v2*v2));
+ Vector v1 = construct_cross_product(construct_vector(p2, pc),
+ construct_vector(p2, p1)),
+ v2 = construct_cross_product(construct_vector(p2, p1),
+ construct_vector(p2, pn));
+ coord_type norm = sqrt(compute_scalar_product(v1, v1) * compute_scalar_product(v2, v2));
if (v1*v2 > COS_BETA*norm)
return 1; // label bonne pliure sinon:
@@ -2487,9 +2535,9 @@ namespace CGAL {
\param out output iterator
\param radius_ratio_bound candidates incident to surface triangles which are not in the beta-wedge
are discarded, if the ratio of their radius and the radius of the surface triangle is larger than `radius_ratio_bound`.
- Described in Section \ref AFSR_Boundaries
+ Described in Section \ref AFSR_Boundaries.
\param beta half the angle of the wedge in which only the radius of triangles counts for the plausibility of candidates.
- Described in Section \ref AFSR_Selection
+ Described in Section \ref AFSR_Selection.
*/
template
@@ -2533,7 +2581,7 @@ namespace CGAL {
be convertible to `Exact_predicates_inexact_constructions_kernel::Point_3` with the `Cartesian_converter`.
\tparam IndicesOutputIterator must be an output iterator to which
`std::array` can be assigned.
- \tparam Priority must be a functor with `double operator()(AdvancingFront,Cell_handle,int)` returning the
+ \tparam Priority must be a functor with `double operator()(Advancing_front_surface_reconstruction,Cell_handle,int)` returning the
priority of the facet `(Cell_handle,int)`.
\param b iterator on the first point of the sequence
diff --git a/Algebraic_foundations/doc/Algebraic_foundations/CGAL/number_utils.h b/Algebraic_foundations/doc/Algebraic_foundations/CGAL/number_utils.h
index f81aa3945c2..74d7c452e99 100644
--- a/Algebraic_foundations/doc/Algebraic_foundations/CGAL/number_utils.h
+++ b/Algebraic_foundations/doc/Algebraic_foundations/CGAL/number_utils.h
@@ -22,7 +22,7 @@ namespace CGAL {
\ingroup PkgAlgebraicFoundationsRef
The template function `compare()` compares the first argument with respect to
-the second, i.e.\ it returns `CGAL::LARGER` if \f$ x\f$ is larger then \f$ y\f$.
+the second, i.e.\ it returns `CGAL::LARGER` if \f$ x\f$ is larger than \f$ y\f$.
In case the argument types `NT1` and `NT2` differ,
`compare` is performed with the semantic of the type determined via
diff --git a/Algebraic_foundations/include/CGAL/number_utils.h b/Algebraic_foundations/include/CGAL/number_utils.h
index abb7894ccf4..d29434ad603 100644
--- a/Algebraic_foundations/include/CGAL/number_utils.h
+++ b/Algebraic_foundations/include/CGAL/number_utils.h
@@ -302,13 +302,13 @@ to_interval( const Real_embeddable& x) {
}
template
-NT approximate_sqrt(const NT& nt, CGAL::Field_tag)
+NT approximate_sqrt(const NT& nt, CGAL::Null_functor)
{
return NT(sqrt(CGAL::to_double(nt)));
}
-template
-NT approximate_sqrt(const NT& nt, CGAL::Field_with_sqrt_tag)
+template
+NT approximate_sqrt(const NT& nt, Sqrt sqrt)
{
return sqrt(nt);
}
@@ -316,9 +316,12 @@ NT approximate_sqrt(const NT& nt, CGAL::Field_with_sqrt_tag)
template
NT approximate_sqrt(const NT& nt)
{
+ // the initial version of this function was using Algebraic_category
+ // for the dispatch but some ring type (like Gmpz) provides a Sqrt
+ // functor even if not being Field_with_sqrt.
typedef CGAL::Algebraic_structure_traits AST;
- typedef typename AST::Algebraic_category Algebraic_category;
- return approximate_sqrt(nt, Algebraic_category());
+ typedef typename AST::Sqrt Sqrt;
+ return approximate_sqrt(nt, Sqrt());
}
CGAL_NTS_END_NAMESPACE
diff --git a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt
index 63cf6965333..b4bf51d141f 100644
--- a/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt
+++ b/Algebraic_kernel_d/examples/Algebraic_kernel_d/CMakeLists.txt
@@ -5,23 +5,15 @@ find_package(CGAL REQUIRED COMPONENTS Core)
find_package(MPFI QUIET)
-if(MPFI_FOUND)
-
+if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP)
include(${CGAL_USE_FILE})
include(${MPFI_USE_FILE})
include(CGAL_VersionUtils)
-
create_single_source_cgal_program("Compare_1.cpp")
create_single_source_cgal_program("Construct_algebraic_real_1.cpp")
create_single_source_cgal_program("Isolate_1.cpp")
create_single_source_cgal_program("Sign_at_1.cpp")
create_single_source_cgal_program("Solve_1.cpp")
-
else()
-
- message(
- STATUS
- "This program requires the CGAL library and MPFI, and will not be compiled."
- )
-
+ message(STATUS "This program requires the CGAL, CGAL_Core and MPFI libraries, and will not be compiled.")
endif()
diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h
index 188610dac44..34290afa7e2 100644
--- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h
+++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Curve_analysis_2.h
@@ -2007,7 +2007,7 @@ public:
*
* For each status line at an event and each status line that represents
* an interval, all y-coordinates are approximated such that their
- * isolating interval has absolute size smaller then \c precision.
+ * isolating interval has absolute size smaller than \c precision.
*/
void refine_all(Bound precision) {
diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt
index b48f6a7e334..1338dba14ff 100644
--- a/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt
+++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/CMakeLists.txt
@@ -34,32 +34,36 @@ include(${CGAL_USE_FILE})
# ##########################################################
create_single_source_cgal_program("cyclic.cpp")
-create_single_source_cgal_program("Algebraic_curve_kernel_2.cpp")
-create_single_source_cgal_program("algebraic_curve_kernel_2_tools.cpp")
-create_single_source_cgal_program("Algebraic_kernel_d_1_LEDA.cpp")
-
-create_single_source_cgal_program(
- "Algebraic_kernel_d_1_CORE_Integer_rational.cpp")
-create_single_source_cgal_program(
- "Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp")
-create_single_source_cgal_program(
- "Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp")
-create_single_source_cgal_program(
- "Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp")
-
-create_single_source_cgal_program("Algebraic_kernel_d_1_GMP.cpp")
-create_single_source_cgal_program("Algebraic_kernel_d_2.cpp")
-create_single_source_cgal_program("Algebraic_real_d_1.cpp")
-create_single_source_cgal_program("Bitstream_descartes.cpp")
-create_single_source_cgal_program("Curve_analysis_2.cpp")
-create_single_source_cgal_program("Curve_pair_analysis_2.cpp")
create_single_source_cgal_program("Descartes.cpp")
-create_single_source_cgal_program("Real_embeddable_traits_extension.cpp")
-if(RS_FOUND)
- create_single_source_cgal_program("Algebraic_kernel_rs_gmpq_d_1.cpp")
- create_single_source_cgal_program("Algebraic_kernel_rs_gmpz_d_1.cpp")
+if(NOT CGAL_DISABLE_GMP)
+ create_single_source_cgal_program("Algebraic_curve_kernel_2.cpp")
+ create_single_source_cgal_program("algebraic_curve_kernel_2_tools.cpp")
+ create_single_source_cgal_program("Algebraic_kernel_d_1_LEDA.cpp")
+
+ create_single_source_cgal_program(
+ "Algebraic_kernel_d_1_CORE_Integer_rational.cpp")
+ create_single_source_cgal_program(
+ "Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp")
+ create_single_source_cgal_program(
+ "Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp")
+ create_single_source_cgal_program(
+ "Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp")
+
+ create_single_source_cgal_program("Algebraic_kernel_d_1_GMP.cpp")
+ create_single_source_cgal_program("Algebraic_kernel_d_2.cpp")
+ create_single_source_cgal_program("Algebraic_real_d_1.cpp")
+ create_single_source_cgal_program("Bitstream_descartes.cpp")
+ create_single_source_cgal_program("Curve_analysis_2.cpp")
+ create_single_source_cgal_program("Curve_pair_analysis_2.cpp")
+ create_single_source_cgal_program("Real_embeddable_traits_extension.cpp")
+ if(RS_FOUND)
+ create_single_source_cgal_program("Algebraic_kernel_rs_gmpq_d_1.cpp")
+ create_single_source_cgal_program("Algebraic_kernel_rs_gmpz_d_1.cpp")
+ else()
+ message(
+ STATUS
+ "NOTICE: Some tests require the RS library, and will not be compiled.")
+ endif()
else()
- message(
- STATUS
- "NOTICE: Some tests require the RS library, and will not be compiled.")
+ message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.")
endif()
diff --git a/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_comparison_root_for_spheres_2_3.h b/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_comparison_root_for_spheres_2_3.h
index 1bfca81e065..1a79af038cc 100644
--- a/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_comparison_root_for_spheres_2_3.h
+++ b/Algebraic_kernel_for_spheres/include/CGAL/Algebraic_kernel_for_spheres/internal_functions_comparison_root_for_spheres_2_3.h
@@ -30,19 +30,19 @@ namespace CGAL {
template
Comparison_result
compare_x(const CGAL::Root_for_spheres_2_3