diff --git a/.gitattributes b/.gitattributes index 38320ad4f0b..4211b302eb1 100644 --- a/.gitattributes +++ b/.gitattributes @@ -58,7 +58,6 @@ Scripts/developer_scripts/check_svn_keywords text eol=lf Scripts/developer_scripts/create_cgal_test text eol=lf Scripts/developer_scripts/create_cgal_test_with_cmake text eol=lf Scripts/developer_scripts/create_internal_release text eol=lf -Scripts/developer_scripts/create_macosx_installer text eol=lf Scripts/developer_scripts/create_new_release text eol=lf Scripts/developer_scripts/detect_files_with_mixed_eol_styles text eol=lf Scripts/developer_scripts/detect_packages_licenses text eol=lf diff --git a/.github/workflows/build_doc.yml b/.github/workflows/build_doc.yml index 9735cd3d3c8..e0813de0236 100644 --- a/.github/workflows/build_doc.yml +++ b/.github/workflows/build_doc.yml @@ -1,56 +1,115 @@ -name: Documentation +name: Build Documentation on: + workflow_dispatch: + inputs: + pr_number: + description: 'Pull request number for which the documentation should be built' + type: number + required: true + doc_version: + description: 'Version number of the documentation build' + type: string + required: true + force_build: + description: 'Force the build of the documentation' + type: boolean + required: false + default: false + issue_comment: - types: [created] + types: [created] + +env: + author_association: ${{ github.event.comment.author_association }} + comment_body: ${{ github.event.comment.body }} permissions: contents: read # to fetch code (actions/checkout) jobs: - build: + pre_build_checks: + runs-on: ubuntu-latest + name: Trigger the build? + outputs: + trigger_build: ${{ steps.get_doc_version.outputs.result && steps.get_doc_version.outputs.result != '' }} + force_build: ${{ steps.check_comment_body.outputs.force_build }} + pr_number: ${{ steps.get_pr_number.outputs.pr_number }} + doc_version: ${{ steps.get_doc_version.outputs.result }} + steps: + - name: Display inputs + run: | + echo "pr_number=${{ inputs.pr_number || github.event.issue.number }}" + echo "doc_version=${{ inputs.doc_version }}" + echo "force_build=${{ inputs.force_build || startsWith(env.comment_body, '/force-build:') }}" + - name: Check comment body + id: check_comment_body + env: + trigger_build: ${{ inputs && inputs.pr_number || startsWith(env.comment_body, '/build:') || startsWith(env.comment_body, '/force-build:') }} + force_build: ${{ inputs && inputs.force_build || startsWith(env.comment_body, '/force-build:') }} + if: inputs.pr_number || startsWith(env.comment_body, '/build:') || startsWith(env.comment_body, '/force-build:') + run: | + if [ "${trigger_build}" = "false" ]; then + echo "No build requested" + exit 1 + fi + echo "force_build=${force_build}" >> $GITHUB_OUTPUT + echo "trigger_build=${trigger_build}" >> $GITHUB_OUTPUT + - name: Check permissions + if: ( steps.check_comment_body.outputs.trigger_build || false ) && (inputs.pr_number || env.author_association == 'OWNER' || env.author_association == 'MEMBER') + run: echo "Authorized" + + - name: No permissions + if: ( steps.check_comment_body.outputs.trigger_build || false ) && (! inputs.pr_number && env.author_association != 'OWNER' && env.author_association != 'MEMBER' ) + run: | + echo 'ERROR: User ${{ github.actor }} is not allowed to trigger the build of the documentation with /build:* or /force-build:*' + exit 1 + + - name: Get PR number + if: ( steps.check_comment_body.outputs.trigger_build || false ) + id: get_pr_number + env: + pr_number: ${{ inputs.pr_number || github.event.issue.number }} + run: echo "pr_number=$pr_number" >> $GITHUB_OUTPUT + + - name: Get doc version + if: ( steps.check_comment_body.outputs.trigger_build || false ) + uses: actions/github-script@v7 + id: get_doc_version + with: + result-encoding: string + script: | + if ( context.payload.input && context.payload.inputs.doc_version ) { + return context.payload.inputs.doc_version + } + const body = context.payload.comment.body + const re = /\/(force-)?build:(\w+)\s*/; + if(re.test(body)) { + const res = re.exec(body) + return res[2] + } + throw new Error('No version found') + + build_doc: + name: | + ${{ format('{0}: Build Documentation version "{1}"', github.actor, needs.pre_build_checks.outputs.doc_version) }} + needs: pre_build_checks permissions: contents: read # to fetch code (actions/checkout) pull-requests: write # to create comment - runs-on: ubuntu-latest + env: + force_build: ${{ needs.pre_build_checks.outputs.force_build }} + pr_number: ${{ needs.pre_build_checks.outputs.pr_number }} + doc_version: ${{ needs.pre_build_checks.outputs.doc_version }} + if: ${{ fromJSON(needs.pre_build_checks.outputs.trigger_build || false) }} steps: - - uses: actions/github-script@v7 - id: get_round - with: - result-encoding: string - script: | - const asso = context.payload.comment.author_association - if(asso == 'OWNER' || asso == 'MEMBER') { - const body = context.payload.comment.body - if(body.includes("build:")) { - const re = /\/(force-)?build:(\w+)\s*/; - if(re.test(body)){ - const res = re.exec(body) - if(body.includes("force-")) { - return res[2]+":yes" - } - else{ - return res[2]+":no" - } - } - } - } - return 'stop' - - uses: actions/github-script@v7 - if: steps.get_round.outputs.result != 'stop' - id: get_pr_number - with: - result-encoding: string - script: | - //get pullrequest url - const pr_number = context.payload.issue.number - return pr_number - name: Emoji-comment + if: github.event_name == 'issue_comment' + continue-on-error: true uses: actions/github-script@v7 - if: steps.get_round.outputs.result != 'stop' with: script: | github.rest.reactions.createForIssueComment({ @@ -62,17 +121,23 @@ jobs: - uses: actions/checkout@v4 name: "checkout branch" - if: steps.get_round.outputs.result != 'stop' with: - repository: ${{ github.repository }} - ref: refs/pull/${{ steps.get_pr_number.outputs.result }}/merge - fetch-depth: 2 + repository: ${{ github.repository }} + ref: refs/pull/${{ env.pr_number }}/head + fetch-depth: 0 - - name: install dependencies - if: steps.get_round.outputs.result != 'stop' + - name: Install dependencies run: | set -x - sudo apt-get update && sudo apt-get install -y graphviz ssh bibtex2html + + # Install Github CLI `gh` + (type -p wget >/dev/null || (sudo apt update && sudo apt-get install wget -y)) + sudo mkdir -p -m 755 /etc/apt/keyrings + wget -qO- https://cli.github.com/packages/githubcli-archive-keyring.gpg | sudo tee /etc/apt/keyrings/githubcli-archive-keyring.gpg > /dev/null + sudo chmod go+r /etc/apt/keyrings/githubcli-archive-keyring.gpg + echo "deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/githubcli-archive-keyring.gpg] https://cli.github.com/packages stable main" | sudo tee /etc/apt/sources.list.d/github-cli.list > /dev/null + + sudo apt-get update && sudo apt-get install -y gh cmake graphviz ssh bibtex2html sudo pip install lxml sudo pip install pyquery wget --no-verbose -O doxygen_exe https://cgal.geometryfactory.com/~cgaltest/doxygen_1_9_6_patched/doxygen @@ -81,36 +146,40 @@ jobs: git config --global user.email "cgal@geometryfactory.com" git config --global user.name "cgaltest" - - name: configure all - if: steps.get_round.outputs.result != 'stop' + - name: CMake configuration of Documentation/doc run: | set -ex mkdir -p build_doc && cd build_doc && cmake ../Documentation/doc - - name: Build and Upload Doc + - name: Build and upload Doc id: build_and_run - if: steps.get_round.outputs.result != 'stop' + env: + GH_TOKEN: ${{ github.token }} run: | set -ex - PR_NUMBER=${{ steps.get_pr_number.outputs.result }} - TMP_ROUND=${{ steps.get_round.outputs.result }} - ROUND=$(echo $TMP_ROUND | cut -d ":" -f 1) - force=$(echo $TMP_ROUND | cut -d ":" -f 2) - wget --no-verbose cgal.github.io -O tmp.html - if ! egrep -q "\/$PR_NUMBER\/$ROUND" tmp.html || [ "$force" = "yes" ]; then + PR_NUMBER=$pr_number + ROUND=$doc_version + force=$force_build + wget --no-verbose cgal.github.io -O index.html + if ! egrep -qF "/$PR_NUMBER/$ROUND" index.html || [ "$force" = "yes" ]; then #list impacted packages - LIST_OF_PKGS=$(git diff --name-only HEAD^1 HEAD |cut -s -d/ -f1 |sort -u | xargs -I {} echo {} && ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true) + LIST_OF_PKGS=$(git diff --name-only origin/master...HEAD |cut -s -d/ -f1 |sort -u | xargs -I {} echo {} && ls -d {}/package_info 2>/dev/null |cut -d/ -f1 |egrep -v Installation||true) if [ "$LIST_OF_PKGS" = "" ]; then echo "DoxygenError=No package affected." >> $GITHUB_OUTPUT exit 1 fi + for p in $LIST_OF_PKGS; do + if [ -f $p/doc/$p/dependencies ]; then + LIST_OF_PKGS="$LIST_OF_PKGS $(cat $p/doc/$p/dependencies)" + fi + done + LIST_OF_PKGS=$(echo $LIST_OF_PKGS | tr ' ' '\n' | sort -u) cd build_doc && make -j$(nproc) doc - make -j$(nproc) doc_with_postprocessing 2>tmp.log - if [ -s tmp.log ]; then - content=`cat ./tmp.log` + make -j$(nproc) doc_with_postprocessing 2>build.log + if [ -s build.log ]; then delimiter="$(openssl rand -hex 8)" echo "DoxygenError<<${delimiter}" >> "${GITHUB_OUTPUT}" - cat tmp.log >> "${GITHUB_OUTPUT}" + cat build.log >> "${GITHUB_OUTPUT}" echo "${delimiter}" >> "${GITHUB_OUTPUT}" exit 1 fi @@ -118,18 +187,16 @@ jobs: git clone https://CGAL:${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}@github.com/CGAL/cgal.github.io.git mkdir -p cgal.github.io/${PR_NUMBER}/$ROUND rm cgal.github.io/${PR_NUMBER}/$ROUND/* -rf - for f in $LIST_OF_PKGS + for f in $LIST_OF_PKGS Manual do if [ -d ./build_doc/doc_output/$f ]; then cp -r ./build_doc/doc_output/$f ./cgal.github.io/${PR_NUMBER}/$ROUND fi done - cp -r ./build_doc/doc_output/Manual ./cgal.github.io/${PR_NUMBER}/$ROUND cd ./cgal.github.io - 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 index.html && git commit -q --amend -m "base commit" && git push -q -f -u origin master + echo "
  • Manual for PR ${PR_NUMBER} ($ROUND).
  • " >> ./index.html + ./cleanup.bash + git add ${PR_NUMBER}/$ROUND index.html && git commit -q --amend -m "sole commit" && git push -q -f -u origin master else echo "DoxygenError=This round already exists. Overwrite it with /force-build." >> $GITHUB_OUTPUT exit 1 @@ -137,13 +204,11 @@ jobs: - name: Post address uses: actions/github-script@v7 - if: ${{ success() && steps.get_round.outputs.result != 'stop' }} + if: ${{ success() }} with: script: | - const tmp_round = "${{ steps.get_round.outputs.result }}"; - const id = tmp_round.indexOf(":"); - const round = tmp_round.substring(0,id); - const address = "The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/${{ steps.get_pr_number.outputs.result }}/"+round+"/Manual/index.html" + const round = "${{ env.doc_version }}" + const address = "The documentation is built. It will be available, after a few minutes, here: https://cgal.github.io/${{ env.pr_number }}/"+round+"/Manual/index.html" github.rest.issues.createComment({ owner: "CGAL", repo: "cgal", @@ -155,7 +220,7 @@ jobs: env: ERRORMSG: ${{steps.build_and_run.outputs.DoxygenError}} uses: actions/github-script@v7 - if: ${{ failure() && steps.get_round.outputs.result != 'stop' }} + if: ${{ failure() }} with: script: | const error = process.env.ERRORMSG diff --git a/.github/workflows/delete_doc.yml b/.github/workflows/delete_doc.yml index 0910e74ef3b..00fd3bac27a 100644 --- a/.github/workflows/delete_doc.yml +++ b/.github/workflows/delete_doc.yml @@ -1,27 +1,33 @@ name: Documentation Removal on: + workflow_dispatch: + inputs: + PR_NUMBER: + description: 'Pull request number for which the documentation should be removed' + type: number + required: true pull_request_target: - types: [closed, removed, workflow_dispatch] + types: [closed] permissions: contents: read jobs: - build: - + delete_doc: permissions: contents: write # for Git to git push runs-on: ubuntu-latest steps: - uses: actions/checkout@v4 - - name: delete directory + - name: delete directory ${{ github.event.inputs.PR_NUMBER || github.event.pull_request.number }}/ in cgal.github.io + env: + PR_NUMBER: ${{ github.event.inputs.PR_NUMBER || github.event.pull_request.number }} run: | set -x git config --global user.email "cgal@geometryfactory.com" git config --global user.name "cgaltest" git clone https://CGAL:${{ secrets.PUSH_TO_CGAL_GITHUB_IO_TOKEN }}@github.com/CGAL/cgal.github.io.git - PR_NUMBER=$(python -c "import json; import os; y = json.load(open(os.environ['GITHUB_EVENT_PATH'])); print(y[\"number\"])") cd cgal.github.io/ egrep -v " ${PR_NUMBER}\." index.html > tmp.html || true if [ -n "$(diff -q ./index.html ./tmp.html)" ]; then diff --git a/.github/workflows/reuse.yml b/.github/workflows/reuse.yml index f76a99b18dd..e312e8a88ad 100644 --- a/.github/workflows/reuse.yml +++ b/.github/workflows/reuse.yml @@ -12,15 +12,15 @@ jobs: steps: - uses: actions/checkout@v4 - name: REUSE version - uses: fsfe/reuse-action@v3 + uses: fsfe/reuse-action@v4 with: args: --version - name: REUSE lint - uses: fsfe/reuse-action@v3 + uses: fsfe/reuse-action@v4 with: args: --include-submodules lint - name: REUSE SPDX SBOM - uses: fsfe/reuse-action@v3 + uses: fsfe/reuse-action@v4 with: args: spdx - name: install dependencies @@ -30,6 +30,6 @@ jobs: mkdir -p ./release cmake -DDESTINATION=./release -DCGAL_VERSION=9.9 -P ./Scripts/developer_scripts/cgal_create_release_with_cmake.cmake - name: REUSE lint release tarball - uses: fsfe/reuse-action@v3 + uses: fsfe/reuse-action@v4 with: args: --root ./release/CGAL-9.9 --include-submodules lint diff --git a/.gitignore b/.gitignore index 90f003227c6..b6fe952fd56 100644 --- a/.gitignore +++ b/.gitignore @@ -1058,7 +1058,7 @@ cmake_install.cmake *~ .#* -# MacOS file https://en.wikipedia.org/wiki/.DS_Store +# macOS file https://en.wikipedia.org/wiki/.DS_Store .DS_Store # Binaries: diff --git a/.reuse/dep5 b/.reuse/dep5 deleted file mode 100644 index 06784d71d6b..00000000000 --- a/.reuse/dep5 +++ /dev/null @@ -1,12 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: CGAL -Upstream-Contact: CGAL Editorial Board -Source: https://github.com/CGAL/cgal - -Files: .* *.cmake *.md .github/* Maintenance/* */TODO */doc/* */deb/* */applications/* */doc_html/* */scripts/* */developer_scripts/* */demo/* */examples/* */src/* */test/* */benchmarks/* */benchmark/* */package_info/* */data/* */cmake/* -Copyright: 1995-2023 The CGAL Project -License: CC0-1.0 - -Files: CMakeLists.txt GraphicsView/include/CGAL/Qt/ImageInterface.ui GraphicsView/include/CGAL/Qt/resources/qglviewer-icon.xpm Installation/AUTHORS Installation/CMakeLists.txt Installation/README Installation/auxiliary/cgal_create_cmake_script.1 Installation/auxiliary/gmp/README Installation/include/CGAL/license/gpl_package_list.txt MacOSX/auxiliary/cgal_app.icns copyright -Copyright: 1995-2023 The CGAL Project -License: CC0-1.0 diff --git a/AABB_tree/include/CGAL/AABB_tree.h b/AABB_tree/include/CGAL/AABB_tree.h index c63fdf38679..9dd8460abd2 100644 --- a/AABB_tree/include/CGAL/AABB_tree.h +++ b/AABB_tree/include/CGAL/AABB_tree.h @@ -551,7 +551,7 @@ public: traits.intersection(query, singleton_data()); break; default: // if(size() >= 2) - root_node()->template traversal_with_priority_and_group_traversal(m_primitives, query, traits, m_primitives.size(), 0, group_traversal_bound); + root_node()->traversal_with_priority_and_group_traversal(m_primitives, query, traits, m_primitives.size(), 0, group_traversal_bound); } } diff --git a/AABB_tree/include/CGAL/AABB_tree/internal/AABB_node.h b/AABB_tree/include/CGAL/AABB_tree/internal/AABB_node.h index a5c09f42fb4..bf878268f59 100644 --- a/AABB_tree/include/CGAL/AABB_tree/internal/AABB_node.h +++ b/AABB_tree/include/CGAL/AABB_tree/internal/AABB_node.h @@ -56,7 +56,7 @@ public: /** * @brief General traversal query * @param query the query - * @param traits the traversal traits that define the traversal behaviour + * @param traits the traversal traits that define the traversal behavior * @param nb_primitives the number of primitive * * General traversal query. The traits class allows using it for the various diff --git a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h index 56c421eee1f..08412f96ea4 100644 --- a/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h +++ b/Algebraic_foundations/include/CGAL/Test/_test_algebraic_structure.h @@ -426,7 +426,7 @@ void test_algebraic_structure_intern( //commutative assert(a+b+c==c+b+a); assert(a*b*c==c*b*a); - //distributiv + //distributive assert((a-b)*c==a*c-b*c); assert((a+b)*c==a*c+b*c); //binom diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h index 654ffa9a46d..1527a3eb7d4 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes.h @@ -65,7 +65,7 @@ class Bitstream_descartes; /* - * \brief Thrown whenever a non-specialised virtual member function is called + * \brief Thrown whenever a non-specialized virtual member function is called */ class Virtual_method_exception {}; @@ -128,7 +128,7 @@ public: /*! * Constructor computing an interval containing all real roots of \c f, - * and initialising the Bitstream Descartes tree + * and initializing the Bitstream Descartes tree */ Generic_descartes_rep(Bitstream_descartes_type type, Polynomial f, @@ -170,7 +170,7 @@ public: /*! * Constructor that copies the Bitstream tree given from outside - * and initialising the Bitstream Descartes tree + * and initializing the Bitstream Descartes tree * The tree must "fit" to the polynomial */ Generic_descartes_rep(Bitstream_descartes_type type, @@ -367,7 +367,7 @@ public: /*! * \brief When does the isolation algorithm terminate? * - * This method must be specialised by derived classes + * This method must be specialized by derived classes */ virtual bool termination_condition() { throw Virtual_method_exception(); @@ -378,7 +378,7 @@ public: * \brief gives an opportunity to process the nodes after * the subdivision steps are finished * - * This method must be specialised by derived classes, but can + * This method must be specialized by derived classes, but can * remain empty in many cases. */ virtual void process_nodes() { @@ -389,7 +389,7 @@ public: /*! \brief returns whether the \c i th root is definitely a simple root * of the isolated polynomial * - * Must be specialised by derived class + * Must be specialized by derived class */ virtual bool is_certainly_simple_root(int) const { throw Virtual_method_exception(); @@ -399,7 +399,7 @@ public: /*! \brief returns whether the \c i th root is definitely a multiple root * of the isolated polynomial * - * Must be specialised by derived class + * Must be specialized by derived class */ virtual bool is_certainly_multiple_root(int) const { throw Virtual_method_exception(); @@ -1082,7 +1082,7 @@ protected: * variant of the Bitstream Descartes method: The Square_free_descartes_tag * starts the usual Bitstream method for square free integer polynomials. * With the M_k_descartes tag, it is able to handle one multiple root in - * favourable situations, the Backshear_descartes_tag allows to isolate + * favorable situations, the Backshear_descartes_tag allows to isolate * even more complicated polynomials, if the multiple roots with even * multiplicity can be refined from outside. See the corresponding * constructors for more information. diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h index a76e1c6ceca..8e64832546a 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/Bitstream_descartes_rndl_tree.h @@ -865,7 +865,7 @@ public: by trying randomly and checking. This randomization means the same polynomial and same initial interval may give rise to different intervals each time this class is used. - As indicated in the paper, we favour subdivision ratios + As indicated in the paper, we favor subdivision ratios with a small denominator. Hence we first try denominator 2 (subdivision at midpoint), then denominator 16, and only then the "proper" denominator prescribed by theory. 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 6fecb592a12..a3dc59edfea 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 @@ -469,7 +469,7 @@ public: * (\c SHEAR_ONLY_AT_IRRATIONAL_STRATEGY) * is to \c shear the curve * if a degenerate situation is detected during the analysis, - * except at rational x-coordinates where the curve can be analysed + * except at rational x-coordinates where the curve can be analyzed * more directly. The analysis * is then performed in the sheared system, and finally translated back * into the original system. diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h index e53c9100aec..1a710084058 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/LRU_hashed_map.h @@ -140,7 +140,7 @@ public: virtual ~LRU_hashed_map() { } - /*! \brief implements cache-like behaviour of the map + /*! \brief implements cache-like behavior of the map * * If the object is not in the map, it is constructed using \c Creator * and added to the map @@ -312,7 +312,7 @@ public: ~LRU_hashed_map_with_kernel() { } - /*! \brief implements cache-like behaviour of the map + /*! \brief implements cache-like behavior of the map * * If the object is not in the map, it is constructed using \c Creator * and added to the map diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/exceptions.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/exceptions.h index 4dd9c4b5122..6a184c377e8 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/exceptions.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/exceptions.h @@ -25,7 +25,7 @@ namespace CGAL { /*! * \brief Exception class for not sufficiently generic positions. * - * Must be thrown whenever a curve cannot be analysed because its position + * Must be thrown whenever a curve cannot be analyzed because its position * is not "good enough". */ class Non_generic_position_exception { @@ -40,7 +40,7 @@ namespace CGAL { /*! * \brief Exception class for not sufficiently generic positions. * - * Must be thrown whenever a curve cannot be analysed because its position + * Must be thrown whenever a curve cannot be analyzed because its position * is not "good enough". */ template diff --git a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/flags.h b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/flags.h index 6b402fbfd23..0317bf7ea11 100644 --- a/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/flags.h +++ b/Algebraic_kernel_d/include/CGAL/Algebraic_kernel_d/flags.h @@ -76,7 +76,7 @@ /** * If set, the curve and curve pair analysis are using specialized code - * to analyse conic curves, i.e. curves of degree 2 + * to analyze conic curves, i.e. curves of degree 2 */ #ifndef CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX #define CGAL_ACK_USE_SPECIAL_TREATMENT_FOR_CONIX 0 diff --git a/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_analysis_2.cpp b/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_analysis_2.cpp index f8ba0d8495e..9527a887650 100644 --- a/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_analysis_2.cpp +++ b/Algebraic_kernel_d/test/Algebraic_kernel_d/Curve_analysis_2.cpp @@ -330,7 +330,7 @@ template void test_routine() { #endif } - { // More tests...just analyse some curves and compute their segments + { // More tests...just analyze some curves and compute their segments Poly_int2 f = from_string("P[8(0,P[8(0,24)(1,-8)(2,-162)(3,204)(4,106)(5,-340)(6,240)(7,-72)(8,8)])(1,P[6(0,-60)(1,8)(2,304)(3,-400)(4,148)(5,8)(6,-8)])(2,P[6(0,18)(1,80)(2,-165)(3,-132)(4,367)(5,-212)(6,38)])(3,P[4(0,-30)(1,-136)(2,264)(3,-72)(4,-26)])(4,P[4(0,-15)(1,36)(2,89)(3,-144)(4,49)])(5,P[2(0,30)(1,-24)(2,-6)])(6,P[2(0,-6)(1,-28)(2,22)])(8,P[0(0,3)])]"); Curve_analysis_2 curve= construct_curve_2(f); #if CGAL_ACK_DEBUG_FLAG diff --git a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h index a4a93f82515..f468f9056f8 100644 --- a/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h +++ b/Alpha_shapes_3/include/CGAL/Alpha_shape_3.h @@ -1638,7 +1638,7 @@ compute_edge_status( const Cell_handle& c, last=ccirc; while (is_infinite(ccirc) ) ++ccirc; //skip infinite incident cells alpha = (*ccirc).get_alpha(); - as.set_alpha_mid(alpha); // initialise as.alpha_mid to alpha value of an incident cell + as.set_alpha_mid(alpha); // initialize as.alpha_mid to alpha value of an incident cell as.set_alpha_max(alpha); // same for as.alpha_max while (++ccirc != last) { diff --git a/Alpha_shapes_3/test/Alpha_shapes_3/include/CGAL/_count_alpha.h b/Alpha_shapes_3/test/Alpha_shapes_3/include/CGAL/_count_alpha.h index f7c0fb41d4d..c38cd3bb53e 100644 --- a/Alpha_shapes_3/test/Alpha_shapes_3/include/CGAL/_count_alpha.h +++ b/Alpha_shapes_3/test/Alpha_shapes_3/include/CGAL/_count_alpha.h @@ -218,7 +218,7 @@ test_filtration(AS &A, bool verbose) typename AS::NT alpha; if(verbose) { std::cerr << std::endl; - std::cerr << "Analyse filtration " << std::endl; + std::cerr << "Analyze filtration " << std::endl; } for (; filtre_it != filtration.end(); filtre_it++) { if(assign(vertex, *filtre_it)) { diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementDemoTab.h b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementDemoTab.h index 54ece4964c2..febc992fd59 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementDemoTab.h +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/ArrangementDemoTab.h @@ -38,7 +38,6 @@ namespace Qt { class Callback; class ArrangementGraphicsItemBase; -class ArrangementGraphicsItemBase; class GraphicsViewCurveInputBase; class GraphicsViewNavigation; enum class CurveType; diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CurveInputMethods.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CurveInputMethods.cpp index 91a64dad22e..06ebae10a20 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CurveInputMethods.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/CurveInputMethods.cpp @@ -111,13 +111,10 @@ void CurveInputMethod::beginInput_() static inline void clearPainterPath(QPainterPath& ppath) { -#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0)) ppath.clear(); -#else - ppath = {}; -#endif } + void CurveInputMethod::reset() { this->resetInput(); diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GridGraphicsItem.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GridGraphicsItem.cpp index 535f4684975..01723db026e 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GridGraphicsItem.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2/GridGraphicsItem.cpp @@ -67,11 +67,7 @@ void GridGraphicsItem::setSpacing(int spacing_) static inline qreal horizontalAdvance(const QFontMetrics& fm, const QString& text) { -#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)) return fm.horizontalAdvance(text); -#else - return fm.boundingRect(text).width(); -#endif } void GridGraphicsItem::paint( diff --git a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos.cpp b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos.cpp index 27dd2a5968b..2d782eec1ac 100644 --- a/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos.cpp +++ b/Arrangement_on_surface_2/demo/Arrangement_on_surface_2_earth/Aos.cpp @@ -40,7 +40,7 @@ namespace { Flag(bool init) : v{ init } {} }; - // EXTENDED AOS for analysing the arrangement + // EXTENDED AOS for analyzing the arrangement using Ext_dcel = CGAL::Arr_extended_dcel; using Ext_topol_traits = CGAL::Arr_spherical_topology_traits_2; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h index 4707748fff6..55a75efd7de 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_counting_traits_2.h @@ -342,13 +342,13 @@ public: {} /*! Operate */ - bool operator()(const X_monotone_curve_2& xc1, - const X_monotone_curve_2& xc2) const - { ++m_counter1; return m_object(xc1, xc2); } + bool operator()(const Point_2& p1, const Point_2& p2) const + { ++m_counter1; return m_object(p1, p2); } /*! Operate */ - bool operator()(const Point_2& p1, const Point_2& p2) const - { ++m_counter2; return m_object(p1, p2); } + bool operator()(const X_monotone_curve_2& xc1, + const X_monotone_curve_2& xc2) const + { ++m_counter2; return m_object(xc1, xc2); } }; /*! A functor that compares compares the y-coordinates of two x-monotone @@ -563,7 +563,7 @@ public: */ class Is_on_x_identification_2 { private: - typename Base::Is_on_x_identificiation_2 m_object; + typename Base::Is_on_x_identification_2 m_object; size_t& m_counter1; size_t& m_counter2; @@ -571,17 +571,17 @@ public: /*! Construct */ Is_on_x_identification_2(const Base* base, size_t& counter1, size_t& counter2) : - m_object(base->is_on_x_identificiation_2_object()), + m_object(base->is_on_x_identification_2_object()), m_counter1(counter1), m_counter2(counter2) {} /*! Operate */ - Arr_parameter_space operator()(const Point_2& p) const + bool operator()(const Point_2& p) const { ++m_counter1; return m_object(p); } /*! Operate */ - Arr_parameter_space operator()(const X_monotone_curve_2& xc) const + bool operator()(const X_monotone_curve_2& xc) const { ++m_counter2; return m_object(xc); } }; @@ -666,7 +666,7 @@ public: */ class Is_on_y_identification_2 { private: - typename Base::Is_on_y_identificiation_2 m_object; + typename Base::Is_on_y_identification_2 m_object; size_t& m_counter1; size_t& m_counter2; @@ -674,18 +674,18 @@ public: /*! Construct */ Is_on_y_identification_2(const Base* base, size_t& counter1, size_t& counter2) : - m_object(base->is_on_y_identificiation_2_object()), + m_object(base->is_on_y_identification_2_object()), m_counter1(counter1), m_counter2(counter2) {} /*! Operate */ - Arr_parameter_space operator()(const Point_2& p) const + bool operator()(const Point_2& p) const { ++m_counter1; return m_object(p); } /*! Operate */ - Arr_parameter_space operator()(const X_monotone_curve_2& xc) const + bool operator()(const X_monotone_curve_2& xc) const { ++m_counter2; return m_object(xc); } }; @@ -824,10 +824,10 @@ public: m_counters[IS_ON_X_IDENTIFICATION_CURVE_OP]); } - Compare_y_on_boundary_2 compare_on_boundary_2_object() const + Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { return Compare_y_on_boundary_2(this, m_counters[COMPARE_Y_ON_BOUNDARY_OP]); } - Compare_y_near_boundary_2 compare_near_boundary_2_object() const + Compare_y_near_boundary_2 compare_y_near_boundary_2_object() const { return Compare_y_near_boundary_2(this, m_counters[COMPARE_Y_NEAR_BOUNDARY_OP]); @@ -943,7 +943,7 @@ Out_stream& operator<<(Out_stream& os, << traits.count_parameter_space_in_x_point() << std::endl << "# of PARAMETER_SPACE_IN_X curve operation = " << traits.count_parameter_space_in_x_curve() << std::endl - << "# of IS_ON_X_IDENTIFICIATION point operation = " + << "# of IS_ON_X_IDENTIFICATION point operation = " << traits.count_is_on_x_identification_point() << std::endl << "# of IS_ON_X_IDENTIFICATION curve operation = " << traits.count_is_on_x_identification_curve() << std::endl @@ -958,7 +958,7 @@ Out_stream& operator<<(Out_stream& os, << traits.count_parameter_space_in_y_point() << std::endl << "# of PARAMETER_SPACE_IN_Y curve operation = " << traits.count_parameter_space_in_y_curve() << std::endl - << "# of IS_ON_Y_IDENTIFICIATION point operation = " + << "# of IS_ON_Y_IDENTIFICATION point operation = " << traits.count_is_on_y_identification_point() << std::endl << "# of IS_ON_Y_IDENTIFICATION curve operation = " << traits.count_is_on_y_identification_curve() << std::endl diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h index ed552b8c9fc..65ab748e0ee 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geodesic_arc_on_sphere_traits_2.h @@ -641,8 +641,7 @@ public: * \param[in] plane the containing plane. * \param[in] source the source-point direction. * \param[in] target the target-point direction. - * \pre Both endpoint lie on the given plane. - * \pre Both endpoint lie on the given plane. + * \pre Both endpoints lie on the given plane. */ X_monotone_curve_2 operator()(const Point_2& source, const Point_2& target, const Direction_3& normal) const @@ -3113,7 +3112,7 @@ public: * \param is_directed_right is the arc directed from left to right? * \param is_full is the arc a full circle? * \param is_degenerate is the arc degenerate (single point)? - * \pre Both endpoint lie on the given plane. + * \pre Both endpoints lie on the given plane. */ Arr_x_monotone_geodesic_arc_on_sphere_3 (const Arr_extended_direction_3& src, @@ -3312,8 +3311,7 @@ public: * \param plane the containing plane. * \param source the source-point direction. * \param target the target-point direction. - * \pre Both endpoint lie on the given plane. - * \pre Both endpoint lie on the given plane. + * \pre Both endpoints lie on the given plane. */ Arr_x_monotone_geodesic_arc_on_sphere_3 (const Arr_extended_direction_3& source, diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h index c1a690bcb8e..aea70d5331a 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_geometry_traits/Rational_arc_2.h @@ -339,7 +339,7 @@ public: if (! valid) return; - // Analyze the behaviour of the rational function at x = -oo (the source). + // Analyze the behavior of the rational function at x = -oo (the source). Algebraic y0; const Arr_parameter_space inf_s = _analyze_at_minus_infinity (_numer, _denom, y0); @@ -351,7 +351,7 @@ public: else // if (inf_s == ARR_INTERIOR) _ps = Point_2 (0, y0); - // Analyze the behaviour of the rational function at x = +oo (the target). + // Analyze the behavior of the rational function at x = +oo (the target). const Arr_parameter_space inf_t = _analyze_at_plus_infinity (_numer, _denom, y0); @@ -735,7 +735,7 @@ public: */ Self split_at_pole (const Algebraic& x0) { - // Analyze the behaviour of the function near the given pole. + // Analyze the behavior of the function near the given pole. const std::pair signs = _analyze_near_pole (x0); const CGAL::Sign sign_left = signs.first; const CGAL::Sign sign_right = signs.second; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h index 30c326b1876..f540146b2cb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_basic_traits_2.h @@ -26,6 +26,7 @@ #include #include +#include #include #include @@ -40,44 +41,44 @@ namespace CGAL { template > class Arr_polycurve_basic_traits_2 { public: - typedef SubcurveTraits_2 Subcurve_traits_2; + using Subcurve_traits_2 = SubcurveTraits_2; /// \name Types and functors inherited from the subcurve geometry traits. //@{ - typedef typename Subcurve_traits_2::Has_left_category Has_left_category; - typedef typename Subcurve_traits_2::Has_do_intersect_category - Has_do_intersect_category; + using Has_left_category = typename Subcurve_traits_2::Has_left_category; + using Has_do_intersect_category = + typename Subcurve_traits_2::Has_do_intersect_category; - typedef typename Subcurve_traits_2::Left_side_category Left_side_category; - typedef typename Subcurve_traits_2::Bottom_side_category Bottom_side_category; - typedef typename Subcurve_traits_2::Top_side_category Top_side_category; - typedef typename Subcurve_traits_2::Right_side_category Right_side_category; + using Left_side_category = typename Subcurve_traits_2::Left_side_category; + using Bottom_side_category = typename Subcurve_traits_2::Bottom_side_category; + using Top_side_category = typename Subcurve_traits_2::Top_side_category; + using Right_side_category = typename Subcurve_traits_2::Right_side_category; - typedef typename Arr_all_sides_oblivious_category::result - All_sides_oblivious_category; + using All_sides_oblivious_category = + typename Arr_all_sides_oblivious_category::result; - typedef typename Arr_two_sides_category::result - Bottom_or_top_sides_category; + using Bottom_or_top_sides_category = + typename Arr_two_sides_category::result; - typedef typename Subcurve_traits_2::Point_2 Point_2; - typedef typename Subcurve_traits_2::X_monotone_curve_2 X_monotone_subcurve_2; - typedef typename Subcurve_traits_2::Multiplicity Multiplicity; + using Point_2 = typename Subcurve_traits_2::Point_2; + using X_monotone_subcurve_2 = typename Subcurve_traits_2::X_monotone_curve_2; + using Multiplicity = typename Subcurve_traits_2::Multiplicity; //@} // Backward compatibility: - typedef X_monotone_subcurve_2 X_monotone_segment_2; + using X_monotone_segment_2 = X_monotone_subcurve_2; private: - typedef Arr_polycurve_basic_traits_2 Self; + using Self = Arr_polycurve_basic_traits_2; // Data members: - const Subcurve_traits_2* m_subcurve_traits; // The base segment-traits class. + const Subcurve_traits_2* m_subcurve_traits; // the base segment-traits class. bool m_own_traits; protected: @@ -91,8 +92,8 @@ public: {} /*! Construct from a subcurve traits. - * \param seg_traits an already existing subcurve tarits which is passed will - * be used by the class. + * \param seg_traits an already existing subcurve tarits, which is passed in; + * it will be used by the class. */ Arr_polycurve_basic_traits_2(const Subcurve_traits_2* geom_traits) : m_subcurve_traits(geom_traits), m_own_traits(false) {} @@ -126,64 +127,67 @@ public: // ArrangementBasicTraits concept. //@{ - /*! An x monotone polycurve represents a continuous piecewise-linear - * curve which is either strongly x-monotone or vertical. Again, + /*! An \f$x\f$-monotone polycurve represents a continuous piecewise-linear + * curve which is either strongly \f$x\f$-monotone or vertical. Again, * the polycurve is without degenerated subcurves. */ - typedef internal::X_monotone_polycurve_2 - X_monotone_curve_2; - typedef typename X_monotone_curve_2::Size Size; - typedef typename X_monotone_curve_2::size_type size_type; + using X_monotone_curve_2 = + internal::X_monotone_polycurve_2; + using Size = typename X_monotone_curve_2::Size; + using size_type = typename X_monotone_curve_2::size_type; - - /*! Compare the x-coordinates of two points. */ + //! Compare the \f$x\f$-coordinates of two points. class Compare_x_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Compare_x_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} - /*! Compare the x-coordinates of two directional points. + public: + /*! Compare the \f$x\f$-coordinates of two directional points. * \param p1 the first directional point. * \param p2 the second directional point. - * \return SMALLER - x(p1) < x(p2); - * EQUAL - x(p1) = x(p2); - * LARGER - x(p1) > x(p2). + * \return `SMALLER` - \f$x\f$(`p1`) < \f$x\f$(`p2`); + * `EQUAL` - \f$x\f$(`p1`) = \f$x\f$(`p2`); + * `LARGER` - \f$x\f$(`p1`) > \f$x\f$(`p2`). * \pre p1 does not lie on the boundary. * \pre p2 does not lie on the boundary. */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { return m_poly_traits.subcurve_traits_2()->compare_x_2_object()(p1, p2); } - /*! Compare two ends of x-monotone curves in x. + /*! Compare two ends of \f$x\f$-monotone curves in \f$x\f$. * \param xs1 the first curve. - * \param ce1 the curve-end indicator of the first x-monotone curve xs1: - * ARR_MIN_END - the minimal end of xs1 or - * ARR_MAX_END - the maximal end of xs1. + * \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve + * `xs1`: + * `ARR_MIN_END` - the minimal end of `xs1` or + * `ARR_MAX_END` - the maximal end of `xs1`. * \param p2 the second curve end. */ Comparison_result operator()(const X_monotone_subcurve_2& xs1, - Arr_curve_end ce1, - const Point_2& p2) + Arr_curve_end ce1, const Point_2& p2) { return operator()(xs1, ce1, p2, All_sides_oblivious_category()); } - /*! Compare two ends of x-monotone curves in x. + /*! Compare two ends of \f$x\f$-monotone curves in x. * \param xs1 the first curve. - * \param ce1 the curve-end indicator of the first x-monotone curve xs1: - * ARR_MIN_END - the minimal end of xs1 or - * ARR_MAX_END - the maximal end of xs1. + * \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve + * `xs1`: + * `ARR_MIN_END` - the minimal end of `xs1` or + * `ARR_MAX_END` - the maximal end of `xs1`. * \param xs2 the second curve. - * \param ce2 the curve-end indicator of the second x-monoton curve xs2: - * ARR_MIN_END - the minimal end of xs2 or - * ARR_MAX_END - the maximal end of xs2. + * \param ce2 the curve-end indicator of the second \f$x\f$-monoton curve + * `xs2`: + * `ARR_MIN_END` - the minimal end of `xs2` or + * `ARR_MAX_END` - the maximal end of `xs2`. */ Comparison_result operator()(const X_monotone_subcurve_2& xs1, Arr_curve_end ce1, @@ -194,12 +198,10 @@ public: private: // Oblivious implementation Comparison_result operator()(const X_monotone_subcurve_2& xs1, - Arr_curve_end ce1, - const Point_2& p2, - Arr_all_sides_oblivious_tag) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - const Point_2& p1 = (ce1 == ARR_MAX_END) ? + Arr_curve_end ce1, const Point_2& p2, + Arr_all_sides_oblivious_tag) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto p1 = (ce1 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs1) : geom_traits->construct_min_vertex_2_object()(xs1); return geom_traits->compare_x_2_object()(p1, p2); @@ -207,13 +209,10 @@ public: // Boundary implementation Comparison_result operator()(const X_monotone_subcurve_2& xs1, - Arr_curve_end ce1, - const Point_2& p2, - Arr_not_all_sides_oblivious_tag) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Parameter_space_in_x_2 ps_x = - geom_traits->parameter_space_in_x_2_object(); + Arr_curve_end ce1, const Point_2& p2, + Arr_not_all_sides_oblivious_tag) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto ps_x = geom_traits->parameter_space_in_x_2_object(); const Arr_parameter_space ps_x1 = ps_x(xs1, ce1); if (ps_x1 != ARR_INTERIOR) { @@ -221,17 +220,15 @@ public: if (ps_x1 == ARR_RIGHT_BOUNDARY) return LARGER; } - typename Subcurve_traits_2::Parameter_space_in_y_2 ps_y = - geom_traits->parameter_space_in_y_2_object(); + auto ps_y = geom_traits->parameter_space_in_y_2_object(); const Arr_parameter_space ps_y1 = ps_y(xs1, ce1); if (ps_y1 == ARR_INTERIOR) { - const Point_2& p1 = (ce1 == ARR_MAX_END) ? + auto p1 = (ce1 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs1) : geom_traits->construct_min_vertex_2_object()(xs1); return geom_traits->compare_x_2_object()(p1, p2); } - typename Subcurve_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd = - geom_traits->compare_x_on_boundary_2_object(); + auto cmp_x_on_bnd = geom_traits->compare_x_on_boundary_2_object(); return opposite(cmp_x_on_bnd(p2, xs1, ce1)); } @@ -240,13 +237,12 @@ public: Arr_curve_end ce1, const X_monotone_subcurve_2& xs2, Arr_curve_end ce2, - Arr_all_sides_oblivious_tag) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - const Point_2& p1 = (ce1 == ARR_MAX_END) ? + Arr_all_sides_oblivious_tag) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto p1 = (ce1 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs1) : geom_traits->construct_min_vertex_2_object()(xs1); - const Point_2& p2 = (ce2 == ARR_MAX_END) ? + auto p2 = (ce2 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs2) : geom_traits->construct_min_vertex_2_object()(xs2); return geom_traits->compare_x_2_object()(p1, p2); @@ -257,11 +253,9 @@ public: Arr_curve_end ce1, const X_monotone_subcurve_2& xs2, Arr_curve_end ce2, - Arr_not_all_sides_oblivious_tag) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Parameter_space_in_x_2 ps_x = - geom_traits->parameter_space_in_x_2_object(); + Arr_not_all_sides_oblivious_tag) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto ps_x = geom_traits->parameter_space_in_x_2_object(); const Arr_parameter_space ps_x1 = ps_x(xs1, ce1); const Arr_parameter_space ps_x2 = ps_x(xs2, ce2); @@ -275,30 +269,27 @@ public: // ps_x1 == ps_x2 if (ps_x1 != ARR_INTERIOR) return EQUAL; - typename Subcurve_traits_2::Parameter_space_in_y_2 ps_y = - geom_traits->parameter_space_in_y_2_object(); + auto ps_y = geom_traits->parameter_space_in_y_2_object(); const Arr_parameter_space ps_y1 = ps_y(xs1, ce1); const Arr_parameter_space ps_y2 = ps_y(xs2, ce2); if (ps_y1 == ARR_INTERIOR) { - const Point_2& p1 = (ce1 == ARR_MAX_END) ? + auto p1 = (ce1 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs1) : geom_traits->construct_min_vertex_2_object()(xs1); if (ps_y2 == ARR_INTERIOR) { - const Point_2& p2 = (ce2 == ARR_MAX_END) ? + auto p2 = (ce2 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs2) : geom_traits->construct_min_vertex_2_object()(xs2); return geom_traits->compare_x_2_object()(p1, p2); } - typename Subcurve_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd = - geom_traits->compare_x_on_boundary_2_object(); + auto cmp_x_on_bnd = geom_traits->compare_x_on_boundary_2_object(); return cmp_x_on_bnd(p1, xs2, ce2); } if (ps_y2 == ARR_INTERIOR) { - const Point_2& p2 = (ce2 == ARR_MAX_END) ? + auto p2 = (ce2 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs2) : geom_traits->construct_min_vertex_2_object()(xs2); - typename Subcurve_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd = - geom_traits->compare_x_on_boundary_2_object(); + auto cmp_x_on_bnd = geom_traits->compare_x_on_boundary_2_object(); return opposite(cmp_x_on_bnd(p2, xs1, ce1)); } return geom_traits->compare_x_on_boundary_2_object()(xs1, ce1, xs2, ce2); @@ -306,59 +297,64 @@ public: }; /*! Obtain a Compare_x_2 functor object. */ - Compare_x_2 compare_x_2_object() const - { return Compare_x_2(*this); } + Compare_x_2 compare_x_2_object() const { return Compare_x_2(*this); } - /*! Compare two curve-ends or points lexigoraphically: by x, then by y. */ + //! Compare two curve-ends or points lexigoraphically: by x, then by y. class Compare_xy_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Compare_xy_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} - /*! Compare two directional points lexigoraphically: by x, then by y. + public: + /*! Compare two directional points lexigoraphically: by \f$x\f$, then by + * \f$y\f$. * \param p1 the first endpoint directional point. * \param p2 the second endpoint directional point. - * \return SMALLER - x(p1) < x(p2); - * SMALLER - x(p1) = x(p2) and y(p1) < y(p2); - * EQUAL - x(p1) = x(p2) and y(p1) = y(p2); - * LARGER - x(p1) = x(p2) and y(p1) > y(p2); - * LARGER - x(p1) > x(p2). - * \pre p1 does not lie on the boundary. - * \pre p2 does not lie on the boundary. + * \return + * `SMALLER` - \f$x\f$(p1) < \f$x\f$(p2); + * `SMALLER` - \f$x\f$(p1) = \f$x\f$(p2) and \f$y\f$(p1) < \f$y\f$(p2); + * `EQUAL` - \f$x\f$(p1) = \f$x\f$(p2) and \f$y\f$(p1) = \f$y\f$(p2); + * `LARGER` - \f$x\f$(p1) = \f$x\f$(p2) and \f$y\f$(p1) > \f$y\f$(p2); + * `LARGER` - \f$x\f$(p1) > \f$x\f$(p2). + * \pre `p1` does not lie on the boundary. + * \pre `p2` does not lie on the boundary. */ Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { return m_poly_traits.subcurve_traits_2()->compare_xy_2_object()(p1, p2); } - /*! Compare two ends of x-monotone curves lexicographically. + /*! Compare two ends of \f$x\f$-monotone curves lexicographically. * \param xs1 the first curve. - * \param ce1 the curve-end indicator of the first x-monotone curve xs1: - * ARR_MIN_END - the minimal end of xs1 or - * ARR_MAX_END - the maximal end of xs1. + * \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve + * `xs1`: + * `ARR_MIN_END` - the lexicographically smallest end of `xs1` or + * `ARR_MAX_END` - the lexicographically largest end of `xs1`. * \param p2 the second curve end. */ Comparison_result operator()(const X_monotone_subcurve_2& xs1, - Arr_curve_end ce1, - const Point_2& p2) + Arr_curve_end ce1, const Point_2& p2) { return operator()(xs1, ce1, p2, All_sides_oblivious_category()); } - /*! Compare two ends of x-monotone curves lexicographically. + /*! Compare two ends of \f$x\f$-monotone curves lexicographically. * \param xs1 the first curve. - * \param ce1 the curve-end indicator of the first x-monotone curve xs1: - * ARR_MIN_END - the minimal end of xs1 or - * ARR_MAX_END - the maximal end of xs1. + * \param ce1 the curve-end indicator of the first \f$x\f$-monotone curve + * `xs1`: + * `ARR_MIN_END` - the minimal end of `xs1` or + * `ARR_MAX_END` - the maximal end of `xs1`. * \param xs2 the second curve. - * \param ce2 the curve-end indicator of the second x-monoton curve xs2: - * ARR_MIN_END - the minimal end of xs2 or - * ARR_MAX_END - the maximal end of xs2. + * \param ce2 the curve-end indicator of the second \f$x\f$-monoton curve + * `xs2`: + * `ARR_MIN_END` - the minimal end of `xs2` or + * `ARR_MAX_END` - the maximal end of `xs2`. */ Comparison_result operator()(const X_monotone_subcurve_2& xs1, Arr_curve_end ce1, @@ -369,12 +365,10 @@ public: private: // Oblivious implementation Comparison_result operator()(const X_monotone_subcurve_2& xs1, - Arr_curve_end ce1, - const Point_2& p2, - Arr_all_sides_oblivious_tag) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - const Point_2& p1 = (ce1 == ARR_MAX_END) ? + Arr_curve_end ce1, const Point_2& p2, + Arr_all_sides_oblivious_tag) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto p1 = (ce1 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs1) : geom_traits->construct_min_vertex_2_object()(xs1); return geom_traits->compare_xy_2_object()(p1, p2); @@ -382,15 +376,11 @@ public: // Boundary implementation Comparison_result operator()(const X_monotone_subcurve_2& xs1, - Arr_curve_end ce1, - const Point_2& p2, - Arr_not_all_sides_oblivious_tag) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Parameter_space_in_x_2 ps_x = - geom_traits->parameter_space_in_x_2_object(); - typename Subcurve_traits_2::Parameter_space_in_y_2 ps_y = - geom_traits->parameter_space_in_y_2_object(); + Arr_curve_end ce1, const Point_2& p2, + Arr_not_all_sides_oblivious_tag) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto ps_x = geom_traits->parameter_space_in_x_2_object(); + auto ps_y = geom_traits->parameter_space_in_y_2_object(); const Arr_parameter_space ps_x1 = ps_x(xs1, ce1); const Arr_parameter_space ps_y1 = ps_y(xs1, ce1); @@ -400,15 +390,14 @@ public: } if (ps_y1 == ARR_INTERIOR) { - const Point_2& p1 = (ce1 == ARR_MAX_END) ? + auto p1 = (ce1 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs1) : geom_traits->construct_min_vertex_2_object()(xs1); return geom_traits->compare_xy_2_object()(p1, p2); } // EFEF: missing implementation for open boundary. - typename Subcurve_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd = - geom_traits->compare_x_on_boundary_2_object(); + auto cmp_x_on_bnd = geom_traits->compare_x_on_boundary_2_object(); Comparison_result res = opposite(cmp_x_on_bnd(p2, xs1, ce1)); if (res != EQUAL) return res; if (ps_y1 == ARR_TOP_BOUNDARY) return LARGER; @@ -421,13 +410,12 @@ public: Arr_curve_end ce1, const X_monotone_subcurve_2& xs2, Arr_curve_end ce2, - Arr_all_sides_oblivious_tag) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - const Point_2& p1 = (ce1 == ARR_MAX_END) ? + Arr_all_sides_oblivious_tag) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto p1 = (ce1 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs1) : geom_traits->construct_min_vertex_2_object()(xs1); - const Point_2& p2 = (ce2 == ARR_MAX_END) ? + auto p2 = (ce2 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs2) : geom_traits->construct_min_vertex_2_object()(xs2); return geom_traits->compare_xy_2_object()(p1, p2); @@ -438,13 +426,10 @@ public: Arr_curve_end ce1, const X_monotone_subcurve_2& xs2, Arr_curve_end ce2, - Arr_not_all_sides_oblivious_tag) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Parameter_space_in_x_2 ps_x = - geom_traits->parameter_space_in_x_2_object(); - typename Subcurve_traits_2::Parameter_space_in_y_2 ps_y = - geom_traits->parameter_space_in_y_2_object(); + Arr_not_all_sides_oblivious_tag) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto ps_x = geom_traits->parameter_space_in_x_2_object(); + auto ps_y = geom_traits->parameter_space_in_y_2_object(); const Arr_parameter_space ps_x1 = ps_x(xs1, ce1); const Arr_parameter_space ps_y1 = ps_y(xs1, ce1); const Arr_parameter_space ps_x2 = ps_x(xs2, ce2); @@ -458,13 +443,13 @@ public: } if ((ps_x1 == ARR_INTERIOR) && (ps_y1 == ARR_INTERIOR)) { - const Point_2& p1 = (ce1 == ARR_MAX_END) ? + auto p1 = (ce1 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs1) : geom_traits->construct_min_vertex_2_object()(xs1); // ps1 == ARR_INTERIOR if ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) { - const Point_2& p2 = (ce2 == ARR_MAX_END) ? + auto p2 = (ce2 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs2) : geom_traits->construct_min_vertex_2_object()(xs2); @@ -480,8 +465,7 @@ public: // ps_y2 != ARR_INTERIOR CGAL_assertion(ps_x2 == ARR_INTERIOR); // EFEF: missing implementation for open boundary. - typename Subcurve_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd = - geom_traits->compare_x_on_boundary_2_object(); + auto cmp_x_on_bnd = geom_traits->compare_x_on_boundary_2_object(); Comparison_result res = cmp_x_on_bnd(p1, xs2, ce2); if (res != EQUAL) return res; if (ps_y2 == ARR_TOP_BOUNDARY) return SMALLER; @@ -491,7 +475,7 @@ public: // ps1 != ARR_INTERIOR if ((ps_x2 == ARR_INTERIOR) && (ps_y2 == ARR_INTERIOR)) { - const Point_2& p2 = (ce2 == ARR_MAX_END) ? + auto p2 = (ce2 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs2) : geom_traits->construct_min_vertex_2_object()(xs2); @@ -501,8 +485,7 @@ public: // ps_y1 != ARR_INTERIOR // ps2 == ARR_INTERIOR CGAL_assertion(ps_x1 == ARR_INTERIOR); - typename Subcurve_traits_2::Compare_x_on_boundary_2 cmp_x_on_bnd = - geom_traits->compare_x_on_boundary_2_object(); + auto cmp_x_on_bnd = geom_traits->compare_x_on_boundary_2_object(); Comparison_result res = cmp_x_on_bnd(p2, xs1, ce1); if (res != EQUAL) return opposite(res); if (ps_y1 == ARR_TOP_BOUNDARY) return LARGER; @@ -524,10 +507,10 @@ public: } CGAL_assertion(ce1 == ce2); - const Point_2& p1 = (ce1 == ARR_MAX_END) ? + auto p1 = (ce1 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs1) : geom_traits->construct_min_vertex_2_object()(xs1); - const Point_2& p2 = (ce2 == ARR_MAX_END) ? + auto p2 = (ce2 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs2) : geom_traits->construct_min_vertex_2_object()(xs2); return geom_traits->compare_y_on_boundary_2_object()(p1, p2); @@ -535,40 +518,46 @@ public: }; /*! Obtain a Compare_xy_2 functor object. */ - Compare_xy_2 compare_xy_2_object() const - { return Compare_xy_2(*this); } + Compare_xy_2 compare_xy_2_object() const { return Compare_xy_2(*this); } + /*! A functor that obtain the lexicographically smallest endpoint of an + * \f$x\f$-monotone curve. + */ class Construct_min_vertex_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /* Constructor. */ Construct_min_vertex_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} - /*! Obtain the left endpoint of the x-monotone polycurve. - * \todo: is it possible to make the return type const reference if the - * return type of the subcurve traits is const reference? - * \param cv The polycurve curve. - * \return The left endpoint. + public: + /*! Obtain the left endpoint of the \f$x\f$-monotone polycurve. The return + * type is the same as the return type of the corresponding operator in the + * functor of the subtraits, which is either by value or by reference. + * \param xcv the polycurve curve. + * \return the lexicographically smallest endpoint. */ - Point_2 operator()(const X_monotone_curve_2& cv) const - { - CGAL_assertion(cv.number_of_subcurves() > 0); + using Subcurve_ctr = typename Subcurve_traits_2::Construct_min_vertex_2; + decltype(std::declval(). + operator()(std::declval())) + operator()(const X_monotone_curve_2& xcv) const { + CGAL_assertion(xcv.number_of_subcurves() > 0); - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); - if (geom_traits->compare_endpoints_xy_2_object()(cv[0]) == SMALLER) - return geom_traits->construct_min_vertex_2_object()(cv[0]); + if (geom_traits->compare_endpoints_xy_2_object()(xcv[0]) == SMALLER) + return geom_traits->construct_min_vertex_2_object()(xcv[0]); else return geom_traits-> - construct_min_vertex_2_object()(cv[cv.number_of_subcurves()-1]); + construct_min_vertex_2_object()(xcv[xcv.number_of_subcurves()-1]); } }; @@ -576,37 +565,41 @@ public: Construct_min_vertex_2 construct_min_vertex_2_object() const { return Construct_min_vertex_2(*this); } + /*! A functor that obtain the lexicographically largest endpoint of an + * \f$x\f$-monotone curve. + */ class Construct_max_vertex_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Construct_max_vertex_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} - /*! Obtain the right endpoint of the x-monotone polycurve. - * \todo: is it possible to make the return type const reference if the - * return type of the subcurve traits is const reference? - * \param cv The polycurve. - * \return The right endpoint. + public: + /*! Obtain the right endpoint of the \f$x\f$-monotone polycurve. The return + * type is the same as the return type of the corresponding operator in the + * functor of the subtraits, which is either by value or by reference. + * \param xcv the polycurve. + * \return the lexicographically largest endpoint. */ - Point_2 operator()(const X_monotone_curve_2& cv) const - { - CGAL_assertion(cv.number_of_subcurves() > 0); - - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - - if (geom_traits->compare_endpoints_xy_2_object()(cv[0]) == SMALLER) - return geom_traits-> - construct_max_vertex_2_object()(cv[cv.number_of_subcurves()-1]); - else - return geom_traits->construct_max_vertex_2_object()(cv[0]); + using Subcurve_ctr = typename Subcurve_traits_2::Construct_max_vertex_2; + decltype(std::declval(). + operator()(std::declval())) + operator()(const X_monotone_curve_2& xcv) const { + CGAL_assertion(xcv.number_of_subcurves() > 0); + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto ctr_max_vertex = geom_traits->construct_max_vertex_2_object(); + if (geom_traits->compare_endpoints_xy_2_object()(xcv[0]) == SMALLER) + return ctr_max_vertex(xcv[xcv.number_of_subcurves()-1]); + else return ctr_max_vertex(xcv[0]); } }; @@ -614,47 +607,51 @@ public: Construct_max_vertex_2 construct_max_vertex_2_object() const { return Construct_max_vertex_2(*this); } + /*! A functor that checks whether an \f$x\f$-monotone curve is a vertical. */ class Is_vertical_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Is_vertical_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} - /*! Check whether the given x-monotone curve is a vertical segment. - * \param cv The curve. - * \return (true) if the curve is a vertical segment;(false) otherwise. + public: + /*! Check whether the given \f$x\f$-monotone curve is a vertical segment. + * \param cv the curve. + * \return `true` if the curve is a vertical segment; `false` otherwise. */ - bool operator()(const X_monotone_curve_2& cv) const - { - // An x-monotone polycurve can represent a vertical segment only if it - // comprises vertical segments. If the first subcurve is vertical, - // all subcurves are vertical in an x-monotone polycurve + bool operator()(const X_monotone_curve_2& cv) const { + /* An \f$x\f$-monotone polycurve can represent a vertical segment only if + * it comprises vertical segments. If the first subcurve is vertical, + * all subcurves are vertical in an \f$x\f$-monotone polycurve + */ return m_poly_traits.subcurve_traits_2()->is_vertical_2_object()(cv[0]); } }; /*! Obtain an Is_vertical_2 functor object. */ - Is_vertical_2 is_vertical_2_object() const - { return Is_vertical_2(*this); } + Is_vertical_2 is_vertical_2_object() const { return Is_vertical_2(*this); } + /*! A functor that compares the \f$y\f$-coordinates of a point and an + * \f$x\f$-monotone curve at the point \f$x\f$-coordinate + */ class Compare_y_at_x_2 { private: // Oblivious implementation Comparison_result operator()(const X_monotone_subcurve_2& xs1, Arr_curve_end ce1, const X_monotone_subcurve_2& xs2, - Arr_all_sides_oblivious_tag) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - const Point_2& p = (ce1 == ARR_MAX_END) ? + Arr_all_sides_oblivious_tag) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto p = (ce1 == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs1) : geom_traits->construct_min_vertex_2_object()(xs1); return geom_traits->compare_y_at_x_2_object()(p, xs2); @@ -664,17 +661,12 @@ public: Comparison_result operator()(const X_monotone_subcurve_2& xs1, Arr_curve_end ce1, const X_monotone_subcurve_2& xs2, - Arr_not_all_sides_oblivious_tag) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Parameter_space_in_x_2 ps_x = - geom_traits->parameter_space_in_x_2_object(); - typename Subcurve_traits_2::Parameter_space_in_y_2 ps_y = - geom_traits->parameter_space_in_y_2_object(); - typename Subcurve_traits_2::Construct_min_vertex_2 min_vertex = - geom_traits->construct_min_vertex_2_object(); - typename Subcurve_traits_2::Construct_max_vertex_2 max_vertex = - geom_traits->construct_max_vertex_2_object(); + Arr_not_all_sides_oblivious_tag) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto ps_x = geom_traits->parameter_space_in_x_2_object(); + auto ps_y = geom_traits->parameter_space_in_y_2_object(); + auto min_vertex = geom_traits->construct_min_vertex_2_object(); + auto max_vertex = geom_traits->construct_max_vertex_2_object(); const Arr_parameter_space ps_x1 = ps_x(xs1, ce1); const Arr_parameter_space ps_y1 = ps_y(xs1, ce1); @@ -683,103 +675,125 @@ public: ((ce1 == ARR_MIN_END) && (ps_x1 != ARR_RIGHT_BOUNDARY))); if (ps_x1 == ARR_INTERIOR) { + auto p = (ce1 == ARR_MAX_END) ? max_vertex(xs1) : min_vertex(xs1); if (ps_y1 == ARR_TOP_BOUNDARY) { - typename Subcurve_traits_2::Equal_2 equal = - geom_traits->equal_2_object(); - const Point_2& p = (ce1 == ARR_MAX_END) ? - max_vertex(xs1) : min_vertex(xs1); + auto equal = geom_traits->equal_2_object(); if (equal(p, max_vertex(xs2))) return EQUAL; if (equal(p, min_vertex(xs2))) return EQUAL; return LARGER; } if (ps_y1 == ARR_BOTTOM_BOUNDARY) { - typename Subcurve_traits_2::Equal_2 equal = - geom_traits->equal_2_object(); - const Point_2& p = (ce1 == ARR_MAX_END) ? - max_vertex(xs1) : min_vertex(xs1); + auto equal = geom_traits->equal_2_object(); if (equal(p, max_vertex(xs2))) return EQUAL; if (equal(p, min_vertex(xs2))) return EQUAL; return SMALLER; } // ps_y1 == ARR_INTERIOR - const Point_2& p = (ce1 == ARR_MAX_END) ? - max_vertex(xs1) : min_vertex(xs1); return geom_traits->compare_y_at_x_2_object()(p, xs2); } // ps_x1 == ARR_RIGHT_BOUNDARY || ARR_LEFT_BOUNDARY - const Point_2& p1 = (ce1 == ARR_MAX_END) ? - max_vertex(xs1) : min_vertex(xs1); - const Point_2& p2 = (ce1 == ARR_MAX_END) ? - max_vertex(xs2) : min_vertex(xs2); + auto p1 = (ce1 == ARR_MAX_END) ? max_vertex(xs1) : min_vertex(xs1); + auto p2 = (ce1 == ARR_MAX_END) ? max_vertex(xs2) : min_vertex(xs2); return geom_traits->compare_y_on_boundary_2_object()(p1, p2); } - protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + // Compare vertical + Comparison_result compare_vertical(const Point_2& p, + const X_monotone_curve_2& xcv) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); +#ifdef CGAL_ALWAYS_LEFT_TO_RIGHT + const Comparison_result l2r_smaller = SMALLER; + const Comparison_result l2r_larger = LARGER; +#else + auto cmp_endpints_xy = m_poly_traits.compare_endpoints_xy_2_object(); + const bool l2r = cmp_endpints_xy(xcv[0]) == SMALLER; + const Comparison_result l2r_smaller = l2r ? SMALLER : LARGER; + const Comparison_result l2r_larger = l2r ? LARGER : SMALLER; +#endif + Comparison_result rc = geom_traits->compare_y_at_x_2_object()(p, xcv[0]); + if (rc == l2r_smaller) return l2r_smaller; + std::size_t n = xcv.number_of_subcurves(); + rc = geom_traits->compare_y_at_x_2_object()(p, xcv[n-1]); + return (rc == l2r_larger) ? l2r_larger : EQUAL; + } - /*! The polycurve traits (in case it has state). */ + // Compare non_vertical + Comparison_result compare_non_vertical(const Point_2& p, + const X_monotone_curve_2& xcv) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + // Get the index of the subcurve in xcv containing p. + auto i = m_poly_traits.locate_impl(xcv, p, All_sides_oblivious_category()); + CGAL_precondition(i != INVALID_INDEX); + + // Compare the subcurve xcv[i] and p. + return geom_traits->compare_y_at_x_2_object()(p, xcv[i]); + } + + // Oblivious implementation + Comparison_result operator()(const Point_2& p, + const X_monotone_curve_2& xcv, + Arr_all_sides_oblivious_tag) const { + if (! m_poly_traits.is_vertical_2_object()(xcv)) + return compare_non_vertical(p, xcv); + return compare_vertical(p, xcv); + } + + // Boundary implementation + Comparison_result operator()(const Point_2& p, + const X_monotone_curve_2& xcv, + Arr_not_all_sides_oblivious_tag) const { + if (! m_poly_traits.is_vertical_2_object()(xcv)) { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + if (geom_traits->is_on_y_identification_2_object()(p)) { + auto cmp_y = geom_traits->compare_y_on_boundary_2_object(); + return cmp_y(p, m_poly_traits.construct_min_vertex_2_object()(xcv)); + } + return compare_non_vertical(p, xcv); + } + return compare_vertical(p, xcv); + } + + protected: + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; + + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Compare_y_at_x_2(const Polycurve_basic_traits_2& traits) : - m_poly_traits(traits) {} + m_poly_traits(traits) + {} + public: /*! Obtain the location of the given point with respect to the input curve. - * \param p The point. - * \param xcv The polycurve curve. - * \pre p is in the x-range of cv. - * \return SMALLER if y(p) < cv(x(p)), i.e. the point is below the curve; - * LARGER if y(p) > cv(x(p)), i.e. the point is above the curve; - * EQUAL if p lies on the curve. + * \param p the point. + * \param xcv the polycurve curve. + * \pre `p` is in the \f$x\f$-range of `xcv`. + * \return + * `SMALLER` if \f$y\f$(p) < cv(x(p)), i.e. the point is below the curve; + * `LARGER` if \f$y\f$(p) > cv(x(p)), i.e. the point is above the curve; + * `EQUAL` if `p` lies on the curve. */ Comparison_result operator()(const Point_2& p, const X_monotone_curve_2& xcv) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - if (! m_poly_traits.is_vertical_2_object()(xcv)) { - // Get the index of the subcurve in xcv containing p. - std::size_t i = - m_poly_traits.locate_impl(xcv, p, All_sides_oblivious_category()); - CGAL_precondition(i != INVALID_INDEX); - - // Compare the subcurve xcv[i] and p. - return geom_traits->compare_y_at_x_2_object()(p, xcv[i]); - } - // The curve is vertical - #ifdef CGAL_ALWAYS_LEFT_TO_RIGHT - const Comparison_result SMLLR = SMALLER; - const Comparison_result LRGR = LARGER; - #else - const bool is_left_to_right = m_poly_traits.subcurve_traits_2()-> - compare_endpoints_xy_2_object()(xcv[0]) - == SMALLER; - const Comparison_result SMLLR = is_left_to_right?SMALLER:LARGER; - const Comparison_result LRGR = is_left_to_right?LARGER:SMALLER; - #endif - - Comparison_result rc = geom_traits->compare_y_at_x_2_object()(p, xcv[0]); - if (rc == SMLLR) return SMLLR; - std::size_t n = xcv.number_of_subcurves(); - rc = geom_traits->compare_y_at_x_2_object()(p, xcv[n-1]); - if (rc == LRGR) return LRGR; - return EQUAL; - } + { return operator()(p, xcv, All_sides_oblivious_category()); } /*! Obtain the location of the given curve_end with respect to the input * curve. * \param xcv The polycurve curve. - * \param ce the curve-end indicator of the x-monotone subcurve xl: - * ARR_MIN_END - the minimal end of xl or - * ARR_MAX_END - the maximal end of xl. + * \param ce the curve-end indicator of the \f$x\f$-monotone subcurve xl: + * `ARR_MIN_END` - the minimal end of xl or + * `ARR_MAX_END` - the maximal end of xl. * \param xcv The polycurve curve. - * \pre the curve-end is in the x-range of xcv. - * \return SMALLER if if y(xs, ce) < cv(x(xs, ce)), i.e. the curve-end - * is below the curve xcv; - * LARGER if y(xs, ce) > cv(x(xs, ce)), i.e. the curve-end is - * above the curve xcv; - * EQUAL if the curve-end lies on the curve xcv. + * \pre the curve-end is in the \f$x\f$-range of `xcv`. + * \return `SMALLER` if if \f$y\f$(xs, ce) < cv(x(xs, ce)), i.e. the + * curve-end is below the curve xcv; + * `LARGER` if \f$y\f$(xs, ce) > cv(x(xs, ce)), i.e. the curve-end + * is above the curve `xcv`; + * `EQUAL` if the curve-end lies on the curve `xcv`. */ Comparison_result operator()(const X_monotone_subcurve_2& xs1, Arr_curve_end ce1, @@ -791,34 +805,38 @@ public: Compare_y_at_x_2 compare_y_at_x_2_object() const { return Compare_y_at_x_2(*this); } + /*! A functor that compares the \f$y\f$-coordinates of two \f$x\f$-monotone + * curves immediately to the left of their intersection point. + */ class Compare_y_at_x_left_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Compare_y_at_x_left_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} - /*! Compare the y value of two x-monotone curves immediately to the left - * of their intersection point. - * \param cv1 The first polycurve curve. - * \param cv2 The second polycurve curve. - * \param p The intersection point. - * \pre The point p lies on both curves, and both of them must be also be - * defined(lexicographically) to its left. - * \return The relative position of cv1 with respect to cv2 immdiately to - * the left of p: SMALLER, LARGER or EQUAL. + public: + /*! Compare the y value of two \f$x\f$-monotone curves immediately to the + * left of their intersection point. + * \param cv1 the first polycurve curve. + * \param cv2 the second polycurve curve. + * \param p the intersection point. + * \pre the point `p` lies on both curves, and both of them must be also be + * defined (lexicographically) to its left. + * \return the relative position of `cv1` with respect to `cv2` immdiately + * to the left of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, - const Point_2& p) const - { + const Point_2& p) const { // Get the indices of the subcurves in cv1 and cv2 containing p and // defined to its left. std::size_t i1 = m_poly_traits.locate_side(cv1, p, false); @@ -828,8 +846,8 @@ public: CGAL_precondition(i2 != INVALID_INDEX); // Compare cv1[i1] and cv2[i2] at p's left. - return m_poly_traits.subcurve_traits_2()-> - compare_y_at_x_left_2_object()(cv1[i1], cv2[i2], p); + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + return geom_traits->compare_y_at_x_left_2_object()(cv1[i1], cv2[i2], p); } }; @@ -837,45 +855,49 @@ public: Compare_y_at_x_left_2 compare_y_at_x_left_2_object() const { return Compare_y_at_x_left_2(*this); } + /*! A functor that compares the \f$y\f$-coordinates of two \f$x\f$-monotone + * curves immediately to the right of their intersection point. + */ class Compare_y_at_x_right_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Compare_y_at_x_right_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} - /*! Compare the y value of two x-monotone curves immediately to the right - * of their intersection point. - * \param cv1 The first curve. - * \param cv2 The second curve. - * \param p The intersection point. - * \pre The point p lies on both curves, and both of them must be also be - * defined(lexicographically) to its right. - * \return The relative position of cv1 with respect to cv2 immdiately to - * the right of p: SMALLER, LARGER or EQUAL. + public: + /*! Compare the \f$y\f$-value of two \f$x\f$-monotone curves immediately to + * the right of their intersection point. + * \param cv1 the first curve. + * \param cv2 the second curve. + * \param p the intersection point. + * \pre the point `p` lies on both curves, and both of them must be also be + * defined (lexicographically) to its right. + * \return the relative position of `cv1` with respect to `cv2` immdiately + * to the right of `p`: `SMALLER`, `LARGER`, or `EQUAL`. */ Comparison_result operator()(const X_monotone_curve_2& cv1, const X_monotone_curve_2& cv2, - const Point_2& p) const - { + const Point_2& p) const { // Get the indices of the subcurves in cv1 and cv2 containing p and // defined to its right. - std::size_t i1=m_poly_traits.locate_side(cv1, p, true); - std::size_t i2=m_poly_traits.locate_side(cv2, p, true); + std::size_t i1 = m_poly_traits.locate_side(cv1, p, true); + std::size_t i2 = m_poly_traits.locate_side(cv2, p, true); CGAL_precondition(i1 != INVALID_INDEX); CGAL_precondition(i2 != INVALID_INDEX); // Compare cv1[i1] and cv2[i2] at p's right. - return m_poly_traits.subcurve_traits_2()-> - compare_y_at_x_right_2_object()(cv1[i1], cv2[i2], p); + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + return geom_traits->compare_y_at_x_right_2_object()(cv1[i1], cv2[i2], p); } }; @@ -884,58 +906,55 @@ public: Compare_y_at_x_right_2 compare_y_at_x_right_2_object() const { return Compare_y_at_x_right_2(*this); } + /*! A functor that checks whether two points and two \f$x\f$-monotone + * curves are identical. + */ class Equal_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Equal_2(const Polycurve_basic_traits_2& poly_tr) : m_poly_traits(poly_tr) {} + public: /*! Check whether the two points are the same. - * \param p1 The first point. - * \param p2 The second point. - * \return (true) if the two point are the same;(false) otherwise. + * \param p1 the first point. + * \param p2 the second point. + * \return `true` if the two point are the same; `false` otherwise. */ bool operator()(const Point_2& p1, const Point_2& p2) const { return m_poly_traits.subcurve_traits_2()->equal_2_object()(p1, p2); } - /*! Check whether the two x-monotone curves are the same (have the same - * graph). - * \param cv1 The first curve. - * \param cv2 The second curve. - * \return(true) if the two curves are the same;(false) otherwise. + /*! Check whether the two \f$x\f$-monotone curves are the same (have the + * same graph). + * \param cv1 the first curve. + * \param cv2 the second curve. + * \return `true` if the two curves are the same; `false` otherwise. */ bool operator()(const X_monotone_curve_2& cv1, - const X_monotone_curve_2& cv2) const - { + const X_monotone_curve_2& cv2) const { // Check the pairwise equality of the contained subcurves. - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Equal_2 equal = - geom_traits->equal_2_object(); - typename Subcurve_traits_2::Compare_x_2 compare_x = - geom_traits->compare_x_2_object(); - typename Subcurve_traits_2::Compare_y_at_x_2 compare_y_at_x = - geom_traits->compare_y_at_x_2_object(); - typename Subcurve_traits_2::Construct_max_vertex_2 max_vertex = - geom_traits->construct_max_vertex_2_object(); - typename Subcurve_traits_2::Compare_endpoints_xy_2 comp_endpt = - geom_traits->compare_endpoints_xy_2_object(); - Is_vertical_2 is_vertical = m_poly_traits.is_vertical_2_object(); - Construct_min_vertex_2 xpoly_min_v = - m_poly_traits.construct_min_vertex_2_object(); - Construct_max_vertex_2 xpoly_max_v = - m_poly_traits.construct_max_vertex_2_object(); + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto equal = geom_traits->equal_2_object(); + auto cmp_x = geom_traits->compare_x_2_object(); + auto cmp_y_at_x = geom_traits->compare_y_at_x_2_object(); + auto max_vertex = geom_traits->construct_max_vertex_2_object(); + auto cmp_endpt = geom_traits->compare_endpoints_xy_2_object(); + auto is_vertical = m_poly_traits.is_vertical_2_object(); + auto xpoly_min_v = m_poly_traits.construct_min_vertex_2_object(); + auto xpoly_max_v = m_poly_traits.construct_max_vertex_2_object(); // The first and last points of the subcurves should be equal. bool res = equal(xpoly_min_v(cv1), xpoly_min_v(cv2)); - if (!res) return false; + if (! res) return false; res = equal(xpoly_max_v(cv1), xpoly_max_v(cv2)); - if (!res) return false; + if (! res) return false; // If the first and last points are equal and the curves are vertical, // it means that it is equal. @@ -952,29 +971,16 @@ public: std::size_t j = 0; std::size_t n1 = cv1.number_of_subcurves(); std::size_t n2 = cv2.number_of_subcurves(); - Comparison_result is_cv1_left_to_right = comp_endpt(cv1[0]); - Comparison_result is_cv2_left_to_right = comp_endpt(cv2[0]); + Comparison_result is_cv1_left_to_right = cmp_endpt(cv1[0]); + Comparison_result is_cv2_left_to_right = cmp_endpt(cv2[0]); while ((i < (n1-1)) || (j < (n2-1))) { - Point_2 point1, point2; - std::size_t cv1_seg_ind, cv2_seg_ind; - if (SMALLER == is_cv1_left_to_right) { - cv1_seg_ind = i; - point1 = max_vertex(cv1[cv1_seg_ind]); - } - else { - cv1_seg_ind = n1 - 1 - i; - point1 = max_vertex(cv1[cv1_seg_ind]); - } - if (SMALLER == is_cv2_left_to_right) { - cv2_seg_ind = j; - point2 = max_vertex(cv2[cv2_seg_ind]); - } - else { - cv2_seg_ind = n2 - 1 - j; - point2 = max_vertex(cv2[cv2_seg_ind]); - } - + std::size_t cv1_seg_ind = (SMALLER == is_cv1_left_to_right) ? + i : n1 - 1 - i; + auto point1 = max_vertex(cv1[cv1_seg_ind]); + std::size_t cv2_seg_ind = (SMALLER == is_cv2_left_to_right) ? + j : n2 - 1 - j; + auto point2 = max_vertex(cv2[cv2_seg_ind]); bool res = equal(point1, point2); // Easy case - the two points are equal if (res) { @@ -982,18 +988,16 @@ public: ++j; } else { - Comparison_result res_x = compare_x(point1,point2); + Comparison_result res_x = cmp_x(point1, point2); // Check if the different point is a collinear point situated on // the line between its two neighbors. if (SMALLER == res_x) { - Comparison_result res_y_at_x = - compare_y_at_x(point1, cv2[cv2_seg_ind]); + Comparison_result res_y_at_x = cmp_y_at_x(point1, cv2[cv2_seg_ind]); if (EQUAL == res_y_at_x) ++i; else return false; } else if (LARGER == res_x) { - Comparison_result res_y_at_x = - compare_y_at_x(point2,cv1[cv1_seg_ind]); + Comparison_result res_y_at_x = cmp_y_at_x(point2, cv1[cv1_seg_ind]); if (EQUAL == res_y_at_x) ++j; else return false; } @@ -1007,31 +1011,33 @@ public: /*! Obtain an Equal_2 functor object. */ Equal_2 equal_2_object() const { return Equal_2(*this); } + /*! A functor that lexicographically compares the endpoints of a curve. */ class Compare_endpoints_xy_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; /*! The traits (in case it has state). */ const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Compare_endpoints_xy_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} + public: /*! Compare the endpoints of an \(x\)-monotone curve lexicographically. * (assuming the curve has a designated source and target points). - * \param cv The curve. - * \return SMALLER if the curve is oriented left-to-right; - * LARGER if the curve is oriented right-to-left. + * \param cv the curve. + * \return `SMALLER` if `cv` is oriented left-to-right; + * `LARGER` if `cv` is oriented right-to-left. */ - Comparison_result operator()(const X_monotone_curve_2& xcv) const - { - return (m_poly_traits.subcurve_traits_2()-> - compare_endpoints_xy_2_object()(xcv[0]) == SMALLER) ? - (SMALLER) : (LARGER); + Comparison_result operator()(const X_monotone_curve_2& xcv) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto cmp_endpt = geom_traits->compare_endpoints_xy_2_object(); + return (cmp_endpt(xcv[0]) == SMALLER) ? (SMALLER) : (LARGER); } }; //@} @@ -1043,37 +1049,39 @@ public: Compare_endpoints_xy_2 compare_endpoints_xy_2_object() const { return Compare_endpoints_xy_2(*this); } + /*! A functor that construct an \f$x\f$-monotone curve with the same endpoints + * of a given curve, but directed in the opposite direction. + */ class Construct_opposite_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The traits (in case it has state). */ + //! The traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor */ Construct_opposite_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} - /*! Construct the reversed \(x\)-monotone polycurve of the input. + public: + /*! Construct the reversed \f$x\f$-monotone polycurve of the input. * Note that the functor constructs the opposites of _all_ subcurves - * constituting xcv. - * \param xcv the \(x\)-monotone polycurve to be reveres + * constituting `xcv`. + * \param xcv the \f$x\f$-monotone polycurve to be reveres * \pre xcv contains at least one subcurve - * \return An \(x\)-monotone polycurve with the same graph as the input xcv - * only with a reverse orientation. + * \return an \f$x\f$-monotone polycurve with the same graph as the input + * `xcv` only with a reverse orientation. */ - X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Construct_opposite_2 const_op = - geom_traits->construct_opposite_2_object(); + X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto const_op = geom_traits->construct_opposite_2_object(); std::vector rev_segs(xcv.number_of_subcurves());; - typename X_monotone_curve_2::Subcurve_const_iterator sit; - typename X_monotone_curve_2::Subcurve_iterator tit = rev_segs.begin(); - for (sit = xcv.subcurves_begin(); sit != xcv.subcurves_end(); ++sit) + auto tit = rev_segs.begin(); + for (auto sit = xcv.subcurves_begin(); sit != xcv.subcurves_end(); ++sit) *tit++ = const_op(*sit); return X_monotone_curve_2(rev_segs.rbegin(), rev_segs.rend()); } @@ -1135,44 +1143,73 @@ public: return approximate_2_object_impl(Is_void()); } - // - class Construct_x_monotone_curve_2 { + //! A functor that constructs a point. + class Construct_point_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; + /*! Constructor. */ + Construct_point_2(const Polycurve_basic_traits_2& traits) : + m_poly_traits(traits) + {} + + friend class Arr_polycurve_basic_traits_2; + public: + /*! Construct a point. + * Apply perfect forwarding. + */ + template + Point_2 operator()(Args ... args) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto ctr_point = geom_traits->construct_point_2_object(); + return ctr_point(std::forward(args)...); + } + }; + + /*! Obtain a Construct_x_monotone_curve_2 functor object. */ + Construct_point_2 construct_point_2_object() const + { return Construct_point_2(*this); } + + //! A functor that constructs an \f$x\f$-monotone curve. + class Construct_x_monotone_curve_2 { + protected: + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; + + //! The polycurve traits (in case it has state). + const Polycurve_basic_traits_2& m_poly_traits; + + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Construct_x_monotone_curve_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} - /*! Obtain an x-monotone polycurve that consists of one given subcurve. + public: + /*! Obtain an \f$x\f$-monotone polycurve that consists of one given subcurve. * \param seg input subcurve. * \pre seg is not degenerated. - * \return An x-monotone polycurve with one subcurve. + * \return an \f$x\f$-monotone polycurve with one subcurve. */ - X_monotone_curve_2 operator()(const X_monotone_subcurve_2& seg) const - { + X_monotone_curve_2 operator()(const X_monotone_subcurve_2& seg) const { CGAL_precondition_code ( /* Test that the subcurve is not degenerated. We do this test * independently from the subcurve traits in use, as we do not * allow a polycurve with degenerated subcurves. */ - const Subcurve_traits_2* geom_traits = - m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Construct_min_vertex_2 get_min_v = - geom_traits->construct_min_vertex_2_object(); - typename Subcurve_traits_2::Construct_max_vertex_2 get_max_v = - geom_traits->construct_max_vertex_2_object(); - typename Subcurve_traits_2::Equal_2 equal = - geom_traits->equal_2_object(); + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto get_min_v = geom_traits->construct_min_vertex_2_object(); + auto get_max_v = geom_traits->construct_max_vertex_2_object(); + auto equal = geom_traits->equal_2_object(); - CGAL_precondition_msg(!equal(get_min_v(seg),get_max_v(seg)), + CGAL_precondition_msg(! equal(get_min_v(seg), get_max_v(seg)), "Cannot construct a degenerated subcurve"); ); @@ -1186,29 +1223,29 @@ public: return X_monotone_curve_2(seg); } - /*! Construct an x-monotone polycurve which is well-oriented from a range of - * elements. - * \pre Range should from a continuous well-oriented x-monotone polycurve. + /*! Construct an \f$x\f$-monotone polycurve, which is well-oriented, from a + * range of elements. + * \pre the elements in the range should form a continuous well-oriented + * \f$x\f$-monotone polycurve. */ template X_monotone_curve_2 operator()(ForwardIterator begin, - ForwardIterator end) const - { - typedef typename std::iterator_traits::value_type VT; - typedef typename std::is_same::type Is_point; + ForwardIterator end) const { + using VT = typename std::iterator_traits::value_type; + using Is_point = typename std::is_same::type; // Dispatch the range to the appropriate implementation. return constructor_impl(begin, end, Is_point()); } - /*! Construct an x-monotone polycurve from a range of points. + /*! Construct an \f$x\f$-monotone polycurve from a range of points. * The polycurve may be oriented left-to-right or right-to-left - * depending on the lexicographical order of the points in the - * input. - * \pre Range contains at least two points. - * \pre No two consecutive points are the same. - * \pre The points form an continuous well-oriented x-monotone polycurve. - * \post By the construction the returned polycurve is well-oriented. + * depending on the lexicographical order of the points in the input. + * \pre range contains at least two points. + * \pre no two consecutive points are the same. + * \pre the points form an continuous well-oriented \f$x\f$-monotone + * polycurve. + * \post by the construction the returned polycurve is well-oriented. */ template X_monotone_curve_2 constructor_impl(ForwardIterator /* begin */, @@ -1216,26 +1253,25 @@ public: std::true_type) const { CGAL_error_msg("Cannot construct a polycurve from a range of points!"); } - /*! Obtain an x-monotone polycurve from a range of subcurves. + /*! Obtain an \f$x\f$-monotone polycurve from a range of subcurves. * \param begin An iterator pointing to the first subcurve in the range. * \param end An iterator pointing to the past-the-end subcurve * in the range. - * \pre The range contains at least one subcurve. - * \pre Subcurves correspond to a well-oriented polycurve. That + * \pre the range contains at least one subcurve. + * \pre subcurves correspond to a well-oriented polycurve. That * is, the target of the i-th subcurve is an source of the * (i+1)th subcurve. - * \pre The sequence of subcurves in the range forms a weak x-monotone + * \pre the sequence of subcurves in the range forms a weak \f$x\f$-monotone * polycurve. - * \pre The container should support bidirectional iteration. - * \return A continuous, well-oriented x-monotone polycurve which + * \pre the container should support bidirectional iteration. + * \return a continuous, well-oriented \f$x\f$-monotone polycurve ,which * is directed either left-to-right or right-to-left * depending on the subcurves in the input. */ template X_monotone_curve_2 constructor_impl(ForwardIterator begin, ForwardIterator end, - std::false_type) const - { + std::false_type) const { CGAL_precondition_msg ( begin != end, @@ -1244,16 +1280,11 @@ public: CGAL_precondition_code ( - const Subcurve_traits_2* geom_traits = - m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts = - geom_traits->compare_endpoints_xy_2_object(); - typename Subcurve_traits_2::Construct_min_vertex_2 get_min_v = - geom_traits->construct_min_vertex_2_object(); - typename Subcurve_traits_2::Construct_max_vertex_2 get_max_v = - geom_traits->construct_max_vertex_2_object(); - typename Subcurve_traits_2::Equal_2 equal = - geom_traits->equal_2_object(); + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto cmp_seg_endpts = geom_traits->compare_endpoints_xy_2_object(); + auto get_min_v = geom_traits->construct_min_vertex_2_object(); + auto get_max_v = geom_traits->construct_max_vertex_2_object(); + auto equal = geom_traits->equal_2_object(); ForwardIterator curr = begin; ForwardIterator next = begin; @@ -1263,7 +1294,7 @@ public: CGAL_precondition_msg ( - (next != end) || !equal(get_max_v(*curr),get_min_v(*curr)), + (next != end) || ! equal(get_max_v(*curr),get_min_v(*curr)), "Cannot construct a polycurve with degenerated subcurve" ); @@ -1325,62 +1356,62 @@ public: //@{ /*! A function object that obtains the parameter space of a geometric - * entity along the x-axis + * entity along the \f$x\f$-axis */ class Parameter_space_in_x_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Parameter_space_in_x_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} - /*! Obtains the parameter space at the end of a curve along the x-axis . - * Note that if the curve-end coincides with a pole, then unless the curve - * coincides with the identification curve, the curve-end is considered to - * be approaching the boundary, but not on the boundary. + public: + /*! Obtains the parameter space at the end of a curve along the + * \f$x\f$-axis. Note that if the curve-end coincides with a pole, then + * unless the curve coincides with the identification curve, the curve-end + * is considered to be approaching the boundary, but not on the boundary. * If the curve coincides with the identification curve, it is assumed to * be smaller than any other object. * \param xcv the curve * \param ce the curve-end indicator: - * ARR_MIN_END - the minimal end of xc or - * ARR_MAX_END - the maximal end of xc + * `ARR_MIN_END` - the minimal end of `xcv` or + * `ARR_MAX_END` - the maximal end of `xcv` * \return the parameter space at the ce end of the curve xcv. - * ARR_LEFT_BOUNDARY - the curve approaches the identification curve - * from the right at the curve left end. - * ARR_INTERIOR - the curve does not approache the identification - * curve. - * ARR_RIGHT_BOUNDARY - the curve approaches the identification curve - * from the left at the curve right end. + * `ARR_LEFT_BOUNDARY` - the curve approaches the identification curve + * from the right at the curve left end. + * `ARR_INTERIOR` - the curve does not approache the identification + * curve. + * `ARR_RIGHT_BOUNDARY` - the curve approaches the identification curve + * from the left at the curve right end. * \pre xcv does not coincide with the vertical identification curve. */ Arr_parameter_space operator()(const X_monotone_curve_2& xcv, - Arr_curve_end ce) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - Comparison_result direction = - geom_traits->compare_endpoints_xy_2_object()(xcv[0]); + Arr_curve_end ce) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto cmp_endpt = geom_traits->compare_endpoints_xy_2_object(); + Comparison_result direction = cmp_endpt(xcv[0]); const X_monotone_subcurve_2& xs = - (((direction == SMALLER) && (ce == ARR_MAX_END)) || - ((direction == LARGER) && (ce == ARR_MIN_END))) ? - xcv[xcv.number_of_subcurves()-1] : xcv[0]; + (((direction == SMALLER) && (ce == ARR_MIN_END)) || + ((direction == LARGER) && (ce == ARR_MAX_END))) ? + xcv[0] : xcv[xcv.number_of_subcurves()-1]; return geom_traits->parameter_space_in_x_2_object()(xs, ce); } - /*! Obtains the parameter space at a point along the x-axis. + /*! Obtains the parameter space at a point along the \f$x\f$-axis. * \param p the point. - * \return the parameter space at p. - * \pre p does not lie on the vertical identification curve. + * \return the parameter space at `p`. + * \pre `p` does not lie on the vertical identification curve. */ - Arr_parameter_space operator()(const Point_2 p) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); + Arr_parameter_space operator()(const Point_2 p) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); return geom_traits->parameter_space_in_x_2_object()(p); } }; @@ -1390,63 +1421,63 @@ public: { return Parameter_space_in_x_2(*this); } /*! A function object that obtains the parameter space of a geometric - * entity along the y-axis + * entity along the \f$y\f$-axis */ class Parameter_space_in_y_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Parameter_space_in_y_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} - /*! Obtains the parameter space at the end of an curve along the y-axis . - * Note that if the curve-end coincides with a pole, then unless the curve - * coincides with the identification curve, the curve-end is considered to - * be approaching the boundary, but not on the boundary. + public: + /*! Obtains the parameter space at the end of an curve along the + * \f$y\f$-axis. Note that if the curve-end coincides with a pole, then + * unless the curve coincides with the identification curve, the curve-end + * is considered to be approaching the boundary, but not on the boundary. * If the curve coincides with the identification curve, it is assumed to * be smaller than any other object. * \param xcv the curve * \param ce the curve-end indicator: - * ARR_MIN_END - the minimal end of xcv or - * ARR_MAX_END - the maximal end of xcv + * `ARR_MIN_END` - the minimal end of `xcv` or + * `ARR_MAX_END` - the maximal end of `xcv` * \return the parameter space at the ce end of the curve xcv. - * ARR_BOTTOM_BOUNDARY - the curve approaches the south pole at the - * curve left end. - * ARR_INTERIOR - the curve does not approache a contraction - * point. - * ARR_TOP_BOUNDARY - the curve approaches the north pole at the - * curve right end. + * `ARR_BOTTOM_BOUNDARY` - the curve approaches the south pole at the + * curve left end. + * `ARR_INTERIOR` - the curve does not approache a contraction + * point. + * `ARR_TOP_BOUNDARY` - the curve approaches the north pole at the + * curve right end. * There are no horizontal identification curves! */ Arr_parameter_space operator()(const X_monotone_curve_2& xcv, - Arr_curve_end ce) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - Comparison_result direction = - geom_traits->compare_endpoints_xy_2_object()(xcv[0]); + Arr_curve_end ce) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto cmp_endpt = geom_traits->compare_endpoints_xy_2_object(); + Comparison_result direction = cmp_endpt(xcv[0]); const X_monotone_subcurve_2& xs = - (((direction == SMALLER) && (ce == ARR_MAX_END)) || - ((direction == LARGER) && (ce == ARR_MIN_END))) ? - xcv[xcv.number_of_subcurves()-1] : xcv[0]; + (((direction == SMALLER) && (ce == ARR_MIN_END)) || + ((direction == LARGER) && (ce == ARR_MAX_END))) ? + xcv[0] : xcv[xcv.number_of_subcurves()-1]; return geom_traits->parameter_space_in_y_2_object()(xs, ce); } - /*! Obtains the parameter space at a point along the y-axis. + /*! Obtains the parameter space at a point along the \f$y\f$-axis. * \param p the point. - * \return the parameter space at p. + * \return the parameter space at `p`. * \pre p does not lie on the horizontal identification curve. * There are no horizontal identification curves! */ - Arr_parameter_space operator()(const Point_2 p) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); + Arr_parameter_space operator()(const Point_2 p) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); return geom_traits->parameter_space_in_y_2_object()(p); } }; @@ -1455,63 +1486,65 @@ public: Parameter_space_in_y_2 parameter_space_in_y_2_object() const { return Parameter_space_in_y_2(*this); } - /*! A functor that compares the x-coordinate of curve-ends and points on the - * boundary of the parameter space. + /*! A functor that compares the \f$x\f$-coordinate of curve-ends and points on + * the boundary of the parameter space. */ class Compare_x_on_boundary_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Compare_x_on_boundary_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} - /*! Compare the x-coordinates of a point with the x-coordinate of an - * x-curve-end on the boundary. + public: + /*! Compare the \f$x\f$-coordinates of a point with the \f$x\f$-coordinate + * of an \f$x\f$-curve-end on the boundary. * \param point the point. - * \param xcv the x-curve, the endpoint of which is compared. - * \param ce the x-curve-end indicator: - * ARR_MIN_END - the minimal end of xcv or - * ARR_MAX_END - the maximal end of xcv. + * \param xcv the \f$x\f$-monotone curve, the endpoint of which is compared. + * \param ce the \f$x\f$-monotone curve-end indicator: + * `ARR_MIN_END` - the minimal end of xcv or + * `ARR_MAX_END` - the maximal end of xcv. * \return the comparison result: - * SMALLER - x(p) < x(xcv, ce); - * EQUAL - x(p) = x(xcv, ce); - * LARGER - x(p) > x(xcv, ce). - * \pre p lies in the interior of the parameter space. - * \pre the ce end of the x-curve xcv lies on the top boundary. - * \pre xcv does not coincide with the vertical identification curve. + * `SMALLER` - \f$x\f$(`p`) < \f$x\f$(`xcv`, `ce`); + * `EQUAL` - \f$x\f$(`p`) = \f$x\f$(`xcv`, `ce`); + * `LARGER` - \f$x\f$(`p`) > \f$x\f$(`xcv`, `ce`). + * \pre `p` lies in the interior of the parameter space. + * \pre the `ce` end of `xcv` lies on the top boundary. + * \pre `xcv` does not coincide with the vertical identification curve. */ Comparison_result operator()(const Point_2& point, const X_monotone_curve_2& xcv, Arr_curve_end ce) const { return operator()(point, xcv, ce, Bottom_or_top_sides_category()); } - /*! Compare the x-coordinates of 2 curve-ends on the boundary of the + /*! Compare the \f$x\f$-coordinates of 2 curve-ends on the boundary of the * parameter space. * \param xcv1 the first curve. * \param ce1 the first curve-end indicator: - * ARR_MIN_END - the minimal end of xcv1 or - * ARR_MAX_END - the maximal end of xcv1. + * `ARR_MIN_END` - the minimal end of `xcv1` or + * `ARR_MAX_END` - the maximal end of `xcv1`. * \param xcv2 the second curve. * \param ce2 the second curve-end indicator: - * ARR_MIN_END - the minimal end of xcv2 or - * ARR_MAX_END - the maximal end of xcv2. + * `ARR_MIN_END` - the minimal end of `xcv2` or + * `ARR_MAX_END` - the maximal end of `xcv2`. * \return the second comparison result: - * SMALLER - x(xcv1, ce1) < x(xcv2, ce2); - * EQUAL - x(xcv1, ce1) = x(xcv2, ce2); - * LARGER - x(xcv1, ce1) > x(xcv2, ce2). - * \pre the ce1 end of the curve xcv1 lies on a pole (implying ce1 is + * `SMALLER` - \f$\f$x(`xcv1`, `ce1`) < \f$x\f$(`xcv2`, `ce2`); + * `EQUAL` - \f$x\f$(`xcv1`, `ce1`) = \f$x\f$(`xcv2`, `ce2`); + * `LARGER` - \f$x\f$(`xcv1`, `ce1`) > \f$x\f$(`xcv2`, `ce2`). + * \pre the `ce1` end of `xcv1` lies on a pole (implying `xcv1` is * vertical). - * \pre the ce2 end of the curve xcv2 lies on a pole (implying ce2 is + * \pre the `ce2` end of `xcv2` lies on a pole (implying `xcv2` is * vertical). - * \pre xcv1 does not coincide with the vertical identification curve. - * \pre xcv2 does not coincide with the vertical identification curve. + * \pre `xcv1` does not coincide with the vertical identification curve. + * \pre `xcv2` does not coincide with the vertical identification curve. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, Arr_curve_end ce1, @@ -1520,118 +1553,99 @@ public: { return operator()(xcv1, ce1, xcv2, ce2, Bottom_or_top_sides_category()); } private: - /*! \brief compares the x-coordinates of a point with the x-coordinate of - * an x-curve-end on the boundary. + /*! \brief compares the \f$x\f$-coordinates of a point with the + * \f$x\f$-coordinate of an \f$x\f$-monotone curve-end on the boundary. */ Comparison_result operator()(const Point_2& point, const X_monotone_curve_2& xcv, Arr_curve_end ce, - Arr_boundary_cond_tag) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - Comparison_result direction = - geom_traits->compare_endpoints_xy_2_object()(xcv[0]); + Arr_boundary_cond_tag) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto cmp_endpt = geom_traits->compare_endpoints_xy_2_object(); + Comparison_result direction = cmp_endpt(xcv[0]); const X_monotone_subcurve_2& xs = - (((direction == SMALLER) && (ce == ARR_MAX_END)) || - ((direction == LARGER) && (ce == ARR_MIN_END))) ? + (((direction == SMALLER) && (ce == ARR_MIN_END)) || + ((direction == LARGER) && (ce == ARR_MAX_END))) ? xcv[0] : xcv[xcv.number_of_subcurves()-1]; return geom_traits->compare_x_on_boundary_2_object()(point, xs, ce); } - /*! \brief compares the x-coordinates of 2 curve-ends on the boundary of - * the parameter space. + /*! \brief compares the \f$x\f$-coordinates of 2 curve-ends on the boundary + * of the parameter space. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, Arr_curve_end ce1, const X_monotone_curve_2& xcv2, Arr_curve_end ce2, - Arr_boundary_cond_tag) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - Comparison_result direction1 = - geom_traits->compare_endpoints_xy_2_object()(xcv1[0]); + Arr_boundary_cond_tag) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto cmp_endpt = geom_traits->compare_endpoints_xy_2_object(); + Comparison_result direction1 = cmp_endpt(xcv1[0]); const X_monotone_subcurve_2& xs1 = - (((direction1 == SMALLER) && (ce1 == ARR_MAX_END)) || - ((direction1 == LARGER) && (ce1 == ARR_MIN_END))) ? + (((direction1 == SMALLER) && (ce1 == ARR_MIN_END)) || + ((direction1 == LARGER) && (ce1 == ARR_MAX_END))) ? xcv1[0] : xcv1[xcv1.number_of_subcurves()-1]; - Comparison_result direction2 = - geom_traits->compare_endpoints_xy_2_object()(xcv2[0]); + Comparison_result direction2 = cmp_endpt(xcv2[0]); const X_monotone_subcurve_2& xs2 = - (((direction2 == SMALLER) && (ce2 == ARR_MAX_END)) || - ((direction2 == LARGER) && (ce2 == ARR_MIN_END))) ? + (((direction2 == SMALLER) && (ce2 == ARR_MIN_END)) || + ((direction2 == LARGER) && (ce2 == ARR_MAX_END))) ? xcv2[0] : xcv2[xcv2.number_of_subcurves()-1]; return geom_traits->compare_x_on_boundary_2_object()(xs1, ce1, xs2, ce2); } size_type get_curve_index(const X_monotone_curve_2& xcv, const Arr_curve_end ce) const - { - //waqar:: dont know why it is opposite in Parameter_space_in_x... - // I think this is because of the way the subcurves are stored in the - // curve_vector. - // I am assuming that min end depends upon the direction and not the - // x-value. - // and also that min end subcurve is always placed at position 0 of the - // vector. - // Confirm with Eric. - return (ce == ARR_MIN_END) ? 0 : xcv.number_of_subcurves() - 1; - } + { return (ce == ARR_MIN_END) ? 0 : xcv.number_of_subcurves() - 1; } - /*! Given a point p, an x-monotone curve C(t) = (X(t),Y(t)), + /*! Given a point \f$p\f$, an x-monotone curve \f$C(t) = (X(t),Y(t))\f$, * and an enumerator that specifies either the minimum end or the * maximum end of the curve, and thus maps to a parameter value - * d in {0,1}, compare x_p and limit{t => d} X(t). - * If the parameter space is unbounded, a precondition ensures that C has - * a vertical asymptote at its d-end; that is limit{t => d} X(t) is finite. + * \f$d \in \{0,1\}\f$, compare x_p and limit{t => d} X(t). + * If the parameter space is unbounded, a precondition ensures that \f$C\f$ + * has a vertical asymptote at its \f$d\f$-end; that is + * limit{t => d} X(t) is finite. */ Comparison_result operator()(const Point_2& p, const X_monotone_curve_2& xcv, Arr_curve_end ce, - Arr_has_open_side_tag) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Compare_x_on_boundary_2 - compare_x_on_boundary = geom_traits->compare_x_on_boundary_2_object(); + Arr_has_open_side_tag) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto cmp_x_on_boundary = geom_traits->compare_x_on_boundary_2_object(); size_type index = this->get_curve_index(xcv, ce); - return compare_x_on_boundary(p, xcv[index], ce ); + return cmp_x_on_boundary(p, xcv[index], ce); } - /*! Given two x-monotone curves C1(t) = (X1(t),Y1(t)) and - * C2(t) = (X2(t),Y2(t)) and two enumerators that specify either the - * minimum ends or the maximum ends of the curves, and thus map to - * parameter values d1 in {0,1} and d2 in {0,1} for C1 and for C2, - * respectively, compare limit{t => d1} X1(t) and limit{t => d2} X2(t). + /*! Given two \f$x\f$-monotone curves \f$C_1(t) = (X_1(t),Y_1(t))\f$ and + * \f$C2_(t) = (X_2(t),Y_2(t))\f$ and two enumerators that specify either + * the minimum ends or the maximum ends of the curves, and thus map to + * parameter values \f$d_1 \in \{0,1\}\f$ and \f$d_2 \in \{0,1\}\f$ for + * \f$C_1\f$ and for \f$C_2\f$, respectively, compare + * limit{t => d1} X1(t) and limit{t => d2} X2(t). * If the parameter space is unbounded, a precondition ensures that - * C1 and C2 have vertical asymptotes at their respective ends; - * that is, limit{t => d1} X1(t) and limit{t =? d2} X2(t) are finite. + * \f$C_1\f$ and \f$C_2\f$ have vertical asymptotes at their respective + * ends; that is, limit{t => d1} X1(t) and limit{t =? d2} X2(t) are finite. */ Comparison_result operator()(const X_monotone_curve_2& xcv1, Arr_curve_end ce1/* for xcv1 */, - const X_monotone_curve_2 & xcv2, + const X_monotone_curve_2& xcv2, Arr_curve_end ce2/*! for xcv2 */, - Arr_has_open_side_tag) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Compare_x_at_on_boundary - compare_x_on_boundary = geom_traits->compare_x_on_boundary_2_object(); - + Arr_has_open_side_tag) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto cmp_x_on_boundary = geom_traits->compare_x_on_boundary_2_object(); size_type index_1 = this->get_curve_index(xcv1, ce1); size_type index_2 = this->get_curve_index(xcv2, ce2); - return compare_x_on_boundary(xcv1[index_1], ce1, xcv2[index_2], ce2); + return cmp_x_on_boundary(xcv1[index_1], ce1, xcv2[index_2], ce2); } Comparison_result operator()(const X_monotone_curve_2& xcv, Arr_curve_end ce1/* for xcv */, const X_monotone_subcurve_2& xseg, - Arr_curve_end ce2/*! for xseg */) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Compare_x_on_boundary_2 - compare_x_on_boundary = geom_traits->compare_x_on_boundary_2_object(); - - size_type index = this->get_curve_index(xcv, ce1 ); - return compare_x_on_boundary(xcv[index], ce1, xseg, ce2); + Arr_curve_end ce2/*! for xseg */) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto cmp_x_on_boundary = geom_traits->compare_x_on_boundary_2_object(); + size_type index = this->get_curve_index(xcv, ce1); + return cmp_x_on_boundary(xcv[index], ce1, xseg, ce2); } }; @@ -1639,42 +1653,33 @@ public: Compare_x_on_boundary_2 compare_x_on_boundary_2_object() const { return Compare_x_on_boundary_2(*this); } - class Compare_x_near_boundary_2{ + /*! A functor that compares the \f$x\f$-coordinates of curve ends near the + * boundary of the parameter space. + */ + class Compare_x_near_boundary_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + Compare_x_near_boundary_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} + public: size_type get_curve_index(const X_monotone_curve_2& xcv, const Arr_curve_end ce) const - { - //waqar:: dont know why it is opposite in Parameter_space_in_x... - // I think this is because of the way the subcurves are stored in the - // curve_vector. - // I am assuming that min end depends upon the direction and not the - // x-value. - // and also that min end subcurve is always placed at position 0 of the - // vector. - // Confirm with Eric. - size_type index = (ce == ARR_MIN_END) ? 0 : xcv.number_of_subcurves() - 1; - return index; - } - - Comparison_result operator()(const X_monotone_curve_2 xcv1, - const X_monotone_curve_2 xcv2, - Arr_curve_end ce) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Compare_x_near_boundary_2 - cmp_x_near_boundary = geom_traits->compare_x_near_boundary_2_object(); + { return (ce == ARR_MIN_END) ? 0 : xcv.number_of_subcurves() - 1; } + Comparison_result operator()(const X_monotone_curve_2& xcv1, + const X_monotone_curve_2& xcv2, + Arr_curve_end ce) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto cmp_x_near_boundary = geom_traits->compare_x_near_boundary_2_object(); size_type index_1 = this->get_curve_index(xcv1, ce); size_type index_2 = this->get_curve_index(xcv2, ce); @@ -1685,36 +1690,37 @@ public: Compare_x_near_boundary_2 compare_x_near_boundary_2_object() const { return Compare_x_near_boundary_2(*this); } - /*! A functor that compares the y-coordinate of two given points + /*! A functor that compares the \f$y\f$-coordinate of two given points * that lie on the vertical identification curve. */ class Compare_y_on_boundary_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Compare_y_on_boundary_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} - /*! Compare the y-coordinate of two given points that lie on the vertical - * identification curve. + public: + /*! Compare the \f$y\f$-coordinate of two given points that lie on the + * vertical identification curve. * \param p1 the first point. * \param p2 the second point. - * \return SMALLER - p1 is lexicographically smaller than p2; - * EQUAL - p1 and p2 coincides; - * LARGER - p1 is lexicographically larger than p2; - * \pre p1 lies on the vertical identification curve. - * \pre p2 lies on the vertical identification curve. + * \return `SMALLER` - `p1` is lexicographically smaller than `p2`; + * `EQUAL` - `p1` and `p2` coincides; + * `LARGER` - `p1` is lexicographically larger than `p2`; + * \pre `p1` lies on the vertical identification curve. + * \pre `p2` lies on the vertical identification curve. */ - Comparison_result operator()(const Point_2& p1, const Point_2& p2) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); + Comparison_result operator()(const Point_2& p1, const Point_2& p2) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); return geom_traits->compare_y_on_boundary_2_object()(p1, p2); } }; @@ -1723,52 +1729,52 @@ public: Compare_y_on_boundary_2 compare_y_on_boundary_2_object() const { return Compare_y_on_boundary_2(*this); } - /*! A functor that compares the y-coordinates of curve-ends near the + /*! A functor that compares the \f$y\f$-coordinates of curve-ends near the * boundary of the parameter space. */ class Compare_y_near_boundary_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Compare_y_near_boundary_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} - /*! Compare the y-coordinates of 2 curves at their ends near the boundary - * of the parameter space. + public: + /*! Compare the \f$y\f$-coordinates of 2 curves at their ends near the + * boundary of the parameter space. * \param xcv1 the first curve. * \param xcv2 the second curve. * \param ce the curve-end indicator: - * ARR_MIN_END - the minimal end or - * ARR_MAX_END - the maximal end + * `ARR_MIN_END` - the minimal end or + * `ARR_MAX_END` - the maximal end * \return the second comparison result. - * \pre the ce ends of the curves xcv1 and xcv2 lie either on the left + * \pre the `ce` ends of the curves `xcv1` and `xcv2` lie either on the left * boundary or on the right boundary of the parameter space (implying * that they cannot be vertical). * There is no horizontal identification curve! */ Comparison_result operator()(const X_monotone_curve_2& xcv1, const X_monotone_curve_2& xcv2, - Arr_curve_end ce) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - Comparison_result direction1 = - geom_traits->compare_endpoints_xy_2_object()(xcv1[0]); + Arr_curve_end ce) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto cmp_endpt = geom_traits->compare_endpoints_xy_2_object(); + Comparison_result direction1 = cmp_endpt(xcv1[0]); const X_monotone_subcurve_2& xs1 = - (((direction1 == SMALLER) && (ce == ARR_MAX_END)) || - ((direction1 == LARGER) && (ce == ARR_MIN_END))) ? + (((direction1 == SMALLER) && (ce == ARR_MIN_END)) || + ((direction1 == LARGER) && (ce == ARR_MAX_END))) ? xcv1[0] : xcv1[xcv1.number_of_subcurves()-1]; - Comparison_result direction2 = - geom_traits->compare_endpoints_xy_2_object()(xcv2[0]); + Comparison_result direction2 = cmp_endpt(xcv2[0]); const X_monotone_subcurve_2& xs2 = - (((direction2 == SMALLER) && (ce == ARR_MAX_END)) || - ((direction2 == LARGER) && (ce == ARR_MIN_END))) ? + (((direction2 == SMALLER) && (ce == ARR_MIN_END)) || + ((direction2 == LARGER) && (ce == ARR_MAX_END))) ? xcv2[0] : xcv2[xcv2.number_of_subcurves()-1]; return geom_traits->compare_y_near_boundary_2_object()(xs1, xs2, ce); } @@ -1783,37 +1789,37 @@ public: */ class Is_on_y_identification_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Is_on_y_identification_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} + public: /*! Determine whether a point lies in the vertical boundary. * \param p the point. - * \return a Boolean indicating whether p lies in the vertical boundary. + * \return a Boolean indicating whether `p` lies in the vertical boundary. */ - bool operator()(const Point_2& p) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); + bool operator()(const Point_2& p) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); return geom_traits->is_on_y_identification_2_object()(p); } - /*! Determine whether an x-monotone curve lies in the vertical boundary. - * \param xcv the x-monotone curve. - * \return a Boolean indicating whether xcv lies in the vertical boundary. + /*! Determine whether an \f$x\f$-monotone curve lies in the vertical + * boundary. + * \param xcv the \f$x\f$-monotone curve. + * \return a Boolean indicating whether `xcv` lies in the vertical boundary. */ - bool operator()(const X_monotone_curve_2& xcv) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - typename X_monotone_curve_2::Subcurve_const_iterator it; - for (it = xcv.subcurves_begin(); it != xcv.subcurves_end(); ++it) + bool operator()(const X_monotone_curve_2& xcv) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + for (auto it = xcv.subcurves_begin(); it != xcv.subcurves_end(); ++it) if (! geom_traits->is_on_y_identification_2_object()(*it)) return false; return true; } @@ -1828,37 +1834,37 @@ public: */ class Is_on_x_identification_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Is_on_x_identification_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} + public: /*! Determine whether a point lies in the vertical boundary. * \param p the point. - * \return a Boolean indicating whether p lies in the vertical boundary. + * \return a Boolean indicating whether `p` lies in the vertical boundary. */ - bool operator()(const Point_2& p) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); + bool operator()(const Point_2& p) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); return geom_traits->is_on_x_identification_2_object()(p); } - /*! Determine whether an x-monotone curve lies in the vertical boundary. - * \param xcv the x-monotone curve. - * \return a Boolean indicating whether xcv lies in the vertical boundary. + /*! Determine whether an \f$x\f$-monotone curve lies in the vertical + * boundary. + * \param `xcv` the \f$x\f$-monotone curve. + * \return a Boolean indicating whether `xcv` lies in the vertical boundary. */ - bool operator()(const X_monotone_curve_2& xcv) const - { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - typename X_monotone_curve_2::Subcurve_const_iterator it; - for (it = xcv.subcurves_begin(); it != xcv.subcurves_end(); ++it) + bool operator()(const X_monotone_curve_2& xcv) const { + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + for (auto it = xcv.subcurves_begin(); it != xcv.subcurves_end(); ++it) if (! geom_traits->is_on_x_identification_2_object()(*it)) return false; return true; } @@ -1878,8 +1884,7 @@ public: */ class Number_of_points_2 { public: - size_type operator()(const X_monotone_curve_2& cv) const - { + size_type operator()(const X_monotone_curve_2& cv) const { size_type num_seg = cv.number_of_subcurves(); return (num_seg == 0) ? 0 : num_seg + 1; } @@ -1893,19 +1898,21 @@ public: */ class Push_back_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The traits (in case it has state). */ + //! The traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Push_back_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} - /*! Append a subcurve to an existing x-monotone polycurve at the back. + public: + /*! Append a subcurve to an existing \f$x\f$-monotone polycurve at the back. */ void operator()(X_monotone_curve_2& xcv, const X_monotone_subcurve_2& seg) const @@ -1913,40 +1920,33 @@ public: private: // Oblivious implementation - template + template void push_back_2_impl(X_monotone_curve_2& xcv, const X_monotone_subcurve_2& seg, - Arr_all_sides_oblivious_tag) const - { + Arr_all_sides_oblivious_tag) const { CGAL_precondition_code ( - typedef typename X_monotone_curve_2::size_type size_type; + using size_type = typename X_monotone_curve_2::size_type; size_type num_seg = xcv.number_of_subcurves(); - const Subcurve_traits_2* geom_traits = - m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts = - geom_traits->compare_endpoints_xy_2_object(); - Comparison_result dir = cmp_seg_endpts(seg); - typename Subcurve_traits_2::Construct_max_vertex_2 get_max_v = - geom_traits->construct_max_vertex_2_object(); - typename Subcurve_traits_2::Construct_min_vertex_2 get_min_v = - geom_traits->construct_min_vertex_2_object(); - typename Subcurve_traits_2::Equal_2 equal = - geom_traits->equal_2_object(); - typename Subcurve_traits_2::Is_vertical_2 is_vertical = - geom_traits->is_vertical_2_object(); + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto cmp_endpts = geom_traits->compare_endpoints_xy_2_object(); + Comparison_result dir = cmp_endpts(seg); + auto get_max_v = geom_traits->construct_max_vertex_2_object(); + auto get_min_v = geom_traits->construct_min_vertex_2_object(); + auto equal = geom_traits->equal_2_object(); + auto is_vertical = geom_traits->is_vertical_2_object(); CGAL_precondition_msg((num_seg == 0) || ((is_vertical(xcv[0]) && is_vertical(seg)) || - (!is_vertical(xcv[0]) && !is_vertical(seg))), + (! is_vertical(xcv[0]) && ! is_vertical(seg))), "xcv is vertical and seg is not or vice versa!"); CGAL_precondition_msg((num_seg == 0) || - (cmp_seg_endpts(xcv[0]) == dir), + (cmp_endpts(xcv[0]) == dir), "xcv and seg do not have the same orientation!"); CGAL_precondition_msg((num_seg == 0) || - !equal(get_min_v(seg), get_max_v(seg)), + ! equal(get_min_v(seg), get_max_v(seg)), "Seg degenerates to a point!"); CGAL_precondition_msg((num_seg == 0) || @@ -1966,40 +1966,31 @@ public: } // Boundary implementation - template + template void push_back_2_impl(X_monotone_curve_2& xcv, const X_monotone_subcurve_2& seg, - Arr_not_all_sides_oblivious_tag) const - { + Arr_not_all_sides_oblivious_tag) const { CGAL_precondition_code ( - typedef typename X_monotone_curve_2::size_type size_type; + using size_type = typename X_monotone_curve_2::size_type; size_type num_seg = xcv.number_of_subcurves(); - const Subcurve_traits_2* geom_traits = - m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts = - geom_traits->compare_endpoints_xy_2_object(); - Comparison_result dir = cmp_seg_endpts(seg); - typename Subcurve_traits_2::Construct_max_vertex_2 get_max_v = - geom_traits->construct_max_vertex_2_object(); - typename Subcurve_traits_2::Construct_min_vertex_2 get_min_v = - geom_traits->construct_min_vertex_2_object(); - typename Subcurve_traits_2::Equal_2 equal = - geom_traits->equal_2_object(); - typename Subcurve_traits_2::Is_vertical_2 is_vertical = - geom_traits->is_vertical_2_object(); - typename Subcurve_traits_2::Parameter_space_in_x_2 ps_x = - geom_traits->parameter_space_in_x_2_object(); - typename Subcurve_traits_2::Parameter_space_in_y_2 ps_y = - geom_traits->parameter_space_in_y_2_object(); + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto cmp_endpts = geom_traits->compare_endpoints_xy_2_object(); + Comparison_result dir = cmp_endpts(seg); + auto get_max_v = geom_traits->construct_max_vertex_2_object(); + auto get_min_v = geom_traits->construct_min_vertex_2_object(); + auto equal = geom_traits->equal_2_object(); + auto is_vertical = geom_traits->is_vertical_2_object(); + auto ps_x = geom_traits->parameter_space_in_x_2_object(); + auto ps_y = geom_traits->parameter_space_in_y_2_object(); CGAL_precondition_msg((num_seg == 0) || ((is_vertical(xcv[0]) && is_vertical(seg)) || - (!is_vertical(xcv[0]) && !is_vertical(seg))), + (! is_vertical(xcv[0]) && ! is_vertical(seg))), "xcv is vertical and seg is not or vice versa!"); CGAL_precondition_msg((num_seg == 0) || - (cmp_seg_endpts(xcv[0]) == dir), + (cmp_endpts(xcv[0]) == dir), "xcv and seg do not have the same orientation!"); const Arr_parameter_space min_x_seg = ps_x(seg, ARR_MIN_END); @@ -2030,7 +2021,7 @@ public: ((max_x_cv == ARR_INTERIOR) && (max_y_cv == ARR_INTERIOR))), "Polycurve reaches the boundary to the right." - "Can not push back any subcurve further." ); + "Can not push back any subcurve further."); // A subcurve should not be pushed if the polycurve is directed to // the left and reaches the boundary. @@ -2038,7 +2029,7 @@ public: ((min_x_cv == ARR_INTERIOR) && (min_y_cv == ARR_INTERIOR))), "Polycurve reaches the boundary to the left." - "Can not push back any subcurve further." ); + "Can not push back any subcurve further."); // Something like a line should not be pushed if there is already a // subcurve present in the polycurve. @@ -2046,7 +2037,7 @@ public: (min_y_seg == ARR_INTERIOR)) || ((max_x_seg == ARR_INTERIOR) && (max_y_seg == ARR_INTERIOR)) || - (num_seg == 0) ), + (num_seg == 0)), "Subcurve reaching the boundary at both ends " "can not be pushed if there is already one or " "more subcurves present in the polycurve."); @@ -2055,7 +2046,7 @@ public: (max_x_seg == ARR_INTERIOR) && (max_y_seg == ARR_INTERIOR)) { CGAL_precondition_msg((num_seg == 0) || - !equal(get_min_v(seg), get_max_v(seg)), + ! equal(get_min_v(seg), get_max_v(seg)), "Seg degenerates to a point!"); } @@ -2067,7 +2058,7 @@ public: "Seg does not connect to the right!"); } - if ((max_x_seg == ARR_INTERIOR) && (max_y_seg == ARR_INTERIOR) ) { + if ((max_x_seg == ARR_INTERIOR) && (max_y_seg == ARR_INTERIOR)) { CGAL_precondition_msg((num_seg == 0) || (((dir != LARGER) || equal(get_min_v(xcv[num_seg-1]), @@ -2088,18 +2079,20 @@ public: */ class Push_front_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /*! The traits (in case it has state). */ + //! The traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - public: + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ Push_front_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} + public: /* Append a subcurve `seg` to an existing polycurve `xcv` at the front. */ void operator()(X_monotone_curve_2& xcv, const X_monotone_subcurve_2& seg) const @@ -2107,42 +2100,34 @@ public: private: // Oblivious implementation - template + template void push_front_2_impl(X_monotone_curve_2& xcv, const X_monotone_subcurve_2& seg, - Arr_all_sides_oblivious_tag) - const - { + Arr_all_sides_oblivious_tag) const { CGAL_precondition_code ( - typedef typename X_monotone_curve_2::size_type size_type; + using size_type = typename X_monotone_curve_2::size_type; size_type num_seg = xcv.number_of_subcurves(); - const Subcurve_traits_2* geom_traits = - m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts = - geom_traits->compare_endpoints_xy_2_object(); - Comparison_result dir = cmp_seg_endpts(seg); - typename Subcurve_traits_2::Construct_max_vertex_2 get_max_v = - geom_traits->construct_max_vertex_2_object(); - typename Subcurve_traits_2::Construct_min_vertex_2 get_min_v = - geom_traits->construct_min_vertex_2_object(); - typename Subcurve_traits_2::Equal_2 equal = - geom_traits->equal_2_object(); - typename Subcurve_traits_2::Is_vertical_2 is_vertical = - geom_traits->is_vertical_2_object(); + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto cmp_endpts = geom_traits->compare_endpoints_xy_2_object(); + Comparison_result dir = cmp_endpts(seg); + auto get_max_v = geom_traits->construct_max_vertex_2_object(); + auto get_min_v = geom_traits->construct_min_vertex_2_object(); + auto equal = geom_traits->equal_2_object(); + auto is_vertical = geom_traits->is_vertical_2_object(); CGAL_precondition_msg((num_seg == 0) || ((is_vertical(xcv[0]) && is_vertical(seg)) || - (!is_vertical(xcv[0]) && !is_vertical(seg))), + (! is_vertical(xcv[0]) && !is_vertical(seg))), "xcv is vertical and seg is not or vice versa!"); CGAL_precondition_msg((num_seg == 0) || - (cmp_seg_endpts(xcv[0]) == dir), + (cmp_endpts(xcv[0]) == dir), "xcv and seg do not have the same orientation!"); CGAL_precondition_msg((num_seg == 0) || - !equal(get_min_v(seg), get_max_v(seg)), + ! equal(get_min_v(seg), get_max_v(seg)), "Seg degenerates to a point!"); CGAL_precondition_msg((num_seg == 0) || (((dir != SMALLER) || @@ -2158,41 +2143,31 @@ public: } // Boundary implementation - template + template void push_front_2_impl(X_monotone_curve_2& xcv, const X_monotone_subcurve_2& seg, - Arr_not_all_sides_oblivious_tag) - const - { + Arr_not_all_sides_oblivious_tag) const { CGAL_precondition_code ( - typedef typename X_monotone_curve_2::size_type size_type; + using size_type = typename X_monotone_curve_2::size_type; size_type num_seg = xcv.number_of_subcurves(); - const Subcurve_traits_2* geom_traits = - m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts = - geom_traits->compare_endpoints_xy_2_object(); - Comparison_result dir = cmp_seg_endpts(seg); - typename Subcurve_traits_2::Construct_max_vertex_2 get_max_v = - geom_traits->construct_max_vertex_2_object(); - typename Subcurve_traits_2::Construct_min_vertex_2 get_min_v = - geom_traits->construct_min_vertex_2_object(); - typename Subcurve_traits_2::Equal_2 equal = - geom_traits->equal_2_object(); - typename Subcurve_traits_2::Parameter_space_in_x_2 ps_x = - geom_traits->parameter_space_in_x_2_object(); - typename Subcurve_traits_2::Parameter_space_in_y_2 ps_y = - geom_traits->parameter_space_in_y_2_object(); - typename Subcurve_traits_2::Is_vertical_2 is_vertical = - geom_traits->is_vertical_2_object(); + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto cmp_endpts = geom_traits->compare_endpoints_xy_2_object(); + Comparison_result dir = cmp_endpts(seg); + auto get_max_v = geom_traits->construct_max_vertex_2_object(); + auto get_min_v = geom_traits->construct_min_vertex_2_object(); + auto equal = geom_traits->equal_2_object(); + auto ps_x = geom_traits->parameter_space_in_x_2_object(); + auto ps_y = geom_traits->parameter_space_in_y_2_object(); + auto is_vertical = geom_traits->is_vertical_2_object(); CGAL_precondition_msg((num_seg == 0) || ((is_vertical(xcv[0]) && is_vertical(seg)) || - (!is_vertical(xcv[0]) && !is_vertical(seg))), + (! is_vertical(xcv[0]) && ! is_vertical(seg))), "xcv is vertical and seg is not or vice versa!"); CGAL_precondition_msg((num_seg == 0) || - (cmp_seg_endpts(xcv[0]) == dir), + (cmp_endpts(xcv[0]) == dir), "xcv and seg do not have the same orientation!"); const Arr_parameter_space min_x_seg = ps_x(seg, ARR_MIN_END); @@ -2227,7 +2202,7 @@ public: (max_x_seg == ARR_INTERIOR) && (max_y_seg == ARR_INTERIOR)) { CGAL_precondition_msg((num_seg == 0) || - !equal(get_min_v(seg), get_max_v(seg)), + ! equal(get_min_v(seg), get_max_v(seg)), "Seg degenerates to a point!"); } @@ -2253,72 +2228,65 @@ public: /*! Obtain a Push_front_2 functor object. */ Push_front_2 push_front_2_object() const { return Push_front_2(*this); } + //! A functor that trimps an \f$x\f$-monotone curve. class Trim_2 { protected: - typedef Arr_polycurve_basic_traits_2 - Polycurve_basic_traits_2; + using Polycurve_basic_traits_2 = + Arr_polycurve_basic_traits_2; - /* The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Polycurve_basic_traits_2& m_poly_traits; - /*! \brief returns a trimmed version of the polycurve with src and tgt as - * end points. - */ - public: - /*! Constructor. */ - Trim_2(const Polycurve_basic_traits_2& traits) : - m_poly_traits(traits) - {} + friend class Arr_polycurve_basic_traits_2; + /*! Constructor. */ + Trim_2(const Polycurve_basic_traits_2& traits) : m_poly_traits(traits) {} + + public: + /*! \brief returns a trimmed version of the polycurve with `source` and + * `target` as end points. + */ X_monotone_curve_2 operator()(const X_monotone_curve_2& xcv, - const Point_2& src, - const Point_2& tgt)const + const Point_2& source, + const Point_2& target) const { - const Subcurve_traits_2* geom_traits = m_poly_traits.subcurve_traits_2(); - typename Subcurve_traits_2::Trim_2 trim = geom_traits->trim_2_object(); + const auto* geom_traits = m_poly_traits.subcurve_traits_2(); + auto min_vertex = geom_traits->construct_min_vertex_2_object(); + auto max_vertex = geom_traits->construct_max_vertex_2_object(); + auto trim = geom_traits->trim_2_object(); //check whether src and tgt lies on the polycurve/polycurve. - CGAL_precondition(m_poly_traits.compare_y_at_x_2_object()(src, xcv) == - EQUAL); - CGAL_precondition(m_poly_traits.compare_y_at_x_2_object()(tgt, xcv) == - EQUAL); + CGAL_precondition_code + (auto cmp_y_at_x_2 = m_poly_traits.compare_y_at_x_2_object()); + CGAL_precondition(cmp_y_at_x_2(source, xcv) == EQUAL); + CGAL_precondition(cmp_y_at_x_2(target, xcv) == EQUAL); /* Check whether the source and the target conform with the * direction of the polycurve. * since the direction of the poly-line/curve should not be changed. * we will interchange the source and the target. */ - Point_2 source = src; - Point_2 target = tgt; - // If curve is oriented from right to left but points are left to right. - if (m_poly_traits.compare_endpoints_xy_2_object()(xcv) == LARGER && - m_poly_traits.compare_x_2_object()(src, tgt) == SMALLER ) - { - source = tgt; - target = src; - } - - /* If curve is oriented from left to right but points are from right - * to left. + /* If the curve is oriented from right to left but points are left to + * right or if the curve is oriented from left to right but points are + * from right to left, reverse. */ - else if (m_poly_traits.compare_endpoints_xy_2_object()(xcv) == SMALLER && - m_poly_traits.compare_x_2_object()(src, tgt) == LARGER ) - { - source = tgt; - target = src; - } + auto [src, trg] = + (((m_poly_traits.compare_endpoints_xy_2_object()(xcv) == LARGER) && + (m_poly_traits.compare_x_2_object()(source, target) == SMALLER)) || + ((m_poly_traits.compare_endpoints_xy_2_object()(xcv) == SMALLER) && + (m_poly_traits.compare_x_2_object()(source, target) == LARGER))) ? + std::make_tuple(target, source) : std::make_tuple(source, target); // std::cout << "**************the new source: " << source // << "the new target: " << target << std::endl; - /* - * Get the source and target subcurve numbers from the polycurve. + /* Get the source and target subcurve numbers from the polycurve. * The trimmed polycurve will have trimmed end subcurves(containing * source and target) along with complete * subcurves in between them. */ - std::size_t source_id = m_poly_traits.locate(xcv, source); - std::size_t target_id = m_poly_traits.locate(xcv, target); + std::size_t src_id = m_poly_traits.locate(xcv, src); + std::size_t trg_id = m_poly_traits.locate(xcv, trg); // std::cout << "source number: " << source_id << " Target number : " // << target_id << std::endl; // std::cout << "target subcurve: " << xcv[target_id] << std::endl; @@ -2328,52 +2296,42 @@ public: Comparison_result orientation = m_poly_traits.compare_endpoints_xy_2_object()(xcv); - Point_2 source_max_vertex = - geom_traits->construct_max_vertex_2_object()(xcv[source_id]); - Point_2 source_min_vertex = - geom_traits->construct_min_vertex_2_object()(xcv[source_id]); - Point_2 target_min_vertex = - geom_traits->construct_min_vertex_2_object()(xcv[target_id]); - Point_2 target_max_vertex = - geom_traits->construct_max_vertex_2_object()(xcv[target_id]); + auto src_max_vertex = max_vertex(xcv[src_id]); + auto src_min_vertex = min_vertex(xcv[src_id]); + auto trg_min_vertex = min_vertex(xcv[trg_id]); + auto trg_max_vertex = max_vertex(xcv[trg_id]); - //push the trimmed version of the source subcurve. - // if(sorientation == SMALLER && source != source_max_vertex) + // Push the trimmed version of the source subcurve. + // if (sorientation == SMALLER && source != src_max_vertex) if ((orientation == SMALLER) && - ! geom_traits->equal_2_object()(source, source_max_vertex) ) - { - if (source_id != target_id ) - trimmed_subcurves.push_back(trim(xcv[source_id], - source, source_max_vertex)); - else trimmed_subcurves.push_back(trim(xcv[source_id], source, target)); + ! geom_traits->equal_2_object()(src, src_max_vertex)) { + if (src_id != trg_id) + trimmed_subcurves.push_back(trim(xcv[src_id], src, src_max_vertex)); + else trimmed_subcurves.push_back(trim(xcv[src_id], src, trg)); } - //else if(orientation == LARGER && source != source_min_vertex) + // else if(orientation == LARGER && source != src_min_vertex) else if ((orientation == LARGER) && - ! geom_traits->equal_2_object()(source, source_min_vertex)) - { - if (source_id != target_id ) - trimmed_subcurves.push_back(trim(xcv[source_id], - source, source_min_vertex)); - else trimmed_subcurves.push_back(trim(xcv[source_id], source, target)); + ! geom_traits->equal_2_object()(src, src_min_vertex)) { + if (src_id != trg_id) + trimmed_subcurves.push_back(trim(xcv[src_id], src, src_min_vertex)); + else trimmed_subcurves.push_back(trim(xcv[src_id], src, trg)); } - //push the middle subcurves as they are. - for (size_t i = source_id+1; iequal_2_object()(target, target_min_vertex)) - trimmed_subcurves.push_back(trim(xcv[target_id], - target_min_vertex, target)); + ! geom_traits->equal_2_object()(trg, trg_min_vertex)) + trimmed_subcurves.push_back(trim(xcv[trg_id], trg_min_vertex, trg)); - //else if (orientation == LARGER && target != target_max_vertex) + // else if (orientation == LARGER && target != trg_max_vertex) else if ((orientation == LARGER) && - ! geom_traits->equal_2_object()(target, target_max_vertex)) - trimmed_subcurves.push_back(trim(xcv[target_id], - target_max_vertex, target)); + ! geom_traits->equal_2_object()(trg, trg_max_vertex)) + trimmed_subcurves.push_back(trim(xcv[trg_id], trg_max_vertex, trg)); } return X_monotone_curve_2(trimmed_subcurves.begin(), @@ -2391,18 +2349,19 @@ protected: * Roadmap: locate() should return an iterator to the located subcurve */ - /*! Obtain the index of the subcurve in the polycurve that contains the - * point q in its x-range. The function performs a binary search, so if the - * point q is in the x-range of the polycurve with n subcurves, the subcurve - * containing it can be located in \cgalBigO{log n} operations. - * \param cv The polycurve curve. - * \param q The point. - * \return An index i such that q is in the x-range of cv[i]. - * If q is not in the x-range of cv, returns INVALID_INDEX. + /*! Obtain the index of the subcurve in the polycurve that contains a point + * \f$q\f$ in its \f$x\f$-range. The function performs a binary search, so if + * the point \f$q\f$ is in the \f$x\f$-range of the polycurve with \f$n\f$ + * subcurves, the subcurve containing it can be located in \cgalBigO{log n} + * operations. + * \param cv the polycurve curve. + * \param q the point. + * \return an index \f$i\f$ such that \f$q\f$ is in the \f$x\f$-range of + * `cv[i]`. If \f$q\f$ is not in the \f$x\f$-range of `cv`, returns + * `INVALID_INDEX`. */ template - std::size_t locate_gen(const X_monotone_curve_2& cv, Compare compare) const - { + std::size_t locate_gen(const X_monotone_curve_2& cv, Compare compare) const { // The direction of cv. SMALLER means left-to-right and // otherwise right-to-left Comparison_result direction = @@ -2429,12 +2388,10 @@ protected: // Perform a binary search to locate the subcurve that contains q in its // range: while (((direction == SMALLER) && (to > from)) || - ((direction == LARGER) && (to < from))) - { + ((direction == LARGER) && (to < from))) { std::size_t mid = (from + to) / 2; if (((direction == SMALLER) && (mid > from)) || - ((direction == LARGER) && (mid < from))) - { + ((direction == LARGER) && (mid < from))) { Comparison_result res_mid = compare(cv[mid], ARR_MIN_END); if (res_mid == EQUAL) { // Ensure that the returned subcurve contains the query point @@ -2466,11 +2423,10 @@ protected: template class Compare_points { private: - /*! The polycurve traits (in case it has state). */ + //! The polycurve traits (in case it has state). const Subcurve_traits_2& m_subcurve_traits; const Point_2& m_point; - Comparer m_compare; public: @@ -2484,9 +2440,8 @@ protected: // Compare the given curve-end with the stored point. Comparison_result operator()(const X_monotone_subcurve_2& xs, - Arr_curve_end ce) - { - const Point_2& p = (ce == ARR_MAX_END) ? + Arr_curve_end ce) { + auto p = (ce == ARR_MAX_END) ? m_subcurve_traits.construct_max_vertex_2_object()(xs) : m_subcurve_traits.construct_min_vertex_2_object()(xs); return m_compare(p, m_point); @@ -2498,7 +2453,6 @@ protected: class Compare_point_curve_end { private: const Point_2& m_point; - Comparer m_compare; public: @@ -2519,9 +2473,7 @@ protected: class Compare_curve_ends { private: const X_monotone_subcurve_2& m_x_monotone_subcurve; - Arr_curve_end m_curve_end; - Comparer m_compare; public: @@ -2543,21 +2495,23 @@ protected: * of a curve. * This implementation is used in the case where at least one side of the * parameter space is not oblivious. - * \param xcv (in) the given polycurve. - * \param xs (in) the given curve. - * \param cd (in) the curve-end indicator. + * \param(in) xcv the given polycurve. + * \param(in) xs the given curve. + * \param(in) ce the curve-end indicator. */ std::size_t locate_impl(const X_monotone_curve_2& xcv, const X_monotone_subcurve_2& xs, Arr_curve_end ce, - Arr_not_all_sides_oblivious_tag) const - { + Arr_not_all_sides_oblivious_tag) const { const Subcurve_traits_2* geom_traits = subcurve_traits_2(); if (geom_traits->is_vertical_2_object()(xcv[0])) { - // Verify that q has the same x-coord as xcv (which is vertical) - Compare_x_2 compare_x = compare_x_2_object(); - Comparison_result res = compare_x(xcv[0], ARR_MIN_END, xs, ce); - if (res != EQUAL) return INVALID_INDEX; + CGAL_precondition_code + ( + // Verify that q has the same x-coord as xcv (which is vertical) + Compare_x_2 cmp_x = compare_x_2_object(); + Comparison_result res = cmp_x(xcv[0], ARR_MIN_END, xs, ce); + if (res != EQUAL) return INVALID_INDEX; + ); Compare_curve_ends compare(compare_xy_2_object(), xs, ce); return locate_gen(xcv, compare); @@ -2571,39 +2525,39 @@ protected: * of a curve. * This implementation is used in the case where all sides of the parameter * space is oblivious. - * \param xcv (in) the given polycurve. - * \param xs (in) the given curve. - * \param cd (in) the curve-end indicator. + * \param(in) xcv the given polycurve. + * \param(in) xs the given curve. + * \param(in) cd the curve-end indicator. */ std::size_t locate_impl(const X_monotone_curve_2& xcv, const X_monotone_subcurve_2& xs, Arr_curve_end ce, - Arr_all_sides_oblivious_tag) const - { + Arr_all_sides_oblivious_tag) const { const Subcurve_traits_2* geom_traits = subcurve_traits_2(); - const Point_2& p = (ce == ARR_MAX_END) ? + auto p = (ce == ARR_MAX_END) ? geom_traits->construct_max_vertex_2_object()(xs) : geom_traits->construct_min_vertex_2_object()(xs); return locate(xcv, p); } - /*! Locate the index of a curve in a polycurve that contains an endpoint - * of a curve. + /*! Locate the index of a curve in a polycurve that contains a point. * This implementation is used in the case where at least one side of the * parameter space is not oblivious. - * \param xcv (in) the given polycurve. - * \param p (in) the endpoint of a curve. + * \param(in) xcv the given polycurve. + * \param(in) p the query point. */ std::size_t locate_impl(const X_monotone_curve_2& xcv, const Point_2& p, - Arr_not_all_sides_oblivious_tag) const - { + Arr_not_all_sides_oblivious_tag) const { const Subcurve_traits_2* geom_traits = subcurve_traits_2(); if (geom_traits->is_vertical_2_object()(xcv[0])) { - // Verify that q has the same x-coord as xcv (which is vertical) - Compare_x_2 compare_x = compare_x_2_object(); - Comparison_result res = compare_x(xcv[0], ARR_MIN_END, p); - if (res != EQUAL) return INVALID_INDEX; + CGAL_precondition_code + ( + // Verify that q has the same x-coord as xcv (which is vertical) + auto cmp_x = compare_x_2_object(); + Comparison_result res = cmp_x(xcv[0], ARR_MIN_END, p); + if (res != EQUAL) return INVALID_INDEX; + ); Compare_point_curve_end compare(compare_xy_2_object(), p); return locate_gen(xcv, compare); @@ -2613,29 +2567,28 @@ protected: return locate_gen(xcv, compare); } - /*! Locate the index of a curve in a polycurve that contains an endpoint - * of a curve. + /*! Locate the index of a curve in a polycurve that contains a point. * This implementation is used in the case where all sides of the parameter - * space is oblivious. - * \param xcv (in) the given polycurve. - * \param p (in) the endpoint of a curve. + * space are oblivious. + * \param(in) xcv the given polycurve. + * \param(in) p the query point. */ std::size_t locate_impl(const X_monotone_curve_2& xcv, const Point_2& p, Arr_all_sides_oblivious_tag) const { return locate(xcv, p); } // - std::size_t locate(const X_monotone_curve_2& xcv, const Point_2& q) const - { + std::size_t locate(const X_monotone_curve_2& xcv, const Point_2& q) const { const Subcurve_traits_2* geom_traits = subcurve_traits_2(); if (geom_traits->is_vertical_2_object()(xcv[0])) { - // Verify that q has the same x-coord as cv (which is vertical) - typename Subcurve_traits_2::Construct_min_vertex_2 min_vertex = - geom_traits->construct_min_vertex_2_object(); - typename Subcurve_traits_2::Compare_x_2 compare_x = - geom_traits->compare_x_2_object(); - Comparison_result res = compare_x(min_vertex(xcv[0]), q); - if (res != EQUAL) return INVALID_INDEX; + CGAL_precondition_code + ( + // Verify that q has the same x-coord as cv (which is vertical) + auto min_vertex = geom_traits->construct_min_vertex_2_object(); + auto cmp_x = geom_traits->compare_x_2_object(); + Comparison_result res = cmp_x(min_vertex(xcv[0]), q); + if (res != EQUAL) return INVALID_INDEX; + ); Compare_points compare(*geom_traits, compare_xy_2_object(), q); @@ -2647,38 +2600,31 @@ protected: } /*! Find the index of the subcurve in the polycurve that is defined to the - * left(or to the right) of the point q. - * \param cv The polycurve curve. - * \param q The point. - * \param to_right(true) if we wish to locate a subcurve to the right of q, - * (false) if we wish to locate a subcurve to its right. - * \return An index i such that subcurves[i] is defined to the left(or to the - * right) of q, or INVALID_INDEX if no such subcurve exists. + * left (or to the right) of the point `q`. + * \param cv the polycurve curve. + * \param q the point. + * \param to_right `true` if we wish to locate a subcurve to the right of q, + * `false` if we wish to locate a subcurve to its right. + * \return an index \f$i\f$ such that subcurves[i] is defined to the left (or + * to the right) of `q`, or `INVALID_INDEX` if no such subcurve exists. */ std::size_t locate_side(const X_monotone_curve_2& cv, - const Point_2& q, const bool& to_right) const - { + const Point_2& q, const bool& to_right) const { // First locate a subcurve subcurves[i] that contains q in its x-range. std::size_t i = locate(cv, q); if (i == INVALID_INDEX) return INVALID_INDEX; - typename Subcurve_traits_2::Equal_2 equal = - subcurve_traits_2()->equal_2_object(); - typename Subcurve_traits_2::Compare_endpoints_xy_2 cmp_seg_endpts = - subcurve_traits_2()->compare_endpoints_xy_2_object(); - typename Subcurve_traits_2::Compare_x_2 comp_x = - subcurve_traits_2()->compare_x_2_object(); - typename Subcurve_traits_2::Is_vertical_2 is_vert = - subcurve_traits_2()->is_vertical_2_object(); - typename Subcurve_traits_2::Construct_max_vertex_2 get_max_v = - subcurve_traits_2()->construct_max_vertex_2_object(); - typename Subcurve_traits_2::Construct_min_vertex_2 get_min_v = - subcurve_traits_2()->construct_min_vertex_2_object(); + auto equal = subcurve_traits_2()->equal_2_object(); + auto cmp_endpts = subcurve_traits_2()->compare_endpoints_xy_2_object(); + auto cmp_x = subcurve_traits_2()->compare_x_2_object(); + auto is_vert = subcurve_traits_2()->is_vertical_2_object(); + auto get_max_v = subcurve_traits_2()->construct_max_vertex_2_object(); + auto get_min_v = subcurve_traits_2()->construct_min_vertex_2_object(); - Comparison_result direction = cmp_seg_endpts(cv[i]); + Comparison_result direction = cmp_endpts(cv[i]); - if ((!is_vert(cv[0]) && (comp_x(get_min_v(cv[i]), q) == EQUAL)) || - (is_vert(cv[0]) && equal(get_min_v(cv[i]), q))){ + if ((! is_vert(cv[0]) && (cmp_x(get_min_v(cv[i]), q) == EQUAL)) || + (is_vert(cv[0]) && equal(get_min_v(cv[i]), q))) { // q is the left endpoint of the i'th subcurve: if (to_right) return i; else { @@ -2694,11 +2640,10 @@ protected: } } - if ((!is_vert(cv[0]) && (comp_x(get_max_v(cv[i]), q) == EQUAL)) || - (is_vert(cv[0]) && equal(get_max_v(cv[i]), q))) - { + if ((! is_vert(cv[0]) && (cmp_x(get_max_v(cv[i]), q) == EQUAL)) || + (is_vert(cv[0]) && equal(get_max_v(cv[i]), q))) { // q is the right endpoint of the i'th subcurve: - if (!to_right) return i; + if (! to_right) return i; else { if (direction == SMALLER) { if (i == (cv.number_of_subcurves() - 1)) return INVALID_INDEX; diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h index 488ed21dea7..bab73408a4f 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_polycurve_traits_2.h @@ -591,8 +591,7 @@ public: Comparison_result dir = cmp_seg_endpts(xcv[0]); // Locate the subcurve on the polycurve xcv that contains p. - std::size_t i = m_poly_traits.locate(xcv, p); - + auto i = m_poly_traits.locate_impl(xcv, p, All_sides_oblivious_category()); CGAL_precondition(i != Polycurve_traits_2::INVALID_INDEX); // Clear the output curves. diff --git a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h index f3921b44149..71af407c54e 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h +++ b/Arrangement_on_surface_2/include/CGAL/Arr_rat_arc/Rational_arc_d_1.h @@ -450,7 +450,7 @@ public: _info = (_info | IS_DIRECTED_RIGHT); - // Analyze the behaviour of the rational function at x = -oo (the source). + // Analyze the behavior of the rational function at x = -oo (the source). Algebraic_real_1 y0; const Arr_parameter_space inf_s = _analyze_at_minus_infinity(P, Q, y0); @@ -460,7 +460,7 @@ public: _info = (_info | SRC_AT_Y_PLUS_INFTY); else // if (inf_s == ARR_INTERIOR) _ps = Algebraic_point_2(); //the point is a dummy - //Analyze the behaviour of the rational function at x = +oo (the target). + //Analyze the behavior of the rational function at x = +oo (the target). const Arr_parameter_space inf_t = _analyze_at_plus_infinity(P, Q, y0); if (inf_t == ARR_BOTTOM_BOUNDARY) @@ -949,7 +949,7 @@ public: Self split_at_pole(const Algebraic_real_1& x0) { - // Analyze the behaviour of the function near the given pole. + // Analyze the behavior of the function near the given pole. const std::pair signs = _analyze_near_pole(x0); const CGAL::Sign sign_left = signs.first; const CGAL::Sign sign_right = signs.second; diff --git a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h index 97c9b5b0f5b..d044c21edf0 100644 --- a/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h +++ b/Arrangement_on_surface_2/include/CGAL/Arrangement_2/Arr_traits_adaptor_2.h @@ -1578,7 +1578,7 @@ public: return res; } - // otherwise: both ends have asymptotic behaviour + // otherwise: both ends have asymptotic behavior if (ps_y1 == ps_y2) { // need special y-comparison if (ce1 == ce2) { // both ends approach asymptote from one side Comparison_result res = m_self->compare_x_near_boundary_2_object()(xcv1, xcv2, ce2); diff --git a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h index f2e6ecfc314..4c8c1a382bb 100644 --- a/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h +++ b/Arrangement_on_surface_2/include/CGAL/Curved_kernel_via_analysis_2/gfx/Curve_renderer_traits.h @@ -24,7 +24,7 @@ * \brief * defines class Curve_renderer_traits. * - * provides specialisations of Curve_renderer_traits for different number + * provides specializations of Curve_renderer_traits for different number * types compatible with the curve renderer */ diff --git a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/circle_segments/intersect b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/circle_segments/intersect index b0e0bbe6a46..6a3783c9cfc 100644 --- a/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/circle_segments/intersect +++ b/Arrangement_on_surface_2/test/Arrangement_on_surface_2/data/circle_segments/intersect @@ -1,6 +1,6 @@ # Input is based on the curves and points indexes from intersect.pt # intersect.xcv. The first two numbers are the numbers of the input curves -# to be intersected. After that there is the number of intesections and +# to be intersected. After that there is the number of intersections and # 2-3 numbers representing each intersection. Meaning, the input is of the form: # intersect \ # [ \ diff --git a/BGL/examples/BGL_OpenMesh/CMakeLists.txt b/BGL/examples/BGL_OpenMesh/CMakeLists.txt index d11ac1444c9..f461d55efb1 100644 --- a/BGL/examples/BGL_OpenMesh/CMakeLists.txt +++ b/BGL/examples/BGL_OpenMesh/CMakeLists.txt @@ -9,9 +9,9 @@ find_package(CGAL REQUIRED) find_package(OpenMesh) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) create_single_source_cgal_program("TriMesh.cpp") - target_link_libraries(TriMesh PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(TriMesh PRIVATE CGAL::OpenMesh_support) else() message("NOTICE: This project requires OpenMesh and will not be compiled.") endif() diff --git a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt index 7c901c71d8e..eabe0b1bd40 100644 --- a/BGL/examples/BGL_polyhedron_3/CMakeLists.txt +++ b/BGL/examples/BGL_polyhedron_3/CMakeLists.txt @@ -18,8 +18,8 @@ create_single_source_cgal_program("copy_polyhedron.cpp") find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - target_link_libraries(copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH) + include(CGAL_OpenMesh_support) + target_link_libraries(copy_polyhedron PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: The example 'copy_polyhedron' will not use OpenMesh.") endif() diff --git a/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h b/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h index b5d16f74d3b..368c5fca524 100644 --- a/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h +++ b/BGL/include/CGAL/boost/graph/Graph_with_descriptor_with_graph.h @@ -733,7 +733,7 @@ struct Graph_with_descriptor_with_graph_property_map { } }; // class Graph_with_descriptor_with_graph_property_map -//specialisation for lvaluepropertymaps +//specialization for lvaluepropertymaps template struct Graph_with_descriptor_with_graph_property_map { diff --git a/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h b/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h index 53f8968f86f..9a217389d82 100644 --- a/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h +++ b/BGL/include/CGAL/boost/graph/METIS/partition_dual_graph.h @@ -116,8 +116,8 @@ void partition_dual_graph(const TriangleMesh& tm, delete[] eptr; delete[] eind; - std::free(npart); - std::free(epart); + (std::free)(npart); + (std::free)(epart); } template diff --git a/BGL/include/CGAL/boost/graph/METIS/partition_graph.h b/BGL/include/CGAL/boost/graph/METIS/partition_graph.h index 08926a64116..42f8c240f01 100644 --- a/BGL/include/CGAL/boost/graph/METIS/partition_graph.h +++ b/BGL/include/CGAL/boost/graph/METIS/partition_graph.h @@ -151,8 +151,8 @@ void partition_graph(const TriangleMesh& tm, delete[] eptr; delete[] eind; - std::free(npart); - std::free(epart); + (std::free)(npart); + (std::free)(epart); } template diff --git a/BGL/include/CGAL/boost/graph/copy_face_graph.h b/BGL/include/CGAL/boost/graph/copy_face_graph.h index 956b640f879..e0d4cbd5b95 100644 --- a/BGL/include/CGAL/boost/graph/copy_face_graph.h +++ b/BGL/include/CGAL/boost/graph/copy_face_graph.h @@ -62,13 +62,15 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm, const tm_face_descriptor tm_null_face = boost::graph_traits::null_face(); const tm_vertex_descriptor tm_null_vertex = boost::graph_traits::null_vertex(); - reserve(tm, static_cast::vertices_size_type>(vertices(tm).size()+vertices(sm).size()), - static_cast::edges_size_type>(edges(tm).size()+edges(sm).size()), - static_cast::faces_size_type>(faces(tm).size()+faces(sm).size()) ); + reserve(tm, static_cast::vertices_size_type>(internal::exact_num_vertices(tm)+internal::exact_num_vertices(sm)), + static_cast::edges_size_type>(internal::exact_num_edges(tm)+internal::exact_num_edges(sm)), + static_cast::faces_size_type>(internal::exact_num_faces(tm)+internal::exact_num_faces(sm)) ); //insert halfedges and create each vertex when encountering its halfedge std::vector new_edges; - new_edges.reserve(edges(sm).size()); + std::vector new_vertices; + new_edges.reserve(internal::exact_num_edges(sm)); + new_vertices.reserve(internal::exact_num_vertices(sm)); for(sm_edge_descriptor sm_e : edges(sm)) { tm_edge_descriptor tm_e = add_edge(tm); @@ -106,6 +108,7 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm, tm_vertex_descriptor tm_h_tgt = add_vertex(tm); *v2v++=std::make_pair(sm_h_tgt, tm_h_tgt); set_halfedge(tm_h_tgt, tm_h, tm); + new_vertices.push_back(tm_h); set_target(tm_h, tm_h_tgt, tm); put(tm_vpm, tm_h_tgt, conv(get(sm_vpm, sm_h_tgt))); } @@ -116,6 +119,7 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm, tm_vertex_descriptor tm_h_src = add_vertex(tm); *v2v++=std::make_pair(sm_h_src, tm_h_src); set_halfedge(tm_h_src, tm_h_opp, tm); + new_vertices.push_back(tm_h_opp); set_target(tm_h_opp, tm_h_src, tm); put(tm_vpm, tm_h_src, conv(get(sm_vpm, sm_h_src))); } @@ -163,11 +167,9 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm, } } // update halfedge vertex of all but the vertex halfedge - for(tm_vertex_descriptor v : vertices(tm)) + for(tm_halfedge_descriptor h : new_vertices) { - tm_halfedge_descriptor h = halfedge(v, tm); - if (h==boost::graph_traits::null_halfedge()) - continue; + tm_vertex_descriptor v = target(h, tm); tm_halfedge_descriptor next_around_vertex=h; do{ next_around_vertex=opposite(next(next_around_vertex, tm), tm); diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index fd43a685fe5..2cf88ff3cbf 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -42,50 +42,31 @@ create_single_source_cgal_program("test_deprecated_io.cpp") find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) - add_definitions(-DCGAL_USE_OPENMESH) + include(CGAL_OpenMesh_support) - target_link_libraries(test_clear PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(test_clear PRIVATE -DCGAL_USE_OPENMESH) - target_link_libraries(test_Euler_operations PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(test_Euler_operations PRIVATE -DCGAL_USE_OPENMESH) - target_link_libraries(test_Collapse_edge PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(test_Collapse_edge PRIVATE -DCGAL_USE_OPENMESH) - target_link_libraries(test_Face_filtered_graph PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(test_Face_filtered_graph PRIVATE -DCGAL_USE_OPENMESH) - target_link_libraries(test_graph_traits PRIVATE ${OPENMESH_LIBRARIES} ) - target_compile_definitions(test_graph_traits PRIVATE -DCGAL_USE_OPENMESH) - target_link_libraries(test_Properties PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(test_Properties PRIVATE -DCGAL_USE_OPENMESH) - target_link_libraries(test_bgl_read_write PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_OPENMESH) + target_link_libraries(test_clear PRIVATE CGAL::OpenMesh_support) + target_link_libraries(test_Euler_operations PRIVATE CGAL::OpenMesh_support) + target_link_libraries(test_Collapse_edge PRIVATE CGAL::OpenMesh_support) + target_link_libraries(test_Face_filtered_graph PRIVATE CGAL::OpenMesh_support) + target_link_libraries(test_graph_traits PRIVATE CGAL::OpenMesh_support ) + target_link_libraries(test_Properties PRIVATE CGAL::OpenMesh_support) + target_link_libraries(test_bgl_read_write PRIVATE CGAL::OpenMesh_support) create_single_source_cgal_program("graph_concept_OpenMesh.cpp") - target_link_libraries(graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(graph_concept_OpenMesh PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.") endif() -find_package(VTK QUIET COMPONENTS vtkCommonCore vtkIOCore vtkIOLegacy vtkIOXML vtkFiltersCore vtkFiltersSources) -if (VTK_FOUND) - if(VTK_USE_FILE) - include(${VTK_USE_FILE}) - endif() - - if ("${VTK_VERSION_MAJOR}" GREATER "5" OR VTK_VERSION VERSION_GREATER 5) - if(TARGET VTK::CommonCore) - set(VTK_LIBRARIES VTK::CommonCore VTK::IOCore VTK::IOLegacy VTK::IOXML VTK::FiltersCore VTK::FiltersSources) - endif() - - if(VTK_LIBRARIES) - target_link_libraries(test_bgl_read_write PRIVATE ${VTK_LIBRARIES}) - target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_VTK -DNOMINMAX) - target_link_libraries(test_deprecated_io PRIVATE ${VTK_LIBRARIES}) - target_compile_definitions(test_deprecated_io PRIVATE -DCGAL_USE_VTK -DNOMINMAX) - else() - message(STATUS "Tests that use VTK will not be compiled.") - endif() - endif() +find_package(VTK 9.0 QUIET COMPONENTS CommonCore IOCore IOLegacy IOXML FiltersCore FiltersSources) +if (VTK_FOUND AND VTK_LIBRARIES) + message(STATUS "VTK ${VTK_VERSION} found ${VTK_LIBRARIES}") + target_link_libraries(test_bgl_read_write PRIVATE ${VTK_LIBRARIES}) + target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_VTK -DNOMINMAX) + target_link_libraries(test_deprecated_io PRIVATE ${VTK_LIBRARIES}) + target_compile_definitions(test_deprecated_io PRIVATE -DCGAL_USE_VTK -DNOMINMAX) +else() + message(STATUS "Tests that use VTK will not be compiled.") endif() #VTK_FOUND find_path(3MF_INCLUDE_DIR diff --git a/BGL/test/BGL/test_Euler_operations.cpp b/BGL/test/BGL/test_Euler_operations.cpp index 941758cb1c3..615a4fd756d 100644 --- a/BGL/test/BGL/test_Euler_operations.cpp +++ b/BGL/test/BGL/test_Euler_operations.cpp @@ -17,6 +17,7 @@ test_copy_face_graph_nm_umbrella() T g; Kernel::Point_3 p(0,0,0); + // make two connected components CGAL::make_tetrahedron(p, p, p, p, g); CGAL::make_tetrahedron(p, p, p, p, g); diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Boolean_set_operations_2.txt b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Boolean_set_operations_2.txt index d03add5708a..661e4d89ae5 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/Boolean_set_operations_2.txt +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/Boolean_set_operations_2.txt @@ -542,13 +542,13 @@ boundary of each input (linear) polygon as a cyclic sequence of single (\f$x\f$-monotone) polylines. By default, `UsePolylines` is set to `CGAL::Tag_true`, which implies that the boundary of the each input (linear) polygon is treated as a cyclic sequence of (\f$x\f$-monotone) -polylines. In most cases this behaviour is superior (that is, less +polylines. In most cases this behavior is superior (that is, less time-consuming) because the number of events handled as part of the execution of the plane-sweep algorithm is reduced. In cases where the boundaries of the input polygons frequently intersect, treating them as polylines may become less efficient. In these cases substitute the `UsePolylines` template parameter with `CGAL::Tag_false` to restore -the original behaviour (where the boundary of each input linear +the original behavior (where the boundary of each input linear polygon is treated as a cyclic sequence of single \f$x\f$-monotone segments). diff --git a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h index 32fbfe7a129..39faf23e21a 100644 --- a/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h +++ b/Boolean_set_operations_2/doc/Boolean_set_operations_2/CGAL/Boolean_set_operations_2.h @@ -1104,7 +1104,7 @@ do_intersect(const General_polygon_with_holes_2>& p * \param traits a traits object. * \return `true` if `pgn1` and `pgn2` intersect in their interior and `false` * otherwise. - * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. + * * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. */ template diff --git a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h index 23af4802c19..8a6e443cd33 100644 --- a/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h +++ b/Boolean_set_operations_2/include/CGAL/Boolean_set_operations_2/Gps_on_surface_base_2.h @@ -642,6 +642,7 @@ public: unsigned int i = 1; for (InputIterator itr = begin; itr != end; ++itr, ++i) { + ValidationPolicy::is_valid((*itr), *m_traits); arr_vec[i].first = new Aos_2(m_traits); _insert(*itr, *(arr_vec[i].first)); } @@ -666,6 +667,7 @@ public: unsigned int i = 1; for (InputIterator itr = begin; itr!=end; ++itr, ++i) { + ValidationPolicy::is_valid((*itr), *m_traits); arr_vec[i].first = new Aos_2(m_traits); _insert(*itr, *(arr_vec[i].first)); } diff --git a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_annulus_d_traits_2.h b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_annulus_d_traits_2.h index d3c56d3b095..b2826180704 100644 --- a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_annulus_d_traits_2.h +++ b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_annulus_d_traits_2.h @@ -5,7 +5,7 @@ namespace CGAL { \ingroup PkgBoundingVolumesRef The class `Min_sphere_annulus_d_traits_2` is a traits class for the \f$ d\f$-dimensional -optimisation algorithms using the two-dimensional \cgal kernel. +optimization algorithms using the two-dimensional \cgal kernel. \tparam K must bea model for `Kernel`. \tparam ET NT are models for `RingNumberType`. Their default type is `K::RT`. diff --git a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_annulus_d_traits_3.h b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_annulus_d_traits_3.h index 84284beefc5..5d57a716ada 100644 --- a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_annulus_d_traits_3.h +++ b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_annulus_d_traits_3.h @@ -5,7 +5,7 @@ namespace CGAL { \ingroup PkgBoundingVolumesRef The class `Min_sphere_annulus_d_traits_3` is a traits class for the \f$ d\f$-dimensional -optimisation algorithms using the three-dimensional \cgal kernel. +optimization algorithms using the three-dimensional \cgal kernel. \tparam K must be a model for `Kernel`. \tparam ET NT are models for `RingNumberType`. Their default type is `K::RT`. diff --git a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_annulus_d_traits_d.h b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_annulus_d_traits_d.h index f2bc035794b..046cced2d58 100644 --- a/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_annulus_d_traits_d.h +++ b/Bounding_volumes/doc/Bounding_volumes/CGAL/Min_sphere_annulus_d_traits_d.h @@ -5,7 +5,7 @@ namespace CGAL { \ingroup PkgBoundingVolumesRef The class `Min_sphere_annulus_d_traits_d` is a traits class for the \f$ d\f$-dimensional -optimisation algorithms using the \f$ d\f$-dimensional \cgal kernel. +optimization algorithms using the \f$ d\f$-dimensional \cgal kernel. \tparam K must be a model for `Kernel`. \tparam ET NT are models for `RingNumberType`. Their default type is `K::RT`. diff --git a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h index 0fc9ef14af1..e200621f7ea 100644 --- a/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h +++ b/Bounding_volumes/include/CGAL/Approximate_min_ellipsoid_d/Khachiyan_approximation.h @@ -71,7 +71,7 @@ namespace CGAL { std::vector P; // input points int n; // number of input points, i.e., P.size() - // This class comes in two flavours: + // This class comes in two flavors: // // (i) When Embed is false, the input points are taken to be // ordinary points in R^{d_P}, where d_P is the dimension of the diff --git a/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h b/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h index b51de487eb3..be95cea772c 100644 --- a/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h +++ b/Bounding_volumes/include/CGAL/Min_sphere_of_spheres_d/Min_sphere_of_spheres_d_pair.h @@ -33,7 +33,7 @@ namespace CGAL_MINIBALL_NAMESPACE { // they are convertible to double. // This is indeed the least invasive fix dropint the function that were // defined here and cause linkage bug. - // You can still have a behaviour of instantiating only if a type + // You can still have a behavior of instantiating only if a type // is convertibale to double (by using type_traits together with _if) // but until "the whole design should be overhauled at some point" // this is fine. diff --git a/Bounding_volumes/include/CGAL/min_quadrilateral_2.h b/Bounding_volumes/include/CGAL/min_quadrilateral_2.h index 081520c0846..8e78c9f42a3 100644 --- a/Bounding_volumes/include/CGAL/min_quadrilateral_2.h +++ b/Bounding_volumes/include/CGAL/min_quadrilateral_2.h @@ -376,7 +376,7 @@ min_rectangle_2( // quadruple of points defining the current rectangle ForwardIterator curr[4]; - // initialised to the points defining the bounding box + // initialized to the points defining the bounding box convex_bounding_box_2(f, l, curr, t); // curr[i] can be advanced (cyclically) until it reaches limit[i] @@ -482,7 +482,7 @@ min_parallelogram_2(ForwardIterator f, // quadruple of points defining the bounding box ForwardIterator curr[4]; - // initialised to the points defining the bounding box + // initialized to the points defining the bounding box convex_bounding_box_2(first, l, curr, t); @@ -659,7 +659,7 @@ min_strip_2(ForwardIterator f, // quadruple of points defining the bounding box ForwardIterator curr[4]; - // initialised to the points defining the bounding box + // initialized to the points defining the bounding box convex_bounding_box_2(first, l, curr, t); ForwardIterator low = curr[0]; diff --git a/Bounding_volumes/include/CGAL/rectangular_3_center_2.h b/Bounding_volumes/include/CGAL/rectangular_3_center_2.h index 276f286fcbf..9d280f2eaf0 100644 --- a/Bounding_volumes/include/CGAL/rectangular_3_center_2.h +++ b/Bounding_volumes/include/CGAL/rectangular_3_center_2.h @@ -135,7 +135,7 @@ rectangular_3_center_2_type1( rad = sdist(v(r, 2), v(r, 0)); // init to prevent default constructor requirement Point bestpoint = *f; - // (initialisation avoids warning) + // (initialization avoids warning) unsigned int bestrun = 0; // two cases: top-left & bottom-right or top-right & bottom-left diff --git a/Bounding_volumes/test/Bounding_volumes/min_sphere_test.cpp b/Bounding_volumes/test/Bounding_volumes/min_sphere_test.cpp index ff82ea1bdb0..816cb353d44 100644 --- a/Bounding_volumes/test/Bounding_volumes/min_sphere_test.cpp +++ b/Bounding_volumes/test/Bounding_volumes/min_sphere_test.cpp @@ -11,7 +11,7 @@ // release : $CGAL_Revision: CGAL-wip $ // release_date : $CGAL_Date$ // -// chapter : $CGAL_Chapter: Optimisation $ +// chapter : $CGAL_Chapter: Geometric Optimization $ // package : $CGAL_Package: MinSphere $ // file : min_sphere_test.C // source : web/Optimisation/Min_sphere_d.aw diff --git a/Bounding_volumes/test/Bounding_volumes/min_sphere_traits_2_test.cpp b/Bounding_volumes/test/Bounding_volumes/min_sphere_traits_2_test.cpp index 0f137fd20ff..cd79be09588 100644 --- a/Bounding_volumes/test/Bounding_volumes/min_sphere_traits_2_test.cpp +++ b/Bounding_volumes/test/Bounding_volumes/min_sphere_traits_2_test.cpp @@ -12,7 +12,7 @@ // release : $CGAL_Revision: CGAL-wip $ // release_date : $CGAL_Date$ // -// chapter : $CGAL_Chapter: Optimisation $ +// chapter : $CGAL_Chapter: Geometric Optimization $ // package : $CGAL_Package: MinSphere $ // file : min_sphere_traits_2_test.C // source : web/Optimisation/Min_sphere_d.aw diff --git a/Bounding_volumes/test/Bounding_volumes/min_sphere_traits_3_test.cpp b/Bounding_volumes/test/Bounding_volumes/min_sphere_traits_3_test.cpp index efb0bed98c8..01fb795f264 100644 --- a/Bounding_volumes/test/Bounding_volumes/min_sphere_traits_3_test.cpp +++ b/Bounding_volumes/test/Bounding_volumes/min_sphere_traits_3_test.cpp @@ -11,7 +11,7 @@ // release : $CGAL_Revision: CGAL-wip $ // release_date : $CGAL_Date$ // -// chapter : $CGAL_Chapter: Optimisation $ +// chapter : $CGAL_Chapter: Geometric Optimization $ // package : $CGAL_Package: MinSphere $ // file : min_sphere_traits_3_test.C // source : web/Optimisation/Min_sphere_d.aw diff --git a/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d.h b/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d.h index a1b3c9e88e0..f393618663f 100644 --- a/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d.h +++ b/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d.h @@ -13,7 +13,7 @@ // // file : test/Min_annulus_d/test_Min_annulus_d.h // package : $CGAL_Package: Min_annulus_d $ -// chapter : Geometric Optimisation +// chapter : Geometric Optimization // // source : web/Min_annulus_d.aw // revision : $Id$ diff --git a/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d_2.cpp b/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d_2.cpp index 8592a9fe977..b13bb42c0e4 100644 --- a/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d_2.cpp +++ b/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d_2.cpp @@ -13,7 +13,7 @@ // // file : test/Min_annulus_d/test_Min_annulus_d_2.cpp // package : $CGAL_Package: Min_annulus_d $ -// chapter : Geometric Optimisation +// chapter : Geometric Optimization // // revision : $Id$ // revision_date : $Date$ diff --git a/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d_3.cpp b/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d_3.cpp index 09dbce7b680..b003679c0f9 100644 --- a/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d_3.cpp +++ b/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d_3.cpp @@ -13,7 +13,7 @@ // // file : test/Min_annulus_d/test_Min_annulus_d_3.cpp // package : $CGAL_Package: Min_annulus_d $ -// chapter : Geometric Optimisation +// chapter : Geometric Optimization // // revision : $Id$ // revision_date : $Date$ diff --git a/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d_d.cpp b/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d_d.cpp index 3d667bead47..4594b2b430e 100644 --- a/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d_d.cpp +++ b/Bounding_volumes/test/Bounding_volumes/test_Min_annulus_d_d.cpp @@ -13,7 +13,7 @@ // // file : test/Min_annulus_d/test_Min_annulus_d_d.cpp // package : $CGAL_Package: Min_annulus_d $ -// chapter : Geometric Optimisation +// chapter : Geometric Optimization // // revision : $Id$ // revision_date : $Date$ diff --git a/Bounding_volumes/test/Bounding_volumes/test_Min_circle.cpp b/Bounding_volumes/test/Bounding_volumes/test_Min_circle.cpp index 01ce8cc429a..5d94946b23e 100644 --- a/Bounding_volumes/test/Bounding_volumes/test_Min_circle.cpp +++ b/Bounding_volumes/test/Bounding_volumes/test_Min_circle.cpp @@ -13,7 +13,7 @@ // // file : test/Min_circle_2/test_Min_circle_2.C // package : $CGAL_Package: Min_circle_2 $ -// chapter : Geometric Optimisation +// chapter : Geometric Optimization // // source : web/Min_circle_2.aw // revision : $Id$ diff --git a/Bounding_volumes/test/Bounding_volumes/test_Min_ellipse_2.cpp b/Bounding_volumes/test/Bounding_volumes/test_Min_ellipse_2.cpp index 535aa4674b1..2410147ccb5 100644 --- a/Bounding_volumes/test/Bounding_volumes/test_Min_ellipse_2.cpp +++ b/Bounding_volumes/test/Bounding_volumes/test_Min_ellipse_2.cpp @@ -13,7 +13,7 @@ // // file : test/Min_ellipse_2/test_Min_ellipse_2.C // package : $CGAL_Package: Min_ellipse_2 $ -// chapter : Geometric Optimisation +// chapter : Geometric Optimization // // source : web/Min_ellipse_2.aw // revision : $Id$ diff --git a/CGAL_Core/include/CGAL/CORE/ExprRep.h b/CGAL_Core/include/CGAL/CORE/ExprRep.h index 0e721dda16a..a325930a2ab 100644 --- a/CGAL_Core/include/CGAL/CORE/ExprRep.h +++ b/CGAL_Core/include/CGAL/CORE/ExprRep.h @@ -595,7 +595,7 @@ public: } void operator delete( void *p, size_t ){ - MemoryPool::global_allocator().free(p); + (MemoryPool::global_allocator().free)(p); } private: @@ -1248,7 +1248,7 @@ void * AddSubRep::operator new( size_t size) template void AddSubRep::operator delete( void *p, size_t ) -{ MemoryPool >::global_allocator().free(p); } +{ (MemoryPool >::global_allocator().free)(p); } /// \typedef AddRep diff --git a/CGAL_Core/include/CGAL/CORE/Impl.h b/CGAL_Core/include/CGAL/CORE/Impl.h index 4ff8b4fa3d4..2e21aab5ac0 100644 --- a/CGAL_Core/include/CGAL/CORE/Impl.h +++ b/CGAL_Core/include/CGAL/CORE/Impl.h @@ -51,14 +51,14 @@ CGAL_INLINE_FUNCTION void *T::operator new( size_t size) \ { return MemoryPool::global_allocator().allocate(size); } \ CGAL_INLINE_FUNCTION void T::operator delete( void *p, size_t ) \ - { MemoryPool::global_allocator().free(p); } + { (MemoryPool::global_allocator().free)(p); } #define CORE_MEMORY_IMPL_TEMPLATE_WITH_ONE_ARG(C) \ template \ CGAL_INLINE_FUNCTION void *C::operator new( size_t size) \ { return MemoryPool >::global_allocator().allocate(size); } \ template \ CGAL_INLINE_FUNCTION void C::operator delete( void *p, size_t ) \ - { MemoryPool >::global_allocator().free(p); } + { (MemoryPool >::global_allocator().free)(p); } #endif // include some common header files diff --git a/CGAL_Core/include/CGAL/CORE/MemoryPool.h b/CGAL_Core/include/CGAL/CORE/MemoryPool.h index 2db3de8736e..1cfa96fa93d 100644 --- a/CGAL_Core/include/CGAL/CORE/MemoryPool.h +++ b/CGAL_Core/include/CGAL/CORE/MemoryPool.h @@ -73,7 +73,7 @@ public: void* allocate(std::size_t size); - void free(void* p); + void free BOOST_PREVENT_MACRO_SUBSTITUTION (void* p); // Access the corresponding static global allocator. static MemoryPool& global_allocator() { @@ -116,7 +116,7 @@ void* MemoryPool< T, nObjects >::allocate(std::size_t) { } template< class T, int nObjects > -void MemoryPool< T, nObjects >::free(void* t) { +void MemoryPool< T, nObjects >::free BOOST_PREVENT_MACRO_SUBSTITUTION (void* t) { CGAL_assertion(t != 0); if (t == 0) return; // for safety if(blocks.empty()){ diff --git a/CGAL_Core/include/CGAL/CORE/RealRep.h b/CGAL_Core/include/CGAL/CORE/RealRep.h index 1c5d0f13a40..f2ec1e90cb3 100644 --- a/CGAL_Core/include/CGAL/CORE/RealRep.h +++ b/CGAL_Core/include/CGAL/CORE/RealRep.h @@ -154,7 +154,7 @@ void * Realbase_for::operator new( size_t size) template void Realbase_for::operator delete( void *p, size_t ) -{ MemoryPool >::global_allocator().free(p); } +{ (MemoryPool >::global_allocator().free)(p); } typedef Realbase_for RealLong; typedef Realbase_for RealDouble; diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/analyze.h b/CGAL_ImageIO/include/CGAL/ImageIO/analyze.h index 98d27a0d994..cbc4eae9109 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/analyze.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/analyze.h @@ -21,7 +21,7 @@ #include -/* read analyse format header +/* read analyze format header return: -1: error diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h b/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h index 9c27b948b3d..b6eb465253f 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/bmptypes.h @@ -108,8 +108,8 @@ typedef std::uint32_t CGAL_UINT32; */ /* - * Bitmapfileheader defines a single bitmap image. Its analogue in the - * Windows SDK is the Bitmapfileheader. Its analogues in the OS/2 Toolkit are + * Bitmapfileheader defines a single bitmap image. Its analog in the + * Windows SDK is the Bitmapfileheader. Its analogs in the OS/2 Toolkit are * the Bitmapfileheader and Bitmapfileheader2 structures. * * A BITMAPHEADER structure is always concatenated to the end of a @@ -128,7 +128,7 @@ typedef struct Bitmapfileheader /* * BITMAPARRAYHEADER is used to establish a linked list of Bitmapfileheader * structures for a bitmap file with multiple images in it. There is no - * equivalent structure in the Windows SDK. Its analogues in the OS/2 toolkit + * equivalent structure in the Windows SDK. Its analogs in the OS/2 toolkit * are the BITMAPARRAYFILEHEADER and BITMAPARRAYFILEHEADER2 structures. * * A Bitmapfileheader structure is always concatenated to the end of a @@ -145,9 +145,9 @@ typedef struct BITMAPARRAYHEADER /* - * BITMAPHEADER defines the properties of a bitmap. Its analogues in the + * BITMAPHEADER defines the properties of a bitmap. Its analogs in the * Windows SDK are the BITMAPCOREINFOHEADER and BITMAPINFOHEADER structures. - * Its analogues in the OS/2 Toolkit are the BITMAPINFOHEADER and + * Its analogs in the OS/2 Toolkit are the BITMAPINFOHEADER and * BITMAPINFOHEADER2 structures. * * A color table is concatenated to this structure. The number of elements in @@ -188,8 +188,8 @@ typedef struct BITMAPHEADER /* - * RGB defines a single color palette entry. Its analogues in the Windows SDK - * are the RGBTRIPLE and RGBQUAD structures. Its analogues in the OS/2 + * RGB defines a single color palette entry. Its analogs in the Windows SDK + * are the RGBTRIPLE and RGBQUAD structures. Its analogs in the OS/2 * Toolkit are the RGB and RGB2 structure. */ typedef struct RGB diff --git a/CGAL_ImageIO/include/CGAL/ImageIO/recline_impl.h b/CGAL_ImageIO/include/CGAL/ImageIO/recline_impl.h index 4b5374898e5..e4b694efa78 100644 --- a/CGAL_ImageIO/include/CGAL/ImageIO/recline_impl.h +++ b/CGAL_ImageIO/include/CGAL/ImageIO/recline_impl.h @@ -283,7 +283,7 @@ RFcoefficientType * InitRecursiveCoefficients( double x, b0 /= x; b1 /= x; - /*--- normalisation ---*/ + /*--- normalization ---*/ switch ( derivative ) { default : CGAL_FALLTHROUGH; diff --git a/CGAL_ipelets/demo/CGAL_ipelets/include/CGAL_ipelets/k_delaunay.h b/CGAL_ipelets/demo/CGAL_ipelets/include/CGAL_ipelets/k_delaunay.h index 7709eb5df26..567ca6c42ad 100644 --- a/CGAL_ipelets/demo/CGAL_ipelets/include/CGAL_ipelets/k_delaunay.h +++ b/CGAL_ipelets/demo/CGAL_ipelets/include/CGAL_ipelets/k_delaunay.h @@ -30,17 +30,17 @@ void k_delaunay(Regular& rt,input_DS& input_wpt,int order){ typedef typename Kernel::Point_2 Point_2; typedef typename Kernel::Weighted_point_2 Weighted_point_2; - std::vector Current_sel;//DS that will contain all possible combinaisons of k points (iterator), where k is the order + std::vector Current_sel;//DS that will contain all possible combinations of k points (iterator), where k is the order typename input_DS::iterator it_wpt = input_wpt.begin(); typename input_DS::iterator stop_combi = input_wpt.end(); for(int i=0;i int main (int argc, char** argv) { - const std::string filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/b9.ply"); + const std::string filename = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/b9.ply"); std::cerr << "Reading input" << std::endl; std::vector pts; diff --git a/Classification/examples/Classification/example_cluster_classification.cpp b/Classification/examples/Classification/example_cluster_classification.cpp index 51c7e642b78..a036f878f0b 100644 --- a/Classification/examples/Classification/example_cluster_classification.cpp +++ b/Classification/examples/Classification/example_cluster_classification.cpp @@ -48,7 +48,7 @@ typedef Classification::Cluster Clu int main (int argc, char** argv) { - std::string filename = CGAL::data_file_path("meshes/b9.ply"); + std::string filename = CGAL::data_file_path("points_3/b9.ply"); std::string filename_config = "data/b9_clusters_config.bin"; if (argc > 1) diff --git a/Classification/examples/Classification/example_feature.cpp b/Classification/examples/Classification/example_feature.cpp index b0cdcd90054..d8bed02141b 100644 --- a/Classification/examples/Classification/example_feature.cpp +++ b/Classification/examples/Classification/example_feature.cpp @@ -66,7 +66,7 @@ public: int main (int argc, char** argv) { - std::string filename (argc > 1 ? argv[1] : CGAL::data_file_path("meshes/b9.ply")); + std::string filename (argc > 1 ? argv[1] : CGAL::data_file_path("points_3/b9.ply")); std::vector pts; std::cerr << "Reading input" << std::endl; diff --git a/Classification/include/CGAL/Classification/Feature/Elevation.h b/Classification/include/CGAL/Classification/Feature/Elevation.h index 175b20b6a44..9ea9f267cc4 100644 --- a/Classification/include/CGAL/Classification/Feature/Elevation.h +++ b/Classification/include/CGAL/Classification/Feature/Elevation.h @@ -130,7 +130,7 @@ public: std::nth_element (z.begin(), z.begin() + (z.size() / 10), z.end()); dtm_x(i,j) = z[z.size() / 10]; } - dem.free(); + (dem.free)(); if (grid.width() * grid.height() > input.size()) values.resize (input.size(), compressed_float(0)); @@ -162,7 +162,7 @@ public: values[*it] = v; } } - dtm_x.free(); + (dtm_x.free)(); } diff --git a/Classification/include/CGAL/Classification/Feature/Height_above.h b/Classification/include/CGAL/Classification/Feature/Height_above.h index b59b108c1ac..3c85d27f91e 100644 --- a/Classification/include/CGAL/Classification/Feature/Height_above.h +++ b/Classification/include/CGAL/Classification/Feature/Height_above.h @@ -100,7 +100,7 @@ public: std::size_t J = grid.y(i); values[i] = float(dtm(I,J) - get (point_map, *(input.begin() + i)).z()); } - dtm.free(); + (dtm.free)(); } } diff --git a/Classification/include/CGAL/Classification/Feature/Height_below.h b/Classification/include/CGAL/Classification/Feature/Height_below.h index 22371934155..f71195dd348 100644 --- a/Classification/include/CGAL/Classification/Feature/Height_below.h +++ b/Classification/include/CGAL/Classification/Feature/Height_below.h @@ -100,7 +100,7 @@ public: std::size_t J = grid.y(i); values[i] = float(get (point_map, *(input.begin() + i)).z() - dtm(I,J)); } - dtm.free(); + (dtm.free)(); } } diff --git a/Classification/include/CGAL/Classification/Feature/Vertical_range.h b/Classification/include/CGAL/Classification/Feature/Vertical_range.h index 45b9c98d3ee..a4df1591c13 100644 --- a/Classification/include/CGAL/Classification/Feature/Vertical_range.h +++ b/Classification/include/CGAL/Classification/Feature/Vertical_range.h @@ -102,7 +102,7 @@ public: std::size_t J = grid.y(i); values[i] = dtm(I,J); } - dtm.free(); + (dtm.free)(); } } diff --git a/Classification/include/CGAL/Classification/Image.h b/Classification/include/CGAL/Classification/Image.h index 084e9572764..3bd915f0b5d 100644 --- a/Classification/include/CGAL/Classification/Image.h +++ b/Classification/include/CGAL/Classification/Image.h @@ -71,7 +71,7 @@ public: { } - void free() + void free BOOST_PREVENT_MACRO_SUBSTITUTION () { m_raw.reset(); m_sparse.reset(); diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map.h b/Combinatorial_map/include/CGAL/Combinatorial_map.h index aaa360677b7..5135f5ec327 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map.h @@ -662,7 +662,7 @@ namespace CGAL { } /** Create a new dart and add it to the map. - * The marks of the darts are initialised with mmask_marks, i.e. the dart + * The marks of the darts are initialized with mmask_marks, i.e. the dart * is unmarked for all the marks. * @return a Dart_descriptor on the new dart. */ @@ -1780,7 +1780,6 @@ namespace CGAL { void basic_link_beta_for_involution(Dart_descriptor adart1, Dart_descriptor adart2, unsigned int i) { - CGAL_assertion( i>=2 && i<=dimension ); CGAL_assertion( i>=2 && i<=dimension ); dart_link_beta(adart1, adart2, i); dart_link_beta(adart2, adart1, i); @@ -3708,6 +3707,9 @@ namespace CGAL { this->automatic_attributes_management = newval; } + void set_automatic_attributes_management_without_correction(bool newval) + { this->automatic_attributes_management = newval; } + /** Create an half-edge. * @return a dart of the new half-edge. */ @@ -4112,7 +4114,7 @@ namespace CGAL { } if (ah != null_descriptor) { - // We initialise the 0-atttrib to ah + // We initialize the 0-atttrib to ah internal::Set_i_attribute_of_dart_functor:: run(*this, d1, ah); } diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h index 5cbf7b7861a..f570d59b187 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map/internal/Combinatorial_map_copy_functors.h @@ -228,7 +228,7 @@ struct Call_functor_if_both_attributes_have_point const Pointconverter&) { return Map2::null_descriptor; } }; -// Specialisation with i==0 and both attributes have points. +// Specialization with i==0 and both attributes have points. template< typename Map1, typename Map2, typename Pointconverter > struct Call_functor_if_both_attributes_have_point @@ -285,7 +285,7 @@ struct Copy_attribute_functor_if_nonvoid cmap2.template set_attribute(dh2, res); } }; -// Specialisation when attr1 is void, and attr2 is non void i==0. Nothing to +// Specialization when attr1 is void, and attr2 is non void i==0. Nothing to // copy, but if 0-attributes has point and i==0, we need to create // vertex attributes. template(dh2, cmap2.template create_attribute<0>()); } }; -// Specialisation when attr1 is void, and attr2 is non void i!=0. +// Specialization when attr1 is void, and attr2 is non void i!=0. // Nothing to do. template @@ -360,7 +360,7 @@ struct Copy_dart_info_functor_if_nonvoid const DartInfoConverter& converter) { converter(map1, map2, dh1, dh2); } }; -// Specialisation when Info1 is void. +// Specialization when Info1 is void. template struct Copy_dart_info_functor_if_nonvoid struct Copy_dart_info_functor_if_nonvoid struct Copy_dart_info_functor_if_nonvoid diff --git a/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h b/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h index 72c89d40142..c1ca6c1987e 100644 --- a/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h +++ b/Combinatorial_map/include/CGAL/Combinatorial_map_operations.h @@ -36,7 +36,7 @@ namespace CGAL { static bool run(const CMap& amap, typename CMap::Dart_const_descriptor adart) { - // TODO? Optimisation for dim-2, and to not test all the darts of the cell? + // TODO? Optimization for dim-2, and to not test all the darts of the cell? bool res = true; for ( CGAL::CMap_dart_const_iterator_of_cell it(amap, adart); res && it.cont(); ++it ) @@ -462,7 +462,7 @@ namespace CGAL { static bool run(const CMap& amap, typename CMap::Dart_const_descriptor adart) { - // TODO ? Optimisation possible to not test all the darts of the cell ? + // TODO ? Optimization possible to not test all the darts of the cell ? bool res = true; for ( CGAL::CMap_dart_const_iterator_of_cell it(amap, adart); res && it.cont(); ++it ) diff --git a/Combinatorial_map/include/CGAL/Dart.h b/Combinatorial_map/include/CGAL/Dart.h index 17ffde4b294..0fb809b6d81 100644 --- a/Combinatorial_map/include/CGAL/Dart.h +++ b/Combinatorial_map/include/CGAL/Dart.h @@ -156,7 +156,7 @@ namespace CGAL { } protected: - /** Default constructor: no real initialisation, + /** Default constructor: no real initialization, * because this is done in the combinatorial map class. */ Dart_without_info() @@ -300,7 +300,7 @@ namespace CGAL { { return Base::operator==(other) && minfo==other.minfo; } protected: - /** Default constructor: no real initialisation, + /** Default constructor: no real initialization, * because this is done in the combinatorial or generalized map class. */ Dart()=default; // default => zero-initializing built-in types diff --git a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt index d0c26ec31c5..8df873f5de3 100644 --- a/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt +++ b/Combinatorial_map/test/Combinatorial_map/CMakeLists.txt @@ -28,13 +28,12 @@ create_single_source_cgal_program(cmap_test_split_attribute.cpp) # Link with OpenMesh if possible find_package(OpenMesh QUIET) -if(TARGET OpenMesh::OpenMesh) +if(OpenMesh_FOUND) message(STATUS "Found OpenMesh") + include(CGAL_OpenMesh_support) - target_link_libraries(Combinatorial_map_copy_test PRIVATE OpenMesh::OpenMesh) - target_compile_definitions(Combinatorial_map_copy_test PRIVATE -DCGAL_USE_OPENMESH) - target_link_libraries(Combinatorial_map_copy_test_index PRIVATE OpenMesh::OpenMesh) - target_compile_definitions(Combinatorial_map_copy_test_index PRIVATE -DCGAL_USE_OPENMESH) + target_link_libraries(Combinatorial_map_copy_test PRIVATE CGAL::OpenMesh_support) + target_link_libraries(Combinatorial_map_copy_test_index PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Tests will not use OpenMesh.") endif() diff --git a/Cone_spanners_2/include/CGAL/Compute_cone_boundaries_2.h b/Cone_spanners_2/include/CGAL/Compute_cone_boundaries_2.h index 4256fd0dc17..a4069a1168a 100644 --- a/Cone_spanners_2/include/CGAL/Compute_cone_boundaries_2.h +++ b/Cone_spanners_2/include/CGAL/Compute_cone_boundaries_2.h @@ -115,7 +115,7 @@ public: #if defined(CGAL_USE_LEDA) || defined(CGAL_USE_CORE) /* - The specialised functor for computing the directions of cone boundaries exactly + The specialized functor for computing the directions of cone boundaries exactly with a given cone number and a given initial direction. */ template <> diff --git a/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h b/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h index d4b47ed33c2..3d1ebc15efb 100644 --- a/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h +++ b/Cone_spanners_2/include/CGAL/Construct_theta_graph_2.h @@ -199,7 +199,7 @@ protected: std::vector S(vit, ve); std::sort(S.begin (), S.end (), orderD1); - // Step 2: Initialise an empty set to store vertices sorted by orderD2 + // Step 2: initialize an empty set to store vertices sorted by orderD2 typedef CGAL::ThetaDetail::Plane_scan_tree S(vit, ve); std::sort(S.begin (), S.end (), orderD1); - // Step 2: Initialise an empty set to store vertices sorted by orderD2 + // Step 2: initialize an empty set to store vertices sorted by orderD2 Point_set pst(orderD2); // Step 3: visit S in orderD1 diff --git a/Cone_spanners_2/include/CGAL/gnuplot_output_2.h b/Cone_spanners_2/include/CGAL/gnuplot_output_2.h index 65324f60134..d2cb402e37a 100644 --- a/Cone_spanners_2/include/CGAL/gnuplot_output_2.h +++ b/Cone_spanners_2/include/CGAL/gnuplot_output_2.h @@ -93,7 +93,7 @@ std::string gnuplot_vertex_list (const Graph& g); /* This struct is defined to use partial specialization to generate arrow styles differently for * directed and undirected graphs. - * Note: Need to use structs because C++ before 11 doesn't allow partial specialisation + * Note: Need to use structs because C++ before 11 doesn't allow partial specialization * for functions */ template diff --git a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/External_structure_builder.h b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/External_structure_builder.h index 8c4c546590d..c6ecee86c0b 100644 --- a/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/External_structure_builder.h +++ b/Convex_decomposition_3/include/CGAL/Convex_decomposition_3/External_structure_builder.h @@ -76,62 +76,13 @@ class External_structure_builder : public Modifier_base sedge2sface; - /* - SFace_iterator sfi; - CGAL_forall_sfaces(sfi, *sncp) { - SFace_cycle_iterator sfc; - for(sfc = sfi->sface_cycles_begin(); sfc != sfi->sface_cycles_end(); ++sfc) { - if(sfc.is_shalfedge()){ - SHalfedge_around_sface_circulator eaf(sfc), end(eaf); - CGAL_For_all(eaf,end) { - SHalfedge_handle se(eaf); - sedge2sface[eaf] = sfi; - } - } - } - } - - // CGAL::SNC_io_parser O0(std::cerr, *sncp, false); - // O0.print(); - - SHalfedge_iterator sei; - CGAL_forall_shalfedges(sei, *sncp) { - SHalfedge_handle se(sei); - if(sedge2sface[se] == SFace_handle()) { - SM_decorator SD(&*sei->source()->source()); - SFace_handle sf_new = SD.new_sface(); - sf_new->mark() = sei->incident_sface()->mark(); - - CGAL_NEF_TRACEN("new entry sedge " << sei->source()->point() - << "->" << sei->twin()->source()->point() - << " at " << sei->source()->source()->point()); - - SD.link_as_face_cycle(sei, sf_new); - - SHalfedge_around_sface_circulator eaf(se), end(eaf); - CGAL_For_all(eaf,end) { - SHalfedge_handle se(eaf); - sedge2sface[eaf] = sf_new; - } - - // TODO: relink inner sface cycles - } - } - */ SNC_point_locator* old_pl = pl; pl = pl->clone(); sncpl.pl = pl; - delete old_pl; SNC_external_structure C(*sncp,pl); C.clear_external_structure(); C.build_external_structure(); - - // CGAL::SNC_io_parser Ox(std::cerr, *sncp, false); - // Ox.print(); + delete old_pl; } }; diff --git a/Convex_decomposition_3/test/Convex_decomposition_3/cd_nested_holes_test.cpp b/Convex_decomposition_3/test/Convex_decomposition_3/cd_nested_holes_test.cpp new file mode 100644 index 00000000000..37a3c68264f --- /dev/null +++ b/Convex_decomposition_3/test/Convex_decomposition_3/cd_nested_holes_test.cpp @@ -0,0 +1,53 @@ +#include +#include +#include +#include +#include +#include +#include + +typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; +typedef CGAL::Polyhedron_3 Polyhedron_3; +typedef CGAL::Nef_polyhedron_3 Nef_polyhedron_3; +typedef Nef_polyhedron_3::Volume_const_iterator Volume_const_iterator; + +std::size_t run(std::string path) +{ + Polyhedron_3 input; + std::ifstream(path) >> input; + + Nef_polyhedron_3 N(input); + + CGAL::convex_decomposition_3(N); + std::list convex_parts; + + Volume_const_iterator ci = ++N.volumes_begin(); + for( ; ci != N.volumes_end(); ++ci) { + if(ci->mark()) { + Polyhedron_3 P; + N.convert_inner_shell_to_polyhedron(ci->shells_begin(), P); + convex_parts.push_back(P); + } + } + +// int i=0; + for (const Polyhedron_3& P : convex_parts) + { +// std::ofstream("out_"+std::to_string(i++)+".off") << std::setprecision(17) << P; + assert(P.size_of_vertices()!=0); + } + + return convex_parts.size(); +} + +int main() +{ + std::size_t val = run("data/in1.off"); + assert(val==9); + val = run("data/in2.off"); + assert(val==10); + val = run("data/in3.off"); + assert(val==13); + val = run("data/in4.off"); + assert(val==17); +} diff --git a/Convex_decomposition_3/test/Convex_decomposition_3/data/in1.off b/Convex_decomposition_3/test/Convex_decomposition_3/data/in1.off new file mode 100644 index 00000000000..dabda4d9d3e --- /dev/null +++ b/Convex_decomposition_3/test/Convex_decomposition_3/data/in1.off @@ -0,0 +1,117 @@ +OFF 40 76 0 +5 -5 4 +5 -5 2 +5 5 2 +5 5 4 +5 -5 -2 +5 -5 -4 +5 5 -4 +5 5 -2 +-5 5 4 +-5 -5 4 +-4 -4 4 +-4 4 4 +4 4 4 +4 -4 4 +-5 -5 -4 +-5 5 -4 +-4 4 -4 +-4 -4 -4 +4 -4 -4 +4 4 -4 +-5 5 2 +-5 -5 2 +-5 -5 -2 +-5 5 -2 +4 4 2 +4 -4 2 +4 -4 -2 +4 4 -2 +-4 4 2 +-4 -4 2 +-4 4 -2 +-4 -4 -2 +6 -6 2 +6 -6 -2 +6 6 -2 +6 6 2 +-6 6 2 +-6 -6 2 +-6 -6 -2 +-6 6 -2 +3 0 2 3 +3 2 0 1 +3 4 6 7 +3 6 4 5 +3 3 12 0 +3 3 11 12 +3 11 8 10 +3 8 11 3 +3 13 0 12 +3 10 0 13 +3 10 9 0 +3 9 10 8 +3 5 18 6 +3 5 17 18 +3 17 14 16 +3 14 17 5 +3 19 6 18 +3 16 6 19 +3 16 15 6 +3 15 16 14 +3 21 8 20 +3 8 21 9 +3 14 23 15 +3 23 14 22 +3 2 8 3 +3 8 2 20 +3 6 23 7 +3 23 6 15 +3 21 0 9 +3 0 21 1 +3 14 4 22 +3 4 14 5 +3 25 12 24 +3 12 25 13 +3 18 27 19 +3 27 18 26 +3 10 28 11 +3 28 10 29 +3 31 16 30 +3 16 31 17 +3 28 12 11 +3 12 28 24 +3 16 27 30 +3 27 16 19 +3 25 10 13 +3 10 25 29 +3 18 31 26 +3 31 18 17 +3 32 34 35 +3 34 32 33 +3 35 2 32 +3 35 20 2 +3 20 36 21 +3 36 20 35 +3 1 32 2 +3 21 32 1 +3 21 37 32 +3 37 21 36 +3 28 25 24 +3 25 28 29 +3 33 4 34 +3 33 22 4 +3 22 38 23 +3 38 22 33 +3 7 34 4 +3 23 34 7 +3 23 39 34 +3 39 23 38 +3 31 27 26 +3 27 31 30 +3 38 36 39 +3 36 38 37 +3 34 36 35 +3 36 34 39 +3 38 32 37 +3 32 38 33 diff --git a/Convex_decomposition_3/test/Convex_decomposition_3/data/in2.off b/Convex_decomposition_3/test/Convex_decomposition_3/data/in2.off new file mode 100644 index 00000000000..d09ff781d58 --- /dev/null +++ b/Convex_decomposition_3/test/Convex_decomposition_3/data/in2.off @@ -0,0 +1,144 @@ +OFF +48 92 0 + +2 2 2 +2 -2 2 +-2 2 2 +-2 -2 2 +-2 2 4 +2 2 4 +-2 -2 4 +2 -2 4 +5 -5 4 +-4 4 4 +5 5 4 +4 -4 4 +-5 -5 4 +-4 -4 -4 +5 -5 -4 +4 4 -4 +-5 5 -4 +-5 5 4 +5 5 -4 +-5 -5 -4 +4 4 4 +4 -4 -2 +-4 -4 4 +-4 4 -2 +-4 4 -4 +4 4 -2 +4 -4 -4 +6 -6 2 +5 5 2 +-5 5 2 +6 6 2 +5 -5 2 +-5 -5 2 +-6 -6 2 +5 -5 -2 +-5 -5 -2 +6 -6 -2 +5 5 -2 +-5 5 -2 +-6 6 -2 +-4 -4 -2 +-6 6 2 +6 6 -2 +-6 -6 -2 +-4 -4 2 +-4 4 2 +4 4 2 +4 -4 2 +3 2 4 5 +3 7 6 3 +3 5 7 1 +3 6 7 5 +3 3 6 4 +3 5 0 2 +3 3 1 7 +3 1 0 5 +3 5 4 6 +3 4 2 3 +3 8 28 10 +3 28 8 31 +3 34 18 37 +3 18 34 14 +3 10 20 8 +3 10 9 20 +3 9 17 22 +3 17 9 10 +3 11 8 20 +3 22 8 11 +3 22 12 8 +3 12 22 17 +3 14 26 18 +3 14 13 26 +3 13 19 24 +3 19 13 14 +3 15 18 26 +3 24 18 15 +3 24 16 18 +3 16 24 19 +3 32 17 29 +3 17 32 12 +3 19 38 16 +3 38 19 35 +3 28 17 10 +3 17 28 29 +3 18 38 37 +3 38 18 16 +3 32 8 12 +3 8 32 31 +3 19 34 35 +3 34 19 14 +3 47 20 46 +3 20 47 11 +3 26 25 15 +3 25 26 21 +3 22 45 9 +3 45 22 44 +3 40 24 23 +3 24 40 13 +3 45 20 9 +3 20 45 46 +3 24 25 23 +3 25 24 15 +3 47 22 11 +3 22 47 44 +3 26 40 21 +3 40 26 13 +3 27 42 30 +3 42 27 36 +3 30 28 27 +3 30 29 28 +3 29 41 32 +3 41 29 30 +3 31 27 28 +3 32 27 31 +3 32 33 27 +3 33 32 41 +3 2 0 45 +3 1 44 47 +3 36 34 42 +3 36 35 34 +3 35 43 38 +3 43 35 36 +3 37 42 34 +3 38 42 37 +3 38 39 42 +3 39 38 43 +3 40 25 21 +3 25 40 23 +3 43 41 39 +3 41 43 33 +3 42 41 30 +3 41 42 39 +3 43 27 33 +3 27 43 36 +3 44 1 3 +3 44 3 45 +3 45 3 2 +3 46 45 0 +3 46 0 47 +3 47 0 1 + diff --git a/Convex_decomposition_3/test/Convex_decomposition_3/data/in3.off b/Convex_decomposition_3/test/Convex_decomposition_3/data/in3.off new file mode 100644 index 00000000000..7685150981d --- /dev/null +++ b/Convex_decomposition_3/test/Convex_decomposition_3/data/in3.off @@ -0,0 +1,180 @@ +OFF +60 116 0 + +1 1 4 +1 0.33333333333333337 4 +1 -1 4 +0.33333333333333337 -1 4 +-1 -1 4 +-1 0.33333333333333337 4 +-1 1 4 +0.33333333333333337 1 4 +-2 2 2 +5 -5 4 +-4 4 4 +5 5 4 +4 -4 4 +-5 -5 4 +-4 -4 -4 +5 -5 -4 +4 4 -4 +-5 5 -4 +-5 5 4 +5 5 -4 +-5 -5 -4 +4 4 4 +4 -4 -2 +-4 -4 4 +-4 4 -2 +-4 4 -4 +4 4 -2 +4 -4 -4 +6 -6 2 +5 5 2 +-5 5 2 +6 6 2 +5 -5 2 +-5 -5 2 +-6 -6 2 +5 -5 -2 +-5 -5 -2 +6 -6 -2 +5 5 -2 +-5 5 -2 +-6 6 -2 +-4 -4 -2 +-6 6 2 +6 6 -2 +-6 -6 -2 +-2 -2 2 +-4 -4 2 +-4 4 2 +4 4 2 +4 -4 2 +2 -2 2 +2 2 2 +-2 2 4 +2 2 4 +2 -2 4 +-2 -2 4 +1 1 2 +1 -1 2 +-1 -1 2 +-1 1 2 +3 8 52 53 +3 54 55 45 +3 53 54 50 +3 0 1 53 +3 45 55 52 +3 53 51 8 +3 45 50 54 +3 50 51 53 +3 4 5 55 +3 52 8 45 +3 9 29 11 +3 29 9 32 +3 35 19 38 +3 19 35 15 +3 11 21 9 +3 11 10 21 +3 10 18 23 +3 18 10 11 +3 12 9 21 +3 23 9 12 +3 23 13 9 +3 13 23 18 +3 15 27 19 +3 15 14 27 +3 14 20 25 +3 20 14 15 +3 16 19 27 +3 25 19 16 +3 25 17 19 +3 17 25 20 +3 33 18 30 +3 18 33 13 +3 20 39 17 +3 39 20 36 +3 29 18 11 +3 18 29 30 +3 19 39 38 +3 39 19 17 +3 33 9 13 +3 9 33 32 +3 20 35 36 +3 35 20 15 +3 49 21 48 +3 21 49 12 +3 27 26 16 +3 26 27 22 +3 23 47 10 +3 47 23 46 +3 41 25 24 +3 25 41 14 +3 47 21 10 +3 21 47 48 +3 25 26 24 +3 26 25 16 +3 49 23 12 +3 23 49 46 +3 27 41 22 +3 41 27 14 +3 28 43 31 +3 43 28 37 +3 31 29 28 +3 31 30 29 +3 30 42 33 +3 42 30 31 +3 32 28 29 +3 33 28 32 +3 33 34 28 +3 34 33 42 +3 8 51 47 +3 50 46 49 +3 37 35 43 +3 37 36 35 +3 36 44 39 +3 44 36 37 +3 38 43 35 +3 39 43 38 +3 39 40 43 +3 40 39 44 +3 41 26 22 +3 26 41 24 +3 44 42 40 +3 42 44 34 +3 43 42 31 +3 42 43 40 +3 44 28 34 +3 28 44 37 +3 46 50 45 +3 46 45 47 +3 47 45 8 +3 48 47 51 +3 48 51 49 +3 49 51 50 +3 52 55 5 +3 52 7 53 +3 52 5 6 +3 53 7 0 +3 52 6 7 +3 54 53 1 +3 54 2 3 +3 54 1 2 +3 55 54 3 +3 55 3 4 +3 58 57 56 +3 59 56 7 +3 2 57 3 +3 0 56 1 +3 5 59 6 +3 56 59 58 +3 57 1 56 +3 57 2 1 +3 58 5 4 +3 7 56 0 +3 58 3 57 +3 4 3 58 +3 59 5 58 +3 7 6 59 + diff --git a/Convex_decomposition_3/test/Convex_decomposition_3/data/in4.off b/Convex_decomposition_3/test/Convex_decomposition_3/data/in4.off new file mode 100644 index 00000000000..1a7bbd1ba82 --- /dev/null +++ b/Convex_decomposition_3/test/Convex_decomposition_3/data/in4.off @@ -0,0 +1,180 @@ +OFF +60 116 0 + +1 1 4 +1 0.5 4 +1 -1 4 +0.5 -1 4 +-1 -1 4 +-1 0.5 4 +-1 1 4 +0.5 1 4 +-2 2 2 +5 -5 4 +-4 4 4 +5 5 4 +4 -4 4 +-5 -5 4 +-4 -4 -4 +5 -5 -4 +4 4 -4 +-5 5 -4 +-5 5 4 +5 5 -4 +-5 -5 -4 +4 4 4 +4 -4 -2 +-4 -4 4 +-4 4 -2 +-4 4 -4 +4 4 -2 +4 -4 -4 +6 -6 2 +5 5 2 +-5 5 2 +6 6 2 +5 -5 2 +-5 -5 2 +-6 -6 2 +5 -5 -2 +-5 -5 -2 +6 -6 -2 +5 5 -2 +-5 5 -2 +-6 6 -2 +-4 -4 -2 +-6 6 2 +6 6 -2 +-6 -6 -2 +-2 -2 2 +-4 -4 2 +-4 4 2 +4 4 2 +4 -4 2 +2 -2 2 +2 2 2 +-2 2 4 +2 2 4 +2 -2 4 +-2 -2 4 +1 1 1 +1 -1 1 +-1 -1 1 +-1 1 1 +3 8 52 53 +3 54 55 45 +3 53 54 50 +3 0 1 53 +3 45 55 52 +3 53 51 8 +3 45 50 54 +3 50 51 53 +3 4 5 55 +3 52 8 45 +3 9 29 11 +3 29 9 32 +3 35 19 38 +3 19 35 15 +3 11 21 9 +3 11 10 21 +3 10 18 23 +3 18 10 11 +3 12 9 21 +3 23 9 12 +3 23 13 9 +3 13 23 18 +3 15 27 19 +3 15 14 27 +3 14 20 25 +3 20 14 15 +3 16 19 27 +3 25 19 16 +3 25 17 19 +3 17 25 20 +3 33 18 30 +3 18 33 13 +3 20 39 17 +3 39 20 36 +3 29 18 11 +3 18 29 30 +3 19 39 38 +3 39 19 17 +3 33 9 13 +3 9 33 32 +3 20 35 36 +3 35 20 15 +3 49 21 48 +3 21 49 12 +3 27 26 16 +3 26 27 22 +3 23 47 10 +3 47 23 46 +3 41 25 24 +3 25 41 14 +3 47 21 10 +3 21 47 48 +3 25 26 24 +3 26 25 16 +3 49 23 12 +3 23 49 46 +3 27 41 22 +3 41 27 14 +3 28 43 31 +3 43 28 37 +3 31 29 28 +3 31 30 29 +3 30 42 33 +3 42 30 31 +3 32 28 29 +3 33 28 32 +3 33 34 28 +3 34 33 42 +3 8 51 47 +3 50 46 49 +3 37 35 43 +3 37 36 35 +3 36 44 39 +3 44 36 37 +3 38 43 35 +3 39 43 38 +3 39 40 43 +3 40 39 44 +3 41 26 22 +3 26 41 24 +3 44 42 40 +3 42 44 34 +3 43 42 31 +3 42 43 40 +3 44 28 34 +3 28 44 37 +3 46 50 45 +3 46 45 47 +3 47 45 8 +3 48 47 51 +3 48 51 49 +3 49 51 50 +3 52 55 5 +3 52 7 53 +3 52 5 6 +3 53 7 0 +3 52 6 7 +3 54 53 1 +3 54 2 3 +3 54 1 2 +3 55 54 3 +3 55 3 4 +3 58 57 56 +3 59 56 7 +3 2 57 3 +3 0 56 1 +3 5 59 6 +3 56 59 58 +3 57 1 56 +3 57 2 1 +3 58 5 4 +3 7 56 0 +3 58 3 57 +3 4 3 58 +3 59 5 58 +3 7 6 59 + diff --git a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt index 4b6f08ba252..add02f31d30 100644 --- a/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt +++ b/Convex_hull_3/examples/Convex_hull_3/CMakeLists.txt @@ -21,13 +21,13 @@ create_single_source_cgal_program("extreme_indices_3.cpp") find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") create_single_source_cgal_program("quickhull_OM_3.cpp") - target_link_libraries(quickhull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(quickhull_OM_3 PRIVATE CGAL::OpenMesh_support) create_single_source_cgal_program("dynamic_hull_OM_3.cpp") - target_link_libraries(dynamic_hull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(dynamic_hull_OM_3 PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() diff --git a/Data/data/meshes/b9.ply b/Data/data/points_3/b9.ply similarity index 100% rename from Data/data/meshes/b9.ply rename to Data/data/points_3/b9.ply diff --git a/Distance_3/test/Distance_3/test_distance_3.cpp b/Distance_3/test/Distance_3/test_distance_3.cpp index ab67ad18d79..f297e93016b 100644 --- a/Distance_3/test/Distance_3/test_distance_3.cpp +++ b/Distance_3/test/Distance_3/test_distance_3.cpp @@ -160,7 +160,6 @@ private: assert(are_equal(res_o2o1, expected_result)); do_intersect_check(o1, o2); - do_intersect_check(o1, o2); } template @@ -169,7 +168,6 @@ private: const FT res_o1o2 = CGAL::squared_distance(o1, o2); const FT res_o2o1 = CGAL::squared_distance(o2, o1); - do_intersect_check(o1, o2); do_intersect_check(o1, o2); assert(res_o1o2 <= ubound); @@ -324,7 +322,7 @@ private: check_squared_distance(S{p2, p3}, S{p4, p5}, 0); check_squared_distance(S{p2, p3}, S{p5, p4}, 0); check_squared_distance(S{p3, p2}, S{p4, p5}, 0); - check_squared_distance(S{p3, p2}, S{p4, p5}, 0); + check_squared_distance(S{p3, p2}, S{p5, p4}, 0); const double lambda_6 = r.get_double(0, 1); const P p6 = p3 + FT(lambda_6) * V{p3 - p2}; @@ -332,7 +330,7 @@ private: check_squared_distance(S{p2, p3}, S{p6, p5}, 0); check_squared_distance(S{p2, p3}, S{p5, p6}, 0); check_squared_distance(S{p3, p2}, S{p6, p5}, 0); - check_squared_distance(S{p3, p2}, S{p6, p5}, 0); + check_squared_distance(S{p3, p2}, S{p5, p6}, 0); const double lambda_7 = r.get_double(1, 2); const P p7 = p3 + FT(lambda_7) * V{p3 - p2}; diff --git a/Documentation/doc/Documentation/Developer_manual/cmakelist_script.txt b/Documentation/doc/Documentation/Developer_manual/cmakelist_script.txt index 26c1f7c0ef4..eeae486b236 100644 --- a/Documentation/doc/Documentation/Developer_manual/cmakelist_script.txt +++ b/Documentation/doc/Documentation/Developer_manual/cmakelist_script.txt @@ -17,7 +17,7 @@ configuration. create a single executable for 'source' linked with compilations of all other source files (`*.cc`, `*.cp`, `*.cxx`, `*.cpp`, `*.CPP`, `*.c++`, or `*.C`). -This behaviour is usually needed for (graphical) demos. +This behavior is usually needed for (graphical) demos. If the parameter is not given, the script creates one executable for each given source file. diff --git a/Documentation/doc/Documentation/Preliminaries.txt b/Documentation/doc/Documentation/Preliminaries.txt index 2e2ae95e661..f2006d05154 100644 --- a/Documentation/doc/Documentation/Preliminaries.txt +++ b/Documentation/doc/Documentation/Preliminaries.txt @@ -47,7 +47,7 @@ also avoid CMake to link with the native threads support library on your system. Much of the \cgal code contains assert statements for preconditions, and postconditions of functions as well as in the code. These assertions can be switched on and off per package -and the user can change the error behaviour. For details see Section \ref secchecks +and the user can change the error behavior. For details see Section \ref secchecks of Chapter \ref Chapter_STL_Extensions_for_CGAL. \section Preliminaries_flags Compile-time Flags to Control Inlining diff --git a/Documentation/doc/Documentation/Third_party.txt b/Documentation/doc/Documentation/Third_party.txt index d56b8484a15..c62e06bf505 100644 --- a/Documentation/doc/Documentation/Third_party.txt +++ b/Documentation/doc/Documentation/Third_party.txt @@ -15,7 +15,7 @@ supporting C++17 or later. | | `Clang` \cgalFootnote{\cgalFootnoteCode{https://clang.llvm.org/}} compiler version 15.0.7 | | \ms Windows | \gnu `g++` 11.4.0 or later\cgalFootnote{\cgalFootnoteCode{https://gcc.gnu.org/}} | | | \ms Visual `C++` 15.9, 16.10, 17.0 (\visualstudio 2017, 2019, and 2022)\cgalFootnote{\cgalFootnoteCode{https://visualstudio.microsoft.com/}} | -| MacOS X | \gnu `g++` 11.4.0 or later\cgalFootnote{\cgalFootnoteCode{https://gcc.gnu.org/}} | +| macOS | \gnu `g++` 11.4.0 or later\cgalFootnote{\cgalFootnoteCode{https://gcc.gnu.org/}} | | | Apple `Clang` compiler versions 10.0.1, 12.0.5, and 15.0.0 | @@ -72,23 +72,32 @@ As there is no canonical directory for where to find \boost on Windows, we recommend that you define the environment variable `BOOST_ROOT` and set it to where you have installed \boost, e.g., `C:\boost\boost_1_70_0`. -\subsection thirdpartyMPFR GNU Multiple Precision Arithmetic (GMP) and GNU Multiple Precision Floating-Point Reliably (MPFR) Libraries -GMP Version 5.0.1 or later, MPFR Version 3.0.0 or later +\subsection thirdpartyMP Multi Precision Number Type Library -The components \cgal, `CGAL_Core`, and `CGAL_Qt6` require -\gmp and \mpfr which are libraries for multi precision integers and rational numbers, -and for multi precision floating point numbers. - -\cgal combines floating point arithmetic with exact arithmetic -in order to be efficient and reliable. \cgal has a built-in -number type for that, but \gmp and \mpfr provide a faster -solution, and we recommend using them. +GNU Multiple Precision Arithmetic (GMP) and GNU Multiple Precision Floating-Point Reliably (MPFR) Libraries +are libraries for multi precision integers and rational numbers, and for multi precision floating point numbers. These libraries can be obtained from `https://gmplib.org/` and `https://www.mpfr.org/`. Since Visual \cpp is not properly supported by the \gmp and \mpfr projects, we provide precompiled versions of \gmp and \mpfr, which can be downloaded from the assets of a release. +Version supported are GMP Version 5.0.1 or later, MPFR Version 3.0.0 or later. + +The \boost library also provides a module for multi precision integers and rational numbers: +\boost multiprecision. +Versions supported are \boost Version 1.72 or later. + +The components \cgal, and `CGAL_Qt6` require either \gmp and \mpfr, or \boost multiprecision +for multi precision numbers. `CGAL_Core` requires \boost multiprecision. + +\cgal combines floating point arithmetic with exact arithmetic +in order to be efficient and reliable. \cgal has a built-in +number type for that, but previous alternatives are faster +solutions, and we recommend using one of them. + +The CMake variable `CGAL_CMAKE_EXACT_NT_BACKEND` can be used to select +the library that will be used internally for multi precision number types. \section secoptional3rdpartysoftware Optional Third Party Libraries @@ -226,9 +235,8 @@ imported target `CGAL::LASLIB_support` provided in \laslib information can be obtained from https://lastools.github.io/ and https://rapidlasso.de/product-overview/. -\laslib is usually distributed along with LAStools: for simplicity, \cgal -provides a fork with a -CMake based install procedure. +\laslib is usually distributed along with LAStools. Current versions of \laslib provide CMake support. +BUILD_SHARED_LIBS needs to be set to true on windows to create a dynamic linked library. \subsection thirdpartyOpenCV OpenCV diff --git a/Documentation/doc/Documentation/Tutorials/Tutorial_GIS.txt b/Documentation/doc/Documentation/Tutorials/Tutorial_GIS.txt index 9ac43d3eb53..546e53c7cd8 100644 --- a/Documentation/doc/Documentation/Tutorials/Tutorial_GIS.txt +++ b/Documentation/doc/Documentation/Tutorials/Tutorial_GIS.txt @@ -193,7 +193,7 @@ An example of a raster image with a rainbow ramp representing height is given in \cgalFigureRef{TutorialGISFigRastering}. \cgalFigureBegin{TutorialGISFigRastering, raster.jpg} -Raster visualisation of height using a rainbow ramp, ranging from +Raster visualization of height using a rainbow ramp, ranging from light blue for low values to dark red for high values. \cgalFigureEnd diff --git a/Documentation/doc/Documentation/Usage.txt b/Documentation/doc/Documentation/Usage.txt index 68a3ae85001..8547affb691 100644 --- a/Documentation/doc/Documentation/Usage.txt +++ b/Documentation/doc/Documentation/Usage.txt @@ -36,7 +36,7 @@ Using \cgal requires a few core components to be previously installed:
  • a supported compiler (see Section \ref seccompilers),
  • \ref seccmake,
  • \ref thirdpartyBoost,
  • -
  • \ref thirdpartyMPFR.
  • +
  • a \ref thirdpartyMP.
  • Optional third-party software might be required to build examples and demos shipped with \cgal, diff --git a/Documentation/doc/Documentation/main.txt b/Documentation/doc/Documentation/main.txt index 2026356b76c..acb38973dad 100644 --- a/Documentation/doc/Documentation/main.txt +++ b/Documentation/doc/Documentation/main.txt @@ -38,7 +38,7 @@ other contexts can be done by obtaining a commercial license from [GeometryFactory](https://www.geometryfactory.com). For more details see the \ref license "License" page. -

    Acknowledgement

    +

    Acknowledgment

    We provide bibtex entries for each package so that you can cite \cgal correctly in your publications, see the page \ref how_to_cite_cgal. diff --git a/Documentation/doc/Documentation/windows.txt b/Documentation/doc/Documentation/windows.txt index c7d613e5c3a..b0b8875c2ee 100644 --- a/Documentation/doc/Documentation/windows.txt +++ b/Documentation/doc/Documentation/windows.txt @@ -6,7 +6,7 @@ 15.9, 16.0, 17.0 (\visualstudio 2017, 2019, and 2022). \cgal is a library that has mandatory dependencies that must be first installed: -\ref thirdpartyBoost and \ref thirdpartyMPFR. +\ref thirdpartyBoost and a \ref thirdpartyMP. You have two options to install \cgal and its dependencies: you can either use the *Vcpkg library manager*, which will automatically install an appropriate version of diff --git a/Documentation/doc/biblio/cgal_manual.bib b/Documentation/doc/biblio/cgal_manual.bib index 7378480ed0e..3f0f258a870 100644 --- a/Documentation/doc/biblio/cgal_manual.bib +++ b/Documentation/doc/biblio/cgal_manual.bib @@ -1545,17 +1545,6 @@ Voronoi diagram" ,update = "97.04 kettner" } -@article{cgal:l-lsqp-82, - title={Least squares quantization in PCM}, - author={Lloyd, Stuart}, - journal={IEEE transactions on information theory}, - volume={28}, - number={2}, - pages={129--137}, - year={1982}, - publisher={IEEE} -} - @InProceedings{ cgal:lprm-lscm-02, author = {Bruno L{\'e}vy and Sylvain Petitjean and Nicolas Ray and J{\'e}rome Maillot}, @@ -2794,7 +2783,7 @@ author = "Pedro M.M. de Castro and Frederic Cazals and Sebastien Loriot and Moni editor = "Jacob E. Goodman, J\'anos Pach and Emo Welzl", year = {2005}, pages = {439-458}, - URL = {http://library.slmath.org/books/Book52/files/23liu.pdf}, + URL = {https://library.slmath.org/books/Book52/files/23liu.pdf}, publisher = {MSRI Publications} } diff --git a/Documentation/doc/biblio/geom.bib b/Documentation/doc/biblio/geom.bib index d6b9488ec1f..30ee53b25c4 100644 --- a/Documentation/doc/biblio/geom.bib +++ b/Documentation/doc/biblio/geom.bib @@ -9513,7 +9513,7 @@ sites with respect to the geodesic metric within a simple $n$-sided polygon." , number = 1 , year = 1993 , pages = "27--35" -, keywords = "polygon, triagulation" +, keywords = "polygon, triangulation" , update = "95.05 korneenko" } @@ -92400,7 +92400,7 @@ some 2 curves cross exponentially many times." @inproceedings{kn-afrmt-97 , author = "Yoshiyuki Kusakari and Takao Nishizeki" -, title = "An Algorithm for Finding a Region with the Minimum Total {$L_1$}-Distance from Prescibed Terminals" +, title = "An Algorithm for Finding a Region with the Minimum Total {$L_1$}-Distance from Prescribed Terminals" , booktitle = "Proc. 8th Annu. Internat. Sympos. Algorithms Comput." , nickname = "ISAAC '97" , site = "Singapore" @@ -101937,7 +101937,7 @@ used in many computational geometry algorithms. Contains C++ code." @inproceedings{mp-drlvd-84 , author = "T. Matsuyama and T. Phillips" -, title = "Digital Realization of the Labelled {Voronoi} Diagram and its Application to Closed Boundary Detection" +, title = "Digital Realization of the Labeled {Voronoi} Diagram and its Application to Closed Boundary Detection" , booktitle = "Proc. IEEE Internat. Conf. Pattern Recogn." , year = 1984 , pages = "478--480" @@ -116182,7 +116182,7 @@ dither and stipple patterns." @techreport{plvt-edecl-96 , author = "P. Parodi and R. Lancewicki and A. Vijh and J. K. Tsotsos" -, title = "Empirically-derived Estimates of the Complexity of Labelling Line Drawings of Polyhedral Scenes" +, title = "Empirically-derived Estimates of the Complexity of Labeling Line Drawings of Polyhedral Scenes" , number = "RBCV-TR-96-52" , institution = "Dept. Comput. Sci., Univ. Toronto" , address = "Toronto, ON" @@ -116759,7 +116759,7 @@ dither and stipple patterns." @article{p-rflg-72 , author = "T. Pavlidis" -, title = "Representation of figures by labelled graphs" +, title = "Representation of figures by labeled graphs" , journal = "Pattern Recogn." , volume = 4 , year = 1972 @@ -133630,7 +133630,7 @@ Contains C code." @inproceedings{sc-aipta-86 , author = "J. K. Sircar and J. A. Cerbrian" -, title = "Application of image processing techniques to the automated labelling of raster digitized contours" +, title = "Application of image processing techniques to the automated labeling of raster digitized contours" , booktitle = "Proc. 2nd Internat. Sympos. Spatial Data Handling" , year = 1986 , pages = "171--184" @@ -151991,7 +151991,7 @@ month = {jun}, articleno = {156}, numpages = {14}, keywords = {polygonal surface mesh, Surface reconstruction, kinetic framework, surface approximation} -} +} @article{levismooth, title={Smooth Rotation Enhanced As-Rigid-As-Possible Mesh Animation}, diff --git a/Documentation/doc/resources/1.10.0/menu_version.js b/Documentation/doc/resources/1.10.0/menu_version.js index 5b8d97efba0..74c82c3d818 100644 --- a/Documentation/doc/resources/1.10.0/menu_version.js +++ b/Documentation/doc/resources/1.10.0/menu_version.js @@ -5,29 +5,29 @@ var url_local = /.*\/doc_output\//; var current_version_local = 'master' var all_versions = [ - 'master', - '6.0-beta1', - '5.6.1', - 'latest', - '5.5.4', - '5.4.4', - '5.3.2', - '5.2.4', - '5.1.5', - '5.0.4', - '4.14.3', - '4.13.2', - '4.12.2', - '4.11.3', - '4.10.2', - '4.9.1', - '4.8.2', - '4.7', - '4.6.3', - '4.5.2', - '4.4', - '4.3' - ]; + 'master', + '6.0', + 'latest', + '5.6.1', + '5.5.4', + '5.4.5', + '5.3.2', + '5.2.4', + '5.1.5', + '5.0.4', + '4.14.3', + '4.13.2', + '4.12.2', + '4.11.3', + '4.10.2', + '4.9.1', + '4.8.2', + '4.7', + '4.6.3', + '4.5.2', + '4.4', + '4.3' +]; function build_select(current_version) { if( current_version == 'master') { diff --git a/Documentation/doc/resources/1.8.13/menu_version.js b/Documentation/doc/resources/1.8.13/menu_version.js index 5b8d97efba0..74c82c3d818 100644 --- a/Documentation/doc/resources/1.8.13/menu_version.js +++ b/Documentation/doc/resources/1.8.13/menu_version.js @@ -5,29 +5,29 @@ var url_local = /.*\/doc_output\//; var current_version_local = 'master' var all_versions = [ - 'master', - '6.0-beta1', - '5.6.1', - 'latest', - '5.5.4', - '5.4.4', - '5.3.2', - '5.2.4', - '5.1.5', - '5.0.4', - '4.14.3', - '4.13.2', - '4.12.2', - '4.11.3', - '4.10.2', - '4.9.1', - '4.8.2', - '4.7', - '4.6.3', - '4.5.2', - '4.4', - '4.3' - ]; + 'master', + '6.0', + 'latest', + '5.6.1', + '5.5.4', + '5.4.5', + '5.3.2', + '5.2.4', + '5.1.5', + '5.0.4', + '4.14.3', + '4.13.2', + '4.12.2', + '4.11.3', + '4.10.2', + '4.9.1', + '4.8.2', + '4.7', + '4.6.3', + '4.5.2', + '4.4', + '4.3' +]; function build_select(current_version) { if( current_version == 'master') { diff --git a/Documentation/doc/resources/1.9.6/menu_version.js b/Documentation/doc/resources/1.9.6/menu_version.js index 5b8d97efba0..74c82c3d818 100644 --- a/Documentation/doc/resources/1.9.6/menu_version.js +++ b/Documentation/doc/resources/1.9.6/menu_version.js @@ -5,29 +5,29 @@ var url_local = /.*\/doc_output\//; var current_version_local = 'master' var all_versions = [ - 'master', - '6.0-beta1', - '5.6.1', - 'latest', - '5.5.4', - '5.4.4', - '5.3.2', - '5.2.4', - '5.1.5', - '5.0.4', - '4.14.3', - '4.13.2', - '4.12.2', - '4.11.3', - '4.10.2', - '4.9.1', - '4.8.2', - '4.7', - '4.6.3', - '4.5.2', - '4.4', - '4.3' - ]; + 'master', + '6.0', + 'latest', + '5.6.1', + '5.5.4', + '5.4.5', + '5.3.2', + '5.2.4', + '5.1.5', + '5.0.4', + '4.14.3', + '4.13.2', + '4.12.2', + '4.11.3', + '4.10.2', + '4.9.1', + '4.8.2', + '4.7', + '4.6.3', + '4.5.2', + '4.4', + '4.3' +]; function build_select(current_version) { if( current_version == 'master') { diff --git a/Documentation/doc/scripts/generate_how_to_cite.py b/Documentation/doc/scripts/generate_how_to_cite.py index ece849f18a9..409678ebb91 100644 --- a/Documentation/doc/scripts/generate_how_to_cite.py +++ b/Documentation/doc/scripts/generate_how_to_cite.py @@ -65,7 +65,7 @@ If you want to refer to \cgal manual, please cite the appropriate The \cgal Project. \cgal User and Reference Manual. \cgal Editorial Board, ${CGAL_CREATED_VERSION_NUM} edition, ${CGAL_BUILD_YEAR4}. -[ bib | +[ bib | http ] @@ -160,7 +160,7 @@ def gen_txt_entry(title, authors, bib, anchor, k): + '.\n\ In \\cgal User and Reference Manual. \\cgal Editorial Board,\n\ ${CGAL_CREATED_VERSION_NUM} edition, ${CGAL_BUILD_YEAR4}.\n\ -[ bib | \n\ addAboutCGAL(); +#if QT_SVG_LIB this->setupExportSVG(action_Export_SVG, graphicsView); +#endif this->addRecentFiles(this->menuFile, this->actionQuit); connect(this, SIGNAL(openRecentFile(QString)), diff --git a/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp b/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp index 076ad27660b..a83a3030f51 100644 --- a/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp +++ b/GraphicsView/demo/Triangulation_2/Constrained_Delaunay_triangulation_2.cpp @@ -339,7 +339,9 @@ MainWindow::MainWindow() this->setupOptionsMenu(); this->addAboutDemo(":/cgal/help/about_Constrained_Delaunay_triangulation_2.html"); this->addAboutCGAL(); +#if QT_SVG_LIB this->setupExportSVG(this->actionExport_SVG, this->graphicsView); +#endif this->addRecentFiles(this->menuFile, this->actionQuit); connect(this, SIGNAL(openRecentFile(QString)), diff --git a/GraphicsView/demo/Triangulation_2/Delaunay_triangulation_2.cpp b/GraphicsView/demo/Triangulation_2/Delaunay_triangulation_2.cpp index 55a11c0171b..15c35df4308 100644 --- a/GraphicsView/demo/Triangulation_2/Delaunay_triangulation_2.cpp +++ b/GraphicsView/demo/Triangulation_2/Delaunay_triangulation_2.cpp @@ -179,7 +179,9 @@ MainWindow::MainWindow() this->setupOptionsMenu(); this->addAboutDemo(":/cgal/help/about_Delaunay_triangulation_2.html"); this->addAboutCGAL(); +#if QT_SVG_LIB this->setupExportSVG(actionExport_SVG, graphicsView); +#endif this->addRecentFiles(this->menuFile, this->actionQuit); connect(this, SIGNAL(openRecentFile(QString)), diff --git a/GraphicsView/demo/Triangulation_2/include/CGAL/Lipschitz_sizing_field_criteria_2.h b/GraphicsView/demo/Triangulation_2/include/CGAL/Lipschitz_sizing_field_criteria_2.h index ad844db31ac..1df267ad955 100644 --- a/GraphicsView/demo/Triangulation_2/include/CGAL/Lipschitz_sizing_field_criteria_2.h +++ b/GraphicsView/demo/Triangulation_2/include/CGAL/Lipschitz_sizing_field_criteria_2.h @@ -62,7 +62,7 @@ public: const double& size() const { return second; } const double& sine() const { return first; } - // q1pivotPoint(); } /*! Sets the Camera's position() and orientation() from an OpenGL ModelView matrix. -This enables a Camera initialisation from an other OpenGL application. \p +This enables a Camera initialization from an other OpenGL application. \p modelView is a 16 GLdouble vector representing a valid OpenGL ModelView matrix, such as one can get using: \code GLdouble mvm[16]; glGetDoublev(GL_MODELVIEW_MATRIX, mvm); diff --git a/GraphicsView/include/CGAL/Qt/manipulatedFrame.h b/GraphicsView/include/CGAL/Qt/manipulatedFrame.h index b763a646580..52cc92105ba 100644 --- a/GraphicsView/include/CGAL/Qt/manipulatedFrame.h +++ b/GraphicsView/include/CGAL/Qt/manipulatedFrame.h @@ -270,13 +270,11 @@ private Q_SLOTS: /*! @name Mouse event handlers */ //@{ protected: - virtual void mousePressEvent(QMouseEvent *const event, Camera *const camera); - virtual void mouseMoveEvent(QMouseEvent *const event, Camera *const camera); - virtual void mouseReleaseEvent(QMouseEvent *const event, - Camera *const camera); - virtual void mouseDoubleClickEvent(QMouseEvent *const event, - Camera *const camera); - virtual void wheelEvent(QWheelEvent *const event, Camera *const camera); + void mousePressEvent (QMouseEvent *const event, Camera *const camera) override; + void mouseMoveEvent (QMouseEvent *const event, Camera *const camera) override; + void mouseReleaseEvent (QMouseEvent *const event, Camera *const camera) override; + void mouseDoubleClickEvent(QMouseEvent *const event, Camera *const camera) override; + void wheelEvent(QWheelEvent *const event, Camera *const camera) override; //@} public: @@ -299,7 +297,7 @@ public: /*! @name MouseGrabber implementation */ //@{ public: - virtual void checkIfGrabsMouse(int x, int y, const Camera *const camera); + void checkIfGrabsMouse(int x, int y, const Camera *const camera) override; //@} #ifndef DOXYGEN diff --git a/GraphicsView/include/CGAL/Qt/qglviewer.h b/GraphicsView/include/CGAL/Qt/qglviewer.h index 8ee3b4135f2..e24a5fcd6d7 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer.h @@ -478,7 +478,6 @@ public: qreal bufferTextureMaxU() const { return bufferTextureMaxU_; } /*! Same as bufferTextureMaxU(), but for the v texture coordinate. */ qreal bufferTextureMaxV() const { return bufferTextureMaxV_; } -#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)) // These methods are part of the QGLWidget public API. // As of version 2.7.0, the use of QOpenGLWidget instead means that they have // to be provided for backward compatibility. @@ -486,7 +485,6 @@ public: const QFont &font = QFont()); void renderText(double x, double y, double z, const QString &str, const QFont &font = QFont()); -#endif public Q_SLOTS: void copyBufferToTexture(GLint, GLenum = GL_NONE); diff --git a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h index 7387b1f4874..01e8a68433d 100644 --- a/GraphicsView/include/CGAL/Qt/qglviewer_impl.h +++ b/GraphicsView/include/CGAL/Qt/qglviewer_impl.h @@ -354,7 +354,6 @@ camera is manipulated) : main drawing method. Should be overloaded. \arg postDraw() : display of visual hints (world axis, FPS...) */ CGAL_INLINE_FUNCTION void CGAL::QGLViewer::paintGL() { - makeCurrent(); // Clears screen, set model view matrix... preDraw(); // Used defined method. Default calls draw() @@ -364,7 +363,6 @@ void CGAL::QGLViewer::paintGL() { draw(); // Add visual hints: axis, camera, grid... postDraw(); - doneCurrent(); Q_EMIT drawFinished(true); } @@ -720,7 +718,6 @@ CGAL_INLINE_FUNCTION void CGAL::QGLViewer::drawLight(GLenum, qreal ) const { } -#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0)) CGAL_INLINE_FUNCTION void CGAL::QGLViewer::renderText(int x, int y, const QString &str, const QFont &font) { @@ -742,7 +739,6 @@ void CGAL::QGLViewer::renderText(double x, double y, double z, const QString &st const Vec proj = camera_->projectedCoordinatesOf(Vec(x, y, z)); renderText(int(proj.x), int(proj.y), str, font); } -#endif /*! Draws \p text at position \p x, \p y (expressed in screen coordinates pixels, origin in the upper left corner of the widget). diff --git a/HalfedgeDS/include/CGAL/HalfedgeDS_vector.h b/HalfedgeDS/include/CGAL/HalfedgeDS_vector.h index f13214b9bf9..871a27e9179 100644 --- a/HalfedgeDS/include/CGAL/HalfedgeDS_vector.h +++ b/HalfedgeDS/include/CGAL/HalfedgeDS_vector.h @@ -604,7 +604,7 @@ public: // This guard is needed here because, rr==ll==begin, might be true // at this point, causing the decrement to result in undefined - // behaviour. + // behavior. // [Fernando Cacciola] if ( ll < rr ) { diff --git a/Hash_map/include/CGAL/Hash_map/internal/chained_map.h b/Hash_map/include/CGAL/Hash_map/internal/chained_map.h index bea9b0993f0..785443e2bee 100644 --- a/Hash_map/include/CGAL/Hash_map/internal/chained_map.h +++ b/Hash_map/include/CGAL/Hash_map/internal/chained_map.h @@ -17,6 +17,7 @@ #define CGAL_HASH_MAP_INTERNAL_CHAINED_MAP_H #include +#include #include #include #include @@ -44,7 +45,7 @@ class chained_map chained_map_elem* table; chained_map_elem* table_end; - chained_map_elem* free; + chained_map_elem* freelist; std::size_t table_size; std::size_t table_size_1; @@ -143,10 +144,10 @@ void chained_map::init_table(std::size_t n) std::allocator_traits::construct(alloc,table + i); } - free = table + t; + freelist = table + t; table_end = table + t + t/2; - for (Item p = table; p < free; ++p) + for (Item p = table; p < freelist; ++p) { p->succ = nullptr; p->k = nullkey; } @@ -160,10 +161,10 @@ inline void chained_map::insert(std::size_t x, T y) q->k = x; q->i = y; } else { - free->k = x; - free->i = y; - free->succ = q->succ; - q->succ = free++; + freelist->k = x; + freelist->i = y; + freelist->succ = q->succ; + q->succ = freelist++; } } @@ -213,7 +214,7 @@ T& chained_map::access(Item p, std::size_t x) // index x not present, insert it - if (free == table_end) // table full: rehash + if (freelist == table_end) // table full: rehash { rehash(); p = HASH(x); } @@ -224,7 +225,7 @@ T& chained_map::access(Item p, std::size_t x) return p->i; } - q = free++; + q = freelist++; q->k = x; init_inf(q->i); // initializes q->i to xdef q->succ = p->succ; @@ -245,7 +246,7 @@ chained_map::chained_map(const chained_map& D) { init_table(D.table_size); - for(Item p = D.table; p < D.free; ++p) + for(Item p = D.table; p < D.freelist; ++p) { if (p->k != nullkey || p >= D.table + D.table_size) { insert(p->k,p->i); //D.copy_inf(p->i); // see chapter Implementation @@ -257,7 +258,7 @@ chained_map::chained_map(chained_map&& D) noexcept(std::is_nothrow_move_constructible_v && std::is_nothrow_move_constructible_v) : table(std::exchange(D.table, nullptr)) , table_end(std::exchange(D.table_end, nullptr)) - , free(std::exchange(D.free, nullptr)) + , freelist(std::exchange(D.freelist, nullptr)) , table_size(std::exchange(D.table_size, 0)) , table_size_1(std::exchange(D.table_size_1, 0)) , alloc(std::move(D.alloc)) @@ -272,7 +273,7 @@ chained_map& chained_map::operator=(const chained_ma init_table(D.table_size); - for(Item p = D.table; p < D.free; ++p) + for(Item p = D.table; p < D.freelist; ++p) { if (p->k != nullkey || p >= D.table + D.table_size) { insert(p->k,p->i); //copy_inf(p->i); // see chapter Implementation @@ -289,7 +290,7 @@ chained_map& chained_map::operator=(chained_map::statistics() const std::size_t n = 0; for (Item p = table; p < table + table_size; ++p) if (p ->k != nullkey) ++n; - std::size_t used_in_overflow = free - (table + table_size ); + std::size_t used_in_overflow = freelist - (table + table_size ); n += used_in_overflow; std::cout << "number of entries: " << n << "\n"; std::cout << "fraction of entries in first position: " << diff --git a/Hash_map/package_info/Hash_map/dependencies b/Hash_map/package_info/Hash_map/dependencies index 25b30f26b79..b611de33d8e 100644 --- a/Hash_map/package_info/Hash_map/dependencies +++ b/Hash_map/package_info/Hash_map/dependencies @@ -1,3 +1,5 @@ Hash_map Installation +Kernel_23 +Profiling_tools STL_Extension diff --git a/Heat_method_3/include/CGAL/Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h b/Heat_method_3/include/CGAL/Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h index 65d78512514..77a399704ec 100644 --- a/Heat_method_3/include/CGAL/Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h +++ b/Heat_method_3/include/CGAL/Heat_method_3/internal/Intrinsic_Delaunay_triangulation_3.h @@ -25,7 +25,6 @@ #include #include #include -#include #include #include #include diff --git a/Installation/.reuse/dep5 b/Installation/.reuse/dep5 deleted file mode 100644 index ef2e017a397..00000000000 --- a/Installation/.reuse/dep5 +++ /dev/null @@ -1,12 +0,0 @@ -Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ -Upstream-Name: CGAL -Upstream-Contact: CGAL Editorial Board -Source: https://github.com/CGAL/cgal - -Files: *.cmake *.md doc/* doc_html/* scripts/* developer_scripts/* package_info/* demo/* examples/* src/* test/* benchmarks/* benchmark/* data/* cmake/* -Copyright: 1995-2023 The CGAL Project -License: CC0-1.0 - -Files: include/CGAL/Qt/ImageInterface.ui include/CGAL/Qt/resources/qglviewer-icon.xpm AUTHORS CMakeLists.txt README auxiliary/cgal_create_cmake_script.1 auxiliary/gmp/README include/CGAL/license/gpl_package_list.txt auxiliary/cgal_app.icns copyright VERSION -Copyright: 1995-2023 The CGAL Project -License: CC0-1.0 diff --git a/Installation/CHANGES.md b/Installation/CHANGES.md index a8ddd38c1a1..f1b4b336cc3 100644 --- a/Installation/CHANGES.md +++ b/Installation/CHANGES.md @@ -1,8 +1,13 @@ # Release History +## [Release 6.0.1](https://github.com/CGAL/cgal/releases/tag/v6.0.1) + +### [Poisson Surface Reconstruction](https://doc.cgal.org/6.0.1/Manual/packages.html#PkgPoissonSurfaceReconstruction3) +- Made the implicit function thread-safe so that the parallel version of `make_mesh_3()` can be used. + ## [Release 6.0](https://github.com/CGAL/cgal/releases/tag/v6.0) -Release date: June 2024 +Release date: September 2024 ### General Changes @@ -13,6 +18,8 @@ Release date: June 2024 - LLVM Clang version 15.0.7 or later (on Linux) - Apple Clang compiler versions 10.0.1, 12.0.5, and 15.0.0 (on macOS) - The minimal supported version of Boost is now 1.72.0. +- GMP/MPFR are no longer mandatory to use CGAL, [Boost.Multiprecision](https://www.boost.org/doc/libs/1_72_0/libs/multiprecision/doc/html/index.html). + can be used instead. - The CGAL `Core` library is no longer based on GMP, but on [Boost.Multiprecision](https://www.boost.org/doc/libs/1_72_0/libs/multiprecision/doc/html/index.html). Either GMP backend or Boost backend can be used. @@ -144,10 +151,6 @@ Release date: June 2024 to the [`GenericMap`](https://doc.cgal.org/6.0/Combinatorial_map/classGenericMap.html) concept, which enables users to insert an edge between two different faces in order to create faces with holes. -- Added new meshing criterion `edge_distance`, an upper bound for the distance from the edge to the 1D feature. -- **Breaking change**: the concept `MeshEdgeCriteria_3` was modified to include the new meshing criterion `edge_distance`. - - ### [Quadtrees, Octrees, and Orthtrees](https://doc.cgal.org/6.0/Manual/packages.html#PkgOrthtree) - **Breaking change**: @@ -225,6 +228,9 @@ Release date: June 2024 as well as the class `Triangle_accessor`. These were no longer used for several releases. - **Breaking change**: Removed the class templates `CGAL::Gray_image_mesh_domain_3`, `CGAL::Implicit_mesh_domain_3`, and `CGAL::Labeled_image_mesh_domain_3`, which were deprecated since CGAL-4.13. +- Added new meshing criterion `edge_distance`, an upper bound for the distance from the edge to the 1D feature. +- **Breaking change**: the concept `MeshEdgeCriteria_3` was modified to include the new meshing criterion `edge_distance`. + ### [3D Surface Mesh Generation](https://doc.cgal.org/6.0/Manual/packages.html#PkgSurfaceMesher3) @@ -1914,7 +1920,7 @@ Release date: April 2018 after the observer is notified that the edge has been removed. This is symmetric (opposite) to the order of notification when an edge is inserted. - The user can restore old (non-symmetric) behaviour by defining the macro: + The user can restore old (non-symmetric) behavior by defining the macro: `CGAL_NON_SYMETRICAL_OBSERVER_EDGE_REMOVAL_BACKWARD_COMPATIBILITY` @@ -3455,7 +3461,7 @@ Release date: October 2013 vertices which would move of very small displacements. - Introduce new data structures and options for speed-up and compacity. Note that `Compact_mesh_cell_base_3` and - `Mesh_vertex_base_3` are now our favoured implementations of the + `Mesh_vertex_base_3` are now our favored implementations of the concepts MeshCellBase\_3 and MeshVertexBase\_3. - Introduce a new constructor for `Polyhedral_mesh_domain_3` that takes a bounding polyhedron to be meshed along with a polyhedral @@ -4566,9 +4572,9 @@ fixes for this release. - The new macro CGAL\_NO\_DEPRECATED\_CODE can be defined to disable deprecated code, helping users discover if they rely on code that may be removed in subsequent releases. -- Assertion behaviour: It is not possible anymore to set the CONTINUE +- Assertion behavior: It is not possible anymore to set the CONTINUE mode for assertion failures. Functions that allow to change the - assertion behaviour are now declared in + assertion behavior are now declared in ``. - Qt3 based demos are still there but the documentation has been removed as the CGAL::Qt\_Widget will be deprecated. @@ -5117,7 +5123,7 @@ static runtime (/ML). - 2D Placement of Streamlines (new package) Visualizing vector fields is important for many application domains. A good way to do it is to generate streamlines that describe the - flow behaviour. This package implements the "Farthest Point Seeding" + flow behavior. This package implements the "Farthest Point Seeding" algorithm for placing streamlines in 2D vector fields. It generates a list of streamlines corresponding to an input flow using a specified separating distance. The algorithm uses a Delaunay @@ -5139,7 +5145,7 @@ static runtime (/ML). structures. The package supports exact or inexact operations on primitives which move along polynomial trajectories. - Smallest Enclosing Ellipsoid (new package) - This algorithm is new in the chapter Geometric Optimisation. + This algorithm is new in the chapter Geometric Optimization. - 2D Arrangement (major revision) This package can be used to construct, maintain, alter, and display arrangements in the plane. Once an arrangement is constructed, the @@ -5154,9 +5160,9 @@ static runtime (/ML). construction history of the arrangement, such that it is possible to obtain the originating curve of an arrangement subcurve. -- Geometric Optimisation (major revision) +- Geometric Optimization (major revision) The underlying QP solver which is the foundation for several - algorithms in the Geometric Optimisation chapter has been completely + algorithms in the Geometric Optimization chapter has been completely rewritten. - 3D Triangulation (new functionality) Regular\_triangulation\_3 now offers vertex removal. @@ -5482,7 +5488,7 @@ The following functionality has been added or changed: Face\_handle or Vertex\_handle. - New classes Triangulation\_vertex\_base\_with\_info\_2 (and 3) and Triangulation\_face\_base\_with\_info\_2 (and 3) to make - easier the customisation of base classes in most cases. + easier the customization of base classes in most cases. - 2D Triangulation - Regular triangulation provides an easy access to hidden points. - The Triangulation\_hierarchy\_2, which provide an efficient @@ -5984,7 +5990,7 @@ kernels themselves can be used as traits classes in many instances. - The traits class requirements have been changed. - The simplicity test has a completely new implementation. - Properties like convexity, simplicity and area can now be cached - by polygons. You need to set a flag to select this behaviour. + by polygons. You need to set a flag to select this behavior. @@ -6157,7 +6163,7 @@ The following functionality has been added: stored within a class, debugging is easier using this kernel. This kernel can also be faster in some cases than the reference-counted Cartesian kernel. -- New optimisation algorithms +- New optimization algorithms - Min\_annulus\_d - Algorithm for computing the smallest enclosing annulus of points in arbitrary dimension - Polytope\_distance\_d - Algorithm for computing the (squared) @@ -6214,7 +6220,7 @@ The following functionality has been added: triangulations. - Triangulations in 3D were added, both Delaunay triangulations and regular triangulations. -- Min\_quadrilateral optimisations have been added. These are +- Min\_quadrilateral optimizations have been added. These are algorithms to compute the minimum enclosing rectangle/parallelogram (arbitrary orientation) and the minimum enclosing strip of a convex point set. diff --git a/Installation/CMakeLists.txt b/Installation/CMakeLists.txt index c5df6f680c6..11ade3231f1 100644 --- a/Installation/CMakeLists.txt +++ b/Installation/CMakeLists.txt @@ -480,8 +480,11 @@ if(CMAKE_COMPILER_IS_GNUCXX) endif() -message("== Generate version files (DONE) ==\n") +if(CGAL_TEST_SUITE) + include(display-third-party-libs-versions) +endif() +message("== Generate version files (DONE) ==\n") #-------------------------------------------------------------------------------------------------- # # -= External libraries =- @@ -934,7 +937,7 @@ if(CGAL_BRANCH_BUILD) find_package(Doxygen REQUIRED) find_package(Eigen3 REQUIRED) find_package(Qt6 COMPONENTS Core Widgets OpenGL Gui REQUIRED) - find_package(VTK COMPONENTS vtkImagingGeneral vtkIOImage NO_MODULE) + find_package(VTK COMPONENTS ImagingGeneral IOImage NO_MODULE) if(VTK_FOUND) get_target_property(VTK_INCLUDE_DIRS VTK::IOImage INTERFACE_INCLUDE_DIRECTORIES) endif() diff --git a/Installation/REUSE.toml b/Installation/REUSE.toml new file mode 100644 index 00000000000..34a4baee435 --- /dev/null +++ b/Installation/REUSE.toml @@ -0,0 +1,47 @@ +version = 1 +SPDX-PackageName = "CGAL" +SPDX-PackageSupplier = "CGAL Editorial Board " +SPDX-PackageDownloadLocation = "https://github.com/CGAL/cgal" + +[[annotations]] +path = [ + "**.cmake", + "**.md", + "doc/**", + "doc_html/**", + "scripts/**", + "developer_scripts/**", + "package_info/**", + "demo/**", + "examples/**", + "src/**", + "test/**", + "benchmarks/**", + "benchmark/**", + "data/**", + "cmake/**", + "**/*.natvis", +] +precedence = "aggregate" +SPDX-FileCopyrightText = "1995-2024 The CGAL Project" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = [ + "REUSE.toml", + "lib/cmake/CGAL/CGALConfig-installation-dirs.cmake.in", + "include/CGAL/Qt/ImageInterface.ui", + "include/CGAL/Qt/resources/qglviewer-icon.xpm", + "AUTHORS", + "CMakeLists.txt", + "README", + "auxiliary/cgal_create_cmake_script.1", + "auxiliary/gmp/README", + "include/CGAL/license/gpl_package_list.txt", + "auxiliary/cgal_app.icns", + "copyright", + "VERSION", +] +precedence = "aggregate" +SPDX-FileCopyrightText = "1995-2024 The CGAL Project" +SPDX-License-Identifier = "CC0-1.0" diff --git a/Installation/cmake/modules/CGAL_LASLIB_support.cmake b/Installation/cmake/modules/CGAL_LASLIB_support.cmake index 7c65da9ebf0..e471c93f02b 100644 --- a/Installation/cmake/modules/CGAL_LASLIB_support.cmake +++ b/Installation/cmake/modules/CGAL_LASLIB_support.cmake @@ -1,8 +1,19 @@ -if(LASLIB_FOUND AND NOT TARGET CGAL::LASLIB_support) - add_library(CGAL::LASLIB_support INTERFACE IMPORTED) - set_target_properties(CGAL::LASLIB_support PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "CGAL_LINKED_WITH_LASLIB" - INTERFACE_INCLUDE_DIRECTORIES "${LASLIB_INCLUDE_DIR};${LASZIP_INCLUDE_DIR}" - INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${LASLIB_INCLUDE_DIR};${LASZIP_INCLUDE_DIR}" - INTERFACE_LINK_LIBRARIES "${LASLIB_LIBRARIES}") +if(LASLIB_FOUND) + if (NOT TARGET CGAL::LASLIB_support) + if (NOT TARGET LASlib) + # message(STATUS "Found using MODULE mode") + add_library(CGAL::LASLIB_support INTERFACE IMPORTED) + set_target_properties(CGAL::LASLIB_support PROPERTIES + INTERFACE_COMPILE_DEFINITIONS "CGAL_LINKED_WITH_LASLIB" + INTERFACE_INCLUDE_DIRECTORIES "${LASLIB_INCLUDE_DIR}" + INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "${LASLIB_INCLUDE_DIR}" + INTERFACE_LINK_LIBRARIES "${LASLIB_LIBRARIES}") + else() + # message(STATUS "Found using CONFIG mode") + add_library(CGAL::LASLIB_support INTERFACE IMPORTED) + set_target_properties(CGAL::LASLIB_support PROPERTIES + INTERFACE_COMPILE_DEFINITIONS "CGAL_LINKED_WITH_LASLIB") + target_link_libraries(CGAL::LASLIB_support INTERFACE LASlib) + endif() + endif() endif() diff --git a/Installation/cmake/modules/CGAL_OpenMesh_support.cmake b/Installation/cmake/modules/CGAL_OpenMesh_support.cmake new file mode 100644 index 00000000000..97df95c8115 --- /dev/null +++ b/Installation/cmake/modules/CGAL_OpenMesh_support.cmake @@ -0,0 +1,17 @@ + +if(OpenMesh_FOUND AND NOT TARGET CGAL::OpenMesh_support) + + add_library(CGAL::OpenMesh_support INTERFACE IMPORTED) + + if(TARGET OpenMeshCore) + target_link_libraries(CGAL::OpenMesh_support INTERFACE OpenMeshCore) + endif() + + if(TARGET OpenMeshTools) + target_link_libraries(CGAL::OpenMesh_support INTERFACE OpenMeshTools) + endif() + + target_compile_definitions(CGAL::OpenMesh_support + INTERFACE "CGAL_USE_OPENMESH;NOMINMAX;_USE_MATH_DEFINES") + +endif() diff --git a/Installation/cmake/modules/FindCORE.cmake b/Installation/cmake/modules/FindCORE.cmake index 6effa1d5e52..adb2ad05f15 100644 --- a/Installation/cmake/modules/FindCORE.cmake +++ b/Installation/cmake/modules/FindCORE.cmake @@ -3,8 +3,6 @@ # CORE_INCLUDE_DIR - the CORE include directory # CORE_LIBRARIES - Libraries needed to use CORE -# TODO: support Windows and MacOSX - # CORE needs GMP include(FindPackageHandleStandardArgs) @@ -17,7 +15,7 @@ if(GMP_FOUND) find_path(CORE_INCLUDE_DIR NAMES CORE.h DOC "The directory containing the CORE include files") find_library(CORE_LIBRARIES NAMES core++ DOC "Path to the core++ library") - + get_filename_component(CORE_LIBRARIES_DIR ${CORE_LIBRARIES} PATH) FIND_PACKAGE_HANDLE_STANDARD_ARGS(CORE "DEFAULT_MSG" CORE_LIBRARIES CORE_INCLUDE_DIR ) diff --git a/Installation/cmake/modules/FindGMP.cmake b/Installation/cmake/modules/FindGMP.cmake index f452c0287f7..38108f3420a 100644 --- a/Installation/cmake/modules/FindGMP.cmake +++ b/Installation/cmake/modules/FindGMP.cmake @@ -5,8 +5,6 @@ # GMP_LIBRARIES_DIR - directory where the GMP libraries are located # GMP_LIBRARIES - Link these to use GMP -# TODO: support MacOSX - include(FindPackageHandleStandardArgs) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_GeneratorSpecificSettings.cmake) diff --git a/Installation/cmake/modules/FindGMPXX.cmake b/Installation/cmake/modules/FindGMPXX.cmake index 277e4b19ef1..ce05fd70346 100644 --- a/Installation/cmake/modules/FindGMPXX.cmake +++ b/Installation/cmake/modules/FindGMPXX.cmake @@ -4,8 +4,6 @@ # GMPXX_INCLUDE_DIR - the GMPXX include directory # GMPXX_LIBRARIES - Libraries needed to use GMPXX -# TODO: support Windows and MacOSX - # GMPXX needs GMP find_package( GMP QUIET ) diff --git a/Installation/cmake/modules/FindLASLIB.cmake b/Installation/cmake/modules/FindLASLIB.cmake index 2353480c245..89a8d7fc693 100644 --- a/Installation/cmake/modules/FindLASLIB.cmake +++ b/Installation/cmake/modules/FindLASLIB.cmake @@ -9,14 +9,16 @@ # first look in user defined locations find_path(LASLIB_INCLUDE_DIR NAMES lasreader.hpp - PATHS /usr/local/include/LASlib/ + PATHS /usr/local/include/LASlib/ ENV LASLIB_INC_DIR ) - + find_path(LASZIP_INCLUDE_DIR NAMES mydefs.hpp PATHS /usr/local/include/LASzip/ ${LASLIB_INCLUDE_DIR}/../../LASzip/src + ${LASLIB_INCLUDE_DIR}/../LASzip + ${LASLIB_INCLUDE_DIR} ) find_library(LASLIB_LIBRARIES @@ -24,12 +26,27 @@ find_library(LASLIB_LIBRARIES PATHS ENV LD_LIBRARY_PATH ENV LIBRARY_PATH /usr/local/lib + /usr/local/lib/LASlib ${LASLIB_INCLUDE_DIR}/../../lib ENV LASLIB_LIB_DIR ) +if (NOT LASLIB_LIBRARIES) + #library was renamed in recent versions of LAStools + find_library(LASLIB_LIBRARIES + NAMES LASlib + PATHS ENV LD_LIBRARY_PATH + ENV LIBRARY_PATH + /usr/local/lib + /usr/local/lib/LASlib + ${LASLIB_INCLUDE_DIR}/../../lib + ENV LASLIB_LIB_DIR + ) +endif() -if(LASLIB_LIBRARIES AND LASLIB_INCLUDE_DIR) +if(LASLIB_LIBRARIES AND LASLIB_INCLUDE_DIR AND LASZIP_INCLUDE_DIR) + if (NOT ${LASLIB_INCLUDE_DIR} STREQUAL ${LASZIP_INCLUDE_DIR}) + list(APPEND LASLIB_INCLUDE_DIR ${LASZIP_INCLUDE_DIR}) + endif() set(LASLIB_FOUND TRUE) set(LASLIB_USE_FILE "UseLASLIB") endif() - diff --git a/Installation/cmake/modules/FindMPFR.cmake b/Installation/cmake/modules/FindMPFR.cmake index 4d1bc43553d..b0507120ce0 100644 --- a/Installation/cmake/modules/FindMPFR.cmake +++ b/Installation/cmake/modules/FindMPFR.cmake @@ -4,8 +4,6 @@ # MPFR_LIBRARIES_DIR - Directory where the MPFR libraries are located # MPFR_LIBRARIES - the MPFR libraries -# TODO: support MacOSX - include(FindPackageHandleStandardArgs) include(${CMAKE_CURRENT_LIST_DIR}/CGAL_GeneratorSpecificSettings.cmake) diff --git a/Installation/cmake/modules/FindOpenMesh.cmake b/Installation/cmake/modules/FindOpenMesh.cmake deleted file mode 100644 index 86b6eaebc9e..00000000000 --- a/Installation/cmake/modules/FindOpenMesh.cmake +++ /dev/null @@ -1,79 +0,0 @@ -#This modules tries to find OpenMesh -# Once done this will define -# -# OpenMesh_FOUND - system has OpenMesh -# OPENMESH_INCLUDE_DIR - OpenMesh include directory -# OPENMESH_LIBRARIES - OpenMesh libraries -# - -find_package(OpenMesh NO_MODULE QUIET) - -# Is it already configured? -if (NOT OpenMesh_FOUND) - - find_path(OPENMESH_INCLUDE_DIR - NAMES OpenMesh/Core/Mesh/ArrayKernel.hh - HINTS ENV OPENMESH_INC_DIR - ENV OPENMESH_DIR - /usr/include - /usr/local/include - PATH_SUFFIXES src - DOC "The directory containing the OpenMesh header files WITHOUT the OpenMesh prefix" - ) - - find_library(OPENMESH_LIBRARY_RELEASE NAMES "OpenMeshCore" - HINTS ENV OPENMESH_LIB_DIR - ENV OPENMESH_DIR - PATH_SUFFIXES lib - DOC "Path to the OpenMeshCore library" - ) - - find_library(OPENMESH_LIBRARY_DEBUG NAMES "OpenMeshCored" - HINTS ENV OPENMESH_LIB_DIR - ENV OPENMESH_DIR - PATH_SUFFIXES lib - DOC "Path to the OpenMeshCored library" - ) - - if(OPENMESH_LIBRARY_RELEASE) - if(OPENMESH_LIBRARY_DEBUG) - set(OPENMESH_LIBRARIES optimized ${OPENMESH_LIBRARY_RELEASE} debug ${OPENMESH_LIBRARY_DEBUG}) - else() - set(OPENMESH_LIBRARIES ${OPENMESH_LIBRARY_RELEASE}) - endif() - endif() -endif() - -include( FindPackageHandleStandardArgs ) - -find_package_handle_standard_args(OpenMesh - REQUIRED_VARS OPENMESH_INCLUDE_DIR OPENMESH_LIBRARIES - FOUND_VAR OpenMesh_FOUND - ) - -if(OpenMesh_FOUND AND NOT TARGET OpenMesh::OpenMesh) - add_library(OpenMesh::OpenMesh UNKNOWN IMPORTED) - - if(TARGET OpenMeshCore) - target_link_libraries(OpenMesh::OpenMesh INTERFACE OpenMeshCore) - return() - endif() - - set_target_properties(OpenMesh::OpenMesh PROPERTIES - INTERFACE_COMPILE_DEFINITIONS "CGAL_USE_OPENMESH;NOMINMAX;_USE_MATH_DEFINES" - INTERFACE_INCLUDE_DIRECTORIES "${OPENMESH_INCLUDE_DIR}") - - if(OPENMESH_LIBRARY_RELEASE) - set_property(TARGET OpenMesh::OpenMesh APPEND PROPERTY - IMPORTED_CONFIGURATIONS RELEASE) - set_target_properties(OpenMesh::OpenMesh PROPERTIES - IMPORTED_LOCATION_RELEASE "${OPENMESH_LIBRARY_RELEASE}") - endif() - - if(OPENMESH_LIBRARY_DEBUG) - set_property(TARGET OpenMesh::OpenMesh APPEND PROPERTY - IMPORTED_CONFIGURATIONS DEBUG) - set_target_properties(OpenMesh::OpenMesh PROPERTIES - IMPORTED_LOCATION_DEBUG "${OPENMESH_LIBRARY_DEBUG}") - endif() -endif() diff --git a/Installation/cmake/modules/UseLASLIB.cmake b/Installation/cmake/modules/UseLASLIB.cmake index 1af7a023ceb..f1ffb0bd906 100644 --- a/Installation/cmake/modules/UseLASLIB.cmake +++ b/Installation/cmake/modules/UseLASLIB.cmake @@ -3,4 +3,4 @@ add_definitions(-DCGAL_LINKED_WITH_LASLIB) -message(DEPRECATION "This file UseLASLIB.cmake is deprecated, and the imported target `CGAL::TBB_support` from CGAL_LASLIB_support.cmake should be used instead.") +message(DEPRECATION "This file UseLASLIB.cmake is deprecated, and the imported target `CGAL::LASLIB_support` from CGAL_LASLIB_support.cmake should be used instead.") diff --git a/Installation/cmake/modules/UseOpenMesh.cmake b/Installation/cmake/modules/UseOpenMesh.cmake deleted file mode 100644 index 23449d7cdf9..00000000000 --- a/Installation/cmake/modules/UseOpenMesh.cmake +++ /dev/null @@ -1,5 +0,0 @@ -# This module setups the compiler for using the OpenMesh library. -# It assumes that find_package(OpenMesh) was already called. - -include_directories ( ${OPENMESH_INCLUDE_DIR} ) -add_definitions( -DNOMINMAX -D_USE_MATH_DEFINES ) diff --git a/Installation/cmake/modules/display-third-party-libs-versions.cmake b/Installation/cmake/modules/display-third-party-libs-versions.cmake new file mode 100644 index 00000000000..96ef4e14992 --- /dev/null +++ b/Installation/cmake/modules/display-third-party-libs-versions.cmake @@ -0,0 +1,106 @@ +set(LIBRARIES_TO_CHECK + Eigen3 Qt6 TBB OpenMesh Boost + GMP Threads SuiteSparse MPFI METIS + VTK SCIP OSQP LASLIB GLPK + ITT Ceres MPFR libpointmatcher ITK + OpenGR OpenCV ZLIB +) + +include(${CMAKE_CURRENT_LIST_DIR}/CGAL_TweakFindBoost.cmake) + +function(get_library_version header_path major_macro minor_macro patchlevel_macro version_var) + if(EXISTS ${header_path}) + file(READ ${header_path} HEADER_CONTENT) + if("${HEADER_CONTENT}" MATCHES "#define[ \t]+${major_macro}[ \t]+([0-9]+)") + set(VERSION_MAJOR ${CMAKE_MATCH_1}) + endif() + if("${HEADER_CONTENT}" MATCHES "#define[ \t]+${minor_macro}[ \t]+([0-9]+)") + set(VERSION_MINOR ${CMAKE_MATCH_1}) + endif() + if("${HEADER_CONTENT}" MATCHES "#define[ \t]+${patchlevel_macro}[ \t]+([0-9]+)") + set(VERSION_PATCHLEVEL ${CMAKE_MATCH_1}) + else() + set(VERSION_PATCHLEVEL "") + endif() + if(VERSION_PATCHLEVEL) + set(${version_var} "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCHLEVEL}" PARENT_SCOPE) + elseif(VERSION_MAJOR GREATER_EQUAL 0 OR VERSION_MINOR GREATER_EQUAL 0) + set(${version_var} "${VERSION_MAJOR}.${VERSION_MINOR}" PARENT_SCOPE) + endif() + endif() +endfunction() + +function(check_library cgal_3rdparty_lib) + set(QT_NO_CREATE_VERSIONLESS_TARGETS ON) + set(CMAKE_FIND_PACKAGE_QUIET TRUE) + string(TOUPPER ${cgal_3rdparty_lib} cgal_3rdparty_lib_upper) + find_package(${cgal_3rdparty_lib} QUIET) + set(CMAKE_FIND_PACKAGE_QUIET FALSE) + if(${cgal_3rdparty_lib}_FOUND) + set(version_var "") + if(DEFINED ${cgal_3rdparty_lib}_VERSION) + set(version_var ${${cgal_3rdparty_lib}_VERSION}) + elseif(DEFINED ${cgal_3rdparty_lib}_VERSION_STRING) + set(version_var ${${cgal_3rdparty_lib}_VERSION_STRING}) + elseif(DEFINED ${cgal_3rdparty_lib_upper}_VERSION) + set(version_var ${${cgal_3rdparty_lib_upper}_VERSION}) + elseif(DEFINED ${cgal_3rdparty_lib_upper}_VERSION_STRING) + set(version_var ${${cgal_3rdparty_lib_upper}_VERSION_STRING}) + elseif(${cgal_3rdparty_lib} STREQUAL "GMP") + set(version_var "") + get_library_version("${GMP_INCLUDE_DIR}/gmp.h" "__GNU_MP_VERSION" "__GNU_MP_VERSION_MINOR" "__GNU_MP_VERSION_PATCHLEVEL" version_var) + if(NOT version_var) + file(READ "${GMP_INCLUDE_DIR}/gmp.h" GMP_HEADER_CONTENT) + string(REGEX MATCHALL "#include[ \t]+\"([^\"]+)\"" INCLUDED_HEADERS "${GMP_HEADER_CONTENT}") + foreach(INCLUDED_HEADER ${INCLUDED_HEADERS}) + string(REGEX REPLACE "#include[ \t]+\"([^\"]+)\"" "\\1" GMP_ARCH_HEADER "${INCLUDED_HEADER}") + set(GMP_ARCH_HEADER_PATH "${GMP_INCLUDE_DIR}/${GMP_ARCH_HEADER}") + if(EXISTS ${GMP_ARCH_HEADER_PATH}) + get_library_version("${GMP_ARCH_HEADER_PATH}" "__GNU_MP_VERSION" "__GNU_MP_VERSION_MINOR" "__GNU_MP_VERSION_PATCHLEVEL" version_var) + if(version_var) + break() + endif() + endif() + endforeach() + endif() + elseif(${cgal_3rdparty_lib} STREQUAL "GLPK") + get_library_version("${GLPK_INCLUDE_DIR}/glpk.h" "GLP_MAJOR_VERSION" "GLP_MINOR_VERSION" "" version_var) + elseif(${cgal_3rdparty_lib} STREQUAL "MPFR") + get_library_version("${MPFR_INCLUDE_DIR}/mpfr.h" "MPFR_VERSION_MAJOR" "MPFR_VERSION_MINOR" "MPFR_VERSION_PATCHLEVEL" version_var) + elseif(${cgal_3rdparty_lib} STREQUAL "METIS") + get_library_version("${METIS_INCLUDE_DIR}/metis.h" "METIS_VER_MAJOR" "METIS_VER_MINOR" "METIS_VER_SUBMINOR" version_var) + elseif(${cgal_3rdparty_lib} STREQUAL "SuiteSparse") + get_library_version("${SuiteSparse_Config_INCLUDE_DIR}/SuiteSparse_config.h" "SUITESPARSE_MAIN_VERSION" "SUITESPARSE_SUB_VERSION" "SUITESPARSE_SUBSUB_VERSION" version_var) + elseif(${cgal_3rdparty_lib} STREQUAL "LASLIB") + get_library_version("${LASLIB_INCLUDE_DIR}/lasdefinitions.hpp" "LAS_TOOLS_VERSION" "" "" version_var) + elseif(${cgal_3rdparty_lib} STREQUAL "ITT") + get_library_version("${ITT_INCLUDE_DIR}/ittnotify.h" "ITT_MAJOR" "ITT_MINOR" "" version_var) + elseif(${cgal_3rdparty_lib} STREQUAL "OpenMesh") + if (TARGET OpenMeshCore) + get_target_property(OpenMesh_INCLUDE_DIRS OpenMeshCore INTERFACE_INCLUDE_DIRECTORIES) + set(CONFIG_FILE_PATH "${OpenMesh_INCLUDE_DIRS}/OpenMesh/Core/System/config.h") + if(EXISTS ${CONFIG_FILE_PATH}) + file(READ ${CONFIG_FILE_PATH} CONFIG_CONTENT) + if("${CONFIG_CONTENT}" MATCHES "#define[ \t]+OM_VERSION[ \t]+(0x[0-9A-F]+)") + set(VERSION_HEX ${CMAKE_MATCH_1}) + math(EXPR VERSION_MAJOR "(${VERSION_HEX} & 0xF0000) >> 16") + math(EXPR VERSION_MINOR "(${VERSION_HEX} & 0x0FF00) >> 8") + math(EXPR VERSION_PATCH "(${VERSION_HEX} & 0x000FF)") + set(version_var "${VERSION_MAJOR}.${VERSION_MINOR}.${VERSION_PATCH}") + endif() + endif() + endif() + endif() + if(version_var) + message(STATUS "Third-party library ${cgal_3rdparty_lib} ${version_var}") + else() + message(STATUS "Third-party library ${cgal_3rdparty_lib} found") + endif() + else() + message(STATUS "Third-party library ${cgal_3rdparty_lib} not found") + endif() +endfunction() + +foreach(cgal_3rdparty_lib IN LISTS LIBRARIES_TO_CHECK) + check_library(${cgal_3rdparty_lib}) +endforeach() diff --git a/Installation/include/CGAL/config.h b/Installation/include/CGAL/config.h index bd5dafbf017..ff437a7f444 100644 --- a/Installation/include/CGAL/config.h +++ b/Installation/include/CGAL/config.h @@ -37,6 +37,13 @@ #endif #ifdef CGAL_INCLUDE_WINDOWS_DOT_H + +#if defined(_MSC_VER) && defined(_DEBUG) +// Include support for memory leak detection +// This is only available in debug mode and when _CRTDBG_MAP_ALLOC is defined. +// It will include which will redefine `malloc` and `free`. +# define _CRTDBG_MAP_ALLOC 1 +#endif // Mimic users including this file which defines min max macros // and other names leading to name clashes #include @@ -243,20 +250,6 @@ # define CGAL_SUNPRO_INITIALIZE(C) #endif -//----------------------------------------------------------------------// -// MacOSX specific. -//----------------------------------------------------------------------// - -#ifdef __APPLE__ -# if defined(__GNUG__) && (__GNUG__ == 4) && (__GNUC_MINOR__ == 0) \ - && defined(__OPTIMIZE__) && !defined(CGAL_NO_WARNING_FOR_MACOSX_GCC_4_0_BUG) -# warning "Your configuration may exhibit run-time errors in CGAL code" -# warning "This appears with g++ 4.0 on MacOSX when optimizing" -# warning "You can disable this warning using -DCGAL_NO_WARNING_FOR_MACOSX_GCC_4_0_BUG" -# warning "For more information, see https://www.cgal.org/FAQ.html#mac_optimization_bug" -# endif -#endif - //-------------------------------------------------------------------// // When the global min and max are no longer defined (as macros) // because of NOMINMAX flag definition, we define our own global diff --git a/Installation/include/CGAL/license/Polygon_mesh_processing/combinatorial_repair.h b/Installation/include/CGAL/license/Polygon_mesh_processing/combinatorial_repair.h index cf07529839b..8f3640a725d 100644 --- a/Installation/include/CGAL/license/Polygon_mesh_processing/combinatorial_repair.h +++ b/Installation/include/CGAL/license/Polygon_mesh_processing/combinatorial_repair.h @@ -9,7 +9,7 @@ // // Author(s) : Andreas Fabri // -// Warning: this file is generated, see include/CGAL/licence/README.md +// Warning: this file is generated, see include/CGAL/license/README.md // not entirely true due to the backward compatibility issue #ifndef CGAL_LICENSE_POLYGON_MESH_PROCESSING_COMBINATORIAL_REPAIR_H diff --git a/Installation/include/CGAL/version.h b/Installation/include/CGAL/version.h index 6840e2546e3..8cdee7a0aa3 100644 --- a/Installation/include/CGAL/version.h +++ b/Installation/include/CGAL/version.h @@ -17,12 +17,12 @@ #define CGAL_VERSION_H #ifndef SWIG -#define CGAL_VERSION 6.0-beta2 +#define CGAL_VERSION 6.0.1 #define CGAL_GIT_HASH abcdef #endif -#define CGAL_VERSION_NR 1060000920 +#define CGAL_VERSION_NR 1060011000 #define CGAL_SVN_REVISION 99999 -#define CGAL_RELEASE_DATE 20240701 +#define CGAL_RELEASE_DATE 20240925 #include diff --git a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake index df15f9e3108..e5e2176a20b 100644 --- a/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake +++ b/Installation/lib/cmake/CGAL/CGALConfigVersion.cmake @@ -1,8 +1,8 @@ set(CGAL_MAJOR_VERSION 6) set(CGAL_MINOR_VERSION 0) -set(CGAL_BUGFIX_VERSION 0) +set(CGAL_BUGFIX_VERSION 1) include(${CMAKE_CURRENT_LIST_DIR}/CGALConfigBuildVersion.cmake) -set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "6.0-beta2") +set(CGAL_VERSION_PUBLIC_RELEASE_VERSION "6.0.1") set(CGAL_VERSION_PUBLIC_RELEASE_NAME "CGAL-${CGAL_VERSION_PUBLIC_RELEASE_VERSION}") if (CGAL_BUGFIX_VERSION AND CGAL_BUGFIX_VERSION GREATER 0) diff --git a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Ray_3_do_intersect.h b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Ray_3_do_intersect.h index f4aa1e8e37c..1cafde62ad3 100644 --- a/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Ray_3_do_intersect.h +++ b/Intersections_3/include/CGAL/Intersections_3/internal/Line_3_Ray_3_do_intersect.h @@ -38,11 +38,8 @@ do_intersect(const typename K::Line_3& l, if(p0p1s == COLLINEAR) return true; - CGAL::Orientation stp0 = pred(r.source(), r.second_point(), l.point(0)); - if(stp0 == COLLINEAR) - return Ray_3_has_on_collinear_Point_3(r,l.point(0),k); - - return (p0p1s != stp0); + typename K::Point_3 lst = l.point(0) + (r.point(1) - r.point(0)); + return (pred(l.point(0), l.point(1), r.point(0), lst) != CGAL::POSITIVE); } template diff --git a/Intersections_3/test/Intersections_3/test_intersections_Line_3.cpp b/Intersections_3/test/Intersections_3/test_intersections_Line_3.cpp index 6fe55a40654..7285c22be72 100644 --- a/Intersections_3/test/Intersections_3/test_intersections_Line_3.cpp +++ b/Intersections_3/test/Intersections_3/test_intersections_Line_3.cpp @@ -156,9 +156,9 @@ public: Pl pl(pl0, pl1, pl2); P pl3 = pl0 + FT(this->r.get_double()) * V(pl1 - pl0) + FT(this->r.get_double()) * V(pl1 - pl0); if(pl.has_on(l1)) - Base::template check_intersection(L(pl3, l1), pl, L(pl3, l1)); // both points on the plane + Base::check_intersection(L(pl3, l1), pl, L(pl3, l1)); // both points on the plane else - Base::template check_intersection(L(pl3, l1), pl, pl3); // single point on the plane + Base::check_intersection(L(pl3, l1), pl, pl3); // single point on the plane if(pl.oriented_side(l0) != pl.oriented_side(l1)) // l0 xor l1 on pl is fine { @@ -232,6 +232,10 @@ public: check_no_intersection(L(p(0,0,0),p(1,0,0)), R(p(3,0,1),p(6,0,1))); check_no_intersection(L(p(0,0,0),p(1,0,0)), R(p(0,2,0),p(0,4,0))); check_no_intersection(L(p(0,0,0),p(1,0,0)), R(p(6,2,0),p(5,4,0))); + check_no_intersection(L(p(0,0,0),p(0,1,0)), R(p(1,-1,0),p(1,0,0))); + check_no_intersection(L(p(0,-10,0),p(0,-9,0)), R(p(1,-1,0),p(2,0,0))); + check_no_intersection(L(p(0,-10,0),p(0,0,0)), R(p(1,-1,0),p(2,0,0))); + check_no_intersection(L(p(0,0,0),p(0,1,0)), R(p(1,-1,0),p(2,0,0))); // Point intersection check_intersection (L(p(0,0,0),p(1,0,0)), R(p(3,0,0),p(6,4,0)), diff --git a/Intersections_3/test/Intersections_3/test_intersections_Ray_3.cpp b/Intersections_3/test/Intersections_3/test_intersections_Ray_3.cpp index e1d603d4a5e..1ce4ab53642 100644 --- a/Intersections_3/test/Intersections_3/test_intersections_Ray_3.cpp +++ b/Intersections_3/test/Intersections_3/test_intersections_Ray_3.cpp @@ -74,6 +74,14 @@ public: check_no_intersection (R(p(0,0,0), p(1,0,0)), R(p(0,1,0), p(0,2,0))); check_no_intersection (R(p(0,0,0), p(1,0,0)), R(p(-1,0,0), p(-1,-1,0))); + check_no_intersection (R(p(1,-1,0), p(2,0,0)), R(p(2,-1,0), p(3,0,0))); + check_no_intersection (R(p(1,-1,0), p(2,0,0)), R(p(2,-1,0), p(3,-1,0))); + check_no_intersection (R(p(1,-1,0), p(2,0,0)), R(p(2,-1,0), p(3,-2,0))); + check_no_intersection (R(p(0,0,0), p(0,1,0)), R(p(0,-1,0), p(1,-1,0))); + check_no_intersection (R(p(0,0,0), p(0,1,0)), R(p(-1,-3,0),p(2,0,0))); + check_no_intersection (R(p(0,0,0), p(0,1,0)), R(p(-2,-4,0),p(-1,-3,0))); + check_no_intersection (R(p(0,0,0), p(0,1,0)), R(p(1,-1,0), p(2,0,0))); + // Point check_intersection (R(p(0,0,0), p(1,0,0)), R(p(0,0,0), p(-1,0,0)), p(0,0,0)); @@ -88,6 +96,10 @@ public: check_intersection (R(p(0,0,0), p(1,0,0)), R(p(1,-2,0), p(1,-1,0)), p(1,0,0)); + check_intersection (R(p(0,0,0), p(1,0,0)), R(p(1,-2,0), p(1,-1,0)), + p(1,0,0)); + + // Segment check_intersection (R(p(0,0,0), p(1,0,0)), R(p(2,0,0), p(-3,0,0)), S(p(0,0,0), p(2,0,0)), false); @@ -161,6 +173,8 @@ public: for(int i=0; i::value_type vpm_value_type; // typedef typename boost::property_traits::key_type vpm_key_type; - //vertex indices are initialised to -1 + //vertex indices are initialized to -1 static void reset_ring_indices(std::vector < Vertex * >&vces, VertexPropertyMap& vpm); diff --git a/Kernel_23/include/CGAL/Kernel/function_objects.h b/Kernel_23/include/CGAL/Kernel/function_objects.h index 2e39f539753..5a7b0774e6d 100644 --- a/Kernel_23/include/CGAL/Kernel/function_objects.h +++ b/Kernel_23/include/CGAL/Kernel/function_objects.h @@ -1093,7 +1093,7 @@ namespace CommonKernelFunctors { public: typedef FT result_type; - // There are 25 combinaisons, we use a template. + // There are 25 combinations, we use a template. template FT operator()( const T1& t1, const T2& t2) const @@ -1108,7 +1108,7 @@ namespace CommonKernelFunctors { public: typedef FT result_type; - // There are 25 combinaisons, we use a template. + // There are 25 combinations, we use a template. template FT operator()( const T1& t1, const T2& t2) const diff --git a/Kernel_23/test/Kernel_23/Dimension.cpp b/Kernel_23/test/Kernel_23/Dimension.cpp index ab9086f0e22..e5b7315d690 100644 --- a/Kernel_23/test/Kernel_23/Dimension.cpp +++ b/Kernel_23/test/Kernel_23/Dimension.cpp @@ -9,7 +9,6 @@ #include #include -#include #include template < typename K > diff --git a/Kinetic_space_partition/examples/Kinetic_space_partition/kinetic_partition.cpp b/Kinetic_space_partition/examples/Kinetic_space_partition/kinetic_partition.cpp index 2eaaf47bbe0..dafdd2fb478 100644 --- a/Kinetic_space_partition/examples/Kinetic_space_partition/kinetic_partition.cpp +++ b/Kinetic_space_partition/examples/Kinetic_space_partition/kinetic_partition.cpp @@ -40,7 +40,7 @@ int main(int argc, char** argv) // Initialization of Kinetic_space_partition_3 object. // 'debug' set to true exports intermediate results into files in the working directory. // The resulting volumes are exported into a volumes folder, if the folder already exists. - KSP ksp(CGAL::parameters::verbose(true).debug(true)); + KSP ksp(CGAL::parameters::verbose(true).debug(false)); // Providing input polygons. ksp.insert(input_vertices, input_faces); diff --git a/Kinetic_space_partition/include/CGAL/KSP/utils.h b/Kinetic_space_partition/include/CGAL/KSP/utils.h index d8e99ddddc2..64a2d997296 100644 --- a/Kinetic_space_partition/include/CGAL/KSP/utils.h +++ b/Kinetic_space_partition/include/CGAL/KSP/utils.h @@ -41,7 +41,6 @@ #include #include #include -#include // Boost includes. #include diff --git a/Kinetic_space_partition/include/CGAL/KSP_3/Data_structure.h b/Kinetic_space_partition/include/CGAL/KSP_3/Data_structure.h index 5a64606321a..7ba219c5fa6 100644 --- a/Kinetic_space_partition/include/CGAL/KSP_3/Data_structure.h +++ b/Kinetic_space_partition/include/CGAL/KSP_3/Data_structure.h @@ -205,13 +205,6 @@ public: } }; - struct Reconstructed_model { - std::vector pfaces; - void clear() { - pfaces.clear(); - } - }; - private: std::vector m_support_planes; std::vector m_initial_support_planes; @@ -239,7 +232,6 @@ private: std::vector m_face2sp; std::vector > m_sp2input_polygon; std::map m_input_polygon_map; // Maps index of input polygon onto support plane indices. - Reconstructed_model m_reconstructed_model; public: Data_structure(const Parameters& parameters, const std::string &prefix) : to_exact(), from_exact(), m_parameters(parameters), m_prefix(prefix) { @@ -266,7 +258,6 @@ public: m_volumes.clear(); m_pface_neighbors.clear(); m_input_polygon_map.clear(); - m_reconstructed_model.clear(); } void precompute_iedge_data() { @@ -572,9 +563,6 @@ public: m_support_planes[sp_idx].get_border(m_intersection_graph, border); for (IEdge edge : border) { - if (m_intersection_graph.has_crossed(edge, sp_idx)) - continue; - Face_event fe; IkFT t = calculate_edge_intersection_time(sp_idx, edge, fe); if (t > 0) { @@ -594,9 +582,6 @@ public: const std::vector &face(std::size_t face_index) const { return m_face2vertices[face_index]; } const Point_3& vertex(std::size_t vertex_index) const { return m_vertices[vertex_index]; } - Reconstructed_model& reconstructed_model() { return m_reconstructed_model; } - const Reconstructed_model& reconstructed_model() const { return m_reconstructed_model; } - /******************************* ** SUPPORT PLANES ** ********************************/ diff --git a/Kinetic_space_partition/include/CGAL/KSP_3/Initializer.h b/Kinetic_space_partition/include/CGAL/KSP_3/Initializer.h index be34da2cb05..74b29a5d461 100644 --- a/Kinetic_space_partition/include/CGAL/KSP_3/Initializer.h +++ b/Kinetic_space_partition/include/CGAL/KSP_3/Initializer.h @@ -17,14 +17,14 @@ // CGAL includes. #include -#include -#include +//#include +//#include #include #include #include #include -#include -#include +//#include +//#include // Internal includes. #include @@ -74,7 +74,7 @@ private: using From_exact = CGAL::Cartesian_converter; using Bbox_3 = CGAL::Bbox_3; - using OBB_traits = CGAL::Oriented_bounding_box_traits_3; + //using OBB_traits = CGAL::Oriented_bounding_box_traits_3; using Parameters = KSP::internal::Parameters_3; diff --git a/Kinetic_space_partition/include/CGAL/KSP_3/Intersection_graph.h b/Kinetic_space_partition/include/CGAL/KSP_3/Intersection_graph.h index e86d696bc0b..3dffb18c35f 100644 --- a/Kinetic_space_partition/include/CGAL/KSP_3/Intersection_graph.h +++ b/Kinetic_space_partition/include/CGAL/KSP_3/Intersection_graph.h @@ -59,7 +59,6 @@ public: std::size_t order; std::map > faces; // For each intersecting support plane there is one pair of adjacent faces (or less if the edge is on the bbox) std::set planes; - std::set crossed; std::map intervals; // Maps support plane index to the kinetic interval. std::pair is the barycentric coordinate and intersection time. Edge_property() : line(std::size_t(-1)), order(edge_counter++) { } @@ -67,10 +66,8 @@ public: const Edge_property& operator=(const Edge_property& other) { line = other.line; - // order = other.order; faces = other.faces; planes = other.planes; - crossed = other.crossed; intervals = other.intervals; return *this; @@ -137,7 +134,6 @@ private: std::vector m_initial_part_of_partition; std::vector > m_initial_intervals; - std::vector > m_initial_crossed; public: Intersection_graph() : @@ -290,13 +286,11 @@ public: void initialization_done() { auto e = edges(); - m_initial_crossed.resize(e.size()); m_initial_intervals.resize(e.size()); std::size_t idx = 0; for (const auto& edge : e) { - m_initial_intervals[idx] = m_graph[edge].intervals; - m_initial_crossed[idx++] = m_graph[edge].crossed; + m_initial_intervals[idx++] = m_graph[edge].intervals; } m_initial_part_of_partition.resize(m_ifaces.size()); @@ -306,13 +300,11 @@ public: void reset_to_initialization() { auto e = edges(); - CGAL_assertion(e.size() == m_initial_crossed.size()); CGAL_assertion(e.size() == m_initial_intervals.size()); std::size_t idx = 0; for (auto edge : e) { m_graph[edge].intervals = m_initial_intervals[idx]; - m_graph[edge].crossed = m_initial_crossed[idx++]; } CGAL_assertion(m_ifaces.size() == m_initial_part_of_partition.size()); @@ -414,15 +406,6 @@ public: m_graph[boost::source(edge, m_graph)].point, m_graph[boost::target(edge, m_graph)].point); } - - bool has_crossed(const Edge_descriptor& edge, std::size_t sp_idx) { - return m_graph[edge].crossed.count(sp_idx) == 1; - } - - void set_crossed(const Edge_descriptor& edge, std::size_t sp_idx) { - CGAL_assertion(false); - m_graph[edge].crossed.insert(sp_idx); - } }; template std::size_t Intersection_graph::Edge_property::edge_counter = 0; diff --git a/Kinetic_space_partition/include/CGAL/Kinetic_space_partition_3.h b/Kinetic_space_partition/include/CGAL/Kinetic_space_partition_3.h index ab53a84a6d9..cabc3eabbd5 100644 --- a/Kinetic_space_partition/include/CGAL/Kinetic_space_partition_3.h +++ b/Kinetic_space_partition/include/CGAL/Kinetic_space_partition_3.h @@ -566,7 +566,15 @@ public: #ifndef DOXYGEN_RUNNING void partition(std::size_t k, FT& partition_time, FT& finalization_time, FT& conformal_time) { - m_volumes.clear(); + if (!m_volumes.empty()) { + for (Sub_partition& node : m_partition_nodes) { + node.m_data->reset_to_initialization(); + node.face_neighbors.clear(); + node.face2vertices.clear(); + node.volumes.clear(); + } + m_volumes.clear(); + } Timer timer; timer.start(); partition_time = 0; @@ -1040,11 +1048,13 @@ private: /*! \brief Face indices of the volume. + \tparam OutputIterator output iterator accepting Index + \param volume_index index of the query volume. - @return - vector of face indices. + \param it + output iterator where faces of the volume are put \pre created partition */ @@ -1061,8 +1071,7 @@ private: /*! \brief Mapping of a vertex index to its position. - @return - vector of points. + @return point of the vertex \pre created partition */ @@ -1085,11 +1094,12 @@ private: /*! \brief Vertices of a face. - \param volume_index - index of the query volume. + \tparam OutputIterator output iterator accepting `Point_3` - @return - vector of face indices. + \param face_index + index of the query face. + + \param it output iterator where points of the face are put \pre created partition */ @@ -1108,11 +1118,12 @@ private: /*! \brief Vertices of a face. - \param volume_index - index of the query volume. + \tparam OutputIterator output iterator accepting `EPECK::Point_3` - @return - vector of face indices. + \param face_index + index of the query face. + + \param it output iterator where points of the face are put \pre created partition */ @@ -2054,11 +2065,7 @@ private: return std::make_pair(-1, -1); } - void adapt_internal_edges(const CDTplus& cdtC, const std::vector &faces_node, std::vector >& c) { - assert(faces_node.size() == c.size()); - - //std::size_t not_skipped = 0; - + void adapt_internal_edges(const CDTplus& cdtC, std::vector >& c) { for (std::size_t f = 0; f < c.size(); f++) { std::vector faces_of_volume; // The face index is probably no longer valid and the full face has been replaced by a smaller face using merged indices @@ -2220,17 +2227,11 @@ private: adapt_faces(cdtC); - idx = 0; - for (auto& p : a_sets) { - adapt_internal_edges(cdtC, p.second, a_constraints[idx]); - idx++; - } + for (idx = 0; idx < a_sets.size(); idx++) + adapt_internal_edges(cdtC, a_constraints[idx]); - idx = 0; - for (auto& p : b_sets) { - adapt_internal_edges(cdtC, p.second, b_constraints[idx]); - idx++; - } + for (idx = 0; idx < b_sets.size(); idx++) + adapt_internal_edges(cdtC, b_constraints[idx]); } void make_conformal(Octree_node node) { @@ -2271,6 +2272,7 @@ private: m_points.clear(); m_points.reserve(count); + m_polygons.clear(); m_polygons.reserve(m_input_polygons.size()); To_exact to_exact; @@ -2313,6 +2315,7 @@ private: max_count = (std::max)(max_count, node); } + m_partition_nodes.clear(); m_partition_nodes.resize(leaf_count); m_node2partition.resize(max_count + 1, std::size_t(-1)); diff --git a/Kinetic_space_partition/package_info/Kinetic_space_partition/dependencies b/Kinetic_space_partition/package_info/Kinetic_space_partition/dependencies index 737b0d92b95..831b16749e8 100644 --- a/Kinetic_space_partition/package_info/Kinetic_space_partition/dependencies +++ b/Kinetic_space_partition/package_info/Kinetic_space_partition/dependencies @@ -1,20 +1,16 @@ Algebraic_foundations Arithmetic_kernel -Arrangement_on_surface_2 BGL -Boolean_set_operations_2 Bounding_volumes CGAL_Core Cartesian_kernel Circulator Combinatorial_map Convex_hull_2 -Convex_hull_3 Distance_2 Distance_3 Filtered_kernel Generalized_map -HalfedgeDS Hash_map Homogeneous_kernel Installation @@ -27,7 +23,6 @@ Kinetic_space_partition Linear_cell_complex Modular_arithmetic Number_types -Optimal_bounding_box Orthtree Point_set_3 Point_set_processing_3 @@ -43,7 +38,5 @@ Solver_interface Spatial_sorting Stream_support Surface_mesh -Surface_sweep_2 TDS_2 Triangulation_2 -Union_find diff --git a/Kinetic_space_partition/readme.md b/Kinetic_space_partition/readme.md deleted file mode 100644 index b654465de42..00000000000 --- a/Kinetic_space_partition/readme.md +++ /dev/null @@ -1,193 +0,0 @@ -** GENERAL ** - -All the test data are placed in the folder examples/data. The name of the folder indicates the type of data or its complexity. -The complexity 1 is low while the complexity 6 is high. - -Examples are the entry point to the package: -- kinetic_2d_example: 2D kinetic algorithm on a random set of segments -- kinetic_precomputed_shapes_example: 3D kinetic algorithm on a set of user-defined polygons read from a file -- kinetic_random_shapes_example: 3D kinetic algorithm on a set of random polygons, you can provide the number - of input polygons to be generated and the number of vertices each polygon should have -- kinetic_reconstruction_example: given a ply with classified point cloud, it first fits polygons using Region Growing, - then runs 3D kinetic, and finally filters out exterior volumes creating a reconstructed model - -Tests: -- kinetic_2d_stress_test: tests the 2D kinetic algorithm -- kinetic_3d_test_all: tests the 3D kinetic algorithm on all data from the examples folder - -The 3D algorithm is running on macOS with zero warnings. On Windows and Linux, it compiles and works, -but can generate warnings related to conversions between std:size_t and int e.g. or similar warnings. -The 2D algorithm should work on all platforms as well. - - -** CURRENT ISSUES ** - - --- EPICK versus EPECK -- - -By running: -./kinetic_precomputed_shapes_example data/stress-test-4/test-9-rnd-polygons-12-4.off - -first with EPICK and then with EPECK shows a huge difference in runtime. This -data set contains 12 random polygons, each having 4 vertices. The time for EPICK is -milliseconds while for EPECK is about 3 minutes. It can also be noticed that most of -the time is spent at the last iterations while the first iterations are very fast. -It is even slower for `Simple_cartesian`. - -It is probably happening because at the latest iterations the computation involves -all operations carried out from the first iteration. Evaluating these cascading operations -is a slow process. E.g. computing an intersection between two lines at the first iterations -takes seconds while at the higher iterations it takes minutes. - -Another issue shows up when running the code with the following data set: -./kinetic_precomputed_shapes_example data/real-data-test/test-40-polygons.ply 6 -that is with k = 6, where k is the number of allowed intersections between support planes -of the input polygons. Here, at about 5300 iteration, assertions start failing but not because -some parts of the algorithm are not implemented (as indicated in the TODO) but because -the scaling is no longer uniform due to the accumulating errors. It leads to wrong configurations -and hence to the wrong events, which in practice with the correct precision cannot happen. - - --- Possible solutions -- - -- Use EPICK and compute always with respect to the input. E.g. intersections between lines should be -done not between lines at the current and previous iterations but between lines at the current -and first iterations. The reason for this optimization is that if we use simply EPICK, -when the number of input polygons grow, we bump into an issue of the accumulating error that gets -bigger and bigger with each iteration and at some point can break the results. It does not happen -with EPECK but we lose speed there. - -- Use EPECK only when it is absolutely necessary like when computing intersections and -use EPICK for all other computations. This way we avoid accumulating errors and should -preserve speed. - -A few ideas shortly after the meeting with Sebastien: -- speed up kinetic with EPECK by optimizing the parts, which are slow, vtune it -- use different speed for each polygon edge during the uniform scaling, a similar - trick to what is used in the straight skeleton now -- point_2() wrapper inside Support_plane.h: it can compute point not based on the point constructed - at the previous event (which is cascading) but based on the interesting polygon edge and intersection graph edge -- avoid certain events in the queue or keep track only of the last 10 events instead of all of them - - -** INTERNALS ** - - --- File descriptions -- - -- KSR sub-folder, used in both KSR2 and KSR3: - - - conversions.h: the kinetic_traits class that performs intersections, all intersections - in the code are called from this class, here the hybrid mode could be potentially implemented. - - - debug.h: a file with a bunch of functions which enable to export / dump to a file - different intermediate steps, events, data structure, etc. - - - enum.h: enumerations used by the reconstruction code from the Reconstruction.h. - - - parameters.h: internal parameters used in the code. - - - property_map.h: property maps used by the reconstruction code from the Reconstruction.h. - - - utils.h: different internal utilities such as normals, distances, angles, etc. - the most important one is tolerance(): this is a global tolerance used everywhere in the code - -- KSR_2 sub-folder, 2D kinetic algorithm, works and tested, fully implemented by Simon. - -- KSR_3 sub-folder, 3D kinetic algorithm + 3D reconstruction algorithm: - - - Data_structure.h: a class with all conversions and all basic operations, which are - performed on the polygons and during events, it also stores the main intersection graph - and all support planes. - - - Event_queue.h: a wrapper around boost multi_index_container that represents a queue of - all events, which can be sorted by time or vertex type. It is based on doubles so even - when we use EPECK globally, we need to convert to double here because boost multi_index_container - fails to work with EPECK due to the fact that values represented by EPECK can vary when converted - to_double() or to_interval(). - - - Event.h: represents different event types used in the propagation. - - - Intersection_graph.h: a boost adjacency_list graph that stores an initial intersection graph - fully in 3D that is used as constraints for kinetic propagation. - - - Support_plane.h: a wrapper around a support plane for each input polygon that stores a 2D - surface mesh that represents an input polygon. So, initially this mesh has only 1 face that is - input polygon while during propagation it is updated and new vertices, faces are added. We preserve - the uniform scaling of the input polygon and validity of this mesh after each event. If any of these - two fails, the whole algorithm fails. At the end of the support plane header, there is an overload - of the operator()== that is used to compare if two planes are equal. It heavily depends on the - tolerance parameters and in case two planes are found to be equal, they are merged at the initialization step. - - - Initializer.h: a class that gets input polygons, creates an enlarged bounding box, removes all - near-collinear vertices of each polygon, merges all near-coplanar support planes, then inserts each - support plane and intersects it with the bounding box. At the final step, it calls Polygon_splitter - class in order to intersect all polygons within the bounding box, one support plane at a time. - - - Polygon_splitter.h: given a support plane, its original polygon, and a set of intersection edges created - by intersecting all support planes with the bounding box (see Initializer.h), it builds a CDT, inserts all these edges - in the CDT, marks all interior and exterior faces and creates a proper 2D surface mesh. This class can be parameterized - by any kernel independently of the input kernel. - - - Propagation.h: is called after Initializer.h has done its work, this class creates an initial queue of - events for all vertices of all polygons and handles these events one by one. This is the most time-consuming - part of the total algorithm. The queue is updated and rebuilt until no valid events show up. This class can be parameterized - by any kernel independently of the input kernel. - - - Finalizer.h: is called after Propagation.h, this class receives a set of 2D surface meshes from the propagation - and an initial intersection graph and does three things: first it checks the validity of the results, it then searches - for dangling / hanging faces if any and fills the gaps; and finally creates 3D volumes bounded by all faces of the 2D surface meshes. - This class can be parameterized by any kernel independently of the input kernel. - - - Reconstruction.h: this class first gets a point cloud with or without semantic labels. If the labels are missing, some - parts of the code have to be still finished. However, if labels are present, it assumes they come from urban areas that is they are - walls, roofs, ground, and trees. It removes all tree points, fits a polygon to the ground points, runs region growing - separately for wall and roof points and detects convex planar polygons, which approximate the input point cloud. - Next, it runs 3D kinetic on these input polygons + ground polygon and gets a set of volumes, which partition the 3D space. - It then estimates a probability of each volume to be inside or outside the point cloud using Visibility.h and runs the graph cut - algorithm on these estimations using Graphcut.h. At the end, it removes all volumes, which have been labeled as exterior volumes - and returns a reconstructed model: 3D surface mesh that approximates the input point cloud (or buildings in case labels are urban related). - - - Visibility.h: estimates a probability of each partition volume to be inside or outside a point cloud by using normals - of the input points and sampling each volume. - - - Graphcut.h: takes initially estimated probabilities for each volume to be interior or exterior with respect to the point cloud, - computed by Visibility.h, creates a graph where each node is a volume and each edge connects volumes to their neighboring volumes, - and runs the mincut - maxflow Boykov optimization algorithm to define which volumes are inside and outside the point cloud. - All edges are weighted by the face area that adjacent to two incident volumes and all nodes are weighted by the volume itself. - -- Kinetic_shape_reconstruction_2.h: is an entry point to the 2D kinetic propagation. - -- Kinetic_shape_reconstruction_3.h: is an entry point to the 3D kinetic propagation and 3D kinetic reconstruction algorithms. - - --- Epsilon usage inside the code -- - -Note that epsilon tolerance is used throughout the code. It is defined inside utils.h -in the function tolerance(). It is used everywhere where we expect a result of certain precision -but it may not be the case. We check if we outside this tolerance and apply different sub-algorithms -in order to be sure we that will generate the right results. This is mostly used for EPICK. When using EPECK, -the precision is higher and the tolerance should be satisfied until there is a bug. - - --- Important parts of the code -- - - - point_2() wrapper from the Support_plane.h. Currently all original points are 3D, - this wrapper takes a point, and constructs the corresponding 2D point for the chosen - 2D support plane and at the chosen time step. That means all these points are constructed - that is a weak point when using EPECK because it is slow. - - - operator==() at the bottom of the Support_plane.h: controls if two near-coplanar planes should - be merged. If we merge too many planes because our input parameters are very weak, we fail to create - a valid partition. If we do not merge at all, the near-coplanar support planes may lead to intricated - errors in the kinetic propagation due to numerical instabilities. - - - parameters: all all explained in the parameters.h. The parameters used in the Reconstruction.h are defined - in the file examples/include/Parameters.h. - - - FUTURE POINTS AND DIRECTIONS section at the bottom of the Data_structure.h, this is where the future points - are computed and this is a part of the code that leads to multiple precision issues, identifying a future - point from the previous event is hard, so instead we simply translate the lines and intersect them at the next - time step to get the point at which our current vertex will be later, but these intersections are imprecise. - If we lose precision here, we fail to scale polygon uniformly so our point can end up behind the bounding box - or in the direction opposite to the one we need, especially if the lines that we intersect are near parallel. diff --git a/Kinetic_space_partition/timings.md b/Kinetic_space_partition/timings.md deleted file mode 100644 index 66c0257e24a..00000000000 --- a/Kinetic_space_partition/timings.md +++ /dev/null @@ -1,134 +0,0 @@ -Latest timings in Debug/Release for k = 1, sec.: - -# stress test 0 -test-6-polygons : 0.25661897659301757812 / 0.067038059234619140625 - -# stress test 1 -test-8-rnd-polygons-3-4 : 0.11995100975036621094 / 0.041974067687988281250 - -# stress test 2 -test-6-rnd-polygons-3-4 : 0.09911918640136718750 / 0.033115148544311523438 - -# stress test 3 -test-5-rnd-polygons-1-3 : 1.00860095024108886720 / 0.023632049560546875000 -test-10-rnd-polygons-5-4: 0.38532781600952148438 / 0.081948041915893554688 - -# stress test 4 -test-4-rnd-polygons-4-6 : 0.12927484512329101562 / 0.057893991470336914062 -test-5-rnd-polygons-6-4 : 1.25370502471923828120 / 0.145575046539306640620 -test-6-rnd-polygons-5-6 : 0.22723698616027832031 / 0.079273939132690429688 -test-8-rnd-polygons-7-8 : 0.33871507644653320312 / 0.106122970581054687500 -test-9-rnd-polygons-12-4: 3.80337786674499511720 / 0.498121976852416992190 - -# stress test 5 -test-1-rnd-polygons-15-6: 7.18183803558349609380 / 1.013967990875244140600 -test-2-rnd-polygons-20-4: 39.7726359367370605470 / 2.458597183227539062500 - -# real data -test-10-polygons : 1.63361907005310058590 / 0.273458003997802734380 -test-15-polygons : 4.62825703620910644530 / 0.625633955001831054690 -test-20-polygons : 21.0442938804626464840 / 1.322691202163696289100 - ----------------------------------------- - -Initial timings in Debug/Release for k = 1, sec.: - -# stress test 0 -test-6-polygons : 1.74040412902832031250 / 0.93602585792541503906 // uniform - -# stress test 1 -test-8-rnd-polygons-3-4 : 0.56194806098937988281 / 0.32906508445739746094 // random - -# stress test 2 -test-6-rnd-polygons-3-4 : 0.45945405960083007812 / 0.30190992355346679688 // random - -# stress test 3 -test-5-rnd-polygons-1-3 : 5.19128680229187011720 / 2.26561689376831054690 // long queue -test-10-rnd-polygons-5-4: 1.91159391403198242190 / 0.86900997161865234375 // random - -# stress test 4 -test-4-rnd-polygons-4-6 : 0.65437197685241699219 / 0.40509605407714843750 // random -test-5-rnd-polygons-6-4 : 5.85984015464782714840 / 1.62112498283386230470 // long queue -test-6-rnd-polygons-5-6 : 1.26136302947998046880 / 0.79284501075744628906 // random -test-8-rnd-polygons-7-8 : 1.93336105346679687500 / 1.18615603446960449220 // random -test-9-rnd-polygons-12-4: 20.0204198360443115230 / 10.0104908943176269530 // random - -# stress test 5 -test-1-rnd-polygons-15-6: 33.7394499778747558590 / 19.8511409759521484380 // random -test-2-rnd-polygons-20-4: 146.272709131240844730 / 81.1140849590301513670 // random - -# real data -test-10-polygons : 12.0924539566040039060 / 7.11851215362548828120 // real -test-15-polygons : 23.6766490936279296880 / 14.2001228332519531250 // real -test-20-polygons : 99.7220361232757568360 / 56.3559079170227050780 // real - ----------------------------------------- - -Kinetic Release (Ours) exact(inexact) timings in Release for k = 1, sec.: - -# stress test 0 -test-6-polygons : 0.070086956024169921875(0.0031790733337402343750)/0.0007059574127197265625/0.0011909008026123046875 - -# stress test 1 -test-8-rnd-polygons-3-4 : 0.036616086959838867188(0.0014970302581787109375)/0.0005979537963867187500/0.0005519390106201171875 - -# stress test 2 -test-6-rnd-polygons-3-4 : 0.031713008880615234375(0.0014698505401611328125)/0.0004079341888427734375/0.0003998279571533203125 - -# stress test 3 -test-5-rnd-polygons-1-3 : 0.013506889343261718750(0.0007200241088867187500)/0.0159411430358886718750/0.0001947879791259765625 -test-10-rnd-polygons-5-4: 0.082195997238159179688(0.0027201175689697265625)/0.0013699531555175781250/0.0011131763458251953125 - -# stress test 4 -test-4-rnd-polygons-4-6 : 0.057297945022583007812(0.0021529197692871093750)/0.0004389286041259765625/0.0008690357208251953125 -test-5-rnd-polygons-6-4 : 0.143490076065063476560(0.0038468837738037109375)/0.0038821697235107421875/0.0029499530792236328125 -test-6-rnd-polygons-5-6 : 0.079412937164306640625(0.0025489330291748046875)/0.0006108283996582031250/0.0010251998901367187500 -test-8-rnd-polygons-7-8 : 0.107537984848022460940(0.0038201808929443359375)/0.0009238719940185546875/0.0017449855804443359375 -test-9-rnd-polygons-12-4: 0.496004104614257812500(0.0116169452667236328120)/0.0060429573059082031250/0.0100910663604736328120 - -# stress test 5 -test-1-rnd-polygons-15-6: 0.980010986328125000000(0.0224440097808837890620)/0.0067451000213623046875/0.0224370956420898437500 -test-2-rnd-polygons-20-4: 2.400671005249023437500(0.0474650859832763671880)/0.0210092067718505859380/0.0636138916015625000000 - -# real data -test-10-polygons : 0.270509958267211914060(0.0079689025878906250000)/0.0023949146270751953125/0.0052959918975830078125 -test-15-polygons : 0.587618112564086914060(0.0166199207305908203120)/0.0055429935455322265625/0.0223670005798339843750 -test-20-polygons : 1.292979955673217773400(0.0307259559631347656250)/0.0119550228118896484380/0.0364160537719726562500 - ----------------------------------------- - -Kinetic Release (JPs) timings in Release for k = 1, sec.: - -# stress test 0 -test-6-polygons : 0.0278370000000000006320/0.0347570000000000031700/0.0290839999999999987420 -> 0.093272999999999994802 - -# stress test 1 -test-8-rnd-polygons-3-4 : 0.0131030000000000000640/0.0126979999999999992180/0.0144899999999999994080 -> 0.041284000000000001251 - -# stress test 2 -test-6-rnd-polygons-3-4 : 0.0152639999999999997900/0.0097359999999999998627/0.0176100000000000006530 -> 0.043695999999999998731 - -# stress test 3 -test-5-rnd-polygons-1-3 : 0.0081639999999999993824/0.0024559999999999998499/0.0104040000000000000540 -> 0.021806999999999999995 -test-10-rnd-polygons-5-4: 0.0250879999999999991900/0.0397320000000000034260/0.0229740000000000013650 -> 0.089145000000000002016 - -# stress test 4 -test-4-rnd-polygons-4-6 : 0.0208039999999999995760/0.0158930000000000008760/0.0158310000000000013210 -> 0.053793000000000000538 -test-5-rnd-polygons-6-4 : 0.0386820000000000011050/0.0381319999999999992290/0.0235430000000000014260 -> 0.101880999999999999340 -test-6-rnd-polygons-5-6 : 0.0302249999999999983960/0.0265990000000000011150/0.0220519999999999986860 -> 0.080500000000000002109 -test-8-rnd-polygons-7-8 : 0.0391299999999999981170/0.0386449999999999987970/0.0259939999999999997450 -> 0.105458999999999997190 -test-9-rnd-polygons-12-4: 0.0950430000000000024810/0.1412920000000000009300/0.0490410000000000012580 -> 0.289791000000000020800 - -# stress test 5 -test-1-rnd-polygons-15-6: 0.1477860000000000007000/0.2010520000000000084800/0.0595559999999999978290 -> 0.413885000000000002900 -test-2-rnd-polygons-20-4: 0.2607679999999999997900/0.4968259999999999898500/0.0970730000000000065040 -> 0.864171000000000022470 - -# real data -test-10-polygons : 0.0910910000000000052990/0.1207400000000000001000/0.0345089999999999980100 -> 0.249154999999999987590 -test-15-polygons : 0.1489729999999999943100/0.1405540000000000122600/0.0711249999999999937830 -> 0.366400999999999976710 -test-20-polygons : 0.2263779999999999958900/0.5643979999999999552800/0.1116729999999999944900 -> 0.912132000000000053850 - -# Many polygons: - -50 polygons : 24.09685707092285156250/0.20391988754272460938/4.08338499069213867188 -50 polygons : 16.14023399353027343750/0.12071609497070312500/1.23236894607543945312 diff --git a/Kinetic_space_partition/todo.md b/Kinetic_space_partition/todo.md deleted file mode 100644 index 72100cda68b..00000000000 --- a/Kinetic_space_partition/todo.md +++ /dev/null @@ -1,26 +0,0 @@ -TODO: - -- Try to add a custom exact queue that supports EPECK, because now we convert to doubles there. - -- What about accumulating errors in EPICK? Maybe we could use hybrid mode doing only important computations exactly like intersections e.g. Another idea is to compute intersections with respect to the original input data instead of the data obtained from the previous iteration. - -- Fix case with touching along an edge polygons at the initialization step, they should propagate while now they do not. See e.g. the edge-case-test/test-same-time.off data set. - -- Can we avoid any inexact computations such as sqrt completely? - -- Fix stress-test-6 cases - they are random, their results may depend on an initial unlucky configuration so we probably need to implement random perturbation before running them as in the original paper. - -- Should we also add random perturbation that can be on or off depending on the input. - -- EPICK fails: 40 polygons k = 1 and coplanarity = 0.1 or 40 polygons k = 6 and coplanarity = 0.5; 40 polygons - the one from real-data-test; coplanarity is from Support_plane.h operator==(). - -- EPECK stress-test-5/test-2-rnd-polygons-20-4 runs extremely slow, does it actually finish? Btw real data with the same number of polygons work much faster! Maybe we better test it from now on only on real data because this is what is going to be most-likely used in real life. Can this speed issue be related to conversion from exact to inexact when creating a queue? It seems to hang at the end of each event that is when we check and continue execution with the next event. Maybe the event queue access is so slow? Do we utilize the technique from the paper, storing and accessing only the last three events? The values maybe grow so much that each intersection takes very long time if we use exact type everywhere. - -- Try to avoid errors by using a smaller step. - -- Make intersections a part of kinetic traits that is exact. - -- Try to find out where we lose precision the most. - -- In naive hybrid mode, we manage to succeed for more events, which means that making more exact computations improves the algorithm, that is a good sign, -however doing them all exactly is very slow, so the trade-off must be found. \ No newline at end of file diff --git a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/ksr_basic.cpp b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/ksr_basic.cpp index ce3ef97db1d..d34ab8a44ef 100644 --- a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/ksr_basic.cpp +++ b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/ksr_basic.cpp @@ -25,23 +25,23 @@ int main() { auto param = CGAL::parameters::maximum_distance(0.5) .maximum_angle(10) .k_neighbors(12) - .minimum_region_size(50); + .minimum_region_size(250); // Algorithm. KSR ksr(point_set, param); ksr.detection_and_partition(1, param); - std::cout << ksr.detect_planar_shapes() << " planar shapes detected" << std::endl; + std::cout << ksr.detected_planar_shapes().size() << " planar shapes detected" << std::endl; std::vector vtx; std::vector > polylist; - ksr.reconstruct_with_ground(0.5, std::back_inserter(vtx), std::back_inserter(polylist)); + ksr.reconstruct_with_ground(0.7, std::back_inserter(vtx), std::back_inserter(polylist)); if (polylist.size() > 0) { std::cout << polylist.size() << " faces in reconstruction" << std::endl; - CGAL::IO::write_polygon_soup("building_0.5.ply", vtx, polylist); + CGAL::IO::write_polygon_soup("building_0.7.ply", vtx, polylist); return EXIT_SUCCESS; } else { diff --git a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/ksr_parameters.cpp b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/ksr_parameters.cpp index 123c7066af3..9ac52e26b9c 100644 --- a/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/ksr_parameters.cpp +++ b/Kinetic_surface_reconstruction/examples/Kinetic_surface_reconstruction/ksr_parameters.cpp @@ -13,19 +13,19 @@ #include "include/Parameters.h" #include "include/Terminal_parser.h" -using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel; -using FT = typename Kernel::FT; -using Point_3 = typename Kernel::Point_3; -using Vector_3 = typename Kernel::Vector_3; +using Kernel = CGAL::Exact_predicates_inexact_constructions_kernel; +using FT = typename Kernel::FT; +using Point_3 = typename Kernel::Point_3; +using Vector_3 = typename Kernel::Vector_3; using Segment_3 = typename Kernel::Segment_3; -using Point_set = CGAL::Point_set_3; -using Point_map = typename Point_set::Point_map; -using Normal_map = typename Point_set::Vector_map; +using Point_set = CGAL::Point_set_3; +using Point_map = typename Point_set::Point_map; +using Normal_map = typename Point_set::Vector_map; using KSR = CGAL::Kinetic_surface_reconstruction_3; -using Parameters = CGAL::KSR::All_parameters; +using Parameters = CGAL::KSR::All_parameters; using Terminal_parser = CGAL::KSR::Terminal_parser; using Timer = CGAL::Real_timer; @@ -50,10 +50,10 @@ void parse_terminal(Terminal_parser& parser, Parameters& parameters) { parser.add_str_parameter("-data", parameters.data); // Shape detection. - parser.add_val_parameter("-kn" , parameters.k_neighbors); - parser.add_val_parameter("-dist" , parameters.maximum_distance); + parser.add_val_parameter("-kn", parameters.k_neighbors); + parser.add_val_parameter("-dist", parameters.maximum_distance); parser.add_val_parameter("-angle", parameters.maximum_angle); - parser.add_val_parameter("-minp" , parameters.min_region_size); + parser.add_val_parameter("-minp", parameters.min_region_size); // Shape regularization. @@ -167,10 +167,18 @@ int main(const int argc, const char** argv) { // Algorithm. KSR ksr(point_set, param); + FT max_d, max_dev; + std::size_t num; + ksr.estimate_detection_parameters(max_d, max_dev, num); + std::cout << "d: " << max_d << std::endl; + std::cout << "dev: " << max_dev << std::endl; + std::cout << "num: " << num << std::endl; + Timer timer; timer.start(); std::size_t num_shapes = ksr.detect_planar_shapes(param); + std::cout << num_shapes << " detected planar shapes" << std::endl; FT after_shape_detection = timer.time(); @@ -198,12 +206,12 @@ int main(const int argc, const char** argv) { FT after_reconstruction = timer.time(); if (polylist.size() > 0) - CGAL::IO::write_polygon_soup("polylist_" + std::to_string(parameters.graphcut_lambda) + (parameters.use_ground ? "_g" : "_") + ".off", vtx, polylist); + CGAL::IO::write_polygon_soup("building_c_" + std::to_string(parameters.graphcut_lambda) + (parameters.use_ground ? "_g" : "_") + ".off", vtx, polylist); timer.stop(); const FT time = static_cast(timer.time()); - std::vector lambdas{0.3, 0.5, 0.6, 0.7, 0.73, 0.75, 0.77, 0.8, 0.9, 0.95, 0.99}; + std::vector lambdas{ 0.3, 0.5, 0.6, 0.7, 0.73, 0.75, 0.77, 0.8, 0.9, 0.95, 0.99 }; bool non_empty = false; @@ -214,7 +222,6 @@ int main(const int argc, const char** argv) { vtx.clear(); polylist.clear(); - if (parameters.use_ground) ksr.reconstruct_with_ground(l, std::back_inserter(vtx), std::back_inserter(polylist)); else @@ -223,7 +230,7 @@ int main(const int argc, const char** argv) { if (polylist.size() > 0) { non_empty = true; - CGAL::IO::write_polygon_soup("polylist_" + std::to_string(l) + (parameters.use_ground ? "_g" : "_") + ".off", vtx, polylist); + CGAL::IO::write_polygon_soup("building_c_" + std::to_string(l) + (parameters.use_ground ? "_g" : "_") + ".off", vtx, polylist); } } diff --git a/Kinetic_surface_reconstruction/include/CGAL/Kinetic_surface_reconstruction_3.h b/Kinetic_surface_reconstruction/include/CGAL/Kinetic_surface_reconstruction_3.h index 7df975df13c..6fdd83b13c3 100644 --- a/Kinetic_surface_reconstruction/include/CGAL/Kinetic_surface_reconstruction_3.h +++ b/Kinetic_surface_reconstruction/include/CGAL/Kinetic_surface_reconstruction_3.h @@ -94,6 +94,9 @@ public: const NamedParameters& np = CGAL::parameters::default_values()) : m_points(points), m_ground_polygon_index(-1), m_kinetic_partition(np) { m_verbose = parameters::choose_parameter(parameters::get_parameter(np, internal_np::verbose), false); m_debug = parameters::choose_parameter(parameters::get_parameter(np, internal_np::debug), false); + + m_point_map = Point_set_processing_3_np_helper::get_point_map(m_points, np); + m_normal_map = Point_set_processing_3_np_helper::get_normal_map(m_points, np); } /*! @@ -133,7 +136,7 @@ public: \cgalParamNBegin{minimum_region_size} \cgalParamDescription{Shape detection: minimum number of 3D points a region must have} \cgalParamType{`std::size_t`} - \cgalParamDefault{1% of input points} + \cgalParamDefault{0.5% of input points} \cgalParamNEnd \cgalParamNBegin{angle_tolerance} \cgalParamDescription{Shape regularization: maximum allowed angle in degrees between plane normals used for parallelism, orthogonality, and axis symmetry} @@ -189,9 +192,6 @@ public: m_regions.clear(); m_planar_regions.clear(); - m_point_map = Point_set_processing_3_np_helper::get_point_map(m_points, np); - m_normal_map = Point_set_processing_3_np_helper::get_normal_map(m_points, np); - create_planar_shapes(np); CGAL_assertion(m_planes.size() == m_polygons.size()); @@ -266,7 +266,7 @@ public: \cgalParamNBegin{minimum_region_size} \cgalParamDescription{Shape detection: minimum number of 3D points a region must have} \cgalParamType{`std::size_t`} - \cgalParamDefault{1% of input points} + \cgalParamDefault{0.5% of input points} \cgalParamNEnd \cgalParamNBegin{angle_tolerance} \cgalParamDescription{Shape regularization: maximum allowed angle in degrees between plane normals used for parallelism, orthogonality, and axis symmetry} @@ -323,6 +323,31 @@ public: partition(k); } + void estimate_detection_parameters(FT& max_distance, FT& normal_dev, std::size_t& min_inliers) { + if (!m_neighbor_query) { + m_neighbor_query = std::unique_ptr(new Neighbor_query(m_points, parameters::point_map(m_point_map).k_neighbors(12))); + m_sorting = std::unique_ptr(new Sorting(m_points, *m_neighbor_query, parameters::point_map(m_point_map))); + m_sorting->sort(); + } + + max_distance = 4 * m_sorting->mean_distance(); + normal_dev = m_sorting->mean_deviation(); + min_inliers = m_points.size() * 0.005; // difficult to estimate as it depends on the kind of data, e.g., object scan vs. large scale urban acquisition + } + + std::size_t estimate_max_subdivision_depth() { + std::size_t max_depth = 1; + std::size_t num_shapes = m_polygon_indices.size(); + + if (num_shapes > 60) + while (num_shapes > 20) { + max_depth++; + num_shapes >>= 3; + } + + return max_depth; + } + /*! \brief initializes the kinetic partition. @@ -347,8 +372,6 @@ public: */ template void initialize_partition(const CGAL_NP_CLASS& np = parameters::default_values()) { - m_kinetic_partition.insert(m_polygon_pts, m_polygon_indices, np); - m_kinetic_partition.initialize(np); } @@ -408,6 +431,9 @@ public: */ template void reconstruct_with_ground(FT lambda, OutputPointIterator pit, OutputPolygonIterator polyit) { + if (m_kinetic_partition.number_of_volumes() == 0) + return; + KSR_3::Graphcut gc(lambda); // add ground consideration here @@ -482,6 +508,9 @@ public: */ template void reconstruct(FT lambda, std::map external_nodes, OutputPointIterator pit, OutputPolygonIterator polyit) { + if (m_kinetic_partition.number_of_volumes() == 0) + return; + KSR_3::Graphcut gc(lambda); // add node consideration here @@ -565,6 +594,9 @@ private: bool m_verbose; bool m_debug; + std::unique_ptr m_neighbor_query; + std::unique_ptr m_sorting; + Point_range &m_points; Point_map m_point_map; Normal_map m_normal_map; @@ -619,7 +651,9 @@ private: m_face_inliers.clear(); auto face_range = m_lcc.template one_dart_per_cell<2>(); + m_faces_lcc.clear(); m_faces_lcc.reserve(face_range.size()); + m_attrib2index_lcc.clear(); for (auto& d : face_range) { typename LCC::Dart_descriptor dh = m_lcc.dart_descriptor(d); @@ -643,9 +677,13 @@ private: // Create value arrays for graph cut m_face_inliers.resize(m_faces_lcc.size()); m_face_area.resize(m_faces_lcc.size()); + m_face_area_lcc.clear(); m_face_area_lcc.resize(m_faces_lcc.size()); + m_face_neighbors_lcc.clear(); m_face_neighbors_lcc.resize(m_faces_lcc.size(), std::pair(-1, -1)); + m_neighbors2index_lcc.clear(); + m_cost_matrix.clear(); m_cost_matrix.resize(2); m_cost_matrix[0].resize(m_kinetic_partition.number_of_volumes() + 6, 0); m_cost_matrix[1].resize(m_kinetic_partition.number_of_volumes() + 6, 0); @@ -839,9 +877,12 @@ private: \param pit an output iterator taking Point_3. - \param triit + \param polyit an output iterator taking std::vector. + \param lambda + trades data faithfulness of the reconstruction for low complexity. Must be in the range `[0, 1)`. + \pre successful reconstruction */ template @@ -981,7 +1022,7 @@ private: \param pit an output iterator taking `Point_3`. - \param triit + \param polyit an output iterator taking `std::vector`. \pre successful reconstruction @@ -1534,7 +1575,7 @@ private: // Start extraction of a border from each dart (each dart is a 1/n-edge) // Search starting darts by searching faces //borders contains Attribute<0> handles casted to std::size_t - std::vector processed(m_lcc.number_of_darts(), false); + std::vector processed(m_lcc.upper_bound_on_dart_ids(), false); borders_per_region.resize(region_index.size()); @@ -1687,13 +1728,8 @@ private: m_volumes[i] = 0; } -// std::size_t count_faces = 0; -// std::size_t count_points = 0; - From_exact from_exact; -// std::size_t idx = 0; - for (std::size_t i = 0; i < m_faces_lcc.size(); i++) { std::size_t v[] = { std::size_t(-1), std::size_t(-1) }; Point_3 c[2]; @@ -1776,17 +1812,40 @@ private: } if (m_verbose) std::cout << "* getting planar shapes using region growing" << std::endl; + FT xmin, ymin, zmin, xmax, ymax, zmax; + auto pit = m_points.begin(); + const Point_3& p = get(m_point_map, *pit); + xmin = xmax = p.x(); + ymin = ymax = p.y(); + zmin = zmax = p.z(); + + pit++; + + while (pit != m_points.end()) { + const Point_3& p = get(m_point_map, *pit); + xmin = (std::min)(xmin, p.x()); + xmax = (std::max)(xmax, p.x()); + ymin = (std::min)(ymin, p.y()); + ymax = (std::max)(ymax, p.y()); + zmin = (std::min)(zmin, p.z()); + zmax = (std::max)(zmax, p.z()); + pit++; + } + + FT diag = CGAL::sqrt((xmax - xmin) * (xmax - xmin) + (ymax - ymin) * (ymax - ymin) + (zmax - zmin) * (zmax - zmin)); + // Parameters. const std::size_t k = parameters::choose_parameter(parameters::get_parameter(np, internal_np::k_neighbors), 12); - const FT max_distance_to_plane = parameters::choose_parameter(parameters::get_parameter(np, internal_np::maximum_distance), FT(1)); + const FT max_distance_to_plane = parameters::choose_parameter(parameters::get_parameter(np, internal_np::maximum_distance), diag * 0.02); const FT max_accepted_angle = parameters::choose_parameter(parameters::get_parameter(np, internal_np::maximum_angle), FT(15)); - const std::size_t min_region_size = parameters::choose_parameter(parameters::get_parameter(np, internal_np::minimum_region_size), 50); + const std::size_t min_region_size = parameters::choose_parameter(parameters::get_parameter(np, internal_np::minimum_region_size), m_points.size() * 0.005); m_detection_distance_tolerance = max_distance_to_plane; // Region growing. - Neighbor_query neighbor_query = CGAL::Shape_detection::Point_set::make_k_neighbor_query( - m_points, CGAL::parameters::k_neighbors(k)); + if (!m_neighbor_query) { + m_neighbor_query = std::unique_ptr(new Neighbor_query(m_points, parameters::point_map(m_point_map).k_neighbors(k))); + } Region_type region_type = CGAL::Shape_detection::Point_set::make_least_squares_plane_fit_region( m_points, @@ -1795,11 +1854,13 @@ private: maximum_angle(max_accepted_angle). minimum_region_size(min_region_size)); - Sorting sorting = CGAL::Shape_detection::Point_set::make_least_squares_plane_fit_sorting(m_points, neighbor_query); - sorting.sort(); + if (!m_sorting) { + m_sorting = std::unique_ptr(new Sorting(m_points, *m_neighbor_query, parameters::point_map(m_point_map))); + m_sorting->sort(); + } Region_growing region_growing( - m_points, sorting.ordered(), neighbor_query, region_type); + m_points, m_sorting->ordered(), *m_neighbor_query, region_type); region_growing.detect(std::back_inserter(m_regions)); std::size_t unassigned = 0; @@ -1818,12 +1879,15 @@ private: std::size_t num_shapes = m_regions.size(); + if (m_regions.empty()) + return; + const bool regularize_axis_symmetry = parameters::choose_parameter(parameters::get_parameter(np, internal_np::regularize_axis_symmetry), false); - const bool regularize_coplanarity = parameters::choose_parameter(parameters::get_parameter(np, internal_np::regularize_coplanarity), false); + const bool regularize_coplanarity = parameters::choose_parameter(parameters::get_parameter(np, internal_np::regularize_coplanarity), true); const bool regularize_orthogonality = parameters::choose_parameter(parameters::get_parameter(np, internal_np::regularize_orthogonality), false); const bool regularize_parallelism = parameters::choose_parameter(parameters::get_parameter(np, internal_np::regularize_parallelism), false); - const FT angle_tolerance = parameters::choose_parameter(parameters::get_parameter(np, internal_np::angle_tolerance), 25); - const FT maximum_offset = parameters::choose_parameter(parameters::get_parameter(np, internal_np::maximum_offset), 0.01); + const FT angle_tolerance = parameters::choose_parameter(parameters::get_parameter(np, internal_np::angle_tolerance), 5); + const FT maximum_offset = parameters::choose_parameter(parameters::get_parameter(np, internal_np::maximum_offset), max_distance_to_plane * 0.5); // Regularize detected planes. @@ -1936,6 +2000,8 @@ private: } num_shapes = m_planar_regions.size(); + + m_kinetic_partition = KSP(m_polygon_pts, m_polygon_indices); } void map_points_to_faces(const std::size_t polygon_index, const std::vector& pts, std::vector > >& face_to_points) { @@ -2041,14 +2107,14 @@ private: // 4 xmin // 5 zmax const double force = static_cast(m_total_inliers * 3); - // 0 - cost for labelled as outside + // 0 - cost for labeled as outside cost_matrix[0][0] = 0; cost_matrix[0][1] = 0; cost_matrix[0][2] = 0; cost_matrix[0][3] = 0; cost_matrix[0][4] = 0; cost_matrix[0][5] = 0; - // 1 - cost for labelled as inside + // 1 - cost for labeled as inside cost_matrix[1][0] = 0; cost_matrix[1][1] = 0; cost_matrix[1][2] = 0; diff --git a/Kinetic_surface_reconstruction/package_info/Kinetic_surface_reconstruction/dependencies b/Kinetic_surface_reconstruction/package_info/Kinetic_surface_reconstruction/dependencies index 50beb4822f2..485a6ca615e 100644 --- a/Kinetic_surface_reconstruction/package_info/Kinetic_surface_reconstruction/dependencies +++ b/Kinetic_surface_reconstruction/package_info/Kinetic_surface_reconstruction/dependencies @@ -1,20 +1,16 @@ Algebraic_foundations Arithmetic_kernel -Arrangement_on_surface_2 BGL -Boolean_set_operations_2 Bounding_volumes Cartesian_kernel CGAL_Core Circulator Combinatorial_map Convex_hull_2 -Convex_hull_3 Distance_2 Distance_3 Filtered_kernel Generalized_map -HalfedgeDS Hash_map Homogeneous_kernel Installation @@ -28,7 +24,6 @@ Kinetic_surface_reconstruction Linear_cell_complex Modular_arithmetic Number_types -Optimal_bounding_box Orthtree Point_set_3 Point_set_processing_3 @@ -48,9 +43,7 @@ Spatial_sorting Stream_support Surface_mesh Surface_mesh_segmentation -Surface_sweep_2 TDS_2 TDS_3 Triangulation_2 Triangulation_3 -Union_find diff --git a/Lab/demo/Lab/CGAL_Lab.cpp b/Lab/demo/Lab/CGAL_Lab.cpp index 6f1504ab668..85880fb8add 100644 --- a/Lab/demo/Lab/CGAL_Lab.cpp +++ b/Lab/demo/Lab/CGAL_Lab.cpp @@ -27,10 +27,8 @@ int& code_to_call_before_creation_of_QCoreApplication(int& i) { fmt.setOption(QSurfaceFormat::DebugContext); QSurfaceFormat::setDefaultFormat(fmt); - //for windows -#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) + // for windows QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL); -#endif return i; } diff --git a/Lab/demo/Lab/MainWindow.cpp b/Lab/demo/Lab/MainWindow.cpp index 2269b4a2839..dd133dbf44f 100644 --- a/Lab/demo/Lab/MainWindow.cpp +++ b/Lab/demo/Lab/MainWindow.cpp @@ -663,15 +663,7 @@ void MainWindow::loadPlugins() } } QString env_path = qgetenv("LAB_DEMO_PLUGINS_PATH"); -#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) QChar separator = QDir::listSeparator(); -#else -#if defined(_WIN32) - QChar separator = ';'; -#else - QChar separator = ':'; -#endif -#endif if(!env_path.isEmpty()) { #if defined(_WIN32) QString path = qgetenv("PATH"); @@ -2652,17 +2644,10 @@ void MainWindow::resetHeader() sceneView->header()->setSectionResizeMode(Scene::RenderingModeColumn, QHeaderView::ResizeToContents); sceneView->header()->setSectionResizeMode(Scene::ABColumn, QHeaderView::Fixed); sceneView->header()->setSectionResizeMode(Scene::VisibleColumn, QHeaderView::Fixed); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) sceneView->header()->resizeSection(Scene::ColorColumn, sceneView->header()->fontMetrics().horizontalAdvance("_#_")); sceneView->resizeColumnToContents(Scene::RenderingModeColumn); sceneView->header()->resizeSection(Scene::ABColumn, sceneView->header()->fontMetrics().horizontalAdvance(QString("_AB_"))); sceneView->header()->resizeSection(Scene::VisibleColumn, sceneView->header()->fontMetrics().horizontalAdvance(QString("_View_"))); -#else - sceneView->header()->resizeSection(Scene::ColorColumn, sceneView->header()->fontMetrics().width("_#_")); - sceneView->resizeColumnToContents(Scene::RenderingModeColumn); - sceneView->header()->resizeSection(Scene::ABColumn, sceneView->header()->fontMetrics().width(QString("_AB_"))); - sceneView->header()->resizeSection(Scene::VisibleColumn, sceneView->header()->fontMetrics().width(QString("_View_"))); -#endif } void MainWindow::reset_default_loaders() diff --git a/Lab/demo/Lab/Plugins/IO/CMakeLists.txt b/Lab/demo/Lab/Plugins/IO/CMakeLists.txt index c6247c39212..760a9c32897 100644 --- a/Lab/demo/Lab/Plugins/IO/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/IO/CMakeLists.txt @@ -1,10 +1,14 @@ include(CGALlab_macros) -find_package(LASLIB QUIET) -set_package_properties( - LASLIB PROPERTIES - DESCRIPTION "A library for LIDAR I/O." - PURPOSE "Required for reading or writing LAS files.") +if (NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1919 OR MSVC_VERSION LESS 1910) + find_package(LASLIB QUIET) + set_package_properties( + LASLIB PROPERTIES + DESCRIPTION "A library for LIDAR I/O." + PURPOSE "Required for reading or writing LAS files.") +else() + message(STATUS "NOTICE: the LAS reader does not work with your version of Visual Studio 2017.") +endif() include(CGAL_LASLIB_support) @@ -43,38 +47,23 @@ target_link_libraries(surf_io_plugin PUBLIC scene_surface_mesh_item) cgal_lab_plugin(lcc_io_plugin lcc_io_plugin KEYWORDS Viewer) target_link_libraries(lcc_io_plugin PUBLIC scene_lcc_item) -find_package(VTK QUIET COMPONENTS vtkCommonCore vtkIOCore vtkIOLegacy vtkIOXML - vtkFiltersCore vtkFiltersSources) +find_package(VTK 9.0 QUIET COMPONENTS CommonCore IOCore IOLegacy IOXML FiltersCore FiltersSources) set_package_properties( VTK PROPERTIES DESCRIPTION "A library for image processing." - PURPOSE "Can be used for I/O (DICOM, VTU, VTP.") + PURPOSE "Can be used for I/O (DICOM, VTU, VTP).") cgal_lab_plugin(triangulation_3_io_plugin triangulation_3_io_plugin KEYWORDS Viewer) target_link_libraries(triangulation_3_io_plugin PUBLIC scene_triangulation_3_item) -if(VTK_FOUND) - if(VTK_USE_FILE) - include(${VTK_USE_FILE}) - endif() - if("${VTK_VERSION_MAJOR}" GREATER "5" OR VTK_VERSION VERSION_GREATER 5) - if(TARGET VTK::CommonCore) - set(VTK_LIBRARIES VTK::CommonCore VTK::IOCore VTK::IOLegacy VTK::IOXML - VTK::FiltersCore VTK::FiltersSources) - endif() - if(VTK_LIBRARIES) - cgal_lab_plugin(vtk_plugin VTK_io_plugin KEYWORDS Viewer Mesh_3) - target_link_libraries(vtk_plugin PUBLIC scene_surface_mesh_item scene_polylines_item scene_c3t3_item scene_points_with_normal_item - ${VTK_LIBRARIES}) - target_compile_definitions(vtk_plugin PRIVATE -DCGAL_USE_VTK -DNOMINMAX) - else() - message(STATUS "NOTICE: the vtk IO plugin needs VTK libraries and will not be compiled.") - endif() - else() - message(STATUS "NOTICE: the vtk IO plugin needs VTK 6.0 or greater and will not be compiled (incorrect version found).") - endif() +if(VTK_FOUND AND VTK_LIBRARIES) + message(STATUS "VTK ${VTK_VERSION} found ${VTK_LIBRARIES}") + cgal_lab_plugin(vtk_plugin VTK_io_plugin KEYWORDS Viewer Mesh_3) + target_link_libraries(vtk_plugin PUBLIC scene_surface_mesh_item scene_polylines_item scene_c3t3_item scene_points_with_normal_item + ${VTK_LIBRARIES}) + target_compile_definitions(vtk_plugin PRIVATE -DCGAL_USE_VTK -DNOMINMAX) else() - message(STATUS "NOTICE: the vtk IO plugin needs VTK 6.0 or greater and will not be compiled.") + message(STATUS "NOTICE: the vtk IO plugin needs VTK 9.0 or greater and will not be compiled.") endif() cgal_lab_plugin(xyz_plugin XYZ_io_plugin KEYWORDS Viewer PointSetProcessing Classification) target_link_libraries(xyz_plugin PUBLIC scene_points_with_normal_item) diff --git a/Lab/demo/Lab/Plugins/Mesh_2/mesh_2_dialog.ui b/Lab/demo/Lab/Plugins/Mesh_2/mesh_2_dialog.ui index b809786a2b6..fad384423b7 100644 --- a/Lab/demo/Lab/Plugins/Mesh_2/mesh_2_dialog.ui +++ b/Lab/demo/Lab/Plugins/Mesh_2/mesh_2_dialog.ui @@ -66,7 +66,7 @@ - Run Lloyd Optimisation + Run Lloyd Optimization Qt::AlignRight|Qt::AlignTrailing|Qt::AlignVCenter diff --git a/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt b/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt index 1f681a39e2c..2234d34db36 100644 --- a/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Mesh_3/CMakeLists.txt @@ -37,21 +37,9 @@ if(ITK_FOUND) target_link_libraries(mesh_3_plugin PUBLIC CGAL::ITK_support) endif(ITK_FOUND) -find_package(VTK QUIET COMPONENTS vtkImagingGeneral vtkIOImage vtkIOXML NO_MODULE) -if(VTK_FOUND) - if(VTK_USE_FILE) - include(${VTK_USE_FILE}) - endif() - if("${VTK_VERSION_MAJOR}" GREATER "5" OR VTK_VERSION VERSION_GREATER 5) - if(TARGET VTK::IOImage) - set(VTK_LIBRARIES VTK::IOImage VTK::ImagingGeneral VTK::IOXML) - endif() - if(NOT VTK_LIBRARIES) - message(STATUS "NOTICE: DICOM files (.dcm) require the VTK libraries, and will not be readable.") - endif() - else() - message(STATUS "NOTICE: DICOM files (.dcm) require the VTK libraries, and will not be readable.") - endif() +find_package(VTK 9.0 QUIET COMPONENTS ImagingGeneral IOImage IOXML NO_MODULE) +if(VTK_FOUND AND VTK_LIBRARIES) + message(STATUS "VTK ${VTK_VERSION} found ${VTK_LIBRARIES}") else() message(STATUS "NOTICE: DICOM files (.dcm) require the VTK libraries, and will not be readable.") endif() diff --git a/Lab/demo/Lab/Plugins/Mesh_3/Io_image_plugin.cpp b/Lab/demo/Lab/Plugins/Mesh_3/Io_image_plugin.cpp index 4720d8aa35b..780511846aa 100644 --- a/Lab/demo/Lab/Plugins/Mesh_3/Io_image_plugin.cpp +++ b/Lab/demo/Lab/Plugins/Mesh_3/Io_image_plugin.cpp @@ -705,11 +705,7 @@ private: // Find the right width for the label to accommodate at least 9999 QFontMetrics metric = x_cubeLabel->fontMetrics(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) x_cubeLabel->setFixedWidth(metric.horizontalAdvance(QString(".9999."))); -#else - x_cubeLabel->setFixedWidth(metric.width(QString(".9999."))); -#endif x_cubeLabel->setText("0"); x_cubeLabel->setValidator(validator); @@ -735,11 +731,7 @@ private: // Find the right width for the label to accommodate at least 9999 QFontMetrics metric = y_cubeLabel->fontMetrics(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) y_cubeLabel->setFixedWidth(metric.horizontalAdvance(QString(".9999."))); -#else - y_cubeLabel->setFixedWidth(metric.width(QString(".9999."))); -#endif y_cubeLabel->setText("0"); y_cubeLabel->setValidator(validator); y_slider = new QSlider(mw); @@ -764,11 +756,7 @@ private: // Find the right width for the label to accommodate at least 9999 QFontMetrics metric = z_cubeLabel->fontMetrics(); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) z_cubeLabel->setFixedWidth(metric.horizontalAdvance(QString(".9999."))); -#else - z_cubeLabel->setFixedWidth(metric.width(QString(".9999."))); -#endif z_cubeLabel->setText("0"); z_cubeLabel->setValidator(validator); z_slider = new QSlider(mw); diff --git a/Lab/demo/Lab/Plugins/Mesh_3/Mesh_3_plugin.cpp b/Lab/demo/Lab/Plugins/Mesh_3/Mesh_3_plugin.cpp index d84bd9fc6f6..2aadc761957 100644 --- a/Lab/demo/Lab/Plugins/Mesh_3/Mesh_3_plugin.cpp +++ b/Lab/demo/Lab/Plugins/Mesh_3/Mesh_3_plugin.cpp @@ -750,7 +750,9 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type, } } - if(mesh_type != Mesh_type::SURFACE_ONLY && !material_ids_valid) + if(mesh_type != Mesh_type::SURFACE_ONLY + && !material_ids_valid + && bounding_sm_item != nullptr) { sm_items.removeAll(make_not_null(bounding_sm_item)); } diff --git a/Lab/demo/Lab/Plugins/Mesh_3/Mesh_function.h b/Lab/demo/Lab/Plugins/Mesh_3/Mesh_function.h index 68c8300f9ee..ec38a369ea0 100644 --- a/Lab/demo/Lab/Plugins/Mesh_3/Mesh_function.h +++ b/Lab/demo/Lab/Plugins/Mesh_3/Mesh_function.h @@ -171,8 +171,10 @@ log() const .arg(detect_connected_components); res << QString("use weights: %1").arg(weights_ptr != nullptr); } - res << QString("use aabb tree: %1").arg(use_sizing_field_with_aabb_tree); - res << QString("manifold: %1").arg(manifold); + if(use_sizing_field_with_aabb_tree) + res << QString("use sizing field with aabb tree: %1").arg(use_sizing_field_with_aabb_tree); + if(manifold) + res << QString("manifold: %1").arg(manifold); return res; } diff --git a/Lab/demo/Lab/Plugins/Mesh_3/Volume_plane.h b/Lab/demo/Lab/Plugins/Mesh_3/Volume_plane.h index a5399210b43..062755fb0cc 100644 --- a/Lab/demo/Lab/Plugins/Mesh_3/Volume_plane.h +++ b/Lab/demo/Lab/Plugins/Mesh_3/Volume_plane.h @@ -280,7 +280,7 @@ private: //according to the tag, a,b,c dim change but not the scale. We look for the max dimension of the whole image. //A high scale factor will often go with a low dimension, to compensate it. So we don't want a max being the - //higher scale * the higher dim, hence the tag specialisation. + //higher scale * the higher dim, hence the tag specialization. //TODO: set the scale factors according to the dimensipon to avoid doing that. double compute_maxDim(x_tag) const { diff --git a/Lab/demo/Lab/Plugins/PMP/Engrave_text_plugin.cpp b/Lab/demo/Lab/Plugins/PMP/Engrave_text_plugin.cpp index 27a3ba46f0d..1adc2ae81ea 100644 --- a/Lab/demo/Lab/Plugins/PMP/Engrave_text_plugin.cpp +++ b/Lab/demo/Lab/Plugins/PMP/Engrave_text_plugin.cpp @@ -250,11 +250,7 @@ protected: } case QEvent::Wheel: { QWheelEvent* event = static_cast(ev); -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - QPoint pos = event->pos(); -#else QPointF pos = event->position(); -#endif QPointF old_pos = v->mapToScene(pos.x(), pos.y()); if(event->angleDelta().y() <0) v->scale(1.2, 1.2); diff --git a/Lab/demo/Lab/Plugins/PMP/Interpolated_corrected_principal_curvatures_plugin.cpp b/Lab/demo/Lab/Plugins/PMP/Interpolated_corrected_principal_curvatures_plugin.cpp index 4a75dfd7a3b..dbe630ad09f 100644 --- a/Lab/demo/Lab/Plugins/PMP/Interpolated_corrected_principal_curvatures_plugin.cpp +++ b/Lab/demo/Lab/Plugins/PMP/Interpolated_corrected_principal_curvatures_plugin.cpp @@ -59,7 +59,6 @@ void compute(SMesh* sMesh, namespace PMP = CGAL::Polygon_mesh_processing; typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic_kernel; typedef Epic_kernel::Point_3 Point; - typedef Epic_kernel::Point_3 Point; typedef Epic_kernel::Vector_3 Vector; typedef boost::graph_traits::vertex_descriptor Vertex_descriptor; diff --git a/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt b/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt index 59d2285660b..9b9599b823e 100644 --- a/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt +++ b/Lab/demo/Lab/Plugins/Point_set/CMakeLists.txt @@ -65,6 +65,15 @@ if(TARGET CGAL::Eigen3_support) features_detection_plugin PUBLIC scene_points_with_normal_item CGAL::Eigen3_support) + qt6_wrap_ui(kinetic_surface_reconstruction_pluginUI_FILES Kinetic_surface_reconstruction_plugin.ui) + cgal_lab_plugin( + kinetic_surface_reconstruction_plugin Kinetic_surface_reconstruction_plugin + ${kinetic_surface_reconstruction_pluginUI_FILES} KEYWORDS PointSetProcessing) + target_link_libraries( + kinetic_surface_reconstruction_plugin PUBLIC scene_points_with_normal_item + CGAL::Eigen3_support scene_polygon_soup_item + scene_surface_mesh_item scene_points_with_normal_item) + cgal_lab_plugin(point_set_smoothing_plugin Point_set_smoothing_plugin KEYWORDS PointSetProcessing) target_link_libraries( @@ -90,9 +99,15 @@ if(TARGET CGAL::Eigen3_support) point_set_shape_detection_plugin PUBLIC scene_surface_mesh_item scene_points_with_normal_item scene_polygon_soup_item scene_callback_signaler CGAL::Eigen3_support) - - find_package(OpenGR QUIET) - include(CGAL_OpenGR_support) + if (NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1910) + find_package(OpenGR QUIET) + include(CGAL_OpenGR_support) + else() + message( + STATUS + "NOTICE : OpenGR does not support your compiler." + ) + endif() find_package(libpointmatcher QUIET) include(CGAL_pointmatcher_support) diff --git a/Lab/demo/Lab/Plugins/Point_set/Kinetic_surface_reconstruction_plugin.cpp b/Lab/demo/Lab/Plugins/Point_set/Kinetic_surface_reconstruction_plugin.cpp new file mode 100644 index 00000000000..f3d9561abda --- /dev/null +++ b/Lab/demo/Lab/Plugins/Point_set/Kinetic_surface_reconstruction_plugin.cpp @@ -0,0 +1,602 @@ + +#include "ui_Kinetic_surface_reconstruction_plugin.h" + +#include "Color_map.h" +#include "Color_ramp.h" +#include "id_printing.h" +#include "Messages_interface.h" + +#include "Scene.h" +#include "Scene_polygon_soup_item.h" +#include "Scene_surface_mesh_item.h" +#include "Scene_points_with_normal_item.h" + +#include +#include +#include + +#include +#include +#include +#include + +#include + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + + +#include + +using namespace CGAL::Three; + +using FT = typename Kernel::FT; +using Point_3 = typename Kernel::Point_3; +using Vector_3 = typename Kernel::Vector_3; +using Segment_3 = typename Kernel::Segment_3; + +using Point_map = typename Point_set::Point_map; +using Normal_map = typename Point_set::Vector_map; + +using KSR = CGAL::Kinetic_surface_reconstruction_3; + +Viewer_interface* (&getActiveViewer)() = Three::activeViewer; + +class DockWidget + : public QDockWidget, + public Ui::KineticSurfaceReconstructionWidget +{ +public: + DockWidget(const QString& name, QWidget* parent) + : QDockWidget(name, parent) + { + setupUi(this); + } +}; + +class Kinetic_surface_reconstruction_plugin + : public QObject, + public CGAL_Lab_plugin_helper +{ + Q_OBJECT + Q_INTERFACES(CGAL::Three::CGAL_Lab_plugin_interface) + Q_PLUGIN_METADATA(IID "com.geometryfactory.CGALLab.PluginInterface/1.0") +private: + QAction* actionKineticSurfaceReconstruction; + + DockWidget* dock_widget; + + Scene_points_with_normal_item* m_pwn_item = nullptr; + + // A dock widget allows switching between items which makes managing parameters and intermediate results a mess. + // I could create a map from item to KSR and also reference intermediate results (in case they are recalculated with changed parameters)? + + KSR *m_ksr = nullptr; + bool m_known_file = false; + +public: + virtual ~Kinetic_surface_reconstruction_plugin() { + if (m_ksr) + delete m_ksr; + m_ksr = nullptr; + } + + bool applicable(QAction*) const override + { + Scene_item* item = scene->item(scene->mainSelectionIndex()); + if (!item) + return false; + + Scene_points_with_normal_item* pwn_item = qobject_cast(item); + + if (pwn_item != nullptr && pwn_item->has_normals()) + return true; + else + return false; + } + + QList actions() const override + { + return QList() << actionKineticSurfaceReconstruction; + } + + void init(QMainWindow* mw, + Scene_interface* sc, + Messages_interface*) override + { + this->scene = sc; + this->mw = mw; + + // Main action + actionKineticSurfaceReconstruction = new QAction(QString("Kinetic Surface Reconstruction"), mw); + actionKineticSurfaceReconstruction->setObjectName("actionKineticSurfaceReconstruction"); + + connect(actionKineticSurfaceReconstruction, SIGNAL(triggered()), + this, SLOT(openDialog())); + + Scene* scene_item = static_cast(scene); + connect(scene_item, SIGNAL(itemIndexSelected(int)), + this, SLOT(onItemIndexSelected(int))); + + // Dock Widget + dock_widget = new DockWidget("Kinetic Surface Reconstruction", mw); + addDockWidget(dock_widget); + + dock_widget->setVisible(false); + //dock_widget->setEnabled(false); + + connect(dock_widget->sdRunButton, SIGNAL(clicked(bool)), this, SLOT(run_detection())); + connect(dock_widget->partRunButton, SIGNAL(clicked(bool)), this, SLOT(run_partition())); + connect(dock_widget->recRunButton, SIGNAL(clicked(bool)), this, SLOT(run_reconstruction())); + connect(dock_widget->partSubdivisionCheck, SIGNAL(stateChanged(int)), this, SLOT(onSubdivisionStateChanged(int))); + connect(dock_widget, SIGNAL(visibilityChanged(bool)), this, SLOT(onVisibilityChanged(bool))); + } +private Q_SLOTS: + void openDialog() + { + if (!dock_widget->isVisible()) + dock_widget->show(); + dock_widget->raise(); + } + + void closure() override + { + dock_widget->hide(); + if (m_ksr) { + delete m_ksr; + m_ksr = nullptr; + } + } + + void onItemIndexSelected(int item_index) { + if (!dock_widget->isVisible()) + return; + + Scene_points_with_normal_item *selection = qobject_cast(scene->item(item_index)); + if (selection == nullptr) { + // Keep old reference if no new point cloud has been selected. + if (m_pwn_item == nullptr) + dock_widget->setEnabled(false); + + return; + } + + if (m_pwn_item == selection) { + // The point cloud may have normals added after loading. + if (m_pwn_item->has_normals()) { + enable_detection(true); + enable_regularization(true); + } + return; + } + + QObject* scene_obj = dynamic_cast(scene); + + if (m_pwn_item) { + disconnect(m_pwn_item, nullptr, this, SLOT(onItemChanged())); + + if (scene_obj) + disconnect(scene_obj, SIGNAL(itemAboutToBeDestroyed(CGAL::Three::Scene_item*)), this, SLOT(onItemDestroyed(CGAL::Three::Scene_item*))); + } + + m_pwn_item = selection; + connect(m_pwn_item, SIGNAL(itemChanged()), this, SLOT(onItemChanged())); + + if (scene_obj) + connect(scene_obj, SIGNAL(itemAboutToBeDestroyed(CGAL::Three::Scene_item*)), this, SLOT(onItemDestroyed(CGAL::Three::Scene_item*))); + + if (m_ksr) { + delete m_ksr; + m_ksr = nullptr; + } + + dock_widget->setEnabled(true); + + if (m_pwn_item && m_pwn_item->has_normals()) { + enable_detection(true); + enable_regularization(true); + } + else { + enable_detection(false); + enable_regularization(false); + } + + enable_partition(false); + enable_reconstruction(false); + + prefill_parameters(); + } + + void onItemChanged() { + // Enable detection if the point set item has normals now + assert(m_pwn_item); + + if (m_pwn_item->has_normals()) + enable_detection(true); + } + + void onItemDestroyed(CGAL::Three::Scene_item* item) { + if (m_pwn_item == item) { + m_pwn_item = nullptr; + if (m_ksr) { + delete m_ksr; + m_ksr = nullptr; + } + + enable_detection(false); + enable_regularization(false); + enable_partition(false); + enable_reconstruction(false); + dock_widget->hide(); + } + } + + void run_detection() { + assert(m_pwn_item); + + if (!m_pwn_item->has_normals()) + return; + + m_ksr->detect_planar_shapes(CGAL::parameters::maximum_distance(dock_widget->sdMaxDistanceBox->value()) + .maximum_angle(dock_widget->sdMaxAngleBox->value()) + .k_neighbors(dock_widget->sdkNeighborsBox->value()) + .minimum_region_size(dock_widget->sdMinRegionSizeBox->value()) + .regularize_parallelism(dock_widget->srParallelismCheck->isChecked()) + .regularize_coplanarity(dock_widget->srCoplanarityCheck->isChecked()) + .regularize_orthogonality(dock_widget->srOrthogonalityCheck->isChecked()) + .regularize_axis_symmetry(false) + .angle_tolerance(dock_widget->srAngleToleranceBox->value()) + .maximum_offset(dock_widget->srMaxOffsetBox->value())); + + CGAL::Three::Three::information(QString::number(m_ksr->detected_planar_shapes().size()) + " regularized planar shapes detected"); + + if (m_ksr->detected_planar_shapes().empty()) { + enable_partition(false); + enable_reconstruction(false); + + return; + } + + const std::vector &planes = m_ksr->detected_planar_shapes(); + const std::vector> ®ions = m_ksr->detected_planar_shape_indices(); + + SMesh* mesh = new SMesh(); + std::vector > polys; + for (std::size_t i = 0; i < regions.size(); i++) + convex_hull(regions[i], planes[i], polys); + + for (std::size_t i = 0; i < polys.size(); i++) { + std::vector vtx(polys[i].size()); + for (std::size_t j = 0; j < polys[i].size(); j++) + vtx[j] = mesh->add_vertex(polys[i][j]); + mesh->add_face(vtx); + } + + Scene_surface_mesh_item* new_item = new Scene_surface_mesh_item(mesh); + new_item->setName(tr("%1 convex shapes d%2 a%3").arg(m_pwn_item->name()).arg(dock_widget->sdMaxDistanceBox->value()).arg(dock_widget->sdMaxAngleBox->value())); + new_item->setColor(Qt::darkCyan); + scene->addItem(new_item); + + if (!m_known_file) { + std::size_t max_depth = m_ksr->estimate_max_subdivision_depth(); + dock_widget->partReorientCheck->setChecked(true); + dock_widget->partSubdivisionCheck->setChecked(true); + dock_widget->partMaxDepthBox->setValue(max_depth); + dock_widget->partPolygonsPerNodeBox->setValue(40); + dock_widget->partKBox->setValue(2); + } + + enable_partition(true); + enable_reconstruction(false); + } + + void run_partition() { + assert(m_pwn_item); + assert(m_ksr); + assert(!m_ksr->detected_planar_shapes().empty()); + + m_ksr->initialize_partition(CGAL::parameters::reorient_bbox(dock_widget->partReorientCheck->checkState() == Qt::Checked) + .max_octree_depth(dock_widget->partSubdivisionCheck->checkState() == Qt::Checked ? dock_widget->partMaxDepthBox->value() : 0) + .max_octree_node_size(dock_widget->partPolygonsPerNodeBox->value())); + + m_ksr->partition(dock_widget->partKBox->value()); + + CGAL::Three::Three::information(QString::number(m_ksr->kinetic_partition().number_of_volumes()) + " volumes in partition"); + + if (m_ksr->kinetic_partition().number_of_volumes() != 0) + enable_reconstruction(true); + else std::cout << "kinetic partition is empty!" << std::endl; + } + + void run_reconstruction() { + assert(m_pwn_item); + assert(m_ksr); + assert(m_ksr->kinetic_partition().number_of_volumes() != 0); + + std::vector vtx; + std::vector > polylist; + + std::map external_nodes; + + if (dock_widget->recGroundCheck->checkState() == Qt::Checked) { + external_nodes[KSR::KSP::Face_support::ZMIN] = false; + m_ksr->reconstruct_with_ground(dock_widget->recLambdaBox->value(), std::back_inserter(vtx), std::back_inserter(polylist)); + } + else { + m_ksr->reconstruct(dock_widget->recLambdaBox->value(), external_nodes, std::back_inserter(vtx), std::back_inserter(polylist)); + } + + if (!polylist.empty()) + { + // Add polygon mesh to scene + Scene_polygon_soup_item* new_item = new Scene_polygon_soup_item(); + new_item->load(vtx, polylist); + new_item->setName(tr("%1 ksr lambda %2").arg(m_pwn_item->name()).arg(dock_widget->recLambdaBox->value())); + new_item->setColor(Qt::darkGray); + new_item->invalidateOpenGLBuffers(); + scene->addItem(new_item); + } + } + + void onSubdivisionStateChanged(int state) { + dock_widget->partMaxDepthBox->setEnabled(state != 0); + dock_widget->partPolygonsPerNodeBox->setEnabled(state != 0); + } + + void onVisibilityChanged(bool) { + if (!dock_widget->isVisible()) + return; + std::cout << "in visibility changed" << std::endl; + } + +private: + void convex_hull(const std::vector& region, const CGAL::Epick::Plane_3& plane, std::vector > &polys) { + if (m_pwn_item == nullptr) + return; + + Point_set* points = m_pwn_item->point_set(); + + std::vector pts2d; + pts2d.reserve(region.size()); + for (const std::size_t idx : region) { + CGAL_assertion(idx < points->size()); + const auto& p = points->point(idx); + const auto q = plane.projection(p); + const auto point = plane.to_2d(q); + pts2d.push_back(point); + } + CGAL_assertion(pts2d.size() == region.size()); + + std::vector ch; + CGAL::convex_hull_2(pts2d.begin(), pts2d.end(), std::back_inserter(ch)); + + std::vector polygon; + for (const auto& p : ch) { + const auto point = plane.to_3d(p); + polygon.push_back(point); + } + + polys.push_back(polygon); + } + void enable_detection(bool enable) { + dock_widget->shapeDetectionGroup->setEnabled(enable); + dock_widget->sdRunButton->setEnabled(enable); + } + + void enable_regularization(bool enable) { + dock_widget->shapeRegularizationGroup->setEnabled(enable); + } + + void enable_partition(bool enable) { + dock_widget->kineticPartitionGroup->setEnabled(enable); + dock_widget->partRunButton->setEnabled(enable); + } + + void enable_reconstruction(bool enable) { + dock_widget->kineticReconstructionGroup->setEnabled(enable); + dock_widget->recRunButton->setEnabled(enable); + } + + void prefill_parameters() { + if (m_pwn_item == nullptr) + return; + + std::string filename = m_pwn_item->name().toStdString(); + + m_known_file = true; + + if (m_ksr) { + delete m_ksr; + m_ksr = nullptr; + } + + Point_set* points = m_pwn_item->point_set(); + m_ksr = new KSR(*points); + + if (filename == "foam_box" || filename == "foam_box_new") { + // Shape detection parameters + dock_widget->sdMaxDistanceBox->setValue(0.05); + dock_widget->sdMaxAngleBox->setValue(15); + dock_widget->sdMinRegionSizeBox->setValue(250); + dock_widget->sdkNeighborsBox->setValue(12); + // Shape regularization parameters + dock_widget->srParallelismCheck->setChecked(true); + dock_widget->srOrthogonalityCheck->setChecked(false); + dock_widget->srCoplanarityCheck->setChecked(true); + dock_widget->srAngleToleranceBox->setValue(10); + dock_widget->srMaxOffsetBox->setValue(0.01); + // Partition parameters + dock_widget->partReorientCheck->setChecked(false); + dock_widget->partSubdivisionCheck->setChecked(true); + dock_widget->partMaxDepthBox->setValue(3); + dock_widget->partPolygonsPerNodeBox->setValue(40); + dock_widget->partKBox->setValue(2); + // Reconstruction parameters + dock_widget->recGroundCheck->setChecked(false); + dock_widget->recLambdaBox->setValue(0.7); + } + else if (filename == "lans") { + // Shape detection parameters + dock_widget->sdMaxDistanceBox->setValue(0.15); + dock_widget->sdMaxAngleBox->setValue(20); + dock_widget->sdMinRegionSizeBox->setValue(300); + dock_widget->sdkNeighborsBox->setValue(12); + // Shape regularization parameters + dock_widget->srParallelismCheck->setChecked(true); + dock_widget->srOrthogonalityCheck->setChecked(false); + dock_widget->srCoplanarityCheck->setChecked(true); + dock_widget->srAngleToleranceBox->setValue(8); + dock_widget->srMaxOffsetBox->setValue(0.08); + // Partition parameters + dock_widget->partReorientCheck->setChecked(false); + dock_widget->partSubdivisionCheck->setChecked(true); + dock_widget->partMaxDepthBox->setValue(3); + dock_widget->partPolygonsPerNodeBox->setValue(40); + dock_widget->partKBox->setValue(2); + // Reconstruction parameters + dock_widget->recGroundCheck->setChecked(false); + dock_widget->recLambdaBox->setValue(0.7); + } + else if (filename == "building_c_1M") { + // Shape detection parameters + dock_widget->sdMaxDistanceBox->setValue(1.1); + dock_widget->sdMaxAngleBox->setValue(26); + dock_widget->sdMinRegionSizeBox->setValue(500); + dock_widget->sdkNeighborsBox->setValue(15); + // Shape regularization parameters + dock_widget->srParallelismCheck->setChecked(true); + dock_widget->srOrthogonalityCheck->setChecked(false); + dock_widget->srCoplanarityCheck->setChecked(true); + dock_widget->srAngleToleranceBox->setValue(3); + dock_widget->srMaxOffsetBox->setValue(0.5); + // Partition parameters + dock_widget->partReorientCheck->setChecked(false); + dock_widget->partSubdivisionCheck->setChecked(true); + dock_widget->partMaxDepthBox->setValue(3); + dock_widget->partPolygonsPerNodeBox->setValue(40); + dock_widget->partKBox->setValue(2); + // Reconstruction parameters + dock_widget->recGroundCheck->setChecked(true); + dock_widget->recLambdaBox->setValue(0.77); + } + else if (filename == "dragon") { + // Shape detection parameters + dock_widget->sdMaxDistanceBox->setValue(0.7); + dock_widget->sdMaxAngleBox->setValue(26); + dock_widget->sdMinRegionSizeBox->setValue(150); + dock_widget->sdkNeighborsBox->setValue(10); + // Shape regularization parameters + dock_widget->srParallelismCheck->setChecked(false); + dock_widget->srOrthogonalityCheck->setChecked(false); + dock_widget->srCoplanarityCheck->setChecked(false); + dock_widget->srAngleToleranceBox->setValue(0); + dock_widget->srMaxOffsetBox->setValue(0); + // Partition parameters + dock_widget->partReorientCheck->setChecked(false); + dock_widget->partSubdivisionCheck->setChecked(true); + dock_widget->partMaxDepthBox->setValue(3); + dock_widget->partPolygonsPerNodeBox->setValue(40); + dock_widget->partKBox->setValue(1); + // Reconstruction parameters + dock_widget->recGroundCheck->setChecked(false); + dock_widget->recLambdaBox->setValue(0.75); + } + else if (filename == "full_thing_pds_1M") { + // Shape detection parameters + dock_widget->sdMaxDistanceBox->setValue(0.3); + dock_widget->sdMaxAngleBox->setValue(36); + dock_widget->sdMinRegionSizeBox->setValue(30); + dock_widget->sdkNeighborsBox->setValue(12); + // Shape regularization parameters + dock_widget->srParallelismCheck->setChecked(true); + dock_widget->srOrthogonalityCheck->setChecked(false); + dock_widget->srCoplanarityCheck->setChecked(true); + dock_widget->srAngleToleranceBox->setValue(3); + dock_widget->srMaxOffsetBox->setValue(0.05); + // Partition parameters + dock_widget->partReorientCheck->setChecked(false); + dock_widget->partSubdivisionCheck->setChecked(true); + dock_widget->partMaxDepthBox->setValue(3); + dock_widget->partPolygonsPerNodeBox->setValue(40); + dock_widget->partKBox->setValue(3); + // Reconstruction parameters + dock_widget->recGroundCheck->setChecked(false); + dock_widget->recLambdaBox->setValue(0.5); + } + else if (filename == "hilbert_cube2_pds_100k") { + // Shape detection parameters + dock_widget->sdMaxDistanceBox->setValue(0.3); + dock_widget->sdMaxAngleBox->setValue(10); + dock_widget->sdMinRegionSizeBox->setValue(10); + dock_widget->sdkNeighborsBox->setValue(12); + // Shape regularization parameters + dock_widget->srParallelismCheck->setChecked(true); + dock_widget->srOrthogonalityCheck->setChecked(true); + dock_widget->srCoplanarityCheck->setChecked(true); + dock_widget->srAngleToleranceBox->setValue(5); + dock_widget->srMaxOffsetBox->setValue(0.03); + // Partition parameters + dock_widget->partReorientCheck->setChecked(false); + dock_widget->partSubdivisionCheck->setChecked(true); + dock_widget->partMaxDepthBox->setValue(3); + dock_widget->partPolygonsPerNodeBox->setValue(40); + dock_widget->partKBox->setValue(4); + // Reconstruction parameters + dock_widget->recGroundCheck->setChecked(false); + dock_widget->recLambdaBox->setValue(0.5); + } + else if (filename == "Meetingroom_3M") { + // Shape detection parameters + dock_widget->sdMaxDistanceBox->setValue(0.03); + dock_widget->sdMaxAngleBox->setValue(19); + dock_widget->sdMinRegionSizeBox->setValue(100); + dock_widget->sdkNeighborsBox->setValue(15); + // Shape regularization parameters + dock_widget->srParallelismCheck->setChecked(true); + dock_widget->srOrthogonalityCheck->setChecked(true); + dock_widget->srCoplanarityCheck->setChecked(true); + dock_widget->srAngleToleranceBox->setValue(10); + dock_widget->srMaxOffsetBox->setValue(0.03); + // Partition parameters + dock_widget->partReorientCheck->setChecked(false); + dock_widget->partSubdivisionCheck->setChecked(true); + dock_widget->partMaxDepthBox->setValue(3); + dock_widget->partPolygonsPerNodeBox->setValue(40); + dock_widget->partKBox->setValue(3); + // Reconstruction parameters + dock_widget->recGroundCheck->setChecked(false); + dock_widget->recLambdaBox->setValue(0.5); + } + else { + m_known_file = false; + FT max_distance, max_angle; + std::size_t min_region_size; + m_ksr->estimate_detection_parameters(max_distance, max_angle, min_region_size); + dock_widget->sdMaxDistanceBox->setValue(max_distance); + dock_widget->sdMaxAngleBox->setValue(max_angle); + dock_widget->sdMinRegionSizeBox->setValue(min_region_size); + dock_widget->sdkNeighborsBox->setValue(12); + dock_widget->srCoplanarityCheck->setChecked(true); + dock_widget->srMaxOffsetBox->setValue(max_distance * 0.5); + } + } +}; + +#include "Kinetic_surface_reconstruction_plugin.moc" diff --git a/Lab/demo/Lab/Plugins/Point_set/Kinetic_surface_reconstruction_plugin.ui b/Lab/demo/Lab/Plugins/Point_set/Kinetic_surface_reconstruction_plugin.ui new file mode 100644 index 00000000000..96d63e2d325 --- /dev/null +++ b/Lab/demo/Lab/Plugins/Point_set/Kinetic_surface_reconstruction_plugin.ui @@ -0,0 +1,425 @@ + + + KineticSurfaceReconstructionWidget + + + true + + + + 0 + 0 + 372 + 590 + + + + + 0 + 0 + + + + + 372 + 590 + + + + Kinetic Surface Reconstruction + + + + + + + partition + + + + + + + false + + + Shape Detection + + + + + + Maximum angle + + + + + + + Maximum distance + + + + + + + Smallest allowed size for a primitive + + + 5 + + + 10000 + + + 50 + + + 500 + + + + + + + Minimum region size + + + + + + + Maximum distance from a point to a plane. + + + 1.0 + + + false + + + + + + + Maximum angle in degrees between the normal of a point and the normal of a plane. + + + 25 + + + + + + + k neighbors + + + + + + + K neighborhood of a point considered for region growing + + + 100 + + + 5 + + + 12 + + + + + + + + + + false + + + Shape Regularization + + + + + + Maximum allowed orthogonal distance between two parallel planes such that they are considered to be coplanar. + + + 25 + + + + + + + Angle tolerance + + + + + + + Maximum allowed angle in degrees between plane normals used for parallelism and orthogonality. + + + 1.0 + + + false + + + + + + + Maximum offset + + + + + + + + + Planes, which are detected as near parallel, are made exactly parallel. + + + Parallelism + + + + + + + Parallel planes, which are detected as near coplanar, are made exactly coplanar. + + + Coplanarity + + + + + + + Planes, which are detected as near orthogonal, are made exactly orthogonal. + + + Orthogonality + + + + + + + + + + + + false + + + Kinetic Surface Reconstruction + + + + + + Estimates a ground level from the detected shapes. Sets the outside label of all faces on the bounding box below the ground level to inside. + + + Estimate ground + + + + + + + + + + Lambda + + + + + + + + + + Lambda trades data faithfulness for low complexity in the energy minimization. + + + 0.7 + + + false + + + + + + + + + + false + + + Kinetic Space Partition + + + + + + K + + + + + + + Maximum depth + + + + + + + Maximum number of intersections that can occur for a polygon before its expansion stops + + + 1 + + + 100 + + + 1 + + + 2 + + + + + + + + + Aligns the x-axis of the bounding box with the direction of the largest variation in horizontal direction of the input data while maintaining the z-axis. + + + Bounding box reorientation + + + + + + + The kinetic partition is split into subpartitions using an octree if the number of intersecting polygons per node is larger than specified. + + + Subdivision + + + true + + + + + + + + + Maximum octree depth for subdivision + + + 1 + + + 100 + + + 1 + + + 3 + + + + + + + Polygons per Node + + + + + + + Maximum number of intersecting polygons for an octree node before it is split + + + 1 + + + 100 + + + 1 + + + 40 + + + + + + + + + + Qt::Vertical + + + + 20 + 40 + + + + + + + + detect and regularize + + + + + + + reconstruct + + + + + + + + + DoubleEdit + QLineEdit +
    CGAL_double_edit.h
    +
    +
    + + +
    diff --git a/Lab/demo/Lab/Plugins/Point_set/Point_set_normal_estimation_plugin.cpp b/Lab/demo/Lab/Plugins/Point_set/Point_set_normal_estimation_plugin.cpp index 505e7e6d769..5ebd97614e1 100644 --- a/Lab/demo/Lab/Plugins/Point_set/Point_set_normal_estimation_plugin.cpp +++ b/Lab/demo/Lab/Plugins/Point_set/Point_set_normal_estimation_plugin.cpp @@ -287,6 +287,7 @@ void CGAL_Lab_point_set_normal_estimation_plugin::on_actionNormalEstimation_trig // Updates scene item->invalidateOpenGLBuffers(); scene->itemChanged(index); + item->itemChanged(); QApplication::restoreOverrideCursor(); } diff --git a/Lab/demo/Lab/Plugins/Surface_mesh/Parameterization_plugin.cpp b/Lab/demo/Lab/Plugins/Surface_mesh/Parameterization_plugin.cpp index d9ec9149133..38d593c2b40 100644 --- a/Lab/demo/Lab/Plugins/Surface_mesh/Parameterization_plugin.cpp +++ b/Lab/demo/Lab/Plugins/Surface_mesh/Parameterization_plugin.cpp @@ -142,11 +142,7 @@ protected: } case QEvent::Wheel: { QWheelEvent* event = static_cast(ev); -#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0) - QPoint pos = event->pos(); -#else QPointF pos = event->position(); -#endif QPointF old_pos = v->mapToScene(pos.x(), pos.y()); if(event->angleDelta().y() <0) v->scale(1.2, 1.2); diff --git a/Lab/demo/Lab/Scene.cpp b/Lab/demo/Lab/Scene.cpp index b3f20ef8ef8..c48aa8b3c07 100644 --- a/Lab/demo/Lab/Scene.cpp +++ b/Lab/demo/Lab/Scene.cpp @@ -768,8 +768,14 @@ Scene::draw_aux(bool with_names, CGAL::Three::Viewer_interface* viewer) fbos.resize(static_cast(viewer->total_pass())); depth_test.resize(static_cast(viewer->total_pass())-1); + int viewport[4]; + viewer->glGetIntegerv(GL_VIEWPORT, viewport); + + int w = viewport[2];// viewer->width(); + int h = viewport[3];// viewer->height(); + //first pass - fbos[0] = new QOpenGLFramebufferObject(viewer->width(), viewer->height(),QOpenGLFramebufferObject::Depth, GL_TEXTURE_2D, GL_RGBA32F); + fbos[0] = new QOpenGLFramebufferObject(w, h, QOpenGLFramebufferObject::Depth, GL_TEXTURE_2D, GL_RGBA32F); fbos[0]->bind(); viewer->glDisable(GL_BLEND); viewer->glEnable(GL_DEPTH_TEST); @@ -783,7 +789,8 @@ Scene::draw_aux(bool with_names, CGAL::Three::Viewer_interface* viewer) renderScene(opaque_items, viewer, picked_item_IDs, false, 0,false, nullptr); renderScene(transparent_items, viewer, picked_item_IDs, false, 0,false, nullptr); fbos[0]->release(); - depth_test[0] = new QOpenGLFramebufferObject(viewer->width(), viewer->height(),QOpenGLFramebufferObject::Depth, GL_TEXTURE_2D, GL_RGBA32F); + + depth_test[0] = new QOpenGLFramebufferObject(w, h,QOpenGLFramebufferObject::Depth, GL_TEXTURE_2D, GL_RGBA32F); depth_test[0]->bind(); viewer->glDisable(GL_BLEND); viewer->glEnable(GL_DEPTH_TEST); @@ -801,7 +808,7 @@ Scene::draw_aux(bool with_names, CGAL::Three::Viewer_interface* viewer) //other passes for(int i=1; itotal_pass()-1; ++i) { - fbos[i] = new QOpenGLFramebufferObject(viewer->width(), viewer->height(),QOpenGLFramebufferObject::Depth, GL_TEXTURE_2D, GL_RGBA32F); + fbos[i] = new QOpenGLFramebufferObject(w, h,QOpenGLFramebufferObject::Depth, GL_TEXTURE_2D, GL_RGBA32F); fbos[i]->bind(); viewer->glDisable(GL_BLEND); viewer->glEnable(GL_DEPTH_TEST); @@ -818,7 +825,7 @@ Scene::draw_aux(bool with_names, CGAL::Three::Viewer_interface* viewer) renderScene(transparent_items, viewer, picked_item_IDs, false, i, false, depth_test[i-1]); fbos[i]->release(); - depth_test[i] = new QOpenGLFramebufferObject(viewer->width(), viewer->height(),QOpenGLFramebufferObject::Depth, GL_TEXTURE_2D, GL_RGBA32F); + depth_test[i] = new QOpenGLFramebufferObject(w, h,QOpenGLFramebufferObject::Depth, GL_TEXTURE_2D, GL_RGBA32F); depth_test[i]->bind(); viewer->glDisable(GL_BLEND); viewer->glEnable(GL_DEPTH_TEST); @@ -834,9 +841,8 @@ Scene::draw_aux(bool with_names, CGAL::Three::Viewer_interface* viewer) depth_test[i]->release(); } - //last pass - fbos[static_cast(viewer->total_pass())-1] = new QOpenGLFramebufferObject(viewer->width(), viewer->height(),QOpenGLFramebufferObject::Depth, GL_TEXTURE_2D, GL_RGBA32F); + fbos[static_cast(viewer->total_pass())-1] = new QOpenGLFramebufferObject(w, h,QOpenGLFramebufferObject::Depth, GL_TEXTURE_2D, GL_RGBA32F); fbos[static_cast(viewer->total_pass())-1]->bind(); viewer->glDisable(GL_BLEND); viewer->glEnable(GL_DEPTH_TEST); diff --git a/Lab/demo/Lab/Scene_item.cpp b/Lab/demo/Lab/Scene_item.cpp index 1b54ec52993..104d2af1c10 100644 --- a/Lab/demo/Lab/Scene_item.cpp +++ b/Lab/demo/Lab/Scene_item.cpp @@ -15,6 +15,7 @@ CGAL::Three::Scene_item::Scene_item(int buffers_size, int vaos_size) are_buffers_filled(false), rendering_mode(FlatPlusEdges), defaultContextMenu(nullptr), + context_menu_outdated(false), buffersSize(buffers_size), vaosSize(vaos_size), vaos(vaos_size) @@ -94,6 +95,11 @@ QString CGAL::Three::Scene_item::renderingModeName() const } QMenu* CGAL::Three::Scene_item::contextMenu() { + if (context_menu_outdated && defaultContextMenu) { + delete defaultContextMenu; + defaultContextMenu = nullptr; + } + if(defaultContextMenu) { defaultContextMenu->setTitle(name()); return defaultContextMenu; @@ -111,14 +117,17 @@ QMenu* CGAL::Three::Scene_item::contextMenu() slotName(RenderingMode(mode))); defaultContextMenu->actions().last()->setProperty("is_groupable", true); } + + context_menu_outdated = false; + return defaultContextMenu; } void CGAL::Three::Scene_item::resetMenu() { - delete defaultContextMenu; - defaultContextMenu = nullptr; + context_menu_outdated = true; } + CGAL::Three::Scene_group_item* CGAL::Three::Scene_item::parentGroup() const { return parent_group; } diff --git a/Lab/demo/Lab/Scene_points_with_normal_item.cpp b/Lab/demo/Lab/Scene_points_with_normal_item.cpp index 0423a7d99b9..a75bf57bf79 100644 --- a/Lab/demo/Lab/Scene_points_with_normal_item.cpp +++ b/Lab/demo/Lab/Scene_points_with_normal_item.cpp @@ -850,6 +850,7 @@ QMenu* Scene_points_with_normal_item::contextMenu() container->menuAction()->setProperty("is_groupable", true); container->addAction(sliderAction); menu->addMenu(container); + d->normal_Slider->show(); } QMenu *container = new QMenu(tr("Points Size")); QWidgetAction *sliderAction = new QWidgetAction(nullptr); @@ -861,6 +862,7 @@ QMenu* Scene_points_with_normal_item::contextMenu() container->menuAction()->setProperty("is_groupable", true); container->addAction(sliderAction); menu->addMenu(container); + d->point_Slider->show(); d->actionDeleteSelection = menu->addAction(tr("Delete Selection")); d->actionDeleteSelection->setObjectName("actionDeleteSelection"); diff --git a/Lab/demo/Lab/Scene_textured_surface_mesh_item.cpp b/Lab/demo/Lab/Scene_textured_surface_mesh_item.cpp index d3fdcb2996d..5ebdf60c6df 100644 --- a/Lab/demo/Lab/Scene_textured_surface_mesh_item.cpp +++ b/Lab/demo/Lab/Scene_textured_surface_mesh_item.cpp @@ -74,7 +74,7 @@ Scene_textured_surface_mesh_item_priv::compute_normals_and_vertices(void) const faces_buffer.resize(0); typedef boost::graph_traits::face_iterator face_iterator; - typedef boost::graph_traits::face_iterator face_iterator; + const CGAL::qglviewer::Vec offset = static_cast(CGAL::QGLViewer::QGLViewerPool().first())->offset(); //Faces diff --git a/Lab/demo/Lab/Triangle_container.cpp b/Lab/demo/Lab/Triangle_container.cpp index 182f401c04d..062b3681e1c 100644 --- a/Lab/demo/Lab/Triangle_container.cpp +++ b/Lab/demo/Lab/Triangle_container.cpp @@ -185,8 +185,11 @@ void Triangle_container::draw(Viewer_interface* viewer, getVao(viewer)->program->setUniformValue("far", static_cast(viewer->camera()->zFar())); getVao(viewer)->program->setUniformValue("writing", viewer->isDepthWriting()); getVao(viewer)->program->setUniformValue("alpha", d->alpha); - if( fbo) + if(fbo) { viewer->glBindTexture(GL_TEXTURE_2D, fbo->texture()); + getVao(viewer)->program->setUniformValue("width", fbo->width() * 1.0f); + getVao(viewer)->program->setUniformValue("height", fbo->height() * 1.0f); + } } if(getVao(viewer)->program->property("drawLinesAdjacency").toBool()) { @@ -225,8 +228,11 @@ void Triangle_container::draw(Viewer_interface* viewer, getVao(viewer)->program->setUniformValue("far", static_cast(viewer->camera()->zFar())); getVao(viewer)->program->setUniformValue("writing", viewer->isDepthWriting()); getVao(viewer)->program->setUniformValue("alpha", d->alpha); - if( fbo) + if(fbo) { viewer->glBindTexture(GL_TEXTURE_2D, fbo->texture()); + getVao(viewer)->program->setUniformValue("width", fbo->width() * 1.0f); + getVao(viewer)->program->setUniformValue("height", fbo->height() * 1.0f); + } } if(getVao(viewer)->program->property("isInstanced").toBool()) { diff --git a/Lab/demo/Lab/Viewer.cpp b/Lab/demo/Lab/Viewer.cpp index 70c2b60e838..b93cb2cb7b1 100644 --- a/Lab/demo/Lab/Viewer.cpp +++ b/Lab/demo/Lab/Viewer.cpp @@ -1152,13 +1152,7 @@ void Viewer::drawVisualHints() //Prints the displayMessage QFont font = QFont(); QFontMetrics fm(font); - TextItem *message_text = new TextItem(float(10 + - #if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) - fm.horizontalAdvance(d->message)/2) - #else - fm.width(d->message)/2) - #endif - , + TextItem *message_text = new TextItem(float(10 + fm.horizontalAdvance(d->message)/2), float(height()-20), 0, d->message, false, QFont(), Qt::gray ); diff --git a/Lab/demo/Lab/Viewer.h b/Lab/demo/Lab/Viewer.h index 9989344a402..3af444f63b9 100644 --- a/Lab/demo/Lab/Viewer.h +++ b/Lab/demo/Lab/Viewer.h @@ -144,15 +144,15 @@ protected: void paintEvent(QPaintEvent *)override; void paintGL()override; - //!Defines the behaviour for the mouse press events + //!Defines the behavior for the mouse press events void mousePressEvent(QMouseEvent*)override; void mouseDoubleClickEvent(QMouseEvent*)override; void wheelEvent(QWheelEvent *)override; - //!Defines the behaviour for the key press events + //!Defines the behavior for the key press events void keyPressEvent(QKeyEvent*)override; //!Deal with context menu events void contextMenuEvent(QContextMenuEvent*)override; - //!Defines the behaviour for the key release events + //!Defines the behavior for the key release events void keyReleaseEvent(QKeyEvent *)override; protected: diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt b/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt index ce0dd87df2f..986cd4f2fdb 100644 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt +++ b/Linear_cell_complex/benchmark/Linear_cell_complex_2/CMakeLists.txt @@ -18,10 +18,8 @@ include_directories(BEFORE "/usr/include/libxml2/") # add_definitions("-g") # OpenMesh -set(OPENMESH_DIR "${CMAKE_CURRENT_SOURCE_DIR}/openmesh") find_package(OpenMesh REQUIRED) -include_directories(${OPENMESH_INCLUDE_DIR}) -link_directories(${OPENMESH_LIBRARY_DIR}) +include(CGAL_OpenMesh_support) # Polyhedron add_executable(polyhedron_performance performance_2.h polyhedron_performance.h @@ -42,7 +40,7 @@ target_link_libraries(surface_mesh_performance surface_mesh) # Open_mesh add_executable(openmesh_performance performance_2.h openmesh_performance.h openmesh_performance.cpp) -target_link_libraries(openmesh_performance ${OPENMESH_LIBRARIES}) +target_link_libraries(openmesh_performance CGAL::OpenMesh_support) # CGoGN find_package(Qt REQUIRED) @@ -91,4 +89,4 @@ target_link_libraries( Zinri z ${QT_LIBRARIES} - ${OPENMESH_LIBRARIES}) + CGAL::OpenMesh_support) diff --git a/Linear_cell_complex/benchmark/Linear_cell_complex_2/cmake/FindOpenMesh.cmake b/Linear_cell_complex/benchmark/Linear_cell_complex_2/cmake/FindOpenMesh.cmake deleted file mode 100644 index 98aefc13d23..00000000000 --- a/Linear_cell_complex/benchmark/Linear_cell_complex_2/cmake/FindOpenMesh.cmake +++ /dev/null @@ -1,40 +0,0 @@ -# Find OpenMesh. If found, this will define -# -# OPENMESH_FOUND - Successfully found OpenMesh -# OPENMESH_INCLUDE_DIR - OpenMesh include directory -# OPENMESH_LIBRARIES - OpenMesh libraries -# OPENMESH_LIBRARY_DIR - OpenMesh library directory -# - -if(DEFINED OPENMESH_INCLUDE_DIR) - set(OPENMESH_FIND_QUIETLY TRUE) -else() - - find_path(OPENMESH_INCLUDE_DIR OpenMesh/Core/Mesh/PolyMeshT.hh - PATHS - /usr/local/include - /usr/include - $ENV{OPENMESH_DIR}/include - ${OPENMESH_DIR}/include - ) - - if(DEFINED OPENMESH_INCLUDE_DIR) - - message(STATUS "Found OpenMesh: " ${OPENMESH_INCLUDE_DIR}) - set(OPENMESH_FOUND true) - - if(WIN32) - set(OPENMESH_LIBRARY_DIR "${OPENMESH_INCLUDE_DIR}/../lib" - CACHE PATH "OpenMesh library directory") - else() - set(OPENMESH_LIBRARY_DIR "${OPENMESH_INCLUDE_DIR}/../lib/OpenMesh" - CACHE PATH "OpenMesh library directory") - endif() - - set(OPENMESH_LIBRARIES "OpenMeshCore;OpenMeshTools" - CACHE STRING "OpenMesh libraries") - - else() - set(OPENMESH_FOUND FALSE) - endif() -endif() diff --git a/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.cpp b/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.cpp index 9237d191347..04d95629494 100644 --- a/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.cpp +++ b/Linear_cell_complex/demo/Linear_cell_complex/MainWindow.cpp @@ -1012,7 +1012,7 @@ void MainWindow::on_actionMerge_coplanar_faces_triggered() timer.start(); #endif - scene.lcc->set_update_attributes(false); + scene.lcc->set_automatic_attributes_management(false); std::vector edges; LCC::size_type treated = scene.lcc->get_new_mark(); @@ -1073,7 +1073,7 @@ void MainWindow::on_actionMerge_coplanar_faces_triggered() scene.lcc->free_mark(treated); scene.lcc->free_mark(treated2); - scene.lcc->set_update_attributes(true); + scene.lcc->set_automatic_attributes_management(true); #ifdef CGAL_PROFILE_LCC_DEMO timer.stop(); @@ -1100,7 +1100,7 @@ void MainWindow::on_actionMerge_all_volumes_triggered() LCC::Dart_range::iterator prev; bool first = true; - scene.lcc->set_update_attributes(false); + scene.lcc->set_automatic_attributes_management(false); for (LCC::Dart_range::iterator it(scene.lcc->darts().begin()), itend=scene.lcc->darts().end(); it!=itend; ) @@ -1127,7 +1127,7 @@ void MainWindow::on_actionMerge_all_volumes_triggered() } } - scene.lcc->set_update_attributes(true); + scene.lcc->set_automatic_attributes_management(true); #ifdef CGAL_PROFILE_LCC_DEMO timer.stop(); @@ -1751,7 +1751,7 @@ void MainWindow::onMengerInc() if (!mengerUpdateAttributes) { - scene.lcc->set_update_attributes(false); + scene.lcc->set_automatic_attributes_management(false); } std::vector edges; @@ -1838,7 +1838,7 @@ void MainWindow::onMengerInc() update_volume_list_add(scene.lcc->attribute<3>(mengerVolumes[i])); } - scene.lcc->set_update_attributes(true); + scene.lcc->set_automatic_attributes_management(true); } #ifdef CGAL_PROFILE_LCC_DEMO @@ -2780,7 +2780,7 @@ void MainWindow::sierpinski_carpet_copy_attributes_and_embed_vertex LCC::Helper::Foreach_enabled_attributes_except , 0>:: run(*(scene.lcc),sierpinskiCarpetSurfaces[0],it); - // We initialise the 0-atttrib to ah + // We initialize the 0-atttrib to ah scene.lcc->set_dart_attribute<0>(it, ah); } } diff --git a/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt b/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt index cac02fc6200..d58e0f6e2e5 100644 --- a/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt +++ b/Linear_cell_complex/doc/Linear_cell_complex/Linear_cell_complex.txt @@ -252,7 +252,7 @@ Before applying the sew operation, the eight vertices of the first cube are colo \subsection Linear_cell_complexAutomaticAttributesManagement Automatic Attribute Management \anchor ssecAttributesManagement -The following example illustrates the use of the automatic attributes management for a linear cell complex. An off file is loaded into a 2D linear cell complex embedded in 3D. Then, a certain percentage of edges is removed from the linear cell complex. The same method is applied twice: the first time by using the automatic attributes management (which is the default behaviour) and the second time by calling first \link GenericMap::set_automatic_attributes_management `set_automatic_attributes_management(false)`\endlink to disable the automatic updating of attributes. +The following example illustrates the use of the automatic attributes management for a linear cell complex. An off file is loaded into a 2D linear cell complex embedded in 3D. Then, a certain percentage of edges is removed from the linear cell complex. The same method is applied twice: the first time by using the automatic attributes management (which is the default behavior) and the second time by calling first \link GenericMap::set_automatic_attributes_management `set_automatic_attributes_management(false)`\endlink to disable the automatic updating of attributes. We can observe that the second run is faster than the first one. Indeed, updating attribute for each edge removal give a bigger complexity. Moreover, the gain increases when the percentage of removed edges increases. diff --git a/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h b/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h index 6681a4bb8b3..b1943bca3c4 100644 --- a/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h +++ b/Linear_cell_complex/include/CGAL/Linear_cell_complex_base.h @@ -836,7 +836,7 @@ namespace CGAL { /** Set the status of the management of the attributes of the Map */ - void set_update_attributes(bool newval) + void set_automatic_attributes_management(bool newval) { if (this->automatic_attributes_management == false && newval == true) { @@ -847,6 +847,10 @@ namespace CGAL { this->automatic_attributes_management = newval; } + + void set_automatic_attributes_management_without_correction(bool newval) + { this->automatic_attributes_management = newval; } + }; } // namespace CGAL diff --git a/MacOSX/auxiliary/cgal_app.icns b/MacOSX/auxiliary/cgal_app.icns deleted file mode 100644 index 19cc33fadb1..00000000000 Binary files a/MacOSX/auxiliary/cgal_app.icns and /dev/null differ diff --git a/MacOSX/package_info/MacOSX/copyright b/MacOSX/package_info/MacOSX/copyright deleted file mode 100644 index 0f433a97f01..00000000000 --- a/MacOSX/package_info/MacOSX/copyright +++ /dev/null @@ -1 +0,0 @@ -Foundation for Research and Technology-Hellas (Greece). \ No newline at end of file diff --git a/MacOSX/package_info/MacOSX/description.txt b/MacOSX/package_info/MacOSX/description.txt deleted file mode 100644 index 93fd0201502..00000000000 --- a/MacOSX/package_info/MacOSX/description.txt +++ /dev/null @@ -1,3 +0,0 @@ -Package for MacOSX support. -Contains scripts and icon files needed for creating demos -in the MacOSX operating system. diff --git a/MacOSX/package_info/MacOSX/maintainer b/MacOSX/package_info/MacOSX/maintainer deleted file mode 100644 index b172ee135bb..00000000000 --- a/MacOSX/package_info/MacOSX/maintainer +++ /dev/null @@ -1 +0,0 @@ -Menelaos Karavelas diff --git a/MacOSX/scripts/cgal_make_macosx_app b/MacOSX/scripts/cgal_make_macosx_app deleted file mode 100755 index 045cec21c0a..00000000000 --- a/MacOSX/scripts/cgal_make_macosx_app +++ /dev/null @@ -1,102 +0,0 @@ -#!/bin/sh - -# Copyright (c) 2005,2006,2013 -# Foundation for Research and Technology-Hellas (Greece). -# All rights reserved. -# -# This file is part of CGAL (www.cgal.org); you can redistribute it and/or -# modify it under the terms of the GNU Lesser General Public License as -# published by the Free Software Foundation; version 3 of the License, -# or (at your option) any later version. -# -# Licensees holding a valid commercial license may use this file in -# accordance with the commercial license agreement provided with the software. -# -# This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE -# WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. -# -# $URL$ -# $Id$ -# SPDX-License-Identifier: LGPL-3.0-or-later OR LicenseRef-Commercial -# -# Authors: Herve Bronnimann -# Menelaos Karavelas -# Eric Berberich - -# This script creates the appropriate directory structure so that a CGAL -# Qt demo can be run on MacOSX - -usage() -{ - echo "Usage: cgal_make_macosx_app executable" -} - - -case $# in - 0) usage - exit 1 -esac - - -for i do - if [ -x "$i" ] ; then - EXECUTABLE=$i - else - usage - exit 1 - fi -done - -if [ -z "$EXECUTABLE.app" ] ; then - mkdir $EXECUTABLE.app -fi - -test -d $EXECUTABLE.app/Contents/MacOS/ || mkdir -p $EXECUTABLE.app/Contents/MacOS/ -strip $EXECUTABLE -cp $EXECUTABLE $EXECUTABLE.app/Contents/MacOS/$EXECUTABLE - -rm -f $EXECUTABLE.app/Contents/PkgInfo -echo "APPL????" > $EXECUTABLE.app/Contents/PkgInfo - -rm -f $EXECUTABLE.app/Contents/Info.plist -cat > $EXECUTABLE.app/Contents/Info.plist < - - - - CFBundleIconFile - cgal_app.icns - CFBundlePackageType - APPL - CFBundleGetInfoString - Created by CGAL - CFBundleSignature - ttxt - CFBundleExecutable - $EXECUTABLE -ENDINFO - -if [ -d "help" ] ; then -cat >> $EXECUTABLE.app/Contents/Info.plist <CFBundleHelpBookFolder - Help - CFBundleHelpBookName - Help -ENDINFO - test -d $EXECUTABLE.app/Contents/Resources/Help || mkdir -p $EXECUTABLE.app/Contents/Resources/Help - cp -r help/* $EXECUTABLE.app/Contents/Resources/Help - ln -s index.html $EXECUTABLE.app/Contents/Resources/Help/Help.html -fi - -cat >> $EXECUTABLE.app/Contents/Info.plist <NOTE - This file was generated by CGAL/scripts/cgal_make_macosx_app. - - -ENDINFO - -test -d $EXECUTABLE.app/Contents/Resources || mkdir -p $EXECUTABLE.app/Contents/Resources -DIR=$( cd "$( dirname "$0" )" && pwd ) -cp $DIR/../auxiliary/cgal_app.icns $EXECUTABLE.app/Contents/Resources -echo "created $EXECUTABLE.app ..." diff --git a/Maintenance/deb/ANNOUNCEMENT.beta b/Maintenance/deb/ANNOUNCEMENT.beta deleted file mode 100644 index ec79d927b55..00000000000 --- a/Maintenance/deb/ANNOUNCEMENT.beta +++ /dev/null @@ -1,23 +0,0 @@ -Debian packages for CGAL 4.1 Beta 1 are now available for i386 and -amd64. To download the packages via apt-get you need to add - - deb http://www.joachim-reichel.de/debian/repository squeeze main - deb-src http://www.joachim-reichel.de/debian/repository squeeze main - - deb http://www.joachim-reichel.de/debian/repository wheezy main - deb-src http://www.joachim-reichel.de/debian/repository wheezy main - - deb http://www.joachim-reichel.de/debian/repository sid main - deb-src http://www.joachim-reichel.de/debian/repository sid main - -to /etc/apt/sources.list (you only need the pair of lines corresponding -to the release you are using). The packages are called libcgal10, -libcgal-dev, libcgal-demo, and libcgal-ipelets. - -In case you want to download the packages manually, have a look at -http://www.joachim-reichel.de/debian/repository/pool/main/c/cgal/ - -For the final 4.1 release, similar packages will be uploaded to the -official Debian repository and/or be available from the CGAL web site. - -See also https://www.cgal.org/FAQ.html#debian_packages . diff --git a/Maintenance/deb/ANNOUNCEMENT.final b/Maintenance/deb/ANNOUNCEMENT.final index 6e42416b3e0..1a59493934b 100644 --- a/Maintenance/deb/ANNOUNCEMENT.final +++ b/Maintenance/deb/ANNOUNCEMENT.final @@ -1,18 +1,19 @@ -Debian packages for CGAL 4.1 are now available as well. Simply add +Debian packages for CGAL 6.0 are now available as well. Simply add - deb ftp://ftp.mpi-sb.mpg.de/pub/outgoing/CGAL/debian squeeze main - deb-src ftp://ftp.mpi-sb.mpg.de/pub/outgoing/CGAL/debian squeeze main + deb http://debian.cgal.org bullseye main + deb-src http://debian.cgal.org bullseye main - deb ftp://ftp.mpi-sb.mpg.de/pub/outgoing/CGAL/debian wheezy main - deb-src ftp://ftp.mpi-sb.mpg.de/pub/outgoing/CGAL/debian wheezy main + deb http://debian.cgal.org bookworm main + deb-src http://debian.cgal.org bookworm main -to /etc/apt/sources list (you only need the pair of lines corresponding -to the release you are using). For sid, packages should be available -from the official Debian repository in a few days. The packages are called -libcgal10, libcgal-dev, libcgal-qt4-10. libcgal-qt4-dev, libcgal-demo, and -libcgal-ipelets. +to /etc/apt/sources.list (you only need the pair of lines +corresponding to the release you are using) and make sure that the +package apt-transport-https is installed. For sid/unstable, +packages are available from the official Debian repository. The +packages are called libcgal-dev, libcgal-qt6-dev, libcgal-demo, +and libcgal-ipelets. In case you want to download the packages manually, have a look at -ftp://ftp.mpi-sb.mpg.de/pub/outgoing/CGAL/debian/pool/main/c/cgal/ +https://debian.cgal.org/pool/main/c/cgal/ . See also https://www.cgal.org/FAQ.html#debian_packages . diff --git a/Maintenance/deb/README b/Maintenance/deb/README index dbac2f07496..13c620b938f 100644 --- a/Maintenance/deb/README +++ b/Maintenance/deb/README @@ -4,54 +4,10 @@ README Backports --------- -backport for wheezy: +backport for trixie: - debian/changelog: - * adjust version suffix from -X to -X~wheezy1 - * adjust suite from unstable to testing + * add new section with version suffix ...-X~deb13u1 and suite testing -backport for squeeze: +backport for bookworm: - debian/changelog: - * adjust version suffix from -X to -X~squeeze1 - * adjust suite from unstable to stable -- debian/control - * adjust Standards-Version from 3.9.3 to 3.9.1 - * replace libgmp10-dev by libgmp3-dev (twice) - * adjust debhelper minimum version from 9 to 8 -- debian/compat - * adjust debhelper compatibility version from 9 to 8 - - -Tags ----- - -svn copy $SVNROOT/branches/next/Maintenance/deb/sid/debian $SVNROOT/tags/debian/4.1-1 -m "Tag for revision 4.1-1" -svn copy $SVNROOT/branches/next/Maintenance/deb/wheezy/debian $SVNROOT/tags/debian/4.1-1~wheezy1 -m "Tag for revision 4.1-1~wheezy1" -svn copy $SVNROOT/branches/next/Maintenance/deb/squeeze/debian $SVNROOT/tags/debian/4.1-1~squeeze1 -m "Tag for revision 4.1-1~squeeze1" - - -FTP server ----------- - -# on my server -cd /var/tmp -tar xjf cgal.org-debian-repository.tar.bz2 -cd cgal.org-debian-repository -mv pool/main/c/cgal/* archive -reprepro -b . include wheezy|squeeze /path/to/*.changes -cd .. -tar cjf cgal.org-debian-repository.tar.bz2 cgal.org-debian-repository -cd cgal.org-debian-repository -rm -fr archive conf db -tar cjf /srv/www/www.joachim-reichel.de/tmp/cgal.tar.bz2 . -cd .. -rm -fr cgal.org-debian-repository - -# on MPI machine -cd /tmp -wget http://www.joachim-reichel.de/tmp/cgal.tar.bz2 -su cgal -cd /ftp/pub/outgoing/CGAL/debian -mv pool/main/c/cgal/* archive -rm -fr dists pool -tar xjf /tmp/cgal.tar.bz2 -# There should be 3 subdirectories "archive", "dists", and "pool" now. + * add new section with version suffix ...-X~deb12u1 and suite stable diff --git a/Maintenance/deb/TODO b/Maintenance/deb/TODO deleted file mode 100644 index d82dbbb34ce..00000000000 --- a/Maintenance/deb/TODO +++ /dev/null @@ -1,3 +0,0 @@ -TODO -==== - diff --git a/Maintenance/deb/sid/debian/NEWS.Debian b/Maintenance/deb/sid/debian/NEWS.Debian deleted file mode 100644 index 938dde2d1fe..00000000000 --- a/Maintenance/deb/sid/debian/NEWS.Debian +++ /dev/null @@ -1,9 +0,0 @@ -cgal (4.2-1) unstable; urgency=low - - The Qt4 support library libCGAL_Qt4.so.10.0.0 has been moved from the package - libcgal10 to the new package libcgal-qt4-10. Similarly, the corresponding - headers and the static library have been moved from the package libcgal-dev - to the new package libcgal-qt4-dev. That is the packages libcgal10 and - libcgal-dev do not any longer depend on the Qt packages. - - -- Joachim Reichel Sun, 02 Sep 2012 12:31:08 +0200 diff --git a/Maintenance/deb/sid/debian/README.Debian b/Maintenance/deb/sid/debian/README.Debian deleted file mode 100644 index def38fe860b..00000000000 --- a/Maintenance/deb/sid/debian/README.Debian +++ /dev/null @@ -1,50 +0,0 @@ -README.Debian -------------- - -The homepage of CGAL (https://www.cgal.org/) offers more information about CGAL. -In particular, a mailing list and the documentation for the library (in PDF and -HTML) are available. The authors ask you to give some feedback about your usage -of CGAL in a short questionnaire (in the download section). - - -Documentation -------------- - -Note that the CGAL documentation cannot be packaged for Debian due to unclear -license conditions. The complete documentation in PDF and HTML is available at -https://www.cgal.org/. - - -Demos and examples ------------------- - -Tarballs with demos and examples can be found in /usr/share/doc/libcgal-demo. -Extract the tarballs somewhere and call "cmake ." to configure the -demos/examples. Call "make" to build them, either in the top-level directory -to build all demos/examples (which takes some time and needs quite some disk -space), or in the subdirectory of the desired demo/example. The cmake option --DCMAKE_VERBOSE_MAKEFILE=ON is useful to generate verbose makefiles that show -each executed command. - - -Demos using libQGLViewer ------------------------- - -The Debian package of libQGLViewer uses non-standard library names to offer the -library in a Qt3 and Qt4 flavor. The build system of CGAL has been patched to -handle the non-standard library name. If your libQGLViewer packages are older -than 2.3.1-4 you need to work around another problem with the non-standard -include directory. Create an include directory with the expected name -"QGLViewer", e.g., - - mkdir -p /some/dir - ln -s /usr/include/qglviewer-qt4 /some/dir/QGLViewer - -and pass the option - - -DQGLVIEWER_INCLUDE_DIR=/some/dir - -to cmake. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522659 for more -information. - - -- Joachim Reichel Sat, 06 Feb 2010 12:29:02 +0100 diff --git a/Maintenance/deb/sid/debian/README.source b/Maintenance/deb/sid/debian/README.source deleted file mode 100644 index 662cd01c5da..00000000000 --- a/Maintenance/deb/sid/debian/README.source +++ /dev/null @@ -1,11 +0,0 @@ -normalize-audio for Debian --------------------------- - -This package uses quilt to manage all modifications to the upstream source. -Changes are stored in the source package as diffs in debian/patches and -applied during the build. - -See /usr/share/doc/quilt/README.source for a detailed explanation. - - -- Joachim Reichel Sun, 15 Jan 2012 14:38:04 +0100 - diff --git a/Maintenance/deb/sid/debian/changelog b/Maintenance/deb/sid/debian/changelog deleted file mode 100644 index aafd8ca8c0c..00000000000 --- a/Maintenance/deb/sid/debian/changelog +++ /dev/null @@ -1,348 +0,0 @@ -cgal (4.1-1) unstable; urgency=low - - * New upstream release. - * Rename binary package libcgal9 to libcgal10 to reflect SONAME change. - * Configure CGAL using -DCGAL_ENABLE_PRECONFIG=OFF since we do not want - that the accidental presence of optional libraries (for demos and - examples) influences the build of the library. - * Move the Qt4 support library and the corresponding headers into new - binary packages libcgal-qt4-10 and libcgal-qt4-dev (Closes: #683214). - * Add libboost-system-dev to Builds-Depends: of cgal. - * Move libmpfi-dev from Suggests: of cgal-demo to Build-Depends: of cgal. - - -- Joachim Reichel Wed, 24 Oct 2012 19:08:35 +0200 - -cgal (4.0.2-1) unstable; urgency=low - - * New upstream release. - * Remove gcc-4.7 patch (fixed upstream). - - -- Joachim Reichel Wed, 04 Jul 2012 19:45:28 +0200 - -cgal (4.0-4) unstable; urgency=low - - * Add Suggests: libeigen3-dev (>= 3.1.0~beta1-1), libmpfi-dev to - libcgal-demo. - - -- Joachim Reichel Tue, 12 Jun 2012 23:53:14 +0200 - -cgal (4.0-3) unstable; urgency=low - - * Change Build-Depends: debhelper (>= 8) to debhelper (>= 9), update - debian/compat to get the default build flags for hardening. Inject - CPPFLAGS into CFLAGS and CXXFLAGS, since CPPFLAGS is ignored by cmake. - * Add lintian override to silence incorrect warnings about - hardening-no-fortify-functions for some libraries (all libraries are - built with the same flags). - - -- Joachim Reichel Sun, 10 Jun 2012 15:36:27 +0200 - -cgal (4.0-2) unstable; urgency=low - - * Add patch gcc-4.7 to fix a syntax error in template code which is - not instantiated during the package build itself (Closes: #673554). - * Fix debian/watch. - - -- Joachim Reichel Sun, 20 May 2012 22:47:56 +0200 - -cgal (4.0-1) unstable; urgency=low - - * New upstream release. - * Move from non-free to main due to upstream license change from QPL - to GPL 3+ (and from LGPL 2.1 to LGPL 3+), updated debian/copyright - accordingly. - * Rename binary package libcgal8 to libcgal9 to reflect SONAME change. - * Update Standards-Version to 3.9.3 (no changes needed). - * Remove fix-ipe-version-detection.dpatch and - fix-qt-moc-parse-error.dpatch (fixed upstream). - * Removed libmagick++9-dev from Suggests: of libcgal-demo, because - that package does no longer exists. - - -- Joachim Reichel Mon, 12 Mar 2012 19:14:55 +0100 - -cgal (3.9-4) unstable; urgency=low - - * Rebuild against boost 1.48 (Closes: #659358). - * Add fix-qt-moc-parse-error.dpatch as workaround for - https://bugreports.qt-project.org/browse/QTBUG-22829. - - -- Joachim Reichel Fri, 10 Feb 2012 22:41:26 +0100 - -cgal (3.9-3) unstable; urgency=low - - * Fix FTBFS when building only architecture dependent packages caused - by recent transition to the new packaging format (Closes: #658191). - - -- Joachim Reichel Wed, 01 Feb 2012 00:07:03 +0100 - -cgal (3.9-2) unstable; urgency=low - - * Changed packaging format to "3.0 (quilt)". - * Add fix-ipe-version-detection.dpatch: upstream patch for bug #643278. - Remove workaround. - * Tighten Depends: of libcgal-ipelets on ipe (Closes: #657720). - * Move libcgal-ipelets to Section: graphics. - * Add libqt4-opengl-dev to Suggests: of libcgal-demo. - - -- Joachim Reichel Mon, 30 Jan 2012 19:04:18 +0100 - -cgal (3.9-1) unstable; urgency=low - - * New upstream release. - * Rename binary package libcgal7 to libcgal8 to reflect SONAME change. - * Add workaround for bug #643278. - - -- Joachim Reichel Wed, 28 Sep 2011 19:51:35 +0200 - -cgal (3.8-1) unstable; urgency=low - - * New upstream release. - * Rename binary package libcgal6 to libcgal7 to reflect SONAME change. - * Update Standards-Version to 3.9.2 (no changes needed). - - -- Joachim Reichel Thu, 21 Apr 2011 18:45:25 +0200 - -cgal (3.7-5) unstable; urgency=low - - * Upload to unstable. - - -- Joachim Reichel Sun, 06 Mar 2011 17:26:11 +0100 - -cgal (3.7-4) experimental; urgency=low - - * Build with libgmp10 (Closes: #614797). Thanks to Christian M. Amsüss. - - -- Joachim Reichel Sun, 27 Feb 2011 16:36:22 +0100 - -cgal (3.7-3) unstable; urgency=low - - * Disable support for Qt3 because Qt3 has been removed from the repository - (Closes: #604478). - - -- Joachim Reichel Thu, 10 Feb 2011 21:06:09 +0100 - -cgal (3.7-2) unstable; urgency=low - - * Upload to unstable. - - -- Joachim Reichel Sun, 06 Feb 2011 13:53:00 +0100 - -cgal (3.7-1) experimental; urgency=low - - * New upstream release. - * Rename binary package libcgal5 to libcgal6 to reflect SONAME change. - * Rename binary package libcgal5-ipelets to libcgal-ipelets because it is - not possible to install the ipelets for different SONAMEs in parallel. - * Remove ipe-default-to-version-7.dpatch: the Ipe version is now - auto-detected. - * Remove fix-core-64bit.dpatch (fixed upstream). - * Add qt4-dev-tools to Suggests: of libcgal-demo for qcollectiongenerator. - * Update Standards-Version to 3.9.1 (-D_REENTRANT no longer needed). - - -- Joachim Reichel Sun, 17 Oct 2010 14:27:54 +0200 - -cgal (3.6.1-2) unstable; urgency=low - - * Add fix-core-64bit.dpatch: use CORE::CHUNK_BIT instead of hard-coded - constant 14. - - -- Joachim Reichel Tue, 24 Aug 2010 19:46:36 +0200 - -cgal (3.6.1-1) unstable; urgency=low - - * New upstream release. - * Set SOVERSION explicitly to 5.0.1 as told by upstream. - * Remove architecture exceptions from Suggests: for libcgal-demo which is no - longer allowed by dpkg-gencontrol (see #560071). - * Fix debian/watch file. - * Change license of packaging to LGPL 2.1 or later because referencing the - BSD license in /usr/share/common-licenses is deprecated. - * Update Standards-Version to 3.9.0 (no changes needed). - - -- Joachim Reichel Thu, 01 Jul 2010 23:37:41 +0200 - -cgal (3.6-1) unstable; urgency=low - - * New upstream release. - * Rename binary package libcgal4 to libcgal5 to reflect SONAME change. - * Remove fix-cmake-qglviewer-detection.dpatch (fixed upstream). - * New binary package libcgal5-ipelets which contains plugins for Ipe 7.x - (Closes: #557643). - * Add ipe-default-to-version-7.dpatch: change default of WITH_IPE_7 to ON. - * Remove libboost-graph1.35-dev from Build-Depends: and Suggests: of - libcgal-demo (not needed). - - -- Joachim Reichel Mon, 22 Mar 2010 19:09:15 +0100 - - -cgal (3.5.1-2) unstable; urgency=low - - * Add fix-cmake-qglviewer-detection.dpatch (Closes: #564126), thanks to - Marc Glisse for the patch. - * Update Standards-Version to 3.8.4 (no changes needed). - - -- Joachim Reichel Sat, 06 Feb 2010 12:29:02 +0100 - -cgal (3.5.1-1) unstable; urgency=low - - * New upstream release. - * Fix error in handling of "debug" and "nostrip" in $(DEB_BUILD_OPTIONS) - (see also #552961). - * Unset QTDIR before calling cmake to reduce problems in non-clean build - environments. - * Add ${misc:Depends} to Depends: of all binary packages as found by - lintian. - - -- Joachim Reichel Sun, 22 Nov 2009 22:31:00 +0100 - -cgal (3.5-1) unstable; urgency=low - - * New upstream release. - * Rename binary package libcgal3 to libcgal4 to reflect SONAME change. - * Remove fix-FindCGAL-cmake.dpatch (fixed upstream). - * Remove fix-demos-examples-configuration.dpatch (fixed upstream). - * Remove add-cmake-2.6.3-support.dpatch (fixed upstream). - * Remove fix-demo-polyheron-3.dpatch (fixed upstream). - * Remove "-mieee -mfp-rounding-mode=d" from CGAL_CXX_FLAGS on alpha - (fixed upstream). - - -- Joachim Reichel Sat, 03 Oct 2009 16:43:08 +0200 - -cgal (3.4-5) unstable; urgency=low - - * Return to unversioned boost dependencies. - * Re-add working watch file. - * Update Standards-Version to 3.8.3 (no changes needed). - - -- Joachim Reichel Wed, 16 Sep 2009 19:25:09 +0200 - -cgal (3.4-4) unstable; urgency=low - - * Add patch fix-demos-examples-configuration.dpatch. - * Add patch add-cmake-2.6.3-support.dpatch. - * Add patch fix-demo-polyheron-3.dpatch. - * Fix support for nocheck in DEB_BUILD_OPTIONS (was broken in 3.4-3). - - -- Joachim Reichel Fri, 01 May 2009 17:31:00 +0200 - -cgal (3.4-3) unstable; urgency=low - - * Update boost dependencies to 1.38. - * Remove watch file (new upstream location uses unpredictable paths). - * Update Standards-Version to 3.8.1 (add support for nocheck in - DEB_BUILD_OPTIONS). - * Change Suggests: dependency of libcgal-demo from libqglviewer-dev - to libqglviewer-qt4-dev (all demos using libQGLViewer use Qt4). - * Add workaround for #522659 to README.Debian. - - -- Joachim Reichel Sat, 18 Apr 2009 11:46:19 +0200 - -cgal (3.4-2) unstable; urgency=low - - * Add "-mieee -mfp-rounding-mode=d" to CGAL_CXX_FLAGS on alpha (got lost - during the transition to cmake). - - -- Joachim Reichel Sun, 15 Feb 2009 15:06:31 +0100 - -cgal (3.4-1) unstable; urgency=low - - * New upstream release. - * Adapt debian/rules to the new cmake-based build system. - * Downgrade LAPACK- and BLAS-related Build-Depends: to Suggests: for - libcgal-demo, since it is now possible to configure demos and examples - independently of the library. - - -- Joachim Reichel Thu, 22 Jan 2009 18:39:44 +0100 - -cgal (3.3.1-4) unstable; urgency=low - - * Remove fortran-transition.dpatch, update build-library.dpatch: - Do not link with -lg2c in configuration tests (Closes: #475721). - * Update cgal_create_makefile.dpatch to remove bashisms (Closes: #486045). - * Update debian/tests/rounding_modes2.cpp to stop constant propagation. - * Update Standards-Version to 3.8.0 (explain in debian/copyright why package - is in non-free). - - -- Joachim Reichel Sun, 15 Jun 2008 22:11:14 +0200 - -cgal (3.3.1-3) unstable; urgency=low - - * Add patch fortran-transition.dpatch (Closes: #470359), thanks to Kumar - Appaiah for the patch. - * debian/rules: s/lapack3-dev/liblapack-dev/, - s/atlas3-base-dev/libatlas-base-dev/, s/libatlas-3.so/libatlas.so.3gf/ . - * Fix manpage w.r.t. makefile vs. cgal.mk (Closes: #466430). - * Add second test for FPU rounding modes. - - -- Joachim Reichel Wed, 19 Mar 2008 20:27:34 +0100 - -cgal (3.3.1-2) unstable; urgency=low - - * debian/control: Really really drop support for atlas and lapack on arm - and m68k, fix atlas and lapack support on other architectures. - * debian/control: Extend exclusions for arm to variants armeb and armel - (Closes: #460141). - * debian/control: Remove virtual dependency liblapack-3.so which is - provided by atlas3-base-dev (which does *not* provide - /usr/lib/liblapack.so, just /usr/lib/atlas/liblapack.so). - * debian/control: Replace virtual dependency libblas-3.so by - libatlas-3.so. - * Add patch qt-compatibility-headers.dpatch (Closes: #464251). - * debian/control: Add Homepage: field, adjust Description: accordingly. - * Update Standards-Version to 3.7.3 (no changes needed). - - -- Joachim Reichel Wed, 06 Feb 2008 18:37:52 +0100 - -cgal (3.3.1-1) unstable; urgency=low - - * New upstream release. - * Remove patch bugfix-fpu-rounding-mode-alpha.dpatch (included by - upstream). - * Fail build if FPU rounding mode test fails. - * Really drop support for atlas and lapack on arm and m68k. - * Fix cgal_create_makefile w.r.t. makefile vs. cgal.mk. - - -- Joachim Reichel Mon, 3 Sep 2007 18:57:36 +0200 - -cgal (3.3-2) unstable; urgency=low - - * Add patch bugfix-fpu-rounding-mode-alpha.dpatch (Closes: #431230). - * debian/control: Add versioned depends on libboost-program-options-dev, - drop build-dependency on libboost-graph-dev. - * Drop support for atlas on arm and m68k. - - -- Joachim Reichel Mon, 16 Jul 2007 15:32:35 +0200 - -cgal (3.3-1) unstable; urgency=low - - * New upstream release. - - -- Joachim Reichel Sun, 3 Jun 2007 09:36:36 +0200 - -cgal (3.2.1-2) unstable; urgency=low - - * Fix FTBFS on hppa (and probably also on other architectures) related - to FPU rounding modes (Closes: #404464). - * debian/control: Add tag XS-Autobuild. - * debian/copyright: Add note about autobuilding. - * debian/control: Make package binNMU-safe. - * Remove linda override for bug #369977 (no longer needed). - * Add watch file. - - -- Joachim Reichel Fri, 26 Jan 2007 19:16:36 +0100 - -cgal (3.2.1-1) unstable; urgency=low - - * New upstream release. - * Add linda override for bug #369977. - * Remove patch bugfix-demo-examples-makefiles.dpatch (no longer needed). - - -- Joachim Reichel Fri, 14 Jul 2006 21:20:16 +0200 - -cgal (3.2-1) unstable; urgency=low - - * New upstream release. - * First upload to Debian archive. (Closes: #251885) - - -- Joachim Reichel Mon, 29 May 2006 20:24:27 +0200 -5~ diff --git a/Maintenance/deb/sid/debian/compat b/Maintenance/deb/sid/debian/compat deleted file mode 100644 index ec635144f60..00000000000 --- a/Maintenance/deb/sid/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/Maintenance/deb/sid/debian/control b/Maintenance/deb/sid/debian/control deleted file mode 100644 index 865bd762a15..00000000000 --- a/Maintenance/deb/sid/debian/control +++ /dev/null @@ -1,120 +0,0 @@ -Source: cgal -Priority: optional -Maintainer: Joachim Reichel -# "ipe" is only needed because it contains goodies.lua which is needed by FindIPE.cmake -Build-Depends: debhelper (>= 9), dpkg-awk, cmake, zlib1g-dev, libboost-dev, - libboost-thread-dev, libboost-program-options-dev, libboost-system-dev, - libgmp10-dev, libmpfr-dev, libmpfi-dev, libqt4-dev, libqt4-opengl-dev, - libipe-dev (>= 7), ipe -Standards-Version: 3.9.3 -Section: libs -Homepage: https://www.cgal.org/ -XS-Autobuild: yes - -Package: libcgal10 -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: C++ library for computational geometry - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - The CGAL library contains: - - the Kernel with geometric primitives such as points, vectors, lines, - predicates for testing things such as relative positions of points, and - operations such as intersections and distance calculation. - - the Basic Library which is a collection of standard data structures and - geometric algorithms, such as convex hull in 2D/3D, (Delaunay) - triangulation in 2D/3D, planar map, polyhedron, smallest enclosing circle, - and multidimensional query structures. - - the Support Library which offers interfaces to other packages, e.g., for - visualisation, and I/O, and other support facilities. - . - This package contains the main library libCGAL.so as well as two support - libraries libCGAL_Core.so (from the CORE project) and libCGAL_ImageIO.so - (image I/O). The library libCGAL_Qt4.so used for visualization in demos - can be found in the package libcgal-qt4-10. - -Package: libcgal-qt4-10 -Architecture: any -Depends: libcgal10 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} -Description: C++ library for computational geometry (support for Qt4) - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - The CGAL library contains: - - the Kernel with geometric primitives such as points, vectors, lines, - predicates for testing things such as relative positions of points, and - operations such as intersections and distance calculation. - - the Basic Library which is a collection of standard data structures and - geometric algorithms, such as convex hull in 2D/3D, (Delaunay) - triangulation in 2D/3D, planar map, polyhedron, smallest enclosing circle, - and multidimensional query structures. - - the Support Library which offers interfaces to other packages, e.g., for - visualisation, and I/O, and other support facilities. - . - This package contains libCGAL_Qt4.so used for visualization in demos. - -Package: libcgal-dev -Section: libdevel -Architecture: any -Depends: libcgal10 (= ${binary:Version}), libboost-dev, libboost-thread-dev, - libboost-program-options-dev, libgmp10-dev, libmpfr-dev, zlib1g-dev, ${misc:Depends} -Description: C++ library for computational geometry (development files) - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - This package contains the header files and static libraries for libCGAL.so, - libCGAL_Core.so, and libCGAL_ImageIO.so. The header files and static - libraries for libCGAL_Qt4.so can be found in the package libcgal-qt4-dev. - -Package: libcgal-qt4-dev -Section: libdevel -Architecture: any -Depends: libcgal10 (= ${binary:Version}), libcgal-qt4-10 (= ${binary:Version}), - libcgal-dev, libqt4-dev, ${misc:Depends} -Description: C++ library for computational geometry (development files, support for Qt4) - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - This package contains the header files and static libraries for - libCGAL_Qt.so. - -Package: libcgal-demo -Section: devel -Architecture: all -Depends: libcgal-dev (>= ${binary:Version}), libcgal10 (>= ${binary:Version}), - ${misc:Depends} -Recommends: libcgal-qt4-dev (>= ${binary:Version}), libcgal10-qt4 (>= ${binary:Version}) -Suggests: liblapack-dev, libatlas-base-dev | libatlas.so.3gf, gfortran, - geomview, libqglviewer-qt4-dev, libipe-dev (>= 7), libglew1.5-dev | libglew-dev, - libmagick++-dev, qt4-dev-tools, libqt4-opengl-dev, libeigen3-dev (>= 3.1.0~beta1-1) -Description: C++ library for computational geometry (demos) - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - This package contains the demos and examples. - -Package: libcgal-ipelets -Section: graphics -Architecture: any -Depends: libcgal10 (>= ${binary:Version}), ipe (>= ${Ipe-Version}), ipe (<< ${Ipe-Version}+), - ${shlibs:Depends}, ${misc:Depends} -Conflicts: libcgal5-ipelets -Replaces: libcgal5-ipelets -Description: C++ library for computational geometry (ipelets) - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - This package contains the ipelets, i.e., plugins for ipe. diff --git a/Maintenance/deb/sid/debian/copyright b/Maintenance/deb/sid/debian/copyright deleted file mode 100644 index 382b30cd2b5..00000000000 --- a/Maintenance/deb/sid/debian/copyright +++ /dev/null @@ -1,351 +0,0 @@ -This package was debianized by Joachim Reichel on -Thu, 29 Apr 2004 18:43:18 +0200. - -It was downloaded from https://www.cgal.org/download/index.html. - -The Debian packaging is Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, -2010, 2011, 2012 Joachim Reichel and is licensed -under the LGPL license, version 2.1 or later (at your option), which can -be found in /usr/share/common-licenses/LGPL-2.1. - - - -Authors -======= - -Pierre Alliez -Matthias Bäsken -Eric Berberich -Olivier Billet -Jean-Daniel Boissonnat -Carine Bonetto -Mario Botsch -Hervé Brönnimann -Fernando Cacciola -Manuel Caroli -Nicolas Carrez -Frédéric Cazals -Raphaëlle Chaine -Tran Kai Frank Da -Christophe Delage -Olivier Devillers -Katrin Dobrindt -Arno Eigenwillig -Eti Ezra -Andreas Fabri -Frédéric Fichel -Kaspar Fischer -Eyal Flato -Julia Flötotto -Efi Fogel -Wolfgang Freiseisen -Bernd Gärtner -Geert-Jan Giezeman -Marc Glisse -Shlomo Golubev -Miguel Granados -Gael Guennebaud -Philippe Guigue -Ankit Gupta -Peter Hachenberger -Iddo Hanniel -Idit Haran -Sariel Har-Peled -Julien Hazebrouck -Michael Hemmer -Thomas Herrmann -Susan Hert -Shai Hirsch -Michael Hoffmann -Dominik Huelse -Marcel Janer -Athanasios Kakargias -Menelaos Karavelas -Michael Kerber -Lutz Kettner -Nico Kruithof -Sylvain Lazard -Eran Leiserowitz -Bruno Lévy -Sebastian Limbach -Kapelushnik Lior -Eugene Lipovetsky -Sébastien Loriot -Pedro Machado -Bastien Manuel -Naama Mayer -Abdelkrim Mebarki -Kurt Mehlhorn -Naceur Meskini -Andreas Meyer -Michal Meyerovitch -Oren Nechushtan -Gabriele Neyer -Ralf Osbild -Steve Oudot -Eli Packer -Dmitrii Pasechnik -Luis Peñaranda -Sylvain Pion -Marc Pouget -Sigal Raab -François Rebufat -Joachim Reichel -David Rey -Laurent Rineau -Daniel Russel -Niv Sabath -Laurent Saboret -Nader Salman -Stefan Schirra -Sven Schönherr -Michael Seel -Ophir Setter -Le-Jeng Shiue -Hans Tangelder -Stéphane Tayeb -Monique Teillaud -Jane Tournois -Constantinos Tsirogiannis -Radu Ursu -Carl Van Geem -Remco Veltkamp -Ron Wein -Wieger Wesselink -Camille Wormser -Mariette Yvinec -Afra Zomorodian -Guy Zucker -Baruch Zukerman -Tali Zvi - - - -Copyright holders -================= - -Utrecht University (The Netherlands) -ETH Zurich (Switzerland) -Freie Universitaet Berlin (Germany) -INRIA Sophia-Antipolis (France) -Martin-Luther-University Halle-Wittenberg (Germany) -Max-Planck-Institute Saarbruecken (Germany) -RISC Linz (Austria) -Tel-Aviv University (Israel) - -Stanford University (USA) -Foundation for Research and Technology-Hellas (Greece) - -GeometryFactory - -Fernando Luis Cacciola Carballal -Le-Jeng Shiue - - - -Copyright (from upstream file LICENSE) -====================================== - - The CGAL software consists of several parts, each of which is licensed under - an open source license. It is also possible to obtain commercial licenses - from GeometryFactory (www.geometryfactory.com) for all or parts of CGAL. - - The source code of the CGAL library can be found in the directories - "src/CGAL", "src/CGALQt", "src/CGALQt4" and "include/CGAL" (with the - exception of "include/CGAL/CORE"). - It is specified in each file of the CGAL library which - license applies to it. This is either the GNU General Public License - or the GNU Lesser General Public License (as published by the Free Software - Foundation; either version 3 of the License or (at your option) any later - version). The texts of both licenses can be found in the files LICENSE.GPL - and LICENSE.LGPL. - - Distributed along with CGAL (for the users' convenience), but not part of - CGAL, are the following third-party libraries, available under their own - licenses: - - - CORE, in the directories "include/CGAL/CORE" and "src/CGALCore", is - licensed under the LGPL (see LICENSE.LGPL). - - ImageIO, in the directory "src/CGALimageIO", is licensed under the LGPL - (see LICENSE.LGPL). - - All other files that do not have an explicit copyright notice (e.g., all - examples and some demos) are licensed under a very permissive license. The - exact license text can be found in the file LICENSE.FREE_USE. - - More information on the CGAL license can be found at - https://www.cgal.org/license.html - - - -Copyright statements for LGPL'd files -===================================== - -The following copyright statement is taken from include/CGAL/config.h. The -year numbers and the set of copyright holders (see list above) varies from -file to file. - - Copyright (c) 1997-2010 - Utrecht University (The Netherlands), - ETH Zurich (Switzerland), - INRIA Sophia-Antipolis (France), - Max-Planck-Institute Saarbruecken (Germany), - and Tel-Aviv University (Israel). All rights reserved. - - This file is part of CGAL (www.cgal.org); you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - Licensees holding a valid commercial license may use this file in - accordance with the commercial license agreement provided with the software. - - This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - - -Copyright statement for GPL'd files -=================================== - -The following copyright statement is taken from include/CGAL/Width_3.h. The -year numbers and the set of copyright holders (see list above) varies from -file to file. - - Copyright (c) 1997-2000 ETH Zurich (Switzerland). - All rights reserved. - - This file is part of CGAL (www.cgal.org). - You can redistribute it and/or modify it under the terms of the GNU - General Public License as published by the Free Software Foundation, - either version 3 of the License, or (at your option) any later version. - - Licensees holding a valid commercial license may use this file in - accordance with the commercial license agreement provided with the software. - - This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - - -Copyright statement for files under the FREE_USE license -======================================================== - - Copyright (c) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007 - Utrecht University (The Netherlands), - ETH Zurich (Switzerland), - INRIA Sophia-Antipolis (France), - Max-Planck-Institute Saarbruecken (Germany), - and Tel-Aviv University (Israel). All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -The following copyright statements apply to third-party libraries -distributed with CGAL: - - - -Boost -===== - -The following files are modified versions originating from Boost: - - ./include/CGAL/STL_Extension/internal/boost/mutable_heap.hpp - ./include/CGAL/STL_Extension/internal/boost/array_binary_tree.hpp - ./include/CGAL/STL_Extension/internal/boost/mutable_queue.hpp - Copyright 1997, 1998, 1999, 2000 University of Notre Dame. - - ./include/CGAL/internal/container_fwd_fixed.hpp - Copyright 2005-2008 Daniel James. - - ./include/CGAL/auto_link/auto_link.h - (C) Copyright John Maddock 2003. - -All of these files are distributed under the Boost Software License, -version 1.0. - - Boost Software License - Version 1.0 - August 17th, 2003 - - Permission is hereby granted, free of charge, to any person or organization - obtaining a copy of the software and accompanying documentation covered by - this license (the "Software") to use, reproduce, display, distribute, - execute, and transmit the Software, and to prepare derivative works of the - Software, and to permit third-parties to whom the Software is furnished to - do so, all subject to the following: - - The copyright notices in the Software and this entire statement, including - the above license grant, this restriction and the following disclaimer, - must be included in all copies of the Software, in whole or in part, and - all derivative works of the Software, unless such copies or derivative - works are solely in the form of machine-executable object code generated by - a source language processor. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT - SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE - FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - - -CORE -==== - -The following copyright statement applies to the CORE library in -src/CGALCore and include/CGAL/CORE. - - Core Library Version 1.7, August 2004 - Copyright (c) 1995-2004 Exact Computation Project - All rights reserved. - - This file is part of CORE (https://cs.nyu.edu/exact/core/). - You can redistribute it and/or modify it under the terms of the GNU - General Public License as published by the Free Software Foundation, - either version 3 of the License, or (at your option) any later version. - - Licensees holding a valid commercial license may use this file in - accordance with the commercial license agreement provided with the - software. - - This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - - -ImageIO -======= - -The following copyright statement applies to the ImageIO library in -src/CGALimageIO. - - Copyright (c) 2005, 2006 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) - All rights reserved. - - The files in this directory are part of the ImageIO Library. - You can redistribute them and/or modify them under the terms of the - GNU Lesser General Public License as published by the Free Software Foundation; - either version 3 of the License, or (at your option) any later version. - - Licensees holding a valid commercial license may use this file in - accordance with the commercial license agreement provided with the software. - - These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --git a/Maintenance/deb/sid/debian/libcgal-demo.install b/Maintenance/deb/sid/debian/libcgal-demo.install deleted file mode 100644 index 239a1b25f46..00000000000 --- a/Maintenance/deb/sid/debian/libcgal-demo.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/share/doc/cgal/demo.tar.gz usr/share/doc/libcgal10 -usr/share/doc/cgal/examples.tar.gz usr/share/doc/libcgal10 diff --git a/Maintenance/deb/sid/debian/libcgal-dev.install b/Maintenance/deb/sid/debian/libcgal-dev.install deleted file mode 100644 index d1af7ba0074..00000000000 --- a/Maintenance/deb/sid/debian/libcgal-dev.install +++ /dev/null @@ -1,11 +0,0 @@ -usr/bin/* -usr/include/* -usr/lib/libCGAL.a -usr/lib/libCGAL_Core.a -usr/lib/libCGAL_ImageIO.a -usr/lib/libCGAL.so -usr/lib/libCGAL_Core.so -usr/lib/libCGAL_ImageIO.so -usr/lib/CGAL/* -usr/share/cmake-2.8/Modules/* -usr/share/man/man1/cgal_create_cmake_script.1 diff --git a/Maintenance/deb/sid/debian/libcgal-ipelets.install b/Maintenance/deb/sid/debian/libcgal-ipelets.install deleted file mode 100644 index dc8f242677f..00000000000 --- a/Maintenance/deb/sid/debian/libcgal-ipelets.install +++ /dev/null @@ -1,2 +0,0 @@ -# use wildcard to avoid hard-coding the Ipe version -usr/lib/ipe/* usr/lib/ipe diff --git a/Maintenance/deb/sid/debian/libcgal-ipelets.lintian-overrides b/Maintenance/deb/sid/debian/libcgal-ipelets.lintian-overrides deleted file mode 100644 index 1aa24c69251..00000000000 --- a/Maintenance/deb/sid/debian/libcgal-ipelets.lintian-overrides +++ /dev/null @@ -1 +0,0 @@ -libcgal-ipelets: hardening-no-fortify-functions usr/lib/ipe/*/ipelets/libCGAL_*.so diff --git a/Maintenance/deb/sid/debian/libcgal-qt4-10.install b/Maintenance/deb/sid/debian/libcgal-qt4-10.install deleted file mode 100644 index b748a7e2d96..00000000000 --- a/Maintenance/deb/sid/debian/libcgal-qt4-10.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/libCGAL_Qt4.so.* usr/lib diff --git a/Maintenance/deb/sid/debian/libcgal-qt4-10.lintian-overrides b/Maintenance/deb/sid/debian/libcgal-qt4-10.lintian-overrides deleted file mode 100644 index 930bb4415ea..00000000000 --- a/Maintenance/deb/sid/debian/libcgal-qt4-10.lintian-overrides +++ /dev/null @@ -1 +0,0 @@ -libcgal-qt4-10: hardening-no-fortify-functions usr/lib/libCGAL_Qt4.so.* diff --git a/Maintenance/deb/sid/debian/libcgal-qt4-10.shlibs b/Maintenance/deb/sid/debian/libcgal-qt4-10.shlibs deleted file mode 100644 index 69742b6438b..00000000000 --- a/Maintenance/deb/sid/debian/libcgal-qt4-10.shlibs +++ /dev/null @@ -1 +0,0 @@ -libCGAL_Qt4 10 libcgal-qt4-10 diff --git a/Maintenance/deb/sid/debian/libcgal-qt4-dev.install b/Maintenance/deb/sid/debian/libcgal-qt4-dev.install deleted file mode 100644 index 6fd829ac922..00000000000 --- a/Maintenance/deb/sid/debian/libcgal-qt4-dev.install +++ /dev/null @@ -1,5 +0,0 @@ -# The next entry is disabled here because it overlaps with the corresponding -# entry in libcgal-dev.install. The files are moved in debian/rules. -# usr/include/CGAL/Qt -usr/lib/libCGAL_Qt4.a -usr/lib/libCGAL_Qt4.so diff --git a/Maintenance/deb/sid/debian/libcgal10.install b/Maintenance/deb/sid/debian/libcgal10.install deleted file mode 100644 index f383cfa6ebc..00000000000 --- a/Maintenance/deb/sid/debian/libcgal10.install +++ /dev/null @@ -1,4 +0,0 @@ -usr/lib/libCGAL.so.* usr/lib -usr/lib/libCGAL_Core.so.* usr/lib -usr/lib/libCGAL_ImageIO.so.* usr/lib -usr/share/doc/cgal/changelog usr/share/doc/libcgal10 diff --git a/Maintenance/deb/sid/debian/libcgal10.lintian-overrides b/Maintenance/deb/sid/debian/libcgal10.lintian-overrides deleted file mode 100644 index 37afa24ac1b..00000000000 --- a/Maintenance/deb/sid/debian/libcgal10.lintian-overrides +++ /dev/null @@ -1 +0,0 @@ -libcgal10: hardening-no-fortify-functions usr/lib/libCGAL.so.* diff --git a/Maintenance/deb/sid/debian/libcgal10.shlibs b/Maintenance/deb/sid/debian/libcgal10.shlibs deleted file mode 100644 index 395a4c6b5ff..00000000000 --- a/Maintenance/deb/sid/debian/libcgal10.shlibs +++ /dev/null @@ -1,3 +0,0 @@ -libCGAL 10 libcgal10 -libCGAL_Core 10 libcgal10 -libCGAL_ImageIO 10 libcgal10 diff --git a/Maintenance/deb/sid/debian/patches/do-not-link-example-with-qt4-support-library.patch b/Maintenance/deb/sid/debian/patches/do-not-link-example-with-qt4-support-library.patch deleted file mode 100644 index 04b469305b8..00000000000 --- a/Maintenance/deb/sid/debian/patches/do-not-link-example-with-qt4-support-library.patch +++ /dev/null @@ -1,12 +0,0 @@ -Description: Avoid -lCGAL_Qt4 in linker command of Linear_cell_complex example ---- cgal-4.1~beta1.orig/examples/Linear_cell_complex/CMakeLists.txt -+++ cgal-4.1~beta1/examples/Linear_cell_complex/CMakeLists.txt -@@ -12,7 +12,7 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR - endif() - endif() - --find_package(CGAL QUIET COMPONENTS Core Qt4) -+find_package(CGAL QUIET COMPONENTS Core) - - # For Gprof. - # ADD_DEFINITIONS("-pg") diff --git a/Maintenance/deb/sid/debian/patches/series b/Maintenance/deb/sid/debian/patches/series deleted file mode 100644 index 68417a3f7a9..00000000000 --- a/Maintenance/deb/sid/debian/patches/series +++ /dev/null @@ -1 +0,0 @@ -do-not-link-example-with-qt4-support-library.patch diff --git a/Maintenance/deb/sid/debian/rules b/Maintenance/deb/sid/debian/rules deleted file mode 100755 index a3533b8b2cb..00000000000 --- a/Maintenance/deb/sid/debian/rules +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/make -f - -# export DH_VERBOSE=1 - -# See https://wiki.debian.org/Hardening#Notes_for_packages_using_CMake -CFLAGS := $(CFLAGS) $(CPPFLAGS) -CXXFLAGS := $(CXXFLAGS) $(CPPFLAGS) - -# The build system links all four libraries against all dependencies. -LDFLAGS += -Wl,--as-needed - -ifeq ($(DEB_BUILD_ARCH),alpha) - IEEE_FPU_OPTION = -mieee -mfp-rounding-mode=d -endif - -%: - dh $@ - -override_dh_auto_configure: - mkdir -p static - cd static && QTDIR= cmake .. \ - -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ - -DWITH_CGAL_Qt3=OFF -DWITH_demos=OFF -DWITH_examples=OFF \ - -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=FALSE - mkdir -p shared - cd shared && QTDIR= cmake .. \ - -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ - -DWITH_CGAL_Qt3=OFF -DWITH_demos=OFF -DWITH_examples=OFF \ - -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_SKIP_RPATH=TRUE - mkdir -p shared/demo/CGAL_ipelets - cd shared/demo/CGAL_ipelets && QTDIR= cmake ../../../demo/CGAL_ipelets \ - -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ - -DCGAL_DIR=$(CURDIR)/shared - -override_dh_auto_build: - $(MAKE) -C static - $(MAKE) -C shared - $(MAKE) -C shared/demo/CGAL_ipelets - -override_dh_auto_test: -ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) - $(MAKE) -C debian/tests IEEE_FPU_OPTION="$(IEEE_FPU_OPTION)" rounding_modes1 - LD_LIBRARY_PATH=shared/lib debian/tests/rounding_modes1 - $(MAKE) -C debian/tests IEEE_FPU_OPTION="$(IEEE_FPU_OPTION)" rounding_modes2 - LD_LIBRARY_PATH=shared/lib debian/tests/rounding_modes2 -endif - -override_dh_auto_clean: - dh_auto_clean - rm -fr shared static - -override_dh_install: - $(MAKE) -C static DESTDIR=$(CURDIR)/debian/tmp install - $(MAKE) -C shared DESTDIR=$(CURDIR)/debian/tmp install - $(MAKE) -C shared/demo/CGAL_ipelets DESTDIR=$(CURDIR)/debian/tmp install - - mkdir -p debian/tmp/usr/share/cmake-2.8/Modules - cp cmake/modules/FindCGAL.cmake debian/tmp/usr/share/cmake-2.8/Modules - - mv debian/tmp/usr/share/doc/CGAL-`cat VERSION` debian/tmp/usr/share/doc/cgal - mv debian/tmp/usr/share/doc/cgal/CHANGES debian/tmp/usr/share/doc/cgal/changelog - rm debian/tmp/usr/share/doc/cgal/LICENSE* - rm debian/tmp/usr/share/doc/cgal/AUTHORS - - tar cf - examples | gzip --best >debian/tmp/usr/share/doc/cgal/examples.tar.gz - tar cf - demo | gzip --best >debian/tmp/usr/share/doc/cgal/demo.tar.gz - - rm debian/tmp/usr/bin/cgal_make_macosx_app - - dh_install --sourcedir=debian/tmp --list-missing - - mkdir -p debian/libcgal-qt4-dev/usr/include/CGAL - mv debian/libcgal-dev/usr/include/CGAL/Qt debian/libcgal-qt4-dev/usr/include/CGAL - - mkdir -p debian/libcgal-qt4-10/usr/share/doc - ln -s libcgal10 debian/libcgal-qt4-10/usr/share/doc/libcgal-qt4-10 - mkdir -p debian/libcgal-dev/usr/share/doc - ln -s libcgal10 debian/libcgal-dev/usr/share/doc/libcgal-dev - mkdir -p debian/libcgal-qt4-dev/usr/share/doc - ln -s libcgal10 debian/libcgal-qt4-dev/usr/share/doc/libcgal-qt4-dev - mkdir -p debian/libcgal-demo/usr/share/doc - ln -s libcgal10 debian/libcgal-demo/usr/share/doc/libcgal-demo - mkdir -p debian/libcgal-ipelets/usr/share/doc - ln -s libcgal10 debian/libcgal-ipelets/usr/share/doc/libcgal-ipelets - -override_dh_installdocs: - dh_installdocs -plibcgal10 debian/copyright - -override_dh_installchangelogs: - dh_installchangelogs -plibcgal10 - -override_dh_shlibdeps: # TODO Is that really needed? - dh_shlibdeps -a -ldebian/libcgal10/usr/lib - -override_dh_gencontrol: - dh_gencontrol -- -VIpe-Version=`dpkg-awk 'Package:^ipe$$' -- Version | grep Version | sed 's/Version: //;s/-[^-]*$$//'` diff --git a/Maintenance/deb/sid/debian/source/format b/Maintenance/deb/sid/debian/source/format deleted file mode 100644 index 163aaf8d82b..00000000000 --- a/Maintenance/deb/sid/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/Maintenance/deb/sid/debian/tests/Makefile b/Maintenance/deb/sid/debian/tests/Makefile deleted file mode 100644 index 7f1b7c747e5..00000000000 --- a/Maintenance/deb/sid/debian/tests/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -rounding_modes1: rounding_modes1.o - g++ $^ -o $@ - -rounding_modes2: rounding_modes2.o - g++ $^ -o $@ -lCGAL -L../../shared/lib - -rounding_modes1.o: rounding_modes1.cpp - g++ -c $< -o $@ -O2 -frounding-math $(IEEE_FPU_OPTION) - -rounding_modes2.o: rounding_modes2.cpp - g++ -c $< -o $@ -O2 -frounding-math $(IEEE_FPU_OPTION) -I../../include -I../../shared/include - -clean: - rm -f *.o rounding_modes1 rounding_modes2 diff --git a/Maintenance/deb/sid/debian/tests/rounding_modes1.cpp b/Maintenance/deb/sid/debian/tests/rounding_modes1.cpp deleted file mode 100644 index 0c497a77dc3..00000000000 --- a/Maintenance/deb/sid/debian/tests/rounding_modes1.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include -#include -#include - -int modes[4] = { FE_TOWARDZERO, FE_UPWARD, FE_DOWNWARD, FE_TONEAREST }; - -std::string str (int mode) -{ - switch (mode) - { - case FE_TOWARDZERO: return "FE_TOWARDZERO"; - case FE_UPWARD: return "FE_UPWARD"; - case FE_DOWNWARD: return "FE_DOWNWARD"; - case FE_TONEAREST: return "FE_TONEAREST"; - default: throw __LINE__; - } -} - -int fetestround () -{ - volatile double eps = std::numeric_limits::denorm_min(); - - double x = -1.0; - double y = 1.0; - volatile double x_plus_eps = x + eps; - volatile double y_minus_eps = y - eps; - - if ((x == x_plus_eps) && (y == y_minus_eps)) - return FE_TONEAREST; - if (y == y_minus_eps) - return FE_UPWARD; - if (x == x_plus_eps) - return FE_DOWNWARD; - return FE_TOWARDZERO; -} - -int main (int argc, char* argv[]) -{ - int errors = 0; - - int mode_get = fegetround(); - std::cout << "fegetround() = " << str(mode_get) << " " << std::endl; - - for (int i=0; i<4; i++) - { - int mode_set = modes[i]; - fesetround (mode_set); - std::cout << "fesetround (" << str(mode_set) << ")" << std::endl; - - int mode_get = fegetround(); - std::cout << "fegetround() = " << str(mode_get) << " "; - bool ok_get = mode_get == mode_set; - if (!ok_get) - errors++; - std::cout << (ok_get ? "(ok)" : "(error)") << std::endl; - - int mode_test = fetestround(); - std::cout << "fetestround() = " << str(mode_test) << " "; - bool ok_test = mode_test == mode_set; - if (!ok_test) - errors++; - std::cout << (ok_test ? "(ok)" : "(error)") << std::endl; - } - - return errors; -} diff --git a/Maintenance/deb/sid/debian/tests/rounding_modes2.cpp b/Maintenance/deb/sid/debian/tests/rounding_modes2.cpp deleted file mode 100644 index 7892a99a83b..00000000000 --- a/Maintenance/deb/sid/debian/tests/rounding_modes2.cpp +++ /dev/null @@ -1,95 +0,0 @@ -// This tests the rounding mode functions. - -#include -#include -#include - -typedef CGAL::Interval_nt_advanced NT_adv; -typedef CGAL::Interval_nt<> NT; - -void print_res (bool res) -{ std::cout << (res ? "ok" : "ERROR") << std::endl; } - -// The results of 1-epsilon and -1+epsilon are enough -// to detect exactly the current rounding mode. -// 1-MIN_DOUBLE -// +------+-------+ -// | 1 | 1-ulp | -// +--------+------+-------+ -// -1+MIN_DOUBLE | -1 | near | -inf | -// | -1+ulp | +inf | zero | -// +--------+------+-------+ - -// I use a global variable here to avoid constant propagation. -double IA_min_double; - -CGAL::FPU_CW_t -FPU_empiric_test() -{ - IA_min_double = CGAL_IA_STOP_CPROP(CGAL_IA_MIN_DOUBLE); - double y = 1.0, z = -1.0; - double ye, ze; - ye = y - IA_min_double; - ze = z + IA_min_double; - if (y == ye && z == ze) return CGAL_FE_TONEAREST; - if (y == ye) return CGAL_FE_UPWARD; - if (z == ze) return CGAL_FE_DOWNWARD; - return CGAL_FE_TOWARDZERO; -} - -void print_rounding_name (CGAL::FPU_CW_t r) -{ - switch (r) { - case CGAL_FE_TONEAREST: std::cout << "NEAR\n"; break; - case CGAL_FE_DOWNWARD: std::cout << "DOWN\n"; break; - case CGAL_FE_UPWARD: std::cout << "UP\n"; break; - case CGAL_FE_TOWARDZERO: std::cout << "ZERO\n"; break; - default: std::cout << "unknown !\n"; - } -} - -int main() -{ - bool flag = true; - - flag = flag && (FPU_empiric_test() == CGAL_FE_TONEAREST); - std::cout << "default: "; - print_res(flag); - - // Should be a no-op. - CGAL::FPU_set_cw(CGAL::FPU_get_cw()); - flag = flag && (FPU_empiric_test() == CGAL_FE_TONEAREST); - std::cout << "get/set: "; - print_res(flag); - if (!flag) print_rounding_name(FPU_empiric_test()); - - // Rounding to zero. - CGAL::FPU_set_cw(CGAL_FE_TOWARDZERO); - flag = flag && (FPU_empiric_test() == CGAL_FE_TOWARDZERO); - std::cout << "zero : "; - print_res(flag); - if (!flag) print_rounding_name(FPU_empiric_test()); - - // Rounding to infinity. - CGAL::FPU_set_cw(CGAL_FE_UPWARD); - flag = flag && (FPU_empiric_test() == CGAL_FE_UPWARD); - std::cout << "+inf : "; - print_res(flag); - if (!flag) print_rounding_name(FPU_empiric_test()); - - // Rounding to minus infinity. - CGAL::FPU_set_cw(CGAL_FE_DOWNWARD); - flag = flag && (FPU_empiric_test() == CGAL_FE_DOWNWARD); - std::cout << "-inf : "; - print_res(flag); - if (!flag) print_rounding_name(FPU_empiric_test()); - - // Rounding to nearest. - CGAL::FPU_set_cw(CGAL_FE_TONEAREST); - flag = flag && (FPU_empiric_test() == CGAL_FE_TONEAREST); - std::cout << "near : "; - print_res(flag); - if (!flag) print_rounding_name(FPU_empiric_test()); - - return (int) !flag; -} diff --git a/Maintenance/deb/sid/debian/watch b/Maintenance/deb/sid/debian/watch deleted file mode 100644 index 36047492bc6..00000000000 --- a/Maintenance/deb/sid/debian/watch +++ /dev/null @@ -1,10 +0,0 @@ -# Note that the file URLs contain unpredictable IDs as directory. The -# uversionmagle options strips this ID. -# -# Note that only digits and "." are used to match the version number. -# Therefore we do not match beta releases. -# -version=3 -opts=uversionmangle=s/(\d+).([\d\.]+)/$2/ \ - https://gforge.inria.fr/frs/?group_id=52 \ - /frs/download.php/(\d+)/CGAL-([\d\.]+).tar.gz diff --git a/Maintenance/deb/squeeze/debian/NEWS.Debian b/Maintenance/deb/squeeze/debian/NEWS.Debian deleted file mode 100644 index 938dde2d1fe..00000000000 --- a/Maintenance/deb/squeeze/debian/NEWS.Debian +++ /dev/null @@ -1,9 +0,0 @@ -cgal (4.2-1) unstable; urgency=low - - The Qt4 support library libCGAL_Qt4.so.10.0.0 has been moved from the package - libcgal10 to the new package libcgal-qt4-10. Similarly, the corresponding - headers and the static library have been moved from the package libcgal-dev - to the new package libcgal-qt4-dev. That is the packages libcgal10 and - libcgal-dev do not any longer depend on the Qt packages. - - -- Joachim Reichel Sun, 02 Sep 2012 12:31:08 +0200 diff --git a/Maintenance/deb/squeeze/debian/README.Debian b/Maintenance/deb/squeeze/debian/README.Debian deleted file mode 100644 index def38fe860b..00000000000 --- a/Maintenance/deb/squeeze/debian/README.Debian +++ /dev/null @@ -1,50 +0,0 @@ -README.Debian -------------- - -The homepage of CGAL (https://www.cgal.org/) offers more information about CGAL. -In particular, a mailing list and the documentation for the library (in PDF and -HTML) are available. The authors ask you to give some feedback about your usage -of CGAL in a short questionnaire (in the download section). - - -Documentation -------------- - -Note that the CGAL documentation cannot be packaged for Debian due to unclear -license conditions. The complete documentation in PDF and HTML is available at -https://www.cgal.org/. - - -Demos and examples ------------------- - -Tarballs with demos and examples can be found in /usr/share/doc/libcgal-demo. -Extract the tarballs somewhere and call "cmake ." to configure the -demos/examples. Call "make" to build them, either in the top-level directory -to build all demos/examples (which takes some time and needs quite some disk -space), or in the subdirectory of the desired demo/example. The cmake option --DCMAKE_VERBOSE_MAKEFILE=ON is useful to generate verbose makefiles that show -each executed command. - - -Demos using libQGLViewer ------------------------- - -The Debian package of libQGLViewer uses non-standard library names to offer the -library in a Qt3 and Qt4 flavor. The build system of CGAL has been patched to -handle the non-standard library name. If your libQGLViewer packages are older -than 2.3.1-4 you need to work around another problem with the non-standard -include directory. Create an include directory with the expected name -"QGLViewer", e.g., - - mkdir -p /some/dir - ln -s /usr/include/qglviewer-qt4 /some/dir/QGLViewer - -and pass the option - - -DQGLVIEWER_INCLUDE_DIR=/some/dir - -to cmake. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522659 for more -information. - - -- Joachim Reichel Sat, 06 Feb 2010 12:29:02 +0100 diff --git a/Maintenance/deb/squeeze/debian/README.source b/Maintenance/deb/squeeze/debian/README.source deleted file mode 100644 index 662cd01c5da..00000000000 --- a/Maintenance/deb/squeeze/debian/README.source +++ /dev/null @@ -1,11 +0,0 @@ -normalize-audio for Debian --------------------------- - -This package uses quilt to manage all modifications to the upstream source. -Changes are stored in the source package as diffs in debian/patches and -applied during the build. - -See /usr/share/doc/quilt/README.source for a detailed explanation. - - -- Joachim Reichel Sun, 15 Jan 2012 14:38:04 +0100 - diff --git a/Maintenance/deb/squeeze/debian/changelog b/Maintenance/deb/squeeze/debian/changelog deleted file mode 100644 index b13607d6678..00000000000 --- a/Maintenance/deb/squeeze/debian/changelog +++ /dev/null @@ -1,348 +0,0 @@ -cgal (4.1-1~squeeze1) stable; urgency=low - - * New upstream release. - * Rename binary package libcgal9 to libcgal10 to reflect SONAME change. - * Configure CGAL using -DCGAL_ENABLE_PRECONFIG=OFF since we do not want - that the accidental presence of optional libraries (for demos and - examples) influences the build of the library. - * Move the Qt4 support library and the corresponding headers into new - binary packages libcgal-qt4-10 and libcgal-qt4-dev (Closes: #683214). - * Add libboost-system-dev to Builds-Depends: of cgal. - * Move libmpfi-dev from Suggests: of cgal-demo to Build-Depends: of cgal. - - -- Joachim Reichel Wed, 24 Oct 2012 19:08:35 +0200 - -cgal (4.0.2-1) unstable; urgency=low - - * New upstream release. - * Remove gcc-4.7 patch (fixed upstream). - - -- Joachim Reichel Wed, 04 Jul 2012 19:45:28 +0200 - -cgal (4.0-4) unstable; urgency=low - - * Add Suggests: libeigen3-dev (>= 3.1.0~beta1-1), libmpfi-dev to - libcgal-demo. - - -- Joachim Reichel Tue, 12 Jun 2012 23:53:14 +0200 - -cgal (4.0-3) unstable; urgency=low - - * Change Build-Depends: debhelper (>= 8) to debhelper (>= 9), update - debian/compat to get the default build flags for hardening. Inject - CPPFLAGS into CFLAGS and CXXFLAGS, since CPPFLAGS is ignored by cmake. - * Add lintian override to silence incorrect warnings about - hardening-no-fortify-functions for some libraries (all libraries are - built with the same flags). - - -- Joachim Reichel Sun, 10 Jun 2012 15:36:27 +0200 - -cgal (4.0-2) unstable; urgency=low - - * Add patch gcc-4.7 to fix a syntax error in template code which is - not instantiated during the package build itself (Closes: #673554). - * Fix debian/watch. - - -- Joachim Reichel Sun, 20 May 2012 22:47:56 +0200 - -cgal (4.0-1) unstable; urgency=low - - * New upstream release. - * Move from non-free to main due to upstream license change from QPL - to GPL 3+ (and from LGPL 2.1 to LGPL 3+), updated debian/copyright - accordingly. - * Rename binary package libcgal8 to libcgal9 to reflect SONAME change. - * Update Standards-Version to 3.9.3 (no changes needed). - * Remove fix-ipe-version-detection.dpatch and - fix-qt-moc-parse-error.dpatch (fixed upstream). - * Removed libmagick++9-dev from Suggests: of libcgal-demo, because - that package does no longer exists. - - -- Joachim Reichel Mon, 12 Mar 2012 19:14:55 +0100 - -cgal (3.9-4) unstable; urgency=low - - * Rebuild against boost 1.48 (Closes: #659358). - * Add fix-qt-moc-parse-error.dpatch as workaround for - https://bugreports.qt-project.org/browse/QTBUG-22829. - - -- Joachim Reichel Fri, 10 Feb 2012 22:41:26 +0100 - -cgal (3.9-3) unstable; urgency=low - - * Fix FTBFS when building only architecture dependent packages caused - by recent transition to the new packaging format (Closes: #658191). - - -- Joachim Reichel Wed, 01 Feb 2012 00:07:03 +0100 - -cgal (3.9-2) unstable; urgency=low - - * Changed packaging format to "3.0 (quilt)". - * Add fix-ipe-version-detection.dpatch: upstream patch for bug #643278. - Remove workaround. - * Tighten Depends: of libcgal-ipelets on ipe (Closes: #657720). - * Move libcgal-ipelets to Section: graphics. - * Add libqt4-opengl-dev to Suggests: of libcgal-demo. - - -- Joachim Reichel Mon, 30 Jan 2012 19:04:18 +0100 - -cgal (3.9-1) unstable; urgency=low - - * New upstream release. - * Rename binary package libcgal7 to libcgal8 to reflect SONAME change. - * Add workaround for bug #643278. - - -- Joachim Reichel Wed, 28 Sep 2011 19:51:35 +0200 - -cgal (3.8-1) unstable; urgency=low - - * New upstream release. - * Rename binary package libcgal6 to libcgal7 to reflect SONAME change. - * Update Standards-Version to 3.9.2 (no changes needed). - - -- Joachim Reichel Thu, 21 Apr 2011 18:45:25 +0200 - -cgal (3.7-5) unstable; urgency=low - - * Upload to unstable. - - -- Joachim Reichel Sun, 06 Mar 2011 17:26:11 +0100 - -cgal (3.7-4) experimental; urgency=low - - * Build with libgmp10 (Closes: #614797). Thanks to Christian M. Amsüss. - - -- Joachim Reichel Sun, 27 Feb 2011 16:36:22 +0100 - -cgal (3.7-3) unstable; urgency=low - - * Disable support for Qt3 because Qt3 has been removed from the repository - (Closes: #604478). - - -- Joachim Reichel Thu, 10 Feb 2011 21:06:09 +0100 - -cgal (3.7-2) unstable; urgency=low - - * Upload to unstable. - - -- Joachim Reichel Sun, 06 Feb 2011 13:53:00 +0100 - -cgal (3.7-1) experimental; urgency=low - - * New upstream release. - * Rename binary package libcgal5 to libcgal6 to reflect SONAME change. - * Rename binary package libcgal5-ipelets to libcgal-ipelets because it is - not possible to install the ipelets for different SONAMEs in parallel. - * Remove ipe-default-to-version-7.dpatch: the Ipe version is now - auto-detected. - * Remove fix-core-64bit.dpatch (fixed upstream). - * Add qt4-dev-tools to Suggests: of libcgal-demo for qcollectiongenerator. - * Update Standards-Version to 3.9.1 (-D_REENTRANT no longer needed). - - -- Joachim Reichel Sun, 17 Oct 2010 14:27:54 +0200 - -cgal (3.6.1-2) unstable; urgency=low - - * Add fix-core-64bit.dpatch: use CORE::CHUNK_BIT instead of hard-coded - constant 14. - - -- Joachim Reichel Tue, 24 Aug 2010 19:46:36 +0200 - -cgal (3.6.1-1) unstable; urgency=low - - * New upstream release. - * Set SOVERSION explicitly to 5.0.1 as told by upstream. - * Remove architecture exceptions from Suggests: for libcgal-demo which is no - longer allowed by dpkg-gencontrol (see #560071). - * Fix debian/watch file. - * Change license of packaging to LGPL 2.1 or later because referencing the - BSD license in /usr/share/common-licenses is deprecated. - * Update Standards-Version to 3.9.0 (no changes needed). - - -- Joachim Reichel Thu, 01 Jul 2010 23:37:41 +0200 - -cgal (3.6-1) unstable; urgency=low - - * New upstream release. - * Rename binary package libcgal4 to libcgal5 to reflect SONAME change. - * Remove fix-cmake-qglviewer-detection.dpatch (fixed upstream). - * New binary package libcgal5-ipelets which contains plugins for Ipe 7.x - (Closes: #557643). - * Add ipe-default-to-version-7.dpatch: change default of WITH_IPE_7 to ON. - * Remove libboost-graph1.35-dev from Build-Depends: and Suggests: of - libcgal-demo (not needed). - - -- Joachim Reichel Mon, 22 Mar 2010 19:09:15 +0100 - - -cgal (3.5.1-2) unstable; urgency=low - - * Add fix-cmake-qglviewer-detection.dpatch (Closes: #564126), thanks to - Marc Glisse for the patch. - * Update Standards-Version to 3.8.4 (no changes needed). - - -- Joachim Reichel Sat, 06 Feb 2010 12:29:02 +0100 - -cgal (3.5.1-1) unstable; urgency=low - - * New upstream release. - * Fix error in handling of "debug" and "nostrip" in $(DEB_BUILD_OPTIONS) - (see also #552961). - * Unset QTDIR before calling cmake to reduce problems in non-clean build - environments. - * Add ${misc:Depends} to Depends: of all binary packages as found by - lintian. - - -- Joachim Reichel Sun, 22 Nov 2009 22:31:00 +0100 - -cgal (3.5-1) unstable; urgency=low - - * New upstream release. - * Rename binary package libcgal3 to libcgal4 to reflect SONAME change. - * Remove fix-FindCGAL-cmake.dpatch (fixed upstream). - * Remove fix-demos-examples-configuration.dpatch (fixed upstream). - * Remove add-cmake-2.6.3-support.dpatch (fixed upstream). - * Remove fix-demo-polyheron-3.dpatch (fixed upstream). - * Remove "-mieee -mfp-rounding-mode=d" from CGAL_CXX_FLAGS on alpha - (fixed upstream). - - -- Joachim Reichel Sat, 03 Oct 2009 16:43:08 +0200 - -cgal (3.4-5) unstable; urgency=low - - * Return to unversioned boost dependencies. - * Re-add working watch file. - * Update Standards-Version to 3.8.3 (no changes needed). - - -- Joachim Reichel Wed, 16 Sep 2009 19:25:09 +0200 - -cgal (3.4-4) unstable; urgency=low - - * Add patch fix-demos-examples-configuration.dpatch. - * Add patch add-cmake-2.6.3-support.dpatch. - * Add patch fix-demo-polyheron-3.dpatch. - * Fix support for nocheck in DEB_BUILD_OPTIONS (was broken in 3.4-3). - - -- Joachim Reichel Fri, 01 May 2009 17:31:00 +0200 - -cgal (3.4-3) unstable; urgency=low - - * Update boost dependencies to 1.38. - * Remove watch file (new upstream location uses unpredictable paths). - * Update Standards-Version to 3.8.1 (add support for nocheck in - DEB_BUILD_OPTIONS). - * Change Suggests: dependency of libcgal-demo from libqglviewer-dev - to libqglviewer-qt4-dev (all demos using libQGLViewer use Qt4). - * Add workaround for #522659 to README.Debian. - - -- Joachim Reichel Sat, 18 Apr 2009 11:46:19 +0200 - -cgal (3.4-2) unstable; urgency=low - - * Add "-mieee -mfp-rounding-mode=d" to CGAL_CXX_FLAGS on alpha (got lost - during the transition to cmake). - - -- Joachim Reichel Sun, 15 Feb 2009 15:06:31 +0100 - -cgal (3.4-1) unstable; urgency=low - - * New upstream release. - * Adapt debian/rules to the new cmake-based build system. - * Downgrade LAPACK- and BLAS-related Build-Depends: to Suggests: for - libcgal-demo, since it is now possible to configure demos and examples - independently of the library. - - -- Joachim Reichel Thu, 22 Jan 2009 18:39:44 +0100 - -cgal (3.3.1-4) unstable; urgency=low - - * Remove fortran-transition.dpatch, update build-library.dpatch: - Do not link with -lg2c in configuration tests (Closes: #475721). - * Update cgal_create_makefile.dpatch to remove bashisms (Closes: #486045). - * Update debian/tests/rounding_modes2.cpp to stop constant propagation. - * Update Standards-Version to 3.8.0 (explain in debian/copyright why package - is in non-free). - - -- Joachim Reichel Sun, 15 Jun 2008 22:11:14 +0200 - -cgal (3.3.1-3) unstable; urgency=low - - * Add patch fortran-transition.dpatch (Closes: #470359), thanks to Kumar - Appaiah for the patch. - * debian/rules: s/lapack3-dev/liblapack-dev/, - s/atlas3-base-dev/libatlas-base-dev/, s/libatlas-3.so/libatlas.so.3gf/ . - * Fix manpage w.r.t. makefile vs. cgal.mk (Closes: #466430). - * Add second test for FPU rounding modes. - - -- Joachim Reichel Wed, 19 Mar 2008 20:27:34 +0100 - -cgal (3.3.1-2) unstable; urgency=low - - * debian/control: Really really drop support for atlas and lapack on arm - and m68k, fix atlas and lapack support on other architectures. - * debian/control: Extend exclusions for arm to variants armeb and armel - (Closes: #460141). - * debian/control: Remove virtual dependency liblapack-3.so which is - provided by atlas3-base-dev (which does *not* provide - /usr/lib/liblapack.so, just /usr/lib/atlas/liblapack.so). - * debian/control: Replace virtual dependency libblas-3.so by - libatlas-3.so. - * Add patch qt-compatibility-headers.dpatch (Closes: #464251). - * debian/control: Add Homepage: field, adjust Description: accordingly. - * Update Standards-Version to 3.7.3 (no changes needed). - - -- Joachim Reichel Wed, 06 Feb 2008 18:37:52 +0100 - -cgal (3.3.1-1) unstable; urgency=low - - * New upstream release. - * Remove patch bugfix-fpu-rounding-mode-alpha.dpatch (included by - upstream). - * Fail build if FPU rounding mode test fails. - * Really drop support for atlas and lapack on arm and m68k. - * Fix cgal_create_makefile w.r.t. makefile vs. cgal.mk. - - -- Joachim Reichel Mon, 3 Sep 2007 18:57:36 +0200 - -cgal (3.3-2) unstable; urgency=low - - * Add patch bugfix-fpu-rounding-mode-alpha.dpatch (Closes: #431230). - * debian/control: Add versioned depends on libboost-program-options-dev, - drop build-dependency on libboost-graph-dev. - * Drop support for atlas on arm and m68k. - - -- Joachim Reichel Mon, 16 Jul 2007 15:32:35 +0200 - -cgal (3.3-1) unstable; urgency=low - - * New upstream release. - - -- Joachim Reichel Sun, 3 Jun 2007 09:36:36 +0200 - -cgal (3.2.1-2) unstable; urgency=low - - * Fix FTBFS on hppa (and probably also on other architectures) related - to FPU rounding modes (Closes: #404464). - * debian/control: Add tag XS-Autobuild. - * debian/copyright: Add note about autobuilding. - * debian/control: Make package binNMU-safe. - * Remove linda override for bug #369977 (no longer needed). - * Add watch file. - - -- Joachim Reichel Fri, 26 Jan 2007 19:16:36 +0100 - -cgal (3.2.1-1) unstable; urgency=low - - * New upstream release. - * Add linda override for bug #369977. - * Remove patch bugfix-demo-examples-makefiles.dpatch (no longer needed). - - -- Joachim Reichel Fri, 14 Jul 2006 21:20:16 +0200 - -cgal (3.2-1) unstable; urgency=low - - * New upstream release. - * First upload to Debian archive. (Closes: #251885) - - -- Joachim Reichel Mon, 29 May 2006 20:24:27 +0200 -5~ diff --git a/Maintenance/deb/squeeze/debian/compat b/Maintenance/deb/squeeze/debian/compat deleted file mode 100644 index 45a4fb75db8..00000000000 --- a/Maintenance/deb/squeeze/debian/compat +++ /dev/null @@ -1 +0,0 @@ -8 diff --git a/Maintenance/deb/squeeze/debian/control b/Maintenance/deb/squeeze/debian/control deleted file mode 100644 index f2b2dc2a29f..00000000000 --- a/Maintenance/deb/squeeze/debian/control +++ /dev/null @@ -1,120 +0,0 @@ -Source: cgal -Priority: optional -Maintainer: Joachim Reichel -# "ipe" is only needed because it contains goodies.lua which is needed by FindIPE.cmake -Build-Depends: debhelper (>= 8), dpkg-awk, cmake, zlib1g-dev, libboost-dev, - libboost-thread-dev, libboost-program-options-dev, libboost-system-dev, - libgmp3-dev, libmpfr-dev, libmpfi-dev, libqt4-dev, libqt4-opengl-dev, - libipe-dev (>= 7), ipe -Standards-Version: 3.9.1 -Section: libs -Homepage: https://www.cgal.org/ -XS-Autobuild: yes - -Package: libcgal10 -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: C++ library for computational geometry - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - The CGAL library contains: - - the Kernel with geometric primitives such as points, vectors, lines, - predicates for testing things such as relative positions of points, and - operations such as intersections and distance calculation. - - the Basic Library which is a collection of standard data structures and - geometric algorithms, such as convex hull in 2D/3D, (Delaunay) - triangulation in 2D/3D, planar map, polyhedron, smallest enclosing circle, - and multidimensional query structures. - - the Support Library which offers interfaces to other packages, e.g., for - visualisation, and I/O, and other support facilities. - . - This package contains the main library libCGAL.so as well as two support - libraries libCGAL_Core.so (from the CORE project) and libCGAL_ImageIO.so - (image I/O). The library libCGAL_Qt4.so used for visualization in demos - can be found in the package libcgal-qt4-10. - -Package: libcgal-qt4-10 -Architecture: any -Depends: libcgal10 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} -Description: C++ library for computational geometry (support for Qt4) - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - The CGAL library contains: - - the Kernel with geometric primitives such as points, vectors, lines, - predicates for testing things such as relative positions of points, and - operations such as intersections and distance calculation. - - the Basic Library which is a collection of standard data structures and - geometric algorithms, such as convex hull in 2D/3D, (Delaunay) - triangulation in 2D/3D, planar map, polyhedron, smallest enclosing circle, - and multidimensional query structures. - - the Support Library which offers interfaces to other packages, e.g., for - visualisation, and I/O, and other support facilities. - . - This package contains libCGAL_Qt4.so used for visualization in demos. - -Package: libcgal-dev -Section: libdevel -Architecture: any -Depends: libcgal10 (= ${binary:Version}), libboost-dev, libboost-thread-dev, - libboost-program-options-dev, libgmp3-dev, libmpfr-dev, zlib1g-dev, ${misc:Depends} -Description: C++ library for computational geometry (development files) - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - This package contains the header files and static libraries for libCGAL.so, - libCGAL_Core.so, and libCGAL_ImageIO.so. The header files and static - libraries for libCGAL_Qt4.so can be found in the package libcgal-qt4-dev. - -Package: libcgal-qt4-dev -Section: libdevel -Architecture: any -Depends: libcgal10 (= ${binary:Version}), libcgal-qt4-10 (= ${binary:Version}), - libcgal-dev, libqt4-dev, ${misc:Depends} -Description: C++ library for computational geometry (development files, support for Qt4) - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - This package contains the header files and static libraries for - libCGAL_Qt.so. - -Package: libcgal-demo -Section: devel -Architecture: all -Depends: libcgal-dev (>= ${binary:Version}), libcgal10 (>= ${binary:Version}), - ${misc:Depends} -Recommends: libcgal-qt4-dev (>= ${binary:Version}), libcgal10-qt4 (>= ${binary:Version}) -Suggests: liblapack-dev, libatlas-base-dev | libatlas.so.3gf, gfortran, - geomview, libqglviewer-qt4-dev, libipe-dev (>= 7), libglew1.5-dev | libglew-dev, - libmagick++-dev, qt4-dev-tools, libqt4-opengl-dev, libeigen3-dev (>= 3.1.0~beta1-1) -Description: C++ library for computational geometry (demos) - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - This package contains the demos and examples. - -Package: libcgal-ipelets -Section: graphics -Architecture: any -Depends: libcgal10 (>= ${binary:Version}), ipe (>= ${Ipe-Version}), ipe (<< ${Ipe-Version}+), - ${shlibs:Depends}, ${misc:Depends} -Conflicts: libcgal5-ipelets -Replaces: libcgal5-ipelets -Description: C++ library for computational geometry (ipelets) - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - This package contains the ipelets, i.e., plugins for ipe. diff --git a/Maintenance/deb/squeeze/debian/copyright b/Maintenance/deb/squeeze/debian/copyright deleted file mode 100644 index 382b30cd2b5..00000000000 --- a/Maintenance/deb/squeeze/debian/copyright +++ /dev/null @@ -1,351 +0,0 @@ -This package was debianized by Joachim Reichel on -Thu, 29 Apr 2004 18:43:18 +0200. - -It was downloaded from https://www.cgal.org/download/index.html. - -The Debian packaging is Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, -2010, 2011, 2012 Joachim Reichel and is licensed -under the LGPL license, version 2.1 or later (at your option), which can -be found in /usr/share/common-licenses/LGPL-2.1. - - - -Authors -======= - -Pierre Alliez -Matthias Bäsken -Eric Berberich -Olivier Billet -Jean-Daniel Boissonnat -Carine Bonetto -Mario Botsch -Hervé Brönnimann -Fernando Cacciola -Manuel Caroli -Nicolas Carrez -Frédéric Cazals -Raphaëlle Chaine -Tran Kai Frank Da -Christophe Delage -Olivier Devillers -Katrin Dobrindt -Arno Eigenwillig -Eti Ezra -Andreas Fabri -Frédéric Fichel -Kaspar Fischer -Eyal Flato -Julia Flötotto -Efi Fogel -Wolfgang Freiseisen -Bernd Gärtner -Geert-Jan Giezeman -Marc Glisse -Shlomo Golubev -Miguel Granados -Gael Guennebaud -Philippe Guigue -Ankit Gupta -Peter Hachenberger -Iddo Hanniel -Idit Haran -Sariel Har-Peled -Julien Hazebrouck -Michael Hemmer -Thomas Herrmann -Susan Hert -Shai Hirsch -Michael Hoffmann -Dominik Huelse -Marcel Janer -Athanasios Kakargias -Menelaos Karavelas -Michael Kerber -Lutz Kettner -Nico Kruithof -Sylvain Lazard -Eran Leiserowitz -Bruno Lévy -Sebastian Limbach -Kapelushnik Lior -Eugene Lipovetsky -Sébastien Loriot -Pedro Machado -Bastien Manuel -Naama Mayer -Abdelkrim Mebarki -Kurt Mehlhorn -Naceur Meskini -Andreas Meyer -Michal Meyerovitch -Oren Nechushtan -Gabriele Neyer -Ralf Osbild -Steve Oudot -Eli Packer -Dmitrii Pasechnik -Luis Peñaranda -Sylvain Pion -Marc Pouget -Sigal Raab -François Rebufat -Joachim Reichel -David Rey -Laurent Rineau -Daniel Russel -Niv Sabath -Laurent Saboret -Nader Salman -Stefan Schirra -Sven Schönherr -Michael Seel -Ophir Setter -Le-Jeng Shiue -Hans Tangelder -Stéphane Tayeb -Monique Teillaud -Jane Tournois -Constantinos Tsirogiannis -Radu Ursu -Carl Van Geem -Remco Veltkamp -Ron Wein -Wieger Wesselink -Camille Wormser -Mariette Yvinec -Afra Zomorodian -Guy Zucker -Baruch Zukerman -Tali Zvi - - - -Copyright holders -================= - -Utrecht University (The Netherlands) -ETH Zurich (Switzerland) -Freie Universitaet Berlin (Germany) -INRIA Sophia-Antipolis (France) -Martin-Luther-University Halle-Wittenberg (Germany) -Max-Planck-Institute Saarbruecken (Germany) -RISC Linz (Austria) -Tel-Aviv University (Israel) - -Stanford University (USA) -Foundation for Research and Technology-Hellas (Greece) - -GeometryFactory - -Fernando Luis Cacciola Carballal -Le-Jeng Shiue - - - -Copyright (from upstream file LICENSE) -====================================== - - The CGAL software consists of several parts, each of which is licensed under - an open source license. It is also possible to obtain commercial licenses - from GeometryFactory (www.geometryfactory.com) for all or parts of CGAL. - - The source code of the CGAL library can be found in the directories - "src/CGAL", "src/CGALQt", "src/CGALQt4" and "include/CGAL" (with the - exception of "include/CGAL/CORE"). - It is specified in each file of the CGAL library which - license applies to it. This is either the GNU General Public License - or the GNU Lesser General Public License (as published by the Free Software - Foundation; either version 3 of the License or (at your option) any later - version). The texts of both licenses can be found in the files LICENSE.GPL - and LICENSE.LGPL. - - Distributed along with CGAL (for the users' convenience), but not part of - CGAL, are the following third-party libraries, available under their own - licenses: - - - CORE, in the directories "include/CGAL/CORE" and "src/CGALCore", is - licensed under the LGPL (see LICENSE.LGPL). - - ImageIO, in the directory "src/CGALimageIO", is licensed under the LGPL - (see LICENSE.LGPL). - - All other files that do not have an explicit copyright notice (e.g., all - examples and some demos) are licensed under a very permissive license. The - exact license text can be found in the file LICENSE.FREE_USE. - - More information on the CGAL license can be found at - https://www.cgal.org/license.html - - - -Copyright statements for LGPL'd files -===================================== - -The following copyright statement is taken from include/CGAL/config.h. The -year numbers and the set of copyright holders (see list above) varies from -file to file. - - Copyright (c) 1997-2010 - Utrecht University (The Netherlands), - ETH Zurich (Switzerland), - INRIA Sophia-Antipolis (France), - Max-Planck-Institute Saarbruecken (Germany), - and Tel-Aviv University (Israel). All rights reserved. - - This file is part of CGAL (www.cgal.org); you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - Licensees holding a valid commercial license may use this file in - accordance with the commercial license agreement provided with the software. - - This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - - -Copyright statement for GPL'd files -=================================== - -The following copyright statement is taken from include/CGAL/Width_3.h. The -year numbers and the set of copyright holders (see list above) varies from -file to file. - - Copyright (c) 1997-2000 ETH Zurich (Switzerland). - All rights reserved. - - This file is part of CGAL (www.cgal.org). - You can redistribute it and/or modify it under the terms of the GNU - General Public License as published by the Free Software Foundation, - either version 3 of the License, or (at your option) any later version. - - Licensees holding a valid commercial license may use this file in - accordance with the commercial license agreement provided with the software. - - This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - - -Copyright statement for files under the FREE_USE license -======================================================== - - Copyright (c) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007 - Utrecht University (The Netherlands), - ETH Zurich (Switzerland), - INRIA Sophia-Antipolis (France), - Max-Planck-Institute Saarbruecken (Germany), - and Tel-Aviv University (Israel). All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -The following copyright statements apply to third-party libraries -distributed with CGAL: - - - -Boost -===== - -The following files are modified versions originating from Boost: - - ./include/CGAL/STL_Extension/internal/boost/mutable_heap.hpp - ./include/CGAL/STL_Extension/internal/boost/array_binary_tree.hpp - ./include/CGAL/STL_Extension/internal/boost/mutable_queue.hpp - Copyright 1997, 1998, 1999, 2000 University of Notre Dame. - - ./include/CGAL/internal/container_fwd_fixed.hpp - Copyright 2005-2008 Daniel James. - - ./include/CGAL/auto_link/auto_link.h - (C) Copyright John Maddock 2003. - -All of these files are distributed under the Boost Software License, -version 1.0. - - Boost Software License - Version 1.0 - August 17th, 2003 - - Permission is hereby granted, free of charge, to any person or organization - obtaining a copy of the software and accompanying documentation covered by - this license (the "Software") to use, reproduce, display, distribute, - execute, and transmit the Software, and to prepare derivative works of the - Software, and to permit third-parties to whom the Software is furnished to - do so, all subject to the following: - - The copyright notices in the Software and this entire statement, including - the above license grant, this restriction and the following disclaimer, - must be included in all copies of the Software, in whole or in part, and - all derivative works of the Software, unless such copies or derivative - works are solely in the form of machine-executable object code generated by - a source language processor. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT - SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE - FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - - -CORE -==== - -The following copyright statement applies to the CORE library in -src/CGALCore and include/CGAL/CORE. - - Core Library Version 1.7, August 2004 - Copyright (c) 1995-2004 Exact Computation Project - All rights reserved. - - This file is part of CORE (https://cs.nyu.edu/exact/core/). - You can redistribute it and/or modify it under the terms of the GNU - General Public License as published by the Free Software Foundation, - either version 3 of the License, or (at your option) any later version. - - Licensees holding a valid commercial license may use this file in - accordance with the commercial license agreement provided with the - software. - - This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - - -ImageIO -======= - -The following copyright statement applies to the ImageIO library in -src/CGALimageIO. - - Copyright (c) 2005, 2006 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) - All rights reserved. - - The files in this directory are part of the ImageIO Library. - You can redistribute them and/or modify them under the terms of the - GNU Lesser General Public License as published by the Free Software Foundation; - either version 3 of the License, or (at your option) any later version. - - Licensees holding a valid commercial license may use this file in - accordance with the commercial license agreement provided with the software. - - These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --git a/Maintenance/deb/squeeze/debian/libcgal-demo.install b/Maintenance/deb/squeeze/debian/libcgal-demo.install deleted file mode 100644 index 239a1b25f46..00000000000 --- a/Maintenance/deb/squeeze/debian/libcgal-demo.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/share/doc/cgal/demo.tar.gz usr/share/doc/libcgal10 -usr/share/doc/cgal/examples.tar.gz usr/share/doc/libcgal10 diff --git a/Maintenance/deb/squeeze/debian/libcgal-dev.install b/Maintenance/deb/squeeze/debian/libcgal-dev.install deleted file mode 100644 index d1af7ba0074..00000000000 --- a/Maintenance/deb/squeeze/debian/libcgal-dev.install +++ /dev/null @@ -1,11 +0,0 @@ -usr/bin/* -usr/include/* -usr/lib/libCGAL.a -usr/lib/libCGAL_Core.a -usr/lib/libCGAL_ImageIO.a -usr/lib/libCGAL.so -usr/lib/libCGAL_Core.so -usr/lib/libCGAL_ImageIO.so -usr/lib/CGAL/* -usr/share/cmake-2.8/Modules/* -usr/share/man/man1/cgal_create_cmake_script.1 diff --git a/Maintenance/deb/squeeze/debian/libcgal-ipelets.install b/Maintenance/deb/squeeze/debian/libcgal-ipelets.install deleted file mode 100644 index dc8f242677f..00000000000 --- a/Maintenance/deb/squeeze/debian/libcgal-ipelets.install +++ /dev/null @@ -1,2 +0,0 @@ -# use wildcard to avoid hard-coding the Ipe version -usr/lib/ipe/* usr/lib/ipe diff --git a/Maintenance/deb/squeeze/debian/libcgal-ipelets.lintian-overrides b/Maintenance/deb/squeeze/debian/libcgal-ipelets.lintian-overrides deleted file mode 100644 index 1aa24c69251..00000000000 --- a/Maintenance/deb/squeeze/debian/libcgal-ipelets.lintian-overrides +++ /dev/null @@ -1 +0,0 @@ -libcgal-ipelets: hardening-no-fortify-functions usr/lib/ipe/*/ipelets/libCGAL_*.so diff --git a/Maintenance/deb/squeeze/debian/libcgal-qt4-10.install b/Maintenance/deb/squeeze/debian/libcgal-qt4-10.install deleted file mode 100644 index b748a7e2d96..00000000000 --- a/Maintenance/deb/squeeze/debian/libcgal-qt4-10.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/libCGAL_Qt4.so.* usr/lib diff --git a/Maintenance/deb/squeeze/debian/libcgal-qt4-10.lintian-overrides b/Maintenance/deb/squeeze/debian/libcgal-qt4-10.lintian-overrides deleted file mode 100644 index 930bb4415ea..00000000000 --- a/Maintenance/deb/squeeze/debian/libcgal-qt4-10.lintian-overrides +++ /dev/null @@ -1 +0,0 @@ -libcgal-qt4-10: hardening-no-fortify-functions usr/lib/libCGAL_Qt4.so.* diff --git a/Maintenance/deb/squeeze/debian/libcgal-qt4-10.shlibs b/Maintenance/deb/squeeze/debian/libcgal-qt4-10.shlibs deleted file mode 100644 index 69742b6438b..00000000000 --- a/Maintenance/deb/squeeze/debian/libcgal-qt4-10.shlibs +++ /dev/null @@ -1 +0,0 @@ -libCGAL_Qt4 10 libcgal-qt4-10 diff --git a/Maintenance/deb/squeeze/debian/libcgal-qt4-dev.install b/Maintenance/deb/squeeze/debian/libcgal-qt4-dev.install deleted file mode 100644 index 6fd829ac922..00000000000 --- a/Maintenance/deb/squeeze/debian/libcgal-qt4-dev.install +++ /dev/null @@ -1,5 +0,0 @@ -# The next entry is disabled here because it overlaps with the corresponding -# entry in libcgal-dev.install. The files are moved in debian/rules. -# usr/include/CGAL/Qt -usr/lib/libCGAL_Qt4.a -usr/lib/libCGAL_Qt4.so diff --git a/Maintenance/deb/squeeze/debian/libcgal10.install b/Maintenance/deb/squeeze/debian/libcgal10.install deleted file mode 100644 index f383cfa6ebc..00000000000 --- a/Maintenance/deb/squeeze/debian/libcgal10.install +++ /dev/null @@ -1,4 +0,0 @@ -usr/lib/libCGAL.so.* usr/lib -usr/lib/libCGAL_Core.so.* usr/lib -usr/lib/libCGAL_ImageIO.so.* usr/lib -usr/share/doc/cgal/changelog usr/share/doc/libcgal10 diff --git a/Maintenance/deb/squeeze/debian/libcgal10.lintian-overrides b/Maintenance/deb/squeeze/debian/libcgal10.lintian-overrides deleted file mode 100644 index 37afa24ac1b..00000000000 --- a/Maintenance/deb/squeeze/debian/libcgal10.lintian-overrides +++ /dev/null @@ -1 +0,0 @@ -libcgal10: hardening-no-fortify-functions usr/lib/libCGAL.so.* diff --git a/Maintenance/deb/squeeze/debian/libcgal10.shlibs b/Maintenance/deb/squeeze/debian/libcgal10.shlibs deleted file mode 100644 index 395a4c6b5ff..00000000000 --- a/Maintenance/deb/squeeze/debian/libcgal10.shlibs +++ /dev/null @@ -1,3 +0,0 @@ -libCGAL 10 libcgal10 -libCGAL_Core 10 libcgal10 -libCGAL_ImageIO 10 libcgal10 diff --git a/Maintenance/deb/squeeze/debian/patches/do-not-link-example-with-qt4-support-library.patch b/Maintenance/deb/squeeze/debian/patches/do-not-link-example-with-qt4-support-library.patch deleted file mode 100644 index 04b469305b8..00000000000 --- a/Maintenance/deb/squeeze/debian/patches/do-not-link-example-with-qt4-support-library.patch +++ /dev/null @@ -1,12 +0,0 @@ -Description: Avoid -lCGAL_Qt4 in linker command of Linear_cell_complex example ---- cgal-4.1~beta1.orig/examples/Linear_cell_complex/CMakeLists.txt -+++ cgal-4.1~beta1/examples/Linear_cell_complex/CMakeLists.txt -@@ -12,7 +12,7 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR - endif() - endif() - --find_package(CGAL QUIET COMPONENTS Core Qt4) -+find_package(CGAL QUIET COMPONENTS Core) - - # For Gprof. - # ADD_DEFINITIONS("-pg") diff --git a/Maintenance/deb/squeeze/debian/patches/series b/Maintenance/deb/squeeze/debian/patches/series deleted file mode 100644 index 68417a3f7a9..00000000000 --- a/Maintenance/deb/squeeze/debian/patches/series +++ /dev/null @@ -1 +0,0 @@ -do-not-link-example-with-qt4-support-library.patch diff --git a/Maintenance/deb/squeeze/debian/rules b/Maintenance/deb/squeeze/debian/rules deleted file mode 100755 index a3533b8b2cb..00000000000 --- a/Maintenance/deb/squeeze/debian/rules +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/make -f - -# export DH_VERBOSE=1 - -# See https://wiki.debian.org/Hardening#Notes_for_packages_using_CMake -CFLAGS := $(CFLAGS) $(CPPFLAGS) -CXXFLAGS := $(CXXFLAGS) $(CPPFLAGS) - -# The build system links all four libraries against all dependencies. -LDFLAGS += -Wl,--as-needed - -ifeq ($(DEB_BUILD_ARCH),alpha) - IEEE_FPU_OPTION = -mieee -mfp-rounding-mode=d -endif - -%: - dh $@ - -override_dh_auto_configure: - mkdir -p static - cd static && QTDIR= cmake .. \ - -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ - -DWITH_CGAL_Qt3=OFF -DWITH_demos=OFF -DWITH_examples=OFF \ - -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=FALSE - mkdir -p shared - cd shared && QTDIR= cmake .. \ - -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ - -DWITH_CGAL_Qt3=OFF -DWITH_demos=OFF -DWITH_examples=OFF \ - -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_SKIP_RPATH=TRUE - mkdir -p shared/demo/CGAL_ipelets - cd shared/demo/CGAL_ipelets && QTDIR= cmake ../../../demo/CGAL_ipelets \ - -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ - -DCGAL_DIR=$(CURDIR)/shared - -override_dh_auto_build: - $(MAKE) -C static - $(MAKE) -C shared - $(MAKE) -C shared/demo/CGAL_ipelets - -override_dh_auto_test: -ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) - $(MAKE) -C debian/tests IEEE_FPU_OPTION="$(IEEE_FPU_OPTION)" rounding_modes1 - LD_LIBRARY_PATH=shared/lib debian/tests/rounding_modes1 - $(MAKE) -C debian/tests IEEE_FPU_OPTION="$(IEEE_FPU_OPTION)" rounding_modes2 - LD_LIBRARY_PATH=shared/lib debian/tests/rounding_modes2 -endif - -override_dh_auto_clean: - dh_auto_clean - rm -fr shared static - -override_dh_install: - $(MAKE) -C static DESTDIR=$(CURDIR)/debian/tmp install - $(MAKE) -C shared DESTDIR=$(CURDIR)/debian/tmp install - $(MAKE) -C shared/demo/CGAL_ipelets DESTDIR=$(CURDIR)/debian/tmp install - - mkdir -p debian/tmp/usr/share/cmake-2.8/Modules - cp cmake/modules/FindCGAL.cmake debian/tmp/usr/share/cmake-2.8/Modules - - mv debian/tmp/usr/share/doc/CGAL-`cat VERSION` debian/tmp/usr/share/doc/cgal - mv debian/tmp/usr/share/doc/cgal/CHANGES debian/tmp/usr/share/doc/cgal/changelog - rm debian/tmp/usr/share/doc/cgal/LICENSE* - rm debian/tmp/usr/share/doc/cgal/AUTHORS - - tar cf - examples | gzip --best >debian/tmp/usr/share/doc/cgal/examples.tar.gz - tar cf - demo | gzip --best >debian/tmp/usr/share/doc/cgal/demo.tar.gz - - rm debian/tmp/usr/bin/cgal_make_macosx_app - - dh_install --sourcedir=debian/tmp --list-missing - - mkdir -p debian/libcgal-qt4-dev/usr/include/CGAL - mv debian/libcgal-dev/usr/include/CGAL/Qt debian/libcgal-qt4-dev/usr/include/CGAL - - mkdir -p debian/libcgal-qt4-10/usr/share/doc - ln -s libcgal10 debian/libcgal-qt4-10/usr/share/doc/libcgal-qt4-10 - mkdir -p debian/libcgal-dev/usr/share/doc - ln -s libcgal10 debian/libcgal-dev/usr/share/doc/libcgal-dev - mkdir -p debian/libcgal-qt4-dev/usr/share/doc - ln -s libcgal10 debian/libcgal-qt4-dev/usr/share/doc/libcgal-qt4-dev - mkdir -p debian/libcgal-demo/usr/share/doc - ln -s libcgal10 debian/libcgal-demo/usr/share/doc/libcgal-demo - mkdir -p debian/libcgal-ipelets/usr/share/doc - ln -s libcgal10 debian/libcgal-ipelets/usr/share/doc/libcgal-ipelets - -override_dh_installdocs: - dh_installdocs -plibcgal10 debian/copyright - -override_dh_installchangelogs: - dh_installchangelogs -plibcgal10 - -override_dh_shlibdeps: # TODO Is that really needed? - dh_shlibdeps -a -ldebian/libcgal10/usr/lib - -override_dh_gencontrol: - dh_gencontrol -- -VIpe-Version=`dpkg-awk 'Package:^ipe$$' -- Version | grep Version | sed 's/Version: //;s/-[^-]*$$//'` diff --git a/Maintenance/deb/squeeze/debian/source/format b/Maintenance/deb/squeeze/debian/source/format deleted file mode 100644 index 163aaf8d82b..00000000000 --- a/Maintenance/deb/squeeze/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/Maintenance/deb/squeeze/debian/tests/Makefile b/Maintenance/deb/squeeze/debian/tests/Makefile deleted file mode 100644 index 7f1b7c747e5..00000000000 --- a/Maintenance/deb/squeeze/debian/tests/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -rounding_modes1: rounding_modes1.o - g++ $^ -o $@ - -rounding_modes2: rounding_modes2.o - g++ $^ -o $@ -lCGAL -L../../shared/lib - -rounding_modes1.o: rounding_modes1.cpp - g++ -c $< -o $@ -O2 -frounding-math $(IEEE_FPU_OPTION) - -rounding_modes2.o: rounding_modes2.cpp - g++ -c $< -o $@ -O2 -frounding-math $(IEEE_FPU_OPTION) -I../../include -I../../shared/include - -clean: - rm -f *.o rounding_modes1 rounding_modes2 diff --git a/Maintenance/deb/squeeze/debian/tests/rounding_modes1.cpp b/Maintenance/deb/squeeze/debian/tests/rounding_modes1.cpp deleted file mode 100644 index 0c497a77dc3..00000000000 --- a/Maintenance/deb/squeeze/debian/tests/rounding_modes1.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include -#include -#include - -int modes[4] = { FE_TOWARDZERO, FE_UPWARD, FE_DOWNWARD, FE_TONEAREST }; - -std::string str (int mode) -{ - switch (mode) - { - case FE_TOWARDZERO: return "FE_TOWARDZERO"; - case FE_UPWARD: return "FE_UPWARD"; - case FE_DOWNWARD: return "FE_DOWNWARD"; - case FE_TONEAREST: return "FE_TONEAREST"; - default: throw __LINE__; - } -} - -int fetestround () -{ - volatile double eps = std::numeric_limits::denorm_min(); - - double x = -1.0; - double y = 1.0; - volatile double x_plus_eps = x + eps; - volatile double y_minus_eps = y - eps; - - if ((x == x_plus_eps) && (y == y_minus_eps)) - return FE_TONEAREST; - if (y == y_minus_eps) - return FE_UPWARD; - if (x == x_plus_eps) - return FE_DOWNWARD; - return FE_TOWARDZERO; -} - -int main (int argc, char* argv[]) -{ - int errors = 0; - - int mode_get = fegetround(); - std::cout << "fegetround() = " << str(mode_get) << " " << std::endl; - - for (int i=0; i<4; i++) - { - int mode_set = modes[i]; - fesetround (mode_set); - std::cout << "fesetround (" << str(mode_set) << ")" << std::endl; - - int mode_get = fegetround(); - std::cout << "fegetround() = " << str(mode_get) << " "; - bool ok_get = mode_get == mode_set; - if (!ok_get) - errors++; - std::cout << (ok_get ? "(ok)" : "(error)") << std::endl; - - int mode_test = fetestround(); - std::cout << "fetestround() = " << str(mode_test) << " "; - bool ok_test = mode_test == mode_set; - if (!ok_test) - errors++; - std::cout << (ok_test ? "(ok)" : "(error)") << std::endl; - } - - return errors; -} diff --git a/Maintenance/deb/squeeze/debian/tests/rounding_modes2.cpp b/Maintenance/deb/squeeze/debian/tests/rounding_modes2.cpp deleted file mode 100644 index 7892a99a83b..00000000000 --- a/Maintenance/deb/squeeze/debian/tests/rounding_modes2.cpp +++ /dev/null @@ -1,95 +0,0 @@ -// This tests the rounding mode functions. - -#include -#include -#include - -typedef CGAL::Interval_nt_advanced NT_adv; -typedef CGAL::Interval_nt<> NT; - -void print_res (bool res) -{ std::cout << (res ? "ok" : "ERROR") << std::endl; } - -// The results of 1-epsilon and -1+epsilon are enough -// to detect exactly the current rounding mode. -// 1-MIN_DOUBLE -// +------+-------+ -// | 1 | 1-ulp | -// +--------+------+-------+ -// -1+MIN_DOUBLE | -1 | near | -inf | -// | -1+ulp | +inf | zero | -// +--------+------+-------+ - -// I use a global variable here to avoid constant propagation. -double IA_min_double; - -CGAL::FPU_CW_t -FPU_empiric_test() -{ - IA_min_double = CGAL_IA_STOP_CPROP(CGAL_IA_MIN_DOUBLE); - double y = 1.0, z = -1.0; - double ye, ze; - ye = y - IA_min_double; - ze = z + IA_min_double; - if (y == ye && z == ze) return CGAL_FE_TONEAREST; - if (y == ye) return CGAL_FE_UPWARD; - if (z == ze) return CGAL_FE_DOWNWARD; - return CGAL_FE_TOWARDZERO; -} - -void print_rounding_name (CGAL::FPU_CW_t r) -{ - switch (r) { - case CGAL_FE_TONEAREST: std::cout << "NEAR\n"; break; - case CGAL_FE_DOWNWARD: std::cout << "DOWN\n"; break; - case CGAL_FE_UPWARD: std::cout << "UP\n"; break; - case CGAL_FE_TOWARDZERO: std::cout << "ZERO\n"; break; - default: std::cout << "unknown !\n"; - } -} - -int main() -{ - bool flag = true; - - flag = flag && (FPU_empiric_test() == CGAL_FE_TONEAREST); - std::cout << "default: "; - print_res(flag); - - // Should be a no-op. - CGAL::FPU_set_cw(CGAL::FPU_get_cw()); - flag = flag && (FPU_empiric_test() == CGAL_FE_TONEAREST); - std::cout << "get/set: "; - print_res(flag); - if (!flag) print_rounding_name(FPU_empiric_test()); - - // Rounding to zero. - CGAL::FPU_set_cw(CGAL_FE_TOWARDZERO); - flag = flag && (FPU_empiric_test() == CGAL_FE_TOWARDZERO); - std::cout << "zero : "; - print_res(flag); - if (!flag) print_rounding_name(FPU_empiric_test()); - - // Rounding to infinity. - CGAL::FPU_set_cw(CGAL_FE_UPWARD); - flag = flag && (FPU_empiric_test() == CGAL_FE_UPWARD); - std::cout << "+inf : "; - print_res(flag); - if (!flag) print_rounding_name(FPU_empiric_test()); - - // Rounding to minus infinity. - CGAL::FPU_set_cw(CGAL_FE_DOWNWARD); - flag = flag && (FPU_empiric_test() == CGAL_FE_DOWNWARD); - std::cout << "-inf : "; - print_res(flag); - if (!flag) print_rounding_name(FPU_empiric_test()); - - // Rounding to nearest. - CGAL::FPU_set_cw(CGAL_FE_TONEAREST); - flag = flag && (FPU_empiric_test() == CGAL_FE_TONEAREST); - std::cout << "near : "; - print_res(flag); - if (!flag) print_rounding_name(FPU_empiric_test()); - - return (int) !flag; -} diff --git a/Maintenance/deb/squeeze/debian/watch b/Maintenance/deb/squeeze/debian/watch deleted file mode 100644 index 36047492bc6..00000000000 --- a/Maintenance/deb/squeeze/debian/watch +++ /dev/null @@ -1,10 +0,0 @@ -# Note that the file URLs contain unpredictable IDs as directory. The -# uversionmagle options strips this ID. -# -# Note that only digits and "." are used to match the version number. -# Therefore we do not match beta releases. -# -version=3 -opts=uversionmangle=s/(\d+).([\d\.]+)/$2/ \ - https://gforge.inria.fr/frs/?group_id=52 \ - /frs/download.php/(\d+)/CGAL-([\d\.]+).tar.gz diff --git a/Maintenance/deb/wheezy/debian/NEWS.Debian b/Maintenance/deb/wheezy/debian/NEWS.Debian deleted file mode 100644 index 938dde2d1fe..00000000000 --- a/Maintenance/deb/wheezy/debian/NEWS.Debian +++ /dev/null @@ -1,9 +0,0 @@ -cgal (4.2-1) unstable; urgency=low - - The Qt4 support library libCGAL_Qt4.so.10.0.0 has been moved from the package - libcgal10 to the new package libcgal-qt4-10. Similarly, the corresponding - headers and the static library have been moved from the package libcgal-dev - to the new package libcgal-qt4-dev. That is the packages libcgal10 and - libcgal-dev do not any longer depend on the Qt packages. - - -- Joachim Reichel Sun, 02 Sep 2012 12:31:08 +0200 diff --git a/Maintenance/deb/wheezy/debian/README.Debian b/Maintenance/deb/wheezy/debian/README.Debian deleted file mode 100644 index def38fe860b..00000000000 --- a/Maintenance/deb/wheezy/debian/README.Debian +++ /dev/null @@ -1,50 +0,0 @@ -README.Debian -------------- - -The homepage of CGAL (https://www.cgal.org/) offers more information about CGAL. -In particular, a mailing list and the documentation for the library (in PDF and -HTML) are available. The authors ask you to give some feedback about your usage -of CGAL in a short questionnaire (in the download section). - - -Documentation -------------- - -Note that the CGAL documentation cannot be packaged for Debian due to unclear -license conditions. The complete documentation in PDF and HTML is available at -https://www.cgal.org/. - - -Demos and examples ------------------- - -Tarballs with demos and examples can be found in /usr/share/doc/libcgal-demo. -Extract the tarballs somewhere and call "cmake ." to configure the -demos/examples. Call "make" to build them, either in the top-level directory -to build all demos/examples (which takes some time and needs quite some disk -space), or in the subdirectory of the desired demo/example. The cmake option --DCMAKE_VERBOSE_MAKEFILE=ON is useful to generate verbose makefiles that show -each executed command. - - -Demos using libQGLViewer ------------------------- - -The Debian package of libQGLViewer uses non-standard library names to offer the -library in a Qt3 and Qt4 flavor. The build system of CGAL has been patched to -handle the non-standard library name. If your libQGLViewer packages are older -than 2.3.1-4 you need to work around another problem with the non-standard -include directory. Create an include directory with the expected name -"QGLViewer", e.g., - - mkdir -p /some/dir - ln -s /usr/include/qglviewer-qt4 /some/dir/QGLViewer - -and pass the option - - -DQGLVIEWER_INCLUDE_DIR=/some/dir - -to cmake. See https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=522659 for more -information. - - -- Joachim Reichel Sat, 06 Feb 2010 12:29:02 +0100 diff --git a/Maintenance/deb/wheezy/debian/README.source b/Maintenance/deb/wheezy/debian/README.source deleted file mode 100644 index 662cd01c5da..00000000000 --- a/Maintenance/deb/wheezy/debian/README.source +++ /dev/null @@ -1,11 +0,0 @@ -normalize-audio for Debian --------------------------- - -This package uses quilt to manage all modifications to the upstream source. -Changes are stored in the source package as diffs in debian/patches and -applied during the build. - -See /usr/share/doc/quilt/README.source for a detailed explanation. - - -- Joachim Reichel Sun, 15 Jan 2012 14:38:04 +0100 - diff --git a/Maintenance/deb/wheezy/debian/changelog b/Maintenance/deb/wheezy/debian/changelog deleted file mode 100644 index 56c3f83f203..00000000000 --- a/Maintenance/deb/wheezy/debian/changelog +++ /dev/null @@ -1,348 +0,0 @@ -cgal (4.1-1~wheezy1) testing; urgency=low - - * New upstream release. - * Rename binary package libcgal9 to libcgal10 to reflect SONAME change. - * Configure CGAL using -DCGAL_ENABLE_PRECONFIG=OFF since we do not want - that the accidental presence of optional libraries (for demos and - examples) influences the build of the library. - * Move the Qt4 support library and the corresponding headers into new - binary packages libcgal-qt4-10 and libcgal-qt4-dev (Closes: #683214). - * Add libboost-system-dev to Builds-Depends: of cgal. - * Move libmpfi-dev from Suggests: of cgal-demo to Build-Depends: of cgal. - - -- Joachim Reichel Wed, 24 Oct 2012 19:08:35 +0200 - -cgal (4.0.2-1) unstable; urgency=low - - * New upstream release. - * Remove gcc-4.7 patch (fixed upstream). - - -- Joachim Reichel Wed, 04 Jul 2012 19:45:28 +0200 - -cgal (4.0-4) unstable; urgency=low - - * Add Suggests: libeigen3-dev (>= 3.1.0~beta1-1), libmpfi-dev to - libcgal-demo. - - -- Joachim Reichel Tue, 12 Jun 2012 23:53:14 +0200 - -cgal (4.0-3) unstable; urgency=low - - * Change Build-Depends: debhelper (>= 8) to debhelper (>= 9), update - debian/compat to get the default build flags for hardening. Inject - CPPFLAGS into CFLAGS and CXXFLAGS, since CPPFLAGS is ignored by cmake. - * Add lintian override to silence incorrect warnings about - hardening-no-fortify-functions for some libraries (all libraries are - built with the same flags). - - -- Joachim Reichel Sun, 10 Jun 2012 15:36:27 +0200 - -cgal (4.0-2) unstable; urgency=low - - * Add patch gcc-4.7 to fix a syntax error in template code which is - not instantiated during the package build itself (Closes: #673554). - * Fix debian/watch. - - -- Joachim Reichel Sun, 20 May 2012 22:47:56 +0200 - -cgal (4.0-1) unstable; urgency=low - - * New upstream release. - * Move from non-free to main due to upstream license change from QPL - to GPL 3+ (and from LGPL 2.1 to LGPL 3+), updated debian/copyright - accordingly. - * Rename binary package libcgal8 to libcgal9 to reflect SONAME change. - * Update Standards-Version to 3.9.3 (no changes needed). - * Remove fix-ipe-version-detection.dpatch and - fix-qt-moc-parse-error.dpatch (fixed upstream). - * Removed libmagick++9-dev from Suggests: of libcgal-demo, because - that package does no longer exists. - - -- Joachim Reichel Mon, 12 Mar 2012 19:14:55 +0100 - -cgal (3.9-4) unstable; urgency=low - - * Rebuild against boost 1.48 (Closes: #659358). - * Add fix-qt-moc-parse-error.dpatch as workaround for - https://bugreports.qt-project.org/browse/QTBUG-22829. - - -- Joachim Reichel Fri, 10 Feb 2012 22:41:26 +0100 - -cgal (3.9-3) unstable; urgency=low - - * Fix FTBFS when building only architecture dependent packages caused - by recent transition to the new packaging format (Closes: #658191). - - -- Joachim Reichel Wed, 01 Feb 2012 00:07:03 +0100 - -cgal (3.9-2) unstable; urgency=low - - * Changed packaging format to "3.0 (quilt)". - * Add fix-ipe-version-detection.dpatch: upstream patch for bug #643278. - Remove workaround. - * Tighten Depends: of libcgal-ipelets on ipe (Closes: #657720). - * Move libcgal-ipelets to Section: graphics. - * Add libqt4-opengl-dev to Suggests: of libcgal-demo. - - -- Joachim Reichel Mon, 30 Jan 2012 19:04:18 +0100 - -cgal (3.9-1) unstable; urgency=low - - * New upstream release. - * Rename binary package libcgal7 to libcgal8 to reflect SONAME change. - * Add workaround for bug #643278. - - -- Joachim Reichel Wed, 28 Sep 2011 19:51:35 +0200 - -cgal (3.8-1) unstable; urgency=low - - * New upstream release. - * Rename binary package libcgal6 to libcgal7 to reflect SONAME change. - * Update Standards-Version to 3.9.2 (no changes needed). - - -- Joachim Reichel Thu, 21 Apr 2011 18:45:25 +0200 - -cgal (3.7-5) unstable; urgency=low - - * Upload to unstable. - - -- Joachim Reichel Sun, 06 Mar 2011 17:26:11 +0100 - -cgal (3.7-4) experimental; urgency=low - - * Build with libgmp10 (Closes: #614797). Thanks to Christian M. Amsüss. - - -- Joachim Reichel Sun, 27 Feb 2011 16:36:22 +0100 - -cgal (3.7-3) unstable; urgency=low - - * Disable support for Qt3 because Qt3 has been removed from the repository - (Closes: #604478). - - -- Joachim Reichel Thu, 10 Feb 2011 21:06:09 +0100 - -cgal (3.7-2) unstable; urgency=low - - * Upload to unstable. - - -- Joachim Reichel Sun, 06 Feb 2011 13:53:00 +0100 - -cgal (3.7-1) experimental; urgency=low - - * New upstream release. - * Rename binary package libcgal5 to libcgal6 to reflect SONAME change. - * Rename binary package libcgal5-ipelets to libcgal-ipelets because it is - not possible to install the ipelets for different SONAMEs in parallel. - * Remove ipe-default-to-version-7.dpatch: the Ipe version is now - auto-detected. - * Remove fix-core-64bit.dpatch (fixed upstream). - * Add qt4-dev-tools to Suggests: of libcgal-demo for qcollectiongenerator. - * Update Standards-Version to 3.9.1 (-D_REENTRANT no longer needed). - - -- Joachim Reichel Sun, 17 Oct 2010 14:27:54 +0200 - -cgal (3.6.1-2) unstable; urgency=low - - * Add fix-core-64bit.dpatch: use CORE::CHUNK_BIT instead of hard-coded - constant 14. - - -- Joachim Reichel Tue, 24 Aug 2010 19:46:36 +0200 - -cgal (3.6.1-1) unstable; urgency=low - - * New upstream release. - * Set SOVERSION explicitly to 5.0.1 as told by upstream. - * Remove architecture exceptions from Suggests: for libcgal-demo which is no - longer allowed by dpkg-gencontrol (see #560071). - * Fix debian/watch file. - * Change license of packaging to LGPL 2.1 or later because referencing the - BSD license in /usr/share/common-licenses is deprecated. - * Update Standards-Version to 3.9.0 (no changes needed). - - -- Joachim Reichel Thu, 01 Jul 2010 23:37:41 +0200 - -cgal (3.6-1) unstable; urgency=low - - * New upstream release. - * Rename binary package libcgal4 to libcgal5 to reflect SONAME change. - * Remove fix-cmake-qglviewer-detection.dpatch (fixed upstream). - * New binary package libcgal5-ipelets which contains plugins for Ipe 7.x - (Closes: #557643). - * Add ipe-default-to-version-7.dpatch: change default of WITH_IPE_7 to ON. - * Remove libboost-graph1.35-dev from Build-Depends: and Suggests: of - libcgal-demo (not needed). - - -- Joachim Reichel Mon, 22 Mar 2010 19:09:15 +0100 - - -cgal (3.5.1-2) unstable; urgency=low - - * Add fix-cmake-qglviewer-detection.dpatch (Closes: #564126), thanks to - Marc Glisse for the patch. - * Update Standards-Version to 3.8.4 (no changes needed). - - -- Joachim Reichel Sat, 06 Feb 2010 12:29:02 +0100 - -cgal (3.5.1-1) unstable; urgency=low - - * New upstream release. - * Fix error in handling of "debug" and "nostrip" in $(DEB_BUILD_OPTIONS) - (see also #552961). - * Unset QTDIR before calling cmake to reduce problems in non-clean build - environments. - * Add ${misc:Depends} to Depends: of all binary packages as found by - lintian. - - -- Joachim Reichel Sun, 22 Nov 2009 22:31:00 +0100 - -cgal (3.5-1) unstable; urgency=low - - * New upstream release. - * Rename binary package libcgal3 to libcgal4 to reflect SONAME change. - * Remove fix-FindCGAL-cmake.dpatch (fixed upstream). - * Remove fix-demos-examples-configuration.dpatch (fixed upstream). - * Remove add-cmake-2.6.3-support.dpatch (fixed upstream). - * Remove fix-demo-polyheron-3.dpatch (fixed upstream). - * Remove "-mieee -mfp-rounding-mode=d" from CGAL_CXX_FLAGS on alpha - (fixed upstream). - - -- Joachim Reichel Sat, 03 Oct 2009 16:43:08 +0200 - -cgal (3.4-5) unstable; urgency=low - - * Return to unversioned boost dependencies. - * Re-add working watch file. - * Update Standards-Version to 3.8.3 (no changes needed). - - -- Joachim Reichel Wed, 16 Sep 2009 19:25:09 +0200 - -cgal (3.4-4) unstable; urgency=low - - * Add patch fix-demos-examples-configuration.dpatch. - * Add patch add-cmake-2.6.3-support.dpatch. - * Add patch fix-demo-polyheron-3.dpatch. - * Fix support for nocheck in DEB_BUILD_OPTIONS (was broken in 3.4-3). - - -- Joachim Reichel Fri, 01 May 2009 17:31:00 +0200 - -cgal (3.4-3) unstable; urgency=low - - * Update boost dependencies to 1.38. - * Remove watch file (new upstream location uses unpredictable paths). - * Update Standards-Version to 3.8.1 (add support for nocheck in - DEB_BUILD_OPTIONS). - * Change Suggests: dependency of libcgal-demo from libqglviewer-dev - to libqglviewer-qt4-dev (all demos using libQGLViewer use Qt4). - * Add workaround for #522659 to README.Debian. - - -- Joachim Reichel Sat, 18 Apr 2009 11:46:19 +0200 - -cgal (3.4-2) unstable; urgency=low - - * Add "-mieee -mfp-rounding-mode=d" to CGAL_CXX_FLAGS on alpha (got lost - during the transition to cmake). - - -- Joachim Reichel Sun, 15 Feb 2009 15:06:31 +0100 - -cgal (3.4-1) unstable; urgency=low - - * New upstream release. - * Adapt debian/rules to the new cmake-based build system. - * Downgrade LAPACK- and BLAS-related Build-Depends: to Suggests: for - libcgal-demo, since it is now possible to configure demos and examples - independently of the library. - - -- Joachim Reichel Thu, 22 Jan 2009 18:39:44 +0100 - -cgal (3.3.1-4) unstable; urgency=low - - * Remove fortran-transition.dpatch, update build-library.dpatch: - Do not link with -lg2c in configuration tests (Closes: #475721). - * Update cgal_create_makefile.dpatch to remove bashisms (Closes: #486045). - * Update debian/tests/rounding_modes2.cpp to stop constant propagation. - * Update Standards-Version to 3.8.0 (explain in debian/copyright why package - is in non-free). - - -- Joachim Reichel Sun, 15 Jun 2008 22:11:14 +0200 - -cgal (3.3.1-3) unstable; urgency=low - - * Add patch fortran-transition.dpatch (Closes: #470359), thanks to Kumar - Appaiah for the patch. - * debian/rules: s/lapack3-dev/liblapack-dev/, - s/atlas3-base-dev/libatlas-base-dev/, s/libatlas-3.so/libatlas.so.3gf/ . - * Fix manpage w.r.t. makefile vs. cgal.mk (Closes: #466430). - * Add second test for FPU rounding modes. - - -- Joachim Reichel Wed, 19 Mar 2008 20:27:34 +0100 - -cgal (3.3.1-2) unstable; urgency=low - - * debian/control: Really really drop support for atlas and lapack on arm - and m68k, fix atlas and lapack support on other architectures. - * debian/control: Extend exclusions for arm to variants armeb and armel - (Closes: #460141). - * debian/control: Remove virtual dependency liblapack-3.so which is - provided by atlas3-base-dev (which does *not* provide - /usr/lib/liblapack.so, just /usr/lib/atlas/liblapack.so). - * debian/control: Replace virtual dependency libblas-3.so by - libatlas-3.so. - * Add patch qt-compatibility-headers.dpatch (Closes: #464251). - * debian/control: Add Homepage: field, adjust Description: accordingly. - * Update Standards-Version to 3.7.3 (no changes needed). - - -- Joachim Reichel Wed, 06 Feb 2008 18:37:52 +0100 - -cgal (3.3.1-1) unstable; urgency=low - - * New upstream release. - * Remove patch bugfix-fpu-rounding-mode-alpha.dpatch (included by - upstream). - * Fail build if FPU rounding mode test fails. - * Really drop support for atlas and lapack on arm and m68k. - * Fix cgal_create_makefile w.r.t. makefile vs. cgal.mk. - - -- Joachim Reichel Mon, 3 Sep 2007 18:57:36 +0200 - -cgal (3.3-2) unstable; urgency=low - - * Add patch bugfix-fpu-rounding-mode-alpha.dpatch (Closes: #431230). - * debian/control: Add versioned depends on libboost-program-options-dev, - drop build-dependency on libboost-graph-dev. - * Drop support for atlas on arm and m68k. - - -- Joachim Reichel Mon, 16 Jul 2007 15:32:35 +0200 - -cgal (3.3-1) unstable; urgency=low - - * New upstream release. - - -- Joachim Reichel Sun, 3 Jun 2007 09:36:36 +0200 - -cgal (3.2.1-2) unstable; urgency=low - - * Fix FTBFS on hppa (and probably also on other architectures) related - to FPU rounding modes (Closes: #404464). - * debian/control: Add tag XS-Autobuild. - * debian/copyright: Add note about autobuilding. - * debian/control: Make package binNMU-safe. - * Remove linda override for bug #369977 (no longer needed). - * Add watch file. - - -- Joachim Reichel Fri, 26 Jan 2007 19:16:36 +0100 - -cgal (3.2.1-1) unstable; urgency=low - - * New upstream release. - * Add linda override for bug #369977. - * Remove patch bugfix-demo-examples-makefiles.dpatch (no longer needed). - - -- Joachim Reichel Fri, 14 Jul 2006 21:20:16 +0200 - -cgal (3.2-1) unstable; urgency=low - - * New upstream release. - * First upload to Debian archive. (Closes: #251885) - - -- Joachim Reichel Mon, 29 May 2006 20:24:27 +0200 -5~ diff --git a/Maintenance/deb/wheezy/debian/compat b/Maintenance/deb/wheezy/debian/compat deleted file mode 100644 index ec635144f60..00000000000 --- a/Maintenance/deb/wheezy/debian/compat +++ /dev/null @@ -1 +0,0 @@ -9 diff --git a/Maintenance/deb/wheezy/debian/control b/Maintenance/deb/wheezy/debian/control deleted file mode 100644 index 865bd762a15..00000000000 --- a/Maintenance/deb/wheezy/debian/control +++ /dev/null @@ -1,120 +0,0 @@ -Source: cgal -Priority: optional -Maintainer: Joachim Reichel -# "ipe" is only needed because it contains goodies.lua which is needed by FindIPE.cmake -Build-Depends: debhelper (>= 9), dpkg-awk, cmake, zlib1g-dev, libboost-dev, - libboost-thread-dev, libboost-program-options-dev, libboost-system-dev, - libgmp10-dev, libmpfr-dev, libmpfi-dev, libqt4-dev, libqt4-opengl-dev, - libipe-dev (>= 7), ipe -Standards-Version: 3.9.3 -Section: libs -Homepage: https://www.cgal.org/ -XS-Autobuild: yes - -Package: libcgal10 -Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} -Description: C++ library for computational geometry - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - The CGAL library contains: - - the Kernel with geometric primitives such as points, vectors, lines, - predicates for testing things such as relative positions of points, and - operations such as intersections and distance calculation. - - the Basic Library which is a collection of standard data structures and - geometric algorithms, such as convex hull in 2D/3D, (Delaunay) - triangulation in 2D/3D, planar map, polyhedron, smallest enclosing circle, - and multidimensional query structures. - - the Support Library which offers interfaces to other packages, e.g., for - visualisation, and I/O, and other support facilities. - . - This package contains the main library libCGAL.so as well as two support - libraries libCGAL_Core.so (from the CORE project) and libCGAL_ImageIO.so - (image I/O). The library libCGAL_Qt4.so used for visualization in demos - can be found in the package libcgal-qt4-10. - -Package: libcgal-qt4-10 -Architecture: any -Depends: libcgal10 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} -Description: C++ library for computational geometry (support for Qt4) - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - The CGAL library contains: - - the Kernel with geometric primitives such as points, vectors, lines, - predicates for testing things such as relative positions of points, and - operations such as intersections and distance calculation. - - the Basic Library which is a collection of standard data structures and - geometric algorithms, such as convex hull in 2D/3D, (Delaunay) - triangulation in 2D/3D, planar map, polyhedron, smallest enclosing circle, - and multidimensional query structures. - - the Support Library which offers interfaces to other packages, e.g., for - visualisation, and I/O, and other support facilities. - . - This package contains libCGAL_Qt4.so used for visualization in demos. - -Package: libcgal-dev -Section: libdevel -Architecture: any -Depends: libcgal10 (= ${binary:Version}), libboost-dev, libboost-thread-dev, - libboost-program-options-dev, libgmp10-dev, libmpfr-dev, zlib1g-dev, ${misc:Depends} -Description: C++ library for computational geometry (development files) - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - This package contains the header files and static libraries for libCGAL.so, - libCGAL_Core.so, and libCGAL_ImageIO.so. The header files and static - libraries for libCGAL_Qt4.so can be found in the package libcgal-qt4-dev. - -Package: libcgal-qt4-dev -Section: libdevel -Architecture: any -Depends: libcgal10 (= ${binary:Version}), libcgal-qt4-10 (= ${binary:Version}), - libcgal-dev, libqt4-dev, ${misc:Depends} -Description: C++ library for computational geometry (development files, support for Qt4) - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - This package contains the header files and static libraries for - libCGAL_Qt.so. - -Package: libcgal-demo -Section: devel -Architecture: all -Depends: libcgal-dev (>= ${binary:Version}), libcgal10 (>= ${binary:Version}), - ${misc:Depends} -Recommends: libcgal-qt4-dev (>= ${binary:Version}), libcgal10-qt4 (>= ${binary:Version}) -Suggests: liblapack-dev, libatlas-base-dev | libatlas.so.3gf, gfortran, - geomview, libqglviewer-qt4-dev, libipe-dev (>= 7), libglew1.5-dev | libglew-dev, - libmagick++-dev, qt4-dev-tools, libqt4-opengl-dev, libeigen3-dev (>= 3.1.0~beta1-1) -Description: C++ library for computational geometry (demos) - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - This package contains the demos and examples. - -Package: libcgal-ipelets -Section: graphics -Architecture: any -Depends: libcgal10 (>= ${binary:Version}), ipe (>= ${Ipe-Version}), ipe (<< ${Ipe-Version}+), - ${shlibs:Depends}, ${misc:Depends} -Conflicts: libcgal5-ipelets -Replaces: libcgal5-ipelets -Description: C++ library for computational geometry (ipelets) - CGAL (Computational Geometry Algorithms Library) makes the most important - of the solutions and methods developed in computational geometry available - to users in industry and academia in a C++ library. The goal is to provide - easy access to useful, reliable geometric algorithms. - . - This package contains the ipelets, i.e., plugins for ipe. diff --git a/Maintenance/deb/wheezy/debian/copyright b/Maintenance/deb/wheezy/debian/copyright deleted file mode 100644 index 382b30cd2b5..00000000000 --- a/Maintenance/deb/wheezy/debian/copyright +++ /dev/null @@ -1,351 +0,0 @@ -This package was debianized by Joachim Reichel on -Thu, 29 Apr 2004 18:43:18 +0200. - -It was downloaded from https://www.cgal.org/download/index.html. - -The Debian packaging is Copyright (c) 2004, 2005, 2006, 2007, 2008, 2009, -2010, 2011, 2012 Joachim Reichel and is licensed -under the LGPL license, version 2.1 or later (at your option), which can -be found in /usr/share/common-licenses/LGPL-2.1. - - - -Authors -======= - -Pierre Alliez -Matthias Bäsken -Eric Berberich -Olivier Billet -Jean-Daniel Boissonnat -Carine Bonetto -Mario Botsch -Hervé Brönnimann -Fernando Cacciola -Manuel Caroli -Nicolas Carrez -Frédéric Cazals -Raphaëlle Chaine -Tran Kai Frank Da -Christophe Delage -Olivier Devillers -Katrin Dobrindt -Arno Eigenwillig -Eti Ezra -Andreas Fabri -Frédéric Fichel -Kaspar Fischer -Eyal Flato -Julia Flötotto -Efi Fogel -Wolfgang Freiseisen -Bernd Gärtner -Geert-Jan Giezeman -Marc Glisse -Shlomo Golubev -Miguel Granados -Gael Guennebaud -Philippe Guigue -Ankit Gupta -Peter Hachenberger -Iddo Hanniel -Idit Haran -Sariel Har-Peled -Julien Hazebrouck -Michael Hemmer -Thomas Herrmann -Susan Hert -Shai Hirsch -Michael Hoffmann -Dominik Huelse -Marcel Janer -Athanasios Kakargias -Menelaos Karavelas -Michael Kerber -Lutz Kettner -Nico Kruithof -Sylvain Lazard -Eran Leiserowitz -Bruno Lévy -Sebastian Limbach -Kapelushnik Lior -Eugene Lipovetsky -Sébastien Loriot -Pedro Machado -Bastien Manuel -Naama Mayer -Abdelkrim Mebarki -Kurt Mehlhorn -Naceur Meskini -Andreas Meyer -Michal Meyerovitch -Oren Nechushtan -Gabriele Neyer -Ralf Osbild -Steve Oudot -Eli Packer -Dmitrii Pasechnik -Luis Peñaranda -Sylvain Pion -Marc Pouget -Sigal Raab -François Rebufat -Joachim Reichel -David Rey -Laurent Rineau -Daniel Russel -Niv Sabath -Laurent Saboret -Nader Salman -Stefan Schirra -Sven Schönherr -Michael Seel -Ophir Setter -Le-Jeng Shiue -Hans Tangelder -Stéphane Tayeb -Monique Teillaud -Jane Tournois -Constantinos Tsirogiannis -Radu Ursu -Carl Van Geem -Remco Veltkamp -Ron Wein -Wieger Wesselink -Camille Wormser -Mariette Yvinec -Afra Zomorodian -Guy Zucker -Baruch Zukerman -Tali Zvi - - - -Copyright holders -================= - -Utrecht University (The Netherlands) -ETH Zurich (Switzerland) -Freie Universitaet Berlin (Germany) -INRIA Sophia-Antipolis (France) -Martin-Luther-University Halle-Wittenberg (Germany) -Max-Planck-Institute Saarbruecken (Germany) -RISC Linz (Austria) -Tel-Aviv University (Israel) - -Stanford University (USA) -Foundation for Research and Technology-Hellas (Greece) - -GeometryFactory - -Fernando Luis Cacciola Carballal -Le-Jeng Shiue - - - -Copyright (from upstream file LICENSE) -====================================== - - The CGAL software consists of several parts, each of which is licensed under - an open source license. It is also possible to obtain commercial licenses - from GeometryFactory (www.geometryfactory.com) for all or parts of CGAL. - - The source code of the CGAL library can be found in the directories - "src/CGAL", "src/CGALQt", "src/CGALQt4" and "include/CGAL" (with the - exception of "include/CGAL/CORE"). - It is specified in each file of the CGAL library which - license applies to it. This is either the GNU General Public License - or the GNU Lesser General Public License (as published by the Free Software - Foundation; either version 3 of the License or (at your option) any later - version). The texts of both licenses can be found in the files LICENSE.GPL - and LICENSE.LGPL. - - Distributed along with CGAL (for the users' convenience), but not part of - CGAL, are the following third-party libraries, available under their own - licenses: - - - CORE, in the directories "include/CGAL/CORE" and "src/CGALCore", is - licensed under the LGPL (see LICENSE.LGPL). - - ImageIO, in the directory "src/CGALimageIO", is licensed under the LGPL - (see LICENSE.LGPL). - - All other files that do not have an explicit copyright notice (e.g., all - examples and some demos) are licensed under a very permissive license. The - exact license text can be found in the file LICENSE.FREE_USE. - - More information on the CGAL license can be found at - https://www.cgal.org/license.html - - - -Copyright statements for LGPL'd files -===================================== - -The following copyright statement is taken from include/CGAL/config.h. The -year numbers and the set of copyright holders (see list above) varies from -file to file. - - Copyright (c) 1997-2010 - Utrecht University (The Netherlands), - ETH Zurich (Switzerland), - INRIA Sophia-Antipolis (France), - Max-Planck-Institute Saarbruecken (Germany), - and Tel-Aviv University (Israel). All rights reserved. - - This file is part of CGAL (www.cgal.org); you can redistribute it and/or - modify it under the terms of the GNU Lesser General Public License as - published by the Free Software Foundation; either version 3 of the License, - or (at your option) any later version. - - Licensees holding a valid commercial license may use this file in - accordance with the commercial license agreement provided with the software. - - This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - - -Copyright statement for GPL'd files -=================================== - -The following copyright statement is taken from include/CGAL/Width_3.h. The -year numbers and the set of copyright holders (see list above) varies from -file to file. - - Copyright (c) 1997-2000 ETH Zurich (Switzerland). - All rights reserved. - - This file is part of CGAL (www.cgal.org). - You can redistribute it and/or modify it under the terms of the GNU - General Public License as published by the Free Software Foundation, - either version 3 of the License, or (at your option) any later version. - - Licensees holding a valid commercial license may use this file in - accordance with the commercial license agreement provided with the software. - - This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - - -Copyright statement for files under the FREE_USE license -======================================================== - - Copyright (c) 1996,1997,1998,1999,2000,2001,2002,2003,2004,2005,2006,2007 - Utrecht University (The Netherlands), - ETH Zurich (Switzerland), - INRIA Sophia-Antipolis (France), - Max-Planck-Institute Saarbruecken (Germany), - and Tel-Aviv University (Israel). All rights reserved. - - Permission is hereby granted, free of charge, to any person obtaining a - copy of this software and associated documentation files (the - "Software"), to deal in the Software without restriction, including - without limitation the rights to use, copy, modify, merge, publish, - distribute, sublicense, and/or sell copies of the Software, and to - permit persons to whom the Software is furnished to do so, subject to - the following conditions: - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS - OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF - MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. - IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY - CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, - TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE - SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - - - -The following copyright statements apply to third-party libraries -distributed with CGAL: - - - -Boost -===== - -The following files are modified versions originating from Boost: - - ./include/CGAL/STL_Extension/internal/boost/mutable_heap.hpp - ./include/CGAL/STL_Extension/internal/boost/array_binary_tree.hpp - ./include/CGAL/STL_Extension/internal/boost/mutable_queue.hpp - Copyright 1997, 1998, 1999, 2000 University of Notre Dame. - - ./include/CGAL/internal/container_fwd_fixed.hpp - Copyright 2005-2008 Daniel James. - - ./include/CGAL/auto_link/auto_link.h - (C) Copyright John Maddock 2003. - -All of these files are distributed under the Boost Software License, -version 1.0. - - Boost Software License - Version 1.0 - August 17th, 2003 - - Permission is hereby granted, free of charge, to any person or organization - obtaining a copy of the software and accompanying documentation covered by - this license (the "Software") to use, reproduce, display, distribute, - execute, and transmit the Software, and to prepare derivative works of the - Software, and to permit third-parties to whom the Software is furnished to - do so, all subject to the following: - - The copyright notices in the Software and this entire statement, including - the above license grant, this restriction and the following disclaimer, - must be included in all copies of the Software, in whole or in part, and - all derivative works of the Software, unless such copies or derivative - works are solely in the form of machine-executable object code generated by - a source language processor. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE, TITLE AND NON-INFRINGEMENT. IN NO EVENT - SHALL THE COPYRIGHT HOLDERS OR ANYONE DISTRIBUTING THE SOFTWARE BE LIABLE - FOR ANY DAMAGES OR OTHER LIABILITY, WHETHER IN CONTRACT, TORT OR OTHERWISE, - ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER - DEALINGS IN THE SOFTWARE. - - - -CORE -==== - -The following copyright statement applies to the CORE library in -src/CGALCore and include/CGAL/CORE. - - Core Library Version 1.7, August 2004 - Copyright (c) 1995-2004 Exact Computation Project - All rights reserved. - - This file is part of CORE (https://cs.nyu.edu/exact/core/). - You can redistribute it and/or modify it under the terms of the GNU - General Public License as published by the Free Software Foundation, - either version 3 of the License, or (at your option) any later version. - - Licensees holding a valid commercial license may use this file in - accordance with the commercial license agreement provided with the - software. - - This file is provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. - - - -ImageIO -======= - -The following copyright statement applies to the ImageIO library in -src/CGALimageIO. - - Copyright (c) 2005, 2006 ASCLEPIOS Project, INRIA Sophia-Antipolis (France) - All rights reserved. - - The files in this directory are part of the ImageIO Library. - You can redistribute them and/or modify them under the terms of the - GNU Lesser General Public License as published by the Free Software Foundation; - either version 3 of the License, or (at your option) any later version. - - Licensees holding a valid commercial license may use this file in - accordance with the commercial license agreement provided with the software. - - These files are provided AS IS with NO WARRANTY OF ANY KIND, INCLUDING THE - WARRANTY OF DESIGN, MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. diff --git a/Maintenance/deb/wheezy/debian/libcgal-demo.install b/Maintenance/deb/wheezy/debian/libcgal-demo.install deleted file mode 100644 index 239a1b25f46..00000000000 --- a/Maintenance/deb/wheezy/debian/libcgal-demo.install +++ /dev/null @@ -1,2 +0,0 @@ -usr/share/doc/cgal/demo.tar.gz usr/share/doc/libcgal10 -usr/share/doc/cgal/examples.tar.gz usr/share/doc/libcgal10 diff --git a/Maintenance/deb/wheezy/debian/libcgal-dev.install b/Maintenance/deb/wheezy/debian/libcgal-dev.install deleted file mode 100644 index d1af7ba0074..00000000000 --- a/Maintenance/deb/wheezy/debian/libcgal-dev.install +++ /dev/null @@ -1,11 +0,0 @@ -usr/bin/* -usr/include/* -usr/lib/libCGAL.a -usr/lib/libCGAL_Core.a -usr/lib/libCGAL_ImageIO.a -usr/lib/libCGAL.so -usr/lib/libCGAL_Core.so -usr/lib/libCGAL_ImageIO.so -usr/lib/CGAL/* -usr/share/cmake-2.8/Modules/* -usr/share/man/man1/cgal_create_cmake_script.1 diff --git a/Maintenance/deb/wheezy/debian/libcgal-ipelets.install b/Maintenance/deb/wheezy/debian/libcgal-ipelets.install deleted file mode 100644 index dc8f242677f..00000000000 --- a/Maintenance/deb/wheezy/debian/libcgal-ipelets.install +++ /dev/null @@ -1,2 +0,0 @@ -# use wildcard to avoid hard-coding the Ipe version -usr/lib/ipe/* usr/lib/ipe diff --git a/Maintenance/deb/wheezy/debian/libcgal-ipelets.lintian-overrides b/Maintenance/deb/wheezy/debian/libcgal-ipelets.lintian-overrides deleted file mode 100644 index 1aa24c69251..00000000000 --- a/Maintenance/deb/wheezy/debian/libcgal-ipelets.lintian-overrides +++ /dev/null @@ -1 +0,0 @@ -libcgal-ipelets: hardening-no-fortify-functions usr/lib/ipe/*/ipelets/libCGAL_*.so diff --git a/Maintenance/deb/wheezy/debian/libcgal-qt4-10.install b/Maintenance/deb/wheezy/debian/libcgal-qt4-10.install deleted file mode 100644 index b748a7e2d96..00000000000 --- a/Maintenance/deb/wheezy/debian/libcgal-qt4-10.install +++ /dev/null @@ -1 +0,0 @@ -usr/lib/libCGAL_Qt4.so.* usr/lib diff --git a/Maintenance/deb/wheezy/debian/libcgal-qt4-10.lintian-overrides b/Maintenance/deb/wheezy/debian/libcgal-qt4-10.lintian-overrides deleted file mode 100644 index 930bb4415ea..00000000000 --- a/Maintenance/deb/wheezy/debian/libcgal-qt4-10.lintian-overrides +++ /dev/null @@ -1 +0,0 @@ -libcgal-qt4-10: hardening-no-fortify-functions usr/lib/libCGAL_Qt4.so.* diff --git a/Maintenance/deb/wheezy/debian/libcgal-qt4-10.shlibs b/Maintenance/deb/wheezy/debian/libcgal-qt4-10.shlibs deleted file mode 100644 index 69742b6438b..00000000000 --- a/Maintenance/deb/wheezy/debian/libcgal-qt4-10.shlibs +++ /dev/null @@ -1 +0,0 @@ -libCGAL_Qt4 10 libcgal-qt4-10 diff --git a/Maintenance/deb/wheezy/debian/libcgal-qt4-dev.install b/Maintenance/deb/wheezy/debian/libcgal-qt4-dev.install deleted file mode 100644 index 6fd829ac922..00000000000 --- a/Maintenance/deb/wheezy/debian/libcgal-qt4-dev.install +++ /dev/null @@ -1,5 +0,0 @@ -# The next entry is disabled here because it overlaps with the corresponding -# entry in libcgal-dev.install. The files are moved in debian/rules. -# usr/include/CGAL/Qt -usr/lib/libCGAL_Qt4.a -usr/lib/libCGAL_Qt4.so diff --git a/Maintenance/deb/wheezy/debian/libcgal10.install b/Maintenance/deb/wheezy/debian/libcgal10.install deleted file mode 100644 index f383cfa6ebc..00000000000 --- a/Maintenance/deb/wheezy/debian/libcgal10.install +++ /dev/null @@ -1,4 +0,0 @@ -usr/lib/libCGAL.so.* usr/lib -usr/lib/libCGAL_Core.so.* usr/lib -usr/lib/libCGAL_ImageIO.so.* usr/lib -usr/share/doc/cgal/changelog usr/share/doc/libcgal10 diff --git a/Maintenance/deb/wheezy/debian/libcgal10.lintian-overrides b/Maintenance/deb/wheezy/debian/libcgal10.lintian-overrides deleted file mode 100644 index 37afa24ac1b..00000000000 --- a/Maintenance/deb/wheezy/debian/libcgal10.lintian-overrides +++ /dev/null @@ -1 +0,0 @@ -libcgal10: hardening-no-fortify-functions usr/lib/libCGAL.so.* diff --git a/Maintenance/deb/wheezy/debian/libcgal10.shlibs b/Maintenance/deb/wheezy/debian/libcgal10.shlibs deleted file mode 100644 index 395a4c6b5ff..00000000000 --- a/Maintenance/deb/wheezy/debian/libcgal10.shlibs +++ /dev/null @@ -1,3 +0,0 @@ -libCGAL 10 libcgal10 -libCGAL_Core 10 libcgal10 -libCGAL_ImageIO 10 libcgal10 diff --git a/Maintenance/deb/wheezy/debian/patches/do-not-link-example-with-qt4-support-library.patch b/Maintenance/deb/wheezy/debian/patches/do-not-link-example-with-qt4-support-library.patch deleted file mode 100644 index 04b469305b8..00000000000 --- a/Maintenance/deb/wheezy/debian/patches/do-not-link-example-with-qt4-support-library.patch +++ /dev/null @@ -1,12 +0,0 @@ -Description: Avoid -lCGAL_Qt4 in linker command of Linear_cell_complex example ---- cgal-4.1~beta1.orig/examples/Linear_cell_complex/CMakeLists.txt -+++ cgal-4.1~beta1/examples/Linear_cell_complex/CMakeLists.txt -@@ -12,7 +12,7 @@ if("${CMAKE_MAJOR_VERSION}.${CMAKE_MINOR - endif() - endif() - --find_package(CGAL QUIET COMPONENTS Core Qt4) -+find_package(CGAL QUIET COMPONENTS Core) - - # For Gprof. - # ADD_DEFINITIONS("-pg") diff --git a/Maintenance/deb/wheezy/debian/patches/series b/Maintenance/deb/wheezy/debian/patches/series deleted file mode 100644 index 68417a3f7a9..00000000000 --- a/Maintenance/deb/wheezy/debian/patches/series +++ /dev/null @@ -1 +0,0 @@ -do-not-link-example-with-qt4-support-library.patch diff --git a/Maintenance/deb/wheezy/debian/rules b/Maintenance/deb/wheezy/debian/rules deleted file mode 100755 index a3533b8b2cb..00000000000 --- a/Maintenance/deb/wheezy/debian/rules +++ /dev/null @@ -1,96 +0,0 @@ -#!/usr/bin/make -f - -# export DH_VERBOSE=1 - -# See https://wiki.debian.org/Hardening#Notes_for_packages_using_CMake -CFLAGS := $(CFLAGS) $(CPPFLAGS) -CXXFLAGS := $(CXXFLAGS) $(CPPFLAGS) - -# The build system links all four libraries against all dependencies. -LDFLAGS += -Wl,--as-needed - -ifeq ($(DEB_BUILD_ARCH),alpha) - IEEE_FPU_OPTION = -mieee -mfp-rounding-mode=d -endif - -%: - dh $@ - -override_dh_auto_configure: - mkdir -p static - cd static && QTDIR= cmake .. \ - -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ - -DWITH_CGAL_Qt3=OFF -DWITH_demos=OFF -DWITH_examples=OFF \ - -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=FALSE - mkdir -p shared - cd shared && QTDIR= cmake .. \ - -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ - -DWITH_CGAL_Qt3=OFF -DWITH_demos=OFF -DWITH_examples=OFF \ - -DCGAL_ENABLE_PRECONFIG=OFF -DBUILD_SHARED_LIBS=TRUE -DCMAKE_SKIP_RPATH=TRUE - mkdir -p shared/demo/CGAL_ipelets - cd shared/demo/CGAL_ipelets && QTDIR= cmake ../../../demo/CGAL_ipelets \ - -DCMAKE_VERBOSE_MAKEFILE=ON -DCMAKE_INSTALL_PREFIX=/usr -DCMAKE_BUILD_TYPE=Release \ - -DCGAL_DIR=$(CURDIR)/shared - -override_dh_auto_build: - $(MAKE) -C static - $(MAKE) -C shared - $(MAKE) -C shared/demo/CGAL_ipelets - -override_dh_auto_test: -ifneq (,$(findstring nocheck,$(DEB_BUILD_OPTIONS))) - $(MAKE) -C debian/tests IEEE_FPU_OPTION="$(IEEE_FPU_OPTION)" rounding_modes1 - LD_LIBRARY_PATH=shared/lib debian/tests/rounding_modes1 - $(MAKE) -C debian/tests IEEE_FPU_OPTION="$(IEEE_FPU_OPTION)" rounding_modes2 - LD_LIBRARY_PATH=shared/lib debian/tests/rounding_modes2 -endif - -override_dh_auto_clean: - dh_auto_clean - rm -fr shared static - -override_dh_install: - $(MAKE) -C static DESTDIR=$(CURDIR)/debian/tmp install - $(MAKE) -C shared DESTDIR=$(CURDIR)/debian/tmp install - $(MAKE) -C shared/demo/CGAL_ipelets DESTDIR=$(CURDIR)/debian/tmp install - - mkdir -p debian/tmp/usr/share/cmake-2.8/Modules - cp cmake/modules/FindCGAL.cmake debian/tmp/usr/share/cmake-2.8/Modules - - mv debian/tmp/usr/share/doc/CGAL-`cat VERSION` debian/tmp/usr/share/doc/cgal - mv debian/tmp/usr/share/doc/cgal/CHANGES debian/tmp/usr/share/doc/cgal/changelog - rm debian/tmp/usr/share/doc/cgal/LICENSE* - rm debian/tmp/usr/share/doc/cgal/AUTHORS - - tar cf - examples | gzip --best >debian/tmp/usr/share/doc/cgal/examples.tar.gz - tar cf - demo | gzip --best >debian/tmp/usr/share/doc/cgal/demo.tar.gz - - rm debian/tmp/usr/bin/cgal_make_macosx_app - - dh_install --sourcedir=debian/tmp --list-missing - - mkdir -p debian/libcgal-qt4-dev/usr/include/CGAL - mv debian/libcgal-dev/usr/include/CGAL/Qt debian/libcgal-qt4-dev/usr/include/CGAL - - mkdir -p debian/libcgal-qt4-10/usr/share/doc - ln -s libcgal10 debian/libcgal-qt4-10/usr/share/doc/libcgal-qt4-10 - mkdir -p debian/libcgal-dev/usr/share/doc - ln -s libcgal10 debian/libcgal-dev/usr/share/doc/libcgal-dev - mkdir -p debian/libcgal-qt4-dev/usr/share/doc - ln -s libcgal10 debian/libcgal-qt4-dev/usr/share/doc/libcgal-qt4-dev - mkdir -p debian/libcgal-demo/usr/share/doc - ln -s libcgal10 debian/libcgal-demo/usr/share/doc/libcgal-demo - mkdir -p debian/libcgal-ipelets/usr/share/doc - ln -s libcgal10 debian/libcgal-ipelets/usr/share/doc/libcgal-ipelets - -override_dh_installdocs: - dh_installdocs -plibcgal10 debian/copyright - -override_dh_installchangelogs: - dh_installchangelogs -plibcgal10 - -override_dh_shlibdeps: # TODO Is that really needed? - dh_shlibdeps -a -ldebian/libcgal10/usr/lib - -override_dh_gencontrol: - dh_gencontrol -- -VIpe-Version=`dpkg-awk 'Package:^ipe$$' -- Version | grep Version | sed 's/Version: //;s/-[^-]*$$//'` diff --git a/Maintenance/deb/wheezy/debian/source/format b/Maintenance/deb/wheezy/debian/source/format deleted file mode 100644 index 163aaf8d82b..00000000000 --- a/Maintenance/deb/wheezy/debian/source/format +++ /dev/null @@ -1 +0,0 @@ -3.0 (quilt) diff --git a/Maintenance/deb/wheezy/debian/tests/Makefile b/Maintenance/deb/wheezy/debian/tests/Makefile deleted file mode 100644 index 7f1b7c747e5..00000000000 --- a/Maintenance/deb/wheezy/debian/tests/Makefile +++ /dev/null @@ -1,14 +0,0 @@ -rounding_modes1: rounding_modes1.o - g++ $^ -o $@ - -rounding_modes2: rounding_modes2.o - g++ $^ -o $@ -lCGAL -L../../shared/lib - -rounding_modes1.o: rounding_modes1.cpp - g++ -c $< -o $@ -O2 -frounding-math $(IEEE_FPU_OPTION) - -rounding_modes2.o: rounding_modes2.cpp - g++ -c $< -o $@ -O2 -frounding-math $(IEEE_FPU_OPTION) -I../../include -I../../shared/include - -clean: - rm -f *.o rounding_modes1 rounding_modes2 diff --git a/Maintenance/deb/wheezy/debian/tests/rounding_modes1.cpp b/Maintenance/deb/wheezy/debian/tests/rounding_modes1.cpp deleted file mode 100644 index 0c497a77dc3..00000000000 --- a/Maintenance/deb/wheezy/debian/tests/rounding_modes1.cpp +++ /dev/null @@ -1,66 +0,0 @@ -#include -#include -#include - -int modes[4] = { FE_TOWARDZERO, FE_UPWARD, FE_DOWNWARD, FE_TONEAREST }; - -std::string str (int mode) -{ - switch (mode) - { - case FE_TOWARDZERO: return "FE_TOWARDZERO"; - case FE_UPWARD: return "FE_UPWARD"; - case FE_DOWNWARD: return "FE_DOWNWARD"; - case FE_TONEAREST: return "FE_TONEAREST"; - default: throw __LINE__; - } -} - -int fetestround () -{ - volatile double eps = std::numeric_limits::denorm_min(); - - double x = -1.0; - double y = 1.0; - volatile double x_plus_eps = x + eps; - volatile double y_minus_eps = y - eps; - - if ((x == x_plus_eps) && (y == y_minus_eps)) - return FE_TONEAREST; - if (y == y_minus_eps) - return FE_UPWARD; - if (x == x_plus_eps) - return FE_DOWNWARD; - return FE_TOWARDZERO; -} - -int main (int argc, char* argv[]) -{ - int errors = 0; - - int mode_get = fegetround(); - std::cout << "fegetround() = " << str(mode_get) << " " << std::endl; - - for (int i=0; i<4; i++) - { - int mode_set = modes[i]; - fesetround (mode_set); - std::cout << "fesetround (" << str(mode_set) << ")" << std::endl; - - int mode_get = fegetround(); - std::cout << "fegetround() = " << str(mode_get) << " "; - bool ok_get = mode_get == mode_set; - if (!ok_get) - errors++; - std::cout << (ok_get ? "(ok)" : "(error)") << std::endl; - - int mode_test = fetestround(); - std::cout << "fetestround() = " << str(mode_test) << " "; - bool ok_test = mode_test == mode_set; - if (!ok_test) - errors++; - std::cout << (ok_test ? "(ok)" : "(error)") << std::endl; - } - - return errors; -} diff --git a/Maintenance/deb/wheezy/debian/tests/rounding_modes2.cpp b/Maintenance/deb/wheezy/debian/tests/rounding_modes2.cpp deleted file mode 100644 index 7892a99a83b..00000000000 --- a/Maintenance/deb/wheezy/debian/tests/rounding_modes2.cpp +++ /dev/null @@ -1,95 +0,0 @@ -// This tests the rounding mode functions. - -#include -#include -#include - -typedef CGAL::Interval_nt_advanced NT_adv; -typedef CGAL::Interval_nt<> NT; - -void print_res (bool res) -{ std::cout << (res ? "ok" : "ERROR") << std::endl; } - -// The results of 1-epsilon and -1+epsilon are enough -// to detect exactly the current rounding mode. -// 1-MIN_DOUBLE -// +------+-------+ -// | 1 | 1-ulp | -// +--------+------+-------+ -// -1+MIN_DOUBLE | -1 | near | -inf | -// | -1+ulp | +inf | zero | -// +--------+------+-------+ - -// I use a global variable here to avoid constant propagation. -double IA_min_double; - -CGAL::FPU_CW_t -FPU_empiric_test() -{ - IA_min_double = CGAL_IA_STOP_CPROP(CGAL_IA_MIN_DOUBLE); - double y = 1.0, z = -1.0; - double ye, ze; - ye = y - IA_min_double; - ze = z + IA_min_double; - if (y == ye && z == ze) return CGAL_FE_TONEAREST; - if (y == ye) return CGAL_FE_UPWARD; - if (z == ze) return CGAL_FE_DOWNWARD; - return CGAL_FE_TOWARDZERO; -} - -void print_rounding_name (CGAL::FPU_CW_t r) -{ - switch (r) { - case CGAL_FE_TONEAREST: std::cout << "NEAR\n"; break; - case CGAL_FE_DOWNWARD: std::cout << "DOWN\n"; break; - case CGAL_FE_UPWARD: std::cout << "UP\n"; break; - case CGAL_FE_TOWARDZERO: std::cout << "ZERO\n"; break; - default: std::cout << "unknown !\n"; - } -} - -int main() -{ - bool flag = true; - - flag = flag && (FPU_empiric_test() == CGAL_FE_TONEAREST); - std::cout << "default: "; - print_res(flag); - - // Should be a no-op. - CGAL::FPU_set_cw(CGAL::FPU_get_cw()); - flag = flag && (FPU_empiric_test() == CGAL_FE_TONEAREST); - std::cout << "get/set: "; - print_res(flag); - if (!flag) print_rounding_name(FPU_empiric_test()); - - // Rounding to zero. - CGAL::FPU_set_cw(CGAL_FE_TOWARDZERO); - flag = flag && (FPU_empiric_test() == CGAL_FE_TOWARDZERO); - std::cout << "zero : "; - print_res(flag); - if (!flag) print_rounding_name(FPU_empiric_test()); - - // Rounding to infinity. - CGAL::FPU_set_cw(CGAL_FE_UPWARD); - flag = flag && (FPU_empiric_test() == CGAL_FE_UPWARD); - std::cout << "+inf : "; - print_res(flag); - if (!flag) print_rounding_name(FPU_empiric_test()); - - // Rounding to minus infinity. - CGAL::FPU_set_cw(CGAL_FE_DOWNWARD); - flag = flag && (FPU_empiric_test() == CGAL_FE_DOWNWARD); - std::cout << "-inf : "; - print_res(flag); - if (!flag) print_rounding_name(FPU_empiric_test()); - - // Rounding to nearest. - CGAL::FPU_set_cw(CGAL_FE_TONEAREST); - flag = flag && (FPU_empiric_test() == CGAL_FE_TONEAREST); - std::cout << "near : "; - print_res(flag); - if (!flag) print_rounding_name(FPU_empiric_test()); - - return (int) !flag; -} diff --git a/Maintenance/deb/wheezy/debian/watch b/Maintenance/deb/wheezy/debian/watch deleted file mode 100644 index 36047492bc6..00000000000 --- a/Maintenance/deb/wheezy/debian/watch +++ /dev/null @@ -1,10 +0,0 @@ -# Note that the file URLs contain unpredictable IDs as directory. The -# uversionmagle options strips this ID. -# -# Note that only digits and "." are used to match the version number. -# Therefore we do not match beta releases. -# -version=3 -opts=uversionmangle=s/(\d+).([\d\.]+)/$2/ \ - https://gforge.inria.fr/frs/?group_id=52 \ - /frs/download.php/(\d+)/CGAL-([\d\.]+).tar.gz diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/.autocgal_with_cmake_rc b/Maintenance/infrastructure/cgal.geometryfactory.com/.autocgal_with_cmake_rc deleted file mode 100644 index 4f6e7b4a2de..00000000000 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/.autocgal_with_cmake_rc +++ /dev/null @@ -1,26 +0,0 @@ -# -*- mode: shell-script -*- -source $HOME/.autocgalrc - -CGAL_ROOT=/home/lrineau/CGAL/releases-and-testsuites-with-cmake -LOGS_DIR="${CGAL_ROOT}/AUTOTEST_LOGS" -LOCK_FILE="${CGAL_ROOT}/autotest_cgal_with_cmake.lock" - -REFERENCE_PLATFORMS_DIR=/home/lrineau/CGAL/releases-and-testsuites-with-cmake/reference-platforms - -COMPILERS_localhost="" -#COMPILERS_localhost="$COMPILERS_localhost i686_Linux-2.6_g++-3.4.6_CentOS-5.1-O2" -#COMPILERS_localhost="$COMPILERS_localhost i686_Linux-2.6_g++-4.1.2_CentOS-5.1" -#COMPILERS_localhost="$COMPILERS_localhost i686_Linux-2.6_g++-4.1.2_CentOS-5.1-O2" -#COMPILERS_localhost="$COMPILERS_localhost i686_Linux-2.6_g++-4.1.2_CentOS-5.1-O3" -#COMPILERS_localhost="$COMPILERS_localhost i686_Linux-2.6_g++-4.3.3_CentOS-5.1" -#COMPILERS_localhost="$COMPILERS_localhost i686_Linux-2.6_g++-4.3.3_CentOS-5.1-O2-NO-DEPRECATED" -#COMPILERS_localhost="$COMPILERS_localhost i686_Linux-2.6_g++-4.3.3_CentOS-5.1-O3" -# Ignored: i686_Linux-2.6_g++-4.1.2_CentOS-5.1-NOGMP -#COMPILERS_localhost="$COMPILERS_localhost x86_64_Linux-x.y_IntelCompiler-15.0_CentOS-7.x" - -# ignore COMPILERS_localhost and use all ref platformes: -USE_REFERENCE_PLATFORMS=yes - -# TAUCS -#CGAL_TAUCS_DIR=$HOME/CGAL/taucs_full -#export CGAL_TAUCS_DIR diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/.autocgalrc b/Maintenance/infrastructure/cgal.geometryfactory.com/.autocgalrc deleted file mode 100644 index 34bbd7db808..00000000000 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/.autocgalrc +++ /dev/null @@ -1,40 +0,0 @@ -# -*- mode: shell-script -*- -BUILD_HOSTS="localhost" -PROCESSORS_localhost=4 -#PROCESSORS_localhost=2 -#COMPILERS_localhost="i686_Linux-2.6_g++-4.1.2_CentOS-5.1-O3 i686_Linux-2.6_g++-4.1.2_CentOS-5.1-O2 i686_Linux-2.6_g++-4.1.2_CentOS-5.1 i686_Linux-2.6_g++-4.3.2_CentOS-5.1-O3 i686_Linux-2.6_g++-4.3.2_CentOS-5.1" -COMPILERS_localhost="i686_Linux-2.6_g++-4.3.2_CentOS-5.1" -CGAL_TESTER="lrineau" -CGAL_TESTER_NAME="cgal (GF)" -CGAL_TESTER_ADDRESS=Laurent.Rineau__cgal_testsuite@normalesup.org - -CGAL_ROOT=/home/lrineau/CGAL/releases-and-testsuites -LOGS_DIR="${CGAL_ROOT}/AUTOTEST_LOGS" -LOCK_FILE="${CGAL_ROOT}/autotest_cgal_with_cmake.lock" - -# Do not output anything on console (otherwise crond sens emails) -CONSOLE_OUTPUT="" - -# QTDIR -source /etc/profile.d/qt.sh - -# set locale -LC_ALL=C -LANG=C -export LC_ALL -export LANG - -# pass QTDIR and locale to the shell -MYSHELL="QTDIR=$QTDIR LC_ALL=C LANG=C /bin/sh -c" - -# Prevent core files : -# ulimit -c 0 -# 3 hours maximum per process. -# ulimit -t 10800 -# Maximum memory to be used : 2GB -# ulimit -v 2000000 -# Maximum files size : 500MB -ULIMIT_OPTIONS="-H -c 0 -t 10800 -v 2000000 -t 500000" - - -UPLOAD_RESULT_DESTINATION="cgaltest@cgaltest.geometryfactory.com:incoming" diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/.cgal_create_new_release_rc b/Maintenance/infrastructure/cgal.geometryfactory.com/.cgal_create_new_release_rc deleted file mode 100644 index a4701211aab..00000000000 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/.cgal_create_new_release_rc +++ /dev/null @@ -1,5 +0,0 @@ -#TMPDIR=$HOME/CGAL/create_internal_release -HTML_DIR=/srv/CGAL/www/Members/Releases -#MAKENSIS=$HOME/CGAL/NSIS-3.4/makensis.exe -#WINE=wine -CGAL_MANUAL=$HOME/bin/cgal_manual diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/.cgalmanualrc b/Maintenance/infrastructure/cgal.geometryfactory.com/.cgalmanualrc deleted file mode 100644 index 0e4fc5e8ec3..00000000000 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/.cgalmanualrc +++ /dev/null @@ -1,24 +0,0 @@ -export TEXINPUTS=".:$HOME/CGAL/Manual_tools-installed/sty:$HOME/CGAL/last-release-branch/Manual/doc_tex:$TEXINPUTS" -export BIBINPUTS="$HOME/CGAL/last-release-branch/Manual/doc_tex:$BIBINPUTS" -export LATEX_CONV_CONFIG=$HOME/CGAL/Manual_tools-installed/latex_conv_config -export LATEX_CONV_INPUTS=$LATEX_CONV_CONFIG/html:$HOME/CGAL/last-release-branch/Manual/doc_tex: - -# Use makeindex from Fedora 10: -# kpathsea-2007-35.fc10.i386 -# texlive-2007-35.fc10.i386 -export PATH=$HOME/bin:$PATH -export LD_PRELOAD=$HOME/bin/libkpathsea.so.4 - -# Selects the different output formats supported -MakePS=0 -MakePDF=1 -MakeHTML=1 - -# Number of older test-suite results kept. Test-suite results beyond this -# number are deleted. -TestSuiteHistory=20 - -# Number of older test-suites for which the full results will be kept. Older -# test suites will have their manuals removed to save space. -TestSuiteFullHistory=10 - diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/cgal_diff_results b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/cgal_diff_results deleted file mode 100755 index ba09b59b185..00000000000 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/cgal_diff_results +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/zsh - -cd /srv/CGAL/www/testsuite - -if [ -z "$1" -o -z "$2" ]; then - printf "Example usage: %s 4.5-I-149 4.6-Ic-30 [DIFF_OPTION]...\n" "$0" - exit 1 -fi - -from="CGAL-$1" -to="CGAL-$2" -pager=${PAGER:-less} - -shift -shift - -if ! [ -e "./$from" ]; then - printf "The CGAL release %s was not tested!\n" "$from" - exit 1 -fi -if ! [ -e "./$to" ]; then - printf "The CGAL release %s was not tested!\n" "$to" - exit 1 -fi - -for f in ${from}/results*txt; do diff -U0 ${1+"$@"} $f ${f/$from/$to}; done |& less -p '^\+[^\+].* [^y]|CGAL-.*|diff' diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/cgal_release.py b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/cgal_release.py deleted file mode 100644 index a835da2c812..00000000000 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/cgal_release.py +++ /dev/null @@ -1,87 +0,0 @@ -"""Python module to create and publish CGAL releases from a branch""" - -import os - - -class Release: - """class to create a CGAL release from a branch - optionally, the release can be internal - """ - - def __init__(self, branch, internal=False): - self.branch = branch - self.internal = internal - self.cwd = f"$HOME/CGAL/create_internal_release-{self.branch}-branch" - self.repo = f"$HOME/CGAL/branches/CGAL-{self.branch}-branch.git" - self.extra_options = " --public" - - def command(self): - """return the command to create and publish the release""" - return ( - f"PATH=/home/lrineau/bin-cmake3:/bin:/usr/bin:/home/lrineau/bin; cd {self.cwd} &&" - + " /usr/bin/time scl enable rh-git29 -- " - + f"$HOME/bin/create_release {self.repo}{self.extra_options} --do-it" - ) - - def __str__(self): - msg = ( - f"{'internal ' if self.internal else ''}release from {self.branch}\n" - f"cwd: {self.cwd}\nrepo: {self.repo}\n" - f"command:\n{self.command()}" - ) - return msg - - def __call__(self): - if os.system(self.command()) != 0: - raise RuntimeError( - "Error while creating " + - f"{'internal ' if self.internal else ''}release from {self.branch}" - ) - - INTERNAL = True - - -class InternalRelease(Release): - """class to create an internal CGAL release from a branch""" - - def __init__(self, branch): - super().__init__(branch, Release.INTERNAL) - self.extra_options = " --integration" - - -class BetaRelease(Release): - """class to create an internal CGAL release from a branch""" - - def __init__(self, branch, beta_number): - super().__init__(branch, Release.INTERNAL) - self.extra_options = f" --public --beta {beta_number}" - - -integration = InternalRelease("integration") -integration.repo = "$HOME/CGAL/branches/integration.git" -integration.cwd = "$HOME/CGAL/create_internal_release" -master = Release("master") -master.repo = "$HOME/CGAL/branches/master.git" -master.cwd = "$HOME/CGAL/create_internal_release" - - -def beta_release_from_master(beta_number): - """Convenience function to create a beta release from master""" - rel = BetaRelease("master", beta_number) - rel.repo = "$HOME/CGAL/branches/master.git" - rel.cwd = "$HOME/CGAL/create_internal_release" - return rel - -def beta_release(branch, beta_number): - """Convenience function to create a beta release from a branch""" - return BetaRelease(branch, beta_number) - -def release(branch): - """Convenience function to create a release from a branch""" - return Release(branch) - - -if __name__ == "__main__": - print( - "This file is a Python module. Use create_internal_release_of_the_day.py instead." - ) diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/collect_data_directories b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/collect_data_directories deleted file mode 100755 index d3f3cdc237b..00000000000 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/collect_data_directories +++ /dev/null @@ -1,23 +0,0 @@ -#!/bin/zsh - -set -e - -setopt extendedglob - -[ -d ./data ] || mkdir data - -for d in (examples|demo)/*/data(/); do - example_or_demo=${d%%/*} - pkg_plus_data=${d#*/} - pkg=${pkg_plus_data%/data} - [ "$d" = "${example_or_demo}/${pkg}/data" ] || echo WRONG $d - ls -d --color "${example_or_demo}/${pkg}/data" - echo example_or_demo=${example_or_demo} - echo pkg=${pkg} - dest_dir=data/data-${pkg} - [ -d "$dest_dir" ] || mkdir "$dest_dir" - ls -d --color "$dest_dir" - cp -a "$d"/* "${dest_dir}/" -done -cd data -zip -r ../data.zip * diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_internal_release_of_the_day.py b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_internal_release_of_the_day.py deleted file mode 100644 index f2a97610321..00000000000 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_internal_release_of_the_day.py +++ /dev/null @@ -1,52 +0,0 @@ -#! /bin/python3 - -"""This script is called by a cron job every day. - It creates and publish a release tarball. -""" - -import os -import datetime -import locale -import argparse -from cgal_release import release, integration, master, beta_release, master, beta_release_from_master - -# Define a dictionary that maps day of the week to an action -actions = { - "Monday": integration, - "Tuesday": integration, - "Wednesday": integration, - "Thursday": integration, - "Friday": release("5.5"), - "Saturday": release("5.6"), - "Sunday": beta_release_from_master(2), -} - - -def main(): - """Entry point of the script.""" - # Get the current day of the week, or get it from the command line - locale.setlocale(locale.LC_ALL, "en_US.UTF-8") - - day_help = f"Day of the week (default: {datetime.datetime.now().strftime('%A')})" - day_help += f" possible values: ({', '.join(actions.keys())})" - parser = argparse.ArgumentParser() - parser.add_argument( - "day", help=day_help, nargs="?", default=datetime.datetime.now().strftime("%A") - ) - parser.add_argument("-n", "--dry-run", action="store_true") - args = parser.parse_args() - - # Look up the action for the current day of the week in the dictionary - create_release = actions[args.day] - - if args.dry_run: - print(create_release) - return - - # Then create the release tarball - if os.system(create_release.command()) != 0: - raise RuntimeError("ERROR while creating release tarball") - - -if __name__ == "__main__": - main() diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_release b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_release deleted file mode 100755 index 7657e924bef..00000000000 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_release +++ /dev/null @@ -1,73 +0,0 @@ -#!/bin/sh - -LC_ALL=POSIX; -export LC_ALL - -# Returns an error once a command returns an error -set -e - -DRY_RUN= -QUIET=--quiet - -if [ "x$1" = "x--dry-run" -o "x$1" = "x-n" ]; then - DRY_RUN=--dry-run - shift -fi - -if [ -n "DRY_RUN" ]; then - QUIET= -fi - -pushd "$1" > /dev/null -branch=`git rev-parse --abbrev-ref HEAD` -remote=`git config branch.${branch}.remote` -git fetch $DRY_RUN $QUIET -p --all -[ -z "$DRY_RUN" ] && git reset $QUIET --hard "$remote/$branch" -git clean $DRY_RUN $QUIET -f -d -x - -ln -s -n -f "$1" $HOME/latest-internal-release-branch - -# Hard-reset integration "every day", if today's "$branch" is integration -# and create testsuite-Monday, testsuite-Tuesday, and so on... -if [ x"$branch" = "xintegration" ]; then - git push $DRY_RUN $QUIET -f cgal-dev "$remote/$branch:refs/heads/`date '+testsuite-%A'`" cgal/master:integration -elif [ x"$branch" = "xintegration-4.5" ]; then - git push $DRY_RUN $QUIET -f cgal-dev "$remote/$branch:refs/heads/`date '+testsuite-%A'`" cgal/releases/CGAL-4.5-branch:integration-4.5 -else - git push $DRY_RUN $QUIET -f cgal-dev "$remote/$branch:refs/heads/`date '+testsuite-%A'`" -fi - -popd > /dev/null - -# Update the symbolic links, using $1 and $2 -rm "$HOME/CGAL/last-release-branch" - -ln -s "$1" "$HOME/CGAL/last-release-branch" - -## That was for LaTeX documentation -#rm "$HOME/CGAL/last-manual_tools-branch" -#rm "$HOME/CGAL/last-manual-branch" - - -## That was for LaTeX documentation -# # Search the Manual and Manual_tools package in candidates, if any. -# # Else use the main branch. -# if [ -d "$2" -a -d "$2/Manual_tools" ]; then -# ln -s "$2" "$HOME/CGAL/last-manual_tools-branch"; -# else -# ln -s "$1" "$HOME/CGAL/last-manual_tools-branch"; -# fi -# if [ -d "$2" -a -d "$2/Manual" ]; then -# ln -s "$2" "$HOME/CGAL/last-manual-branch"; -# else -# ln -s "$1" "$HOME/CGAL/last-manual-branch"; -# fi - -## That was for LaTeX documentation -# # Update the manual tools -# # They are used in create_new_release to build the installation manual. -# "$HOME/bin/update_manual_tools" - -# Launch create_new_release, from the branch itself -[ -z "$DRY_RUN" ] && exec bash -$- "$HOME/CGAL/last-release-branch/Scripts/developer_scripts/create_new_release" --no-scm-update "$@" -# --no-scm-update because branches have already been updated diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/dump_crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/dump_crontab deleted file mode 100755 index 478770cf106..00000000000 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/dump_crontab +++ /dev/null @@ -1,17 +0,0 @@ -#!/bin/zsh - -cd $HOME/infrastructure -crontab -l >| crontab -if [ -d ../../../.git ]; then - git pull --ff-only --quiet || exit $? - git diff --cached --quiet || exit $? - git add crontab - if git commit -m 'updated crontab (automated commit)' > /dev/null; then - git push cgal master - else - true - fi -else - svn add -q crontab - [ -n "`svn st crontab`" ] && svn ci -m 'updated crontab (automated commit)' crontab -fi diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/update_manual_tools b/Maintenance/infrastructure/cgal.geometryfactory.com/bin/update_manual_tools deleted file mode 100755 index d7185498bfd..00000000000 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/bin/update_manual_tools +++ /dev/null @@ -1,21 +0,0 @@ -#!/bin/sh - -LC_ALL=POSIX; -export LC_ALL - -rm -rf "$HOME/CGAL/Manual_tools-src" -cp -a "$HOME/CGAL/last-manual_tools-branch/Manual_tools" "$HOME/CGAL/Manual_tools-src" -cp -a "$HOME/CGAL/last-manual-branch/Manual/developer_scripts/cgal_manual" "$HOME/bin" - -pushd "$HOME/CGAL/Manual_tools-src" - -cat > install.config <<'EOF' -export LATEX_CONV_BIN=$HOME/bin -MANUAL_TOOLS_PREFIX=$HOME/CGAL/Manual_tools-installed -export LATEX_CONV_CONFIG=$MANUAL_TOOLS_PREFIX/latex_conv_config -export STYLE_FILES=$MANUAL_TOOLS_PREFIX/sty -EOF - -sh install.sh - -popd diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab b/Maintenance/infrastructure/cgal.geometryfactory.com/crontab deleted file mode 100644 index 758fd180e8e..00000000000 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/crontab +++ /dev/null @@ -1,115 +0,0 @@ -# For details see man 4 crontabs - -# Example of job definition: -# .---------------- minute (0 - 59) -# | .------------- hour (0 - 23) -# | | .---------- day of month (1 - 31) -# | | | .------- month (1 - 12) OR jan,feb,mar,apr ... -# | | | | .---- day of week (0 - 6) (Sunday=0 or 7) OR sun,mon,tue,wed,thu,fri,sat -# | | | | | -# * * * * * command to be executed - -PATH=/home/lrineau/bin-cmake3:/bin:/usr/bin:/home/lrineau/bin -LC_CTYPE=en_US.UTF-8 - -# Update testsuite result pages -5,15,25,35,45,55 * * * * cd $HOME/CGAL/collect_and_public_testresults; ./treat_result_collection || echo ERROR - -# Create internal release -0 21 * * * python3 /home/lrineau/CGAL/branches/local-master.git/Maintenance/infrastructure/cgal.geometryfactory.com/bin/create_internal_release_of_the_day.py - -## Older stuff - -## "master" alone -#0 21 * * Sun cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/master.git --do-it --public || echo ERROR -## "integration" -#0 21 * * Mon,Tue,Wed cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration.git $HOME/CGAL/branches/empty-dir --do-it || echo ERROR -## from branch 5.5 -#0 21 * * Fri cd $HOME/CGAL/create_internal_release-5.5-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.5-branch.git --public --do-it || echo ERROR -## from branch 5.4 -#0 21 * * Sat,Thu cd $HOME/CGAL/create_internal_release-5.4-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.4-branch.git --public --do-it || echo ERROR - -# from branch 5.3 -#0 21 * * Sat cd $HOME/CGAL/create_internal_release-5.3-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.3-branch.git --public --do-it || echo ERROR -# from branch 5.2 -#0 21 * * Fri cd $HOME/CGAL/create_internal_release-5.2-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.2-branch.git --public --do-it || echo ERROR -# from branch 5.1 -#0 21 * * Fri cd $HOME/CGAL/create_internal_release-5.1-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.1-branch.git --public --do-it || echo ERROR -# from branch 5.0 -#0 21 * * Fri cd $HOME/CGAL/create_internal_release-5.0-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-5.0-branch.git --public --do-it || echo ERROR -# from branch 4.14 -#0 21 * * Fri cd $HOME/CGAL/create_internal_release-4.14-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.14-branch.git --public --do-it || echo ERROR -# from branch 4.13 -#0 21 * * Fri cd $HOME/CGAL/create_internal_release-4.13-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.13-branch.git --public --do-it || echo ERROR -# from branch 4.12 -#0 21 * * Sat cd $HOME/CGAL/create_internal_release-4.12-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.12-branch.git --public --do-it || echo ERROR -# from branch 4.11 -#0 21 * * Sat cd $HOME/CGAL/create_internal_release-4.11-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.11-branch.git --public --do-it || echo ERROR -# from branch 4.10 -#0 21 * * Mon,Tue cd $HOME/CGAL/create_internal_release-4.10-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.10-branch.git --public --do-it || echo ERROR -# from branch 4.9 -#0 21 * * Sat cd $HOME/CGAL/create_internal_release-4.9-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.9-branch.git --public --do-it -# from branch 4.8 -#0 21 * * Sat cd $HOME/CGAL/create_internal_release-4.8-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.8-branch.git --public --do-it -# from branch 4.7 -#0 21 * * Sat cd $HOME/CGAL/create_internal_release-4.7-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.7-branch.git --public --do-it -# from branch 4.6 -#0 21 * * Sat cd $HOME/CGAL/create_internal_release-4.6-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.6-branch.git --public --do-it -# from branch 4.5 -#0 21 * * Sat cd $HOME/CGAL/create_internal_release-4.5-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.5-branch.git --public --do-it - -# Launch our Docker testsuite , at 21:36, -# after a pull of all new images at 20:23. -06 20 * * * for i in $(cat /home/lrineau/.config/CGAL/test_cgal_docker_images); do docker pull $i; done; docker rmi $(docker images | awk '// {print $3}') -36 21 * * * cd /home/lrineau/Git/cgal-testsuite-dockerfiles && /usr/bin/time ./test_cgal.py --use-fedora-selinux-policy --force-rm --max-cpus 12 --container-cpus 4 --jobs 5 --upload-results --images $($HOME/bin/docker_images_to_test_today) - - -# Dump the crontab to SVN every hour at minute 18 -18 * * * * $HOME/bin/dump_crontab - -# Docker check every hour -#0 * * * * docker inspect --format='{{json .State.Health.Status}}' cgal-mediawiki-docker_wiki_1 | grep -q '"healthy"' || docker logs cgal-mediawiki-docker_wiki_1 - -# cgal->cgal2 with git-multimail -*/5 * * * * cd $HOME/Git/cgal-dev-pusher.git && $HOME/bin/git-fetch-and-push-to-multimail cgal-dev cgal-dev-receiver -*/5 * * * * cd $HOME/Git/cgal-pusher.git && $HOME/bin/git-fetch-and-push-to-multimail cgal cgal-receiver -*/5 * * * * cd $HOME/Git/cgal-students-pusher.git && $HOME/bin/git-fetch-and-push-to-multimail cgal-public-dev cgal-students-receiver -*/5 * * * * cd $HOME/Git/cgal-web-pusher.git && $HOME/bin/git-fetch-and-push-to-multimail cgal-web cgal-web-receiver - -#################################### -# Old stuff -#################################### - -## Manual Test suite, at 9:40pm -#40 21 * * * cd $HOME/CGAL/releases-and-testsuites-with-cmake/CGAL-I/doc_tex; nice -19 $HOME/bin/cgal_manual -testsuite || true -## Doxygen Test suite, at 9:05pm -#20 21 * * * time $HOME/CGAL/python-3.3/bin/python3 $HOME/CGAL/doxy-port-pmoeller/Documentation/testsuite.py --doxyassist $HOME/CGAL/doxyassist/doxyassist.py --doxygen $HOME/Git/doxygen-fixes/bin/doxygen --documentation $HOME/CGAL/doxy-port-pmoeller/Documentation --publish /var/CGAL/www/Members/Doxygen_test/ --do-update --do-purge-rebuild - -# "next" alone -#0 21 * * Sat cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/next.svn --public --do-it -# "next" + candidates -#0 21 * * Mon,Tue,Wed,Thu,Fri cd $HOME/CGAL/create_internal_release && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/next.svn $HOME/CGAL/candidate-packages --public --do-it -# from branch 4.1 -#0 21 * * Sun cd $HOME/CGAL/create_internal_release-4.1-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/CGAL-4.1-branch --public --do-it -# from branch 4.4 -#0 21 * * Sun cd $HOME/CGAL/create_internal_release-4.4-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/CGAL-4.4-branch.git --public --do-it -# "integration-4.5" -#0 21 * * Sat,Mon cd $HOME/CGAL/create_internal_release-4.5-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/branches/integration-4.5.git $HOME/CGAL/branches/empty-dir --do-it --public - -# - from branch 3.4 -#0 21 * * Sat cd $HOME/CGAL/create_internal_release-3.4-branch; scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/CGAL-3.4-branch --public --do-it -# - from branch 3.7 -#0 21 * * Fri cd $HOME/CGAL/create_internal_release-3.7-branch; scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/CGAL-3.7-branch --public --do-it -# - from branch 3.9 -#0 21 * * Sat cd $HOME/CGAL/create_internal_release-3.9-branch; scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/CGAL-3.9-branch --public --do-it -# - from branch 4.0 -#0 21 * * Sun cd $HOME/CGAL/create_internal_release-4.0-branch && /usr/bin/time scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/CGAL-4.0-branch --public --do-it -# - on trunk -#0 21 * * Sat cd $HOME/CGAL/create_internal_release; scl enable rh-git29 -- $HOME/bin/create_release $HOME/CGAL/trunk --public --do-it - -# Check the links of http://www.cgal.org/projects.html every sunday at 17:42 -#42 17 * * Sun linklint -host www.cgal.org -http /projects.html -net -no_anchors -quiet -silent -error - -# A test that does not work -#30 21 * * * grep 'conflicts with' $HOME/CGAL/create_internal_release/create_release.log.`date '+%Y-%m-%d'`* --no-filename - diff --git a/Maintenance/infrastructure/cgal.geometryfactory.com/partition-table-sda.txt b/Maintenance/infrastructure/cgal.geometryfactory.com/partition-table-sda.txt deleted file mode 100644 index 7ba18c16b03..00000000000 --- a/Maintenance/infrastructure/cgal.geometryfactory.com/partition-table-sda.txt +++ /dev/null @@ -1,12 +0,0 @@ -# partition table of /dev/sda -unit: sectors - -/dev/sda1 : start= 63, size= 20482812, Id=fd, bootable -/dev/sda2 : start= 20482875, size= 16383174, Id=fd -/dev/sda3 : start= 36866049, size=2893406016, Id= f -/dev/sda4 : start= 0, size= 0, Id= 0 -/dev/sda5 : start= 36866050, size=2893406015, Id=fd -# -# Restore with: -# sfdisk --force /dev/sda < partition-table-sda.txt -# diff --git a/Maintenance/public_release/announcement/announcement.md b/Maintenance/public_release/announcement/announcement.md index eb9cd301033..aa199675250 100644 --- a/Maintenance/public_release/announcement/announcement.md +++ b/Maintenance/public_release/announcement/announcement.md @@ -1,108 +1,257 @@ -The CGAL Open Source Project is pleased to announce the release 5.6 of CGAL, the Computational Geometry Algorithms Library. +The CGAL Open Source Project is pleased to announce the release 6.0 of CGAL, the Computational Geometry Algorithms Library. -Besides fixes and general enhancement to existing packages, the following has changed since CGAL 5.5: +Besides fixes and general enhancement to existing packages, the following has changed since CGAL 5.6: ### General Changes -- **Breaking change**: Package-specific assertions, preconditions, and postconditions (such as `CGAL_triangulation_assertion`) have been removed. Corresponding CGAL-wide versions (such as `CGAL_assertion`) should be used instead. +- CGAL 6.0 is the first release of CGAL that requires a C++ compiler + with the support of C++17 or later. The new list of supported compilers is: + - Visual C++ 15.9, 16.10, 17.0 (from Visual Studio 2017, 2019 and 2022) or later + - Gnu g++ 11.4.0 or later (on Linux or macOS) + - LLVM Clang version 15.0.7 or later (on Linux) + - Apple Clang compiler versions 10.0.1, 12.0.5, and 15.0.0 (on macOS) +- The minimal supported version of Boost is now 1.72.0. +- GMP/MPFR are no longer mandatory to use CGAL, [Boost.Multiprecision](https://www.boost.org/doc/libs/1_72_0/libs/multiprecision/doc/html/index.html). + can be used instead. +- The CGAL `Core` library is no longer based on GMP, but on + [Boost.Multiprecision](https://www.boost.org/doc/libs/1_72_0/libs/multiprecision/doc/html/index.html). + Either GMP backend or Boost backend can be used. +- All demos are now based on Qt6. +- **Breaking change**: The CMake file `UseCGAL.cmake` has been removed from CGAL. + Usages of the CMake variables `${CGAL_USE_FILE}` and `${CGAL_LIBRARIES}` must be replaced + by a link to the imported target `CGAL::CGAL`, for example: + `target_link_library(your_target PRIVATE CGAL::CGAL)`. -### [Shape Detection](https://doc.cgal.org/5.6/Manual/packages.html#PkgShapeDetection) (major changes) +### [Kinetic Space Partition](https://doc.cgal.org/6.0/Manual/packages.html#PkgKineticSpacePartition) (new package) -- **Breaking change**: The region growing part of the package have been reworked to fix design issues introduced with the handling of `FaceGraph` models. In particular, the notion of `Item` has been introduced to reference an element in the input range of elements. Region maps now operates on `Item` and no longer on the value type of the input range. -- **Breaking change**: The method `update()` in the concept `RegionType` now returns a `Boolean` instead of `void`, that is used inside the class `Region_growing` for detecting if the input conditions for the new region are satisfied. This change affects only user-defined types of regions. -- **Breaking change**: The constructors of all models used together with the region growing algorithm now enable users to provide parameters through the [named parameters](https://doc.cgal.org/5.6/BGL/group__bgl__namedparameters.html) mechanism. -- All fitting classes in the region growing framework are now using better versions of the region conditions, more precise and faster, including the correct normal orientations. -- Added new models of the concept `RegionType` for getting linear regions in a set of 2D and 3D segments and on 2D and 3D polylines. -- Added the class `Polyline_graph` for extracting a set of polylines from a face graph, which splits this graph into a set of user-defined regions. -- Added new shapes to the Region Growing algorithm on a point set: circles in 2D, spheres in 3D, and cylinders in 3D. +- This package implements kinetic space partition: based on a set of planar input shapes, + the bounding box of the input data is split into convex volumes. The complexity of the partition + can be adjusted with a single parameter. -### [2D Straight Skeleton and Polygon Offsetting](https://doc.cgal.org/5.6/Manual/packages.html#PkgStraightSkeleton2) (major changes) -- Added weighted straight skeletons: weighted straight skeletons are a generalization of straight skeletons. Contour edges are assigned a positive weight, which can be understood as assigning a speed to the wavefront spawned from the contour edge. -- Added straight skeleton extrusion: this CGAL package now implements the extrusion of weighted straight skeletons of polygons with holes. The output is a closed, combinatorially 2-manifold surface triangle mesh. - See also the [news entry](https://www.cgal.org/2023/05/09/improved_straight_skeleton/). +### [Kinetic Surface Reconstruction](https://doc.cgal.org/6.0/Manual/packages.html#PkgKineticSurfaceReconstruction) (new package) -### [2D and 3D Linear Geometry Kernel](https://doc.cgal.org/5.6/Manual/packages.html#PkgKernel23) +- The package implements a piece-wise planar surface reconstruction pipeline from point clouds + combining methods from the [Shape Detection](https://doc.cgal.org/6.0/Manual/packages.html#PkgShapeDetection), + [Shape Regularization](https://doc.cgal.org/6.0/Manual/packages.html#PkgShapeRegularization) + and [Kinetic Shape Partition](https://doc.cgal.org/6.0/Manual/packages.html#PkgKineticSpacePartition) packages + and graph-cut to reconstruct surfaces from point clouds. -- Added the functor [`CompareAngle_3`](https://doc.cgal.org/5.6/Kernel_23/classKernel_1_1CompareAngle__3.html) to the concept [`Kernel`](https://doc.cgal.org/5.6/Kernel_23/classKernel.html) to compare an angle defined by three points to the cosinus of another angle. +### [Basic Viewer](https://doc.cgal.org/6.0/Basic_viewer/index.html#Chapter_Basic_viewer) (new package) -### [Combinatorial Maps](https://doc.cgal.org/5.6/Manual/packages.html#PkgCombinatorialMaps), [Generalized Maps](https://doc.cgal.org/5.6/Manual/packages.html#PkgGeneralizedMaps), and [Linear Cell Complex](https://doc.cgal.org/5.6/Manual/packages.html#PkgLinearCellComplex) +- The basic viewer package provides interactive visualization for most CGAL packages, + such as [2D Arrangements](https://doc.cgal.org/6.0/Manual/packages.html#PkgArrangementOnSurface2), + [2D Regularized Boolean Set-Operations](https://doc.cgal.org/6.0/Manual/packages.html#PkgBooleanSetOperations2), + [Linear Cell Complex](https://doc.cgal.org/6.0/Manual/packages.html#PkgLinearCellComplex), + [3D Boolean Operations on Nef Polyhedra](https://doc.cgal.org/6.0/Manual/packages.html#PkgNef3), + [2D Periodic Triangulations](https://doc.cgal.org/6.0/Manual/packages.html#PkgPeriodic2Triangulation2), + [3D Point Set](https://doc.cgal.org/6.0/Manual/packages.html#PkgPointSet3), + [2D Polygons](https://doc.cgal.org/6.0/Manual/packages.html#PkgPolygon2), + [3D Polyhedral Surface](https://doc.cgal.org/6.0/Manual/packages.html#PkgPolyhedron), + [2D Straight Skeleton and Polygon Offsetting](https://doc.cgal.org/6.0/Manual/packages.html#PkgStraightSkeleton2), + [Surface Mesh](https://doc.cgal.org/6.0/Manual/packages.html#PkgSurfaceMesh), + [2D Triangulations](https://doc.cgal.org/6.0/Manual/packages.html#PkgTriangulation2), + [3D Triangulations](https://doc.cgal.org/6.0/Manual/packages.html#PkgTriangulation3), + [2D Voronoi Diagrams](https://doc.cgal.org/6.0/Manual/packages.html#PkgVoronoiDiagram2), + and more. + The most simple use case of the basic viewer is the call of the global `CGAL::draw()` function. + There is one such `draw()` function for each CGAL package that has a basic viewer. Such a call opens + an interactive window showing the given model and allowing to navigate in the scene, + show or hide some specific cells, show the interior of the model if any, etc. + The `Basic_viewer` is based on Qt6. -- Added a version that uses indices instead of handles as dart and attribute descriptors. As the indices are integers convertible from and to `std::size_t`, they can be used as index into vectors which store properties. To use the index version, `Use_index` must be defined and be equal to `CGAL::Tag_true` in the item class. +### [Polygon Repair](https://doc.cgal.org/6.0/Manual/packages.html#PkgPolygonRepair) (new package) -### [Linear Cell Complex](https://doc.cgal.org/5.6/Manual/packages.html#PkgLinearCellComplex) +- This package provides algorithms to repair 2D polygons, polygons with holes, + and multipolygons with holes, by selecting faces of the arrangement of the input + using the odd-even heuristic. -- Added the class [`Linear_cell_complex_incremental_builder_3`](https://doc.cgal.org/5.6/Linear_cell_complex/classCGAL_1_1Linear__cell__complex__incremental__builder__3.html). +### [2D and 3D Linear Geometry Kernel](https://doc.cgal.org/6.0/Manual/packages.html#PkgKernel23) -### [2D Arrangements](https://doc.cgal.org/5.6/Manual/packages.html#PkgArrangementOnSurface2) +- **Breaking change**: Replaced all instances of `boost::variant` with `std::variant` + in the intersection functions. +- **Breaking change**: Replaced all instances of `boost::optional` with `std::optional` + in the intersection functions. -- Introduced an overload function template, namely `draw(arr)`, that renders arrangements based on the `Basic_viewer_qt` class template. As of now, only 2D arrangements on the plane induced by (i) segments, (ii) conics, and (iii) circular arcs or (linear) segments are supported. -- Improved the traits class template that handles conics, namely [`Arr_conic_traits_2`](https://doc.cgal.org/5.6/Arrangement_on_surface_2/classCGAL_1_1Arr__conic__traits__2.html). This includes the following: 1. Fixed a couple of bugs and slightly optimized some functions. 2. Introduced functionality that approximates conics with polylines. (This is used to draw conic curves.) 3. **Breaking change**: Changed the interface to generate conic curves. In the past, curves where generated directly using the constructors of the conic and x-monotone conic constructs. Now, they are constructed via function objects provided by the traits. This eliminates the constructions of temporary kernels. The old functionality is obsolete, but still supported for a limited number of versions. It depends on a static member function of the traits. In a future version this function will no longer be static, implying that the old functionality will no longer be supported. -- Introduced functionality that approximates circular segments with polylines. (This is used to draw conic curves.) +### [3D Polyhedral Surface](https://doc.cgal.org/6.0/Manual/packages.html#PkgPolyhedron) -### [Polygon Mesh Processing](https://doc.cgal.org/5.6/Manual/packages.html#PkgPolygonMeshProcessing) +- The demo of this package, also known as "Polyhedron Demo" has been renamed "CGAL Lab" + and moved to its own package ("Lab"). -- Added functions [`CGAL::Polygon_mesh_processing::region_growing_of_planes_on_faces()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PkgPolygonMeshProcessingRef.html#ga50dcd2f6295f584d2e378b57290ae2af) and [`CGAL::Polygon_mesh_processing::detect_corners_of_regions()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PkgPolygonMeshProcessingRef.html#gac8e445730d718a2fc49604e865017d2e), which enable partitioning a mesh into planar regions using the region growing algorithm from the [Shape Detection](https://doc.cgal.org/5.6/Manual/packages.html#PkgShapeDetection) package. +### [2D and 3D Fast Intersection and Distance Computation (AABB Tree)](https://doc.cgal.org/6.0/Manual/packages.html#PkgAABBTree) -- Added the functions [`CGAL::Polygon_mesh_processing::remesh_planar_patches()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__meshing__grp.html#ga7fca6fa2db94560ab6d32e6a77fc35b6) and [`CGAL::Polygon_mesh_processing::remesh_almost_planar_patches()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__meshing__grp.html#ga0e6da479548199a5d82c3cf0ed36e8a0), which can be used to remesh patches of coplanar faces in a mesh. +- The AABB tree can now be used with 2D or 3D primitives: + - The concepts `AABBGeomTraits` and `AABBRayIntersectionGeomTraits` + have been replaced by [`AABBGeomTraits_3`](https://doc.cgal.org/6.0/AABB_tree/classAABBGeomTraits__3.html) + and by [`AABBRayIntersectionGeomTraits_3`](https://doc.cgal.org/6.0/AABB_tree/classAABBRayIntersectionGeomTraits__3.html), + respectively. + - The concepts [`AABBGeomTraits_2`](https://doc.cgal.org/6.0/AABB_tree/classAABBGeomTraits__2.html) + and [`AABBRayIntersectionGeomTraits_2`](https://doc.cgal.org/6.0/AABB_tree/classAABBRayIntersectionGeomTraits__2.html) + have been introduced, as the 2D counterparts. + - The class [`CGAL::AABB_traits`](https://doc.cgal.org/6.0/AABB_tree/group__PkgAABBTreeRef.html#ga764f0fc59c96355877536810aa1aca5b) + is deprecated and replaced by [`CGAL::AABB_traits_3`](https://doc.cgal.org/6.0/AABB_tree/classCGAL_1_1AABB__traits__3.html). + - The class [`CGAL::AABB_traits_2`](https://doc.cgal.org/6.0/AABB_tree/classCGAL_1_1AABB__traits__2.html) is introduced as the 2D counterpart. + - The class [`CGAL::AABB_segment_primitive`](https://doc.cgal.org/6.0/AABB_tree/group__PkgAABBTreeRef.html#gad0acfd5c4a3c081b7570cc6bd4594c8d) + has been deprecated and replaced by the class [`CGAL::AABB_segment_primitive_3`](https://doc.cgal.org/6.0/AABB_tree/classCGAL_1_1AABB__segment__primitive__3.html). + - The class [`CGAL::AABB_triangle_primitive`](https://doc.cgal.org/6.0/AABB_tree/group__PkgAABBTreeRef.html#ga54a56f01dc8024624f7d83ee0a01add0) + has been deprecated and replaced by the class [`CGAL::AABB_triangle_primitive_3`](https://doc.cgal.org/6.0/AABB_tree/classCGAL_1_1AABB__triangle__primitive__3.html). + - The following 2D primitive classes have been added: + [`CGAL::AABB_segment_primitive_2`](https://doc.cgal.org/6.0/AABB_tree/classCGAL_1_1AABB__segment__primitive__2.html), + [`CGAL::AABB_polyline_segment_primitive_2`](https://doc.cgal.org/6.0/AABB_tree/classCGAL_1_1AABB__polyline__segment__primitive__2.html), + [`CGAL::AABB_triangle_primitive_2`](https://doc.cgal.org/6.0/AABB_tree/classCGAL_1_1AABB__triangle__primitive__2.html), + [`CGAL::AABB_indexed_triangle_primitive_2`](https://doc.cgal.org/6.0/AABB_tree/classCGAL_1_1AABB__indexed__triangle__primitive__2.html). +- **Breaking change**: The concept [`AABBTraits`](https://doc.cgal.org/6.0/AABB_tree/classAABBTraits.html) + now refines the concept [`SearchTraits`](https://doc.cgal.org/6.0/Spatial_searching/classSearchTraits.html). +- **Breaking change**: Replaced all instances of `boost::optional` with `std::optional`. -- Added the function [`CGAL::Polygon_mesh_processing::surface_Delaunay_remeshing()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__meshing__grp.html#gaff62f9415d2fe96d1d3095351f156ced), which can be used to remesh a surface triangle mesh using the Delaunay refinement algorithm from the [3D Mesh Generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh3) package. +### [2D Arrangements](https://doc.cgal.org/6.0/Manual/packages.html#PkgArrangementOnSurface2) -- Added the function [`CGAL::Polygon_mesh_processing::remove_almost_degenerate_faces()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__geometric__repair__grp.html#ga48008d2b66de8a68a7068f29db15dad6), which can be used to remove badly shaped triangles faces in a mesh. +- **Breaking change**: Replaced all instances of `boost::variant` with `std::variant`. +- **Breaking change**: The type of the result of point location queries has been changed to + `std::variant`. Support for the old macro `CGAL_ARR_POINT_LOCATION_VERSION` + has been removed. +- **Breaking change**: Eliminated the error-prone C-type casting that was used to define observers. + In general, backward compatibility was maintained; however, the class template + [`CGAL::Arr_observer`](https://doc.cgal.org/6.0/Arrangement_on_surface_2/group__PkgArrangementOnSurface2Ref.html#ga8019f986f5469920136c4b92290b7b1b) + has been replaced by an alias template. (The class `CGAL::Arr_observer` + was renamed to [`CGAL::Aos_observer`](https://doc.cgal.org/6.0/Arrangement_on_surface_2/classCGAL_1_1Aos__observer.html)). +- Introduced [`Arr_dcel`](https://doc.cgal.org/6.0/Arrangement_on_surface_2/classCGAL_1_1Arr__dcel.html), + which essentially replaces the former `CGAL::Arr_default_dcel`. + Backward compatibility was maintained by the introduction of the alias template + [`CGAL::Arr_default_dcel`](https://doc.cgal.org/6.0/Arrangement_on_surface_2/group__PkgArrangementOnSurface2DCEL.html#gaf9635869a3794a46d7dcfce63d7de2a6). + `CGAL::Arr_dcel`, as opposed to the former `CGAL::Arr_default_dcel` is templated + (in addition to the geometry traits) by `Vertex`, `Halfedge`, and `Face` template parameters, + and they have default type values. All this enables the layered extension of DCEL records. +- Fixed a bug in the zone construction code applied to arrangements of geodesic arcs on a sphere, + when inserting an arc that lies on the identification curve. +- Introduced a new interactive program that demonstrates 2D arrangements embedded on the sphere + called `earth`. The program (i) reads a database of all administrative boundaries of the countries + in the world, (ii) displays the globe with all countries and land covered by water (which is land + not covered by countries) on a window, and (ii) enables interaction with the user. -- Added the functions [`CGAL::Polygon_mesh_processing::does_triangle_soup_self_intersect()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__intersection__grp.html#ga4909920dc48b8285e69feb845feb1e53) and [`CGAL::Polygon_mesh_processing::triangle_soup_self_intersections()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__intersection__grp.html#ga1c5fee17bd0d92d5a2fba77ed94d4b4d) to identify and report self-intersections in a triangle soup, similarly to existing functions on triangle meshes. +### [3D Envelopes](https://doc.cgal.org/6.0/Manual/packages.html#PkgEnvelope3) -- Added the function [`CGAL::Polygon_mesh_processing::triangulate_polygons()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__meshing__grp.html#ga8b7db6aa8c3e79526b594739ba926d82), which allows users to triangulate polygon soups. +- **Breaking change**: [`Construct_projected_boundary_2`](https://doc.cgal.org/6.0/Envelope_3/classEnvelopeTraits__3.html#ac7b8f72870f0572834a0a3de62c67bc1) + in [`EnvelopeTraits_3`](https://doc.cgal.org/6.0/Envelope_3/classEnvelopeTraits__3.html) + now uses `std::variant` instead of [`CGAL::Object`](https://doc.cgal.org/6.0/STL_Extension/classCGAL_1_1Object.html). +- Passed the base class of [`CGAL::Env_plane_traits_3`](https://doc.cgal.org/6.0/Envelope_3/classCGAL_1_1Env__plane__traits__3.html) + as a template parameter with a default value (being the 2D arrangement linear traits). + Similarly, passed the base class of `CGAL::Env_triangle_traits_3` as a template parameter + with a default value (being the 2D arrangement segment traits). -- Added a named parameter to [`CGAL::Polygon_mesh_processing::smooth_shape()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__meshing__grp.html#ga57fa999abe8dc557003482444df2a189) to disable the scaling, which otherwise aims to compensate volume loss during smoothing. +### [Combinatorial Maps](https://doc.cgal.org/6.0/Manual/packages.html#PkgCombinatorialMaps) and [Generalized Maps](https://doc.cgal.org/6.0/Manual/packages.html#PkgGeneralizedMaps) -- Deprecated the overloads of functions [`CGAL::Polygon_mesh_processing::triangulate_hole()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__hole__filling__grp.html#ga3abdf2d0558822e85f060966b69cae98), [`CGAL::Polygon_mesh_processing::triangulate_and_refine_hole()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__hole__filling__grp.html#ga9868fac4d9dca77462ad7828bc99d8a1), and [`CGAL::Polygon_mesh_processing::triangulate_refine_and_fair_hole()`](https://doc.cgal.org/5.6/Polygon_mesh_processing/group__PMP__hole__filling__grp.html#ga18eac756a8f8e5d5f73e645fd4e26cad) which have output iterators for vertices and faces as parameter. They are replaced by overloads with two additional named parameters. +- Added the function [`insert_cell_1_between_two_cells_2()`](https://doc.cgal.org/6.0/Combinatorial_map/classGenericMap.html#aa29570a0812094c7876e24a228373f12) + to the [`GenericMap`](https://doc.cgal.org/6.0/Combinatorial_map/classGenericMap.html) + concept, which enables users to insert an edge between two different faces in order to create faces with holes. -### [2D Convex Hulls](https://doc.cgal.org/5.6/Manual/packages.html#PkgConvexHull2) +### [Quadtrees, Octrees, and Orthtrees](https://doc.cgal.org/6.0/Manual/packages.html#PkgOrthtree) -- **Breaking change**: The concept [`ConvexHullTraits_2`](https://doc.cgal.org/5.6/Convex_hull_2/classConvexHullTraits__2.html) no longer requires the functor `Less_signed_distance_to_line_2`, but requires the functor `Compare_signed_distance_to_line_2` instead. -- The long-deprecated classes `Convex_hull_projective_xy_traits_2`, `Convex_hull_projective_xz_traits_2`, and `Convex_hull_projective_yz_traits_2` have been removed. Users should use [`Projection_traits_xy_3`](https://doc.cgal.org/5.6/Kernel_23/classCGAL_1_1Projection__traits__xy__3.html), [`Projection_traits_xz_3`](https://doc.cgal.org/5.6/Kernel_23/classCGAL_1_1Projection__traits__xz__3.html), and [`Projection_traits_yz_3`](https://doc.cgal.org/5.6/Kernel_23/classCGAL_1_1Projection__traits__yz__3.html) instead. +- **Breaking change**: + - Node splitting behavior and per-node data are now customizable via the Traits class. + - Nodes are now stored as a property map, with properties of each node accessed by index. + - Nearest neighbors functions only work for Orthtrees which provide the necessary functionality. -### [2D Triangulations](https://doc.cgal.org/5.6/Manual/packages.html#PkgTriangulation2) +### [CGAL and the Boost Graph Library (BGL)](https://doc.cgal.org/6.0/Manual/packages.html#PkgBGL) -- Added the function [`CGAL::mark_domain_in_triangulation()`](https://doc.cgal.org/5.6/Triangulation_2/group__PkgTriangulation2Miscellaneous.html#ga0409755d0eb89100810230443a85e7eb) to mark faces connected with non-constrained edges as inside of the domain based on the nesting level. +- Added the function [`CGAL::remove_all_elements()`](https://doc.cgal.org/6.0/BGL/group__PkgBGLHelperFct.html#gac7e199820c95ed1fc6ab536750749358), + which removes vertices, halfedges, and faces without collecting garbage and without removing properties. +- [Dynamic property maps](https://doc.cgal.org/6.0/BGL/group__PkgBGLPropertiesDynamic.html) + can now have a default value. +- The class [`CGAL::Face_filtered_graph`](https://doc.cgal.org/6.0/BGL/structCGAL_1_1Face__filtered__graph.html) + now supports patch IDs of any type and not just `faces_size_type`. The only requirement is that + the type is hashable. -### [2D Conforming Triangulations and Meshes](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh2) +### [Polygon Mesh Processing](https://doc.cgal.org/6.0/Manual/packages.html#PkgPolygonMeshProcessing) -- Added new overloads to the function [`write_VTU()`](https://doc.cgal.org/5.6/Mesh_2/group__PkgMesh2IO.html), with property maps for specifying the domain. -- Deprecated usage of boost parameters in favor of function named parameters in [`CGAL::lloyd_optimize_mesh_2()`](https://doc.cgal.org/5.6/Mesh_2/group__PkgMesh2Functions.html#gafeaf59d3fa014da287f8514913b38d05). -- Deprecated two overloads of the function [`refine_Delaunay_mesh()`](https://doc.cgal.org/5.6/Mesh_2/group__PkgMesh2Functions.html), and replaced them with versions using function named parameters. +- Added the function [`CGAL::Polygon_mesh_processing::autorefine_triangle_soup()`](https://doc.cgal.org/6.0/Polygon_mesh_processing/group__PMP__corefinement__grp.html#gaec85370aa0b2acc0919e5f8406cfb74c), + which can be used to refine a soup of triangles such that no pair of triangles intersects + in their interiors. Also added, the function [`CGAL::Polygon_mesh_processing::autorefine()`](https://doc.cgal.org/6.0/Polygon_mesh_processing/group__PMP__corefinement__grp.html#ga3e3a0a82b6c04bdc3a6c070e8da4aed5) + operating directly on a triangle mesh and updating it using the aforementioned function on a triangle soup. +- Added the class [`CGAL::Corefinement::Non_manifold_output_visitor`](https://doc.cgal.org/6.0/Polygon_mesh_processing/structCGAL_1_1Polygon__mesh__processing_1_1Corefinement_1_1Non__manifold__output__visitor.html), + which can be used in corefinement based functions to deal with non-manifold outputs. +- Added the option to use a variable sizing field for [`CGAL::Polygon_mesh_processing::isotropic_remeshing()`](https://doc.cgal.org/6.0/Polygon_mesh_processing/group__PMP__meshing__grp.html#ga66cb01cf228ed22f0a2a474cfa2aeb3f), + and a sizing function based on a measure of local curvature for adaptive remeshing. +- Added the function [`CGAL::Polygon_mesh_processing::interpolated_corrected_curvatures()`](https://doc.cgal.org/6.0/Polygon_mesh_processing/group__PMP__corrected__curvatures__grp.html#ga22665c9ce92aaedab07df1b05f20bdb2) + which can be used to compute the mean and Gaussian curvatures, as well as the principal curvature + and directions. +- Added the function [`CGAL::Polygon_mesh_processing::refine_mesh_at_isolevel()`](https://doc.cgal.org/6.0/Polygon_mesh_processing/group__PkgPolygonMeshProcessingRef.html#ga396505d5a60b5f6d29792b214fa59352) + which can be used to refine a polygon mesh along an isocurve. +- Added the function [`CGAL::Polygon_mesh_processing::add_bbox()`](https://doc.cgal.org/6.0/Polygon_mesh_processing/group__PkgPolygonMeshProcessingRef.html#gabaf98d2fd9ae599ff1f3a5a6cde79cf3), + which enables adding a tight or extended, triangulated or not, bounding box to a face graph. -### [2D Hyperbolic Triangulations](https://doc.cgal.org/5.6/Manual/packages.html#PkgHyperbolicTriangulation2) +### [2D Triangulations](https://doc.cgal.org/6.0/Manual/packages.html#PkgTriangulation2) +- **Breaking change**: the concept [`TriangulationTraits_2`](https://doc.cgal.org/6.0/Triangulation_2/classTriangulationTraits__2.html) now requires an additional functor `Compare_xy_2`. -- **Breaking change**: the concept [`HyperbolicTriangulationFaceBase_2`](https://doc.cgal.org/5.6/Hyperbolic_triangulation_2/classHyperbolicTriangulationFaceBase__2.html) has been modified to better reflect the triangulation's requirements and avoid a conflict with the requirements described by the concept `TriangulationDataStructure_2::Face`. The model [`CGAL::Hyperbolic_triangulation_face_base_2`](https://doc.cgal.org/5.6/Hyperbolic_triangulation_2/classCGAL_1_1Hyperbolic__triangulation__face__base__2.html) has been adapted correspondingly. +### [3D Triangulations](https://doc.cgal.org/6.0/Manual/packages.html#PkgTriangulation3) -### [3D Simplicial Mesh Data Structure](https://doc.cgal.org/5.6/Manual/packages.html#PkgSMDS3) (new package) +- Added three member functions [`vertices()`](https://doc.cgal.org/6.0/Triangulation_3/classCGAL_1_1Triangulation__3.html#a02faf334255e1ca8caa1a6f412533759) + to the class [`CGAL::Triangulation_3`](https://doc.cgal.org/6.0/Triangulation_3/classCGAL_1_1Triangulation__3.html). + Each of them returns an array containing the vertices of the given triangulation simplex. -- This new package wraps all the existing code that deals with a [`MeshComplex_3InTriangulation_3`](https://doc.cgal.org/5.6/SMDS_3/classMeshComplex__3InTriangulation__3.html) to describe 3D simplicial meshes, and makes the data structure independent from the [tetrahedral mesh generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh3) package. +### [dD Triangulations](https://doc.cgal.org/6.0/Manual/packages.html#PkgTriangulations) -### [Tetrahedral Remeshing](https://doc.cgal.org/5.6/Manual/packages.html#PkgTetrahedralRemeshing) -- **Breaking change**: The template parameters of [`CGAL::Tetrahedral_remeshing::Remeshing_vertex_base_3`](https://doc.cgal.org/5.6/Tetrahedral_remeshing/group__PkgTetrahedralRemeshingClasses.html#ga7ef4f8c0c1ed715c34389ea4ee851a92) and [`CGAL::Tetrahedral_remeshing::Remeshing_cell_base_3`](https://doc.cgal.org/5.6/Tetrahedral_remeshing/classCGAL_1_1Tetrahedral__remeshing_1_1Remeshing__cell__base__3.html) have been modified. +- **Breaking change**: `CGAL::TDS_full_cell_mirror_storage_policy` is now unsupported in dimension larger than 127. +- **Breaking change**: Inserting multiple unweighted points in the same + position now keeps the first one, instead of switching to the latest. This + only affects custom point types where not all points in the same position + are equivalent. -### [3D Mesh Generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgMesh3) +### [Tetrahedral Remeshing](https://doc.cgal.org/6.0/Manual/packages.html#PkgTetrahedralRemeshing) -- Added two new named parameters to the named constructor [`CGAL::create_labeled_image_mesh_domain()`](https://doc.cgal.org/5.6/Mesh_3/classCGAL_1_1Labeled__mesh__domain__3.html#aec3f58e9883a8036a1b3e379df7d8fa9) for automatic detection and protection of 1D-curves that lie at the intersection of three or more subdomains extracted from labeled images. -- Added [`CGAL::Sizing_field_with_aabb_tree`](https://doc.cgal.org/5.6/Mesh_3/structCGAL_1_1Sizing__field__with__aabb__tree.html), a geometry-aware sizing field for feature edges in polyhedral domains. -- Added new meshing criterion [`edge_min_size`](https://doc.cgal.org/5.6/Mesh_3/classCGAL_1_1Mesh__criteria__3.html#a5f1c2649cb7ea346a3b6a2a8724b4df1) to avoid subdividing sharp edges that are shorter than a prescribed size bound. -- Added new meshing criteria [`facet_min_size`](https://doc.cgal.org/5.6/Mesh_3/classCGAL_1_1Mesh__criteria__3.html#a5f1c2649cb7ea346a3b6a2a8724b4df1) and [`cell_min_size`](https://doc.cgal.org/5.6/Mesh_3/classCGAL_1_1Mesh__criteria__3.html#a5f1c2649cb7ea346a3b6a2a8724b4df1) to prevent Delaunay refinement from creating simplices smaller than a prescribed bound. -- Deprecated usage of boost parameters in favor of function named parameters. +- Added a sizing field as new parameter of [`CGAL::tetrahedral_isotropic_remeshing()`](https://doc.cgal.org/6.0/Tetrahedral_remeshing/group__PkgTetrahedralRemeshingRef.html#ga263775c52eeb483a86a16aeb9eb31af0), + which can be used to perform non-uniform and adaptive remeshing. +- **Breaking change**: The template parameters of + [`CGAL::Tetrahedral_remeshing::Remeshing_cell_base_3`](https://doc.cgal.org/6.0/Tetrahedral_remeshing/classCGAL_1_1Tetrahedral__remeshing_1_1Remeshing__cell__base__3.html) + have been modified, reverting changes introduced in CGAL 5.6. +- **Breaking change**: The vertex base of + [`CGAL::Tetrahedral_remeshing::Remeshing_vertex_base_3`](https://doc.cgal.org/6.0/Tetrahedral_remeshing/classCGAL_1_1Tetrahedral__remeshing_1_1Remeshing__vertex__base__3.html) + must now be a model of the concept + [`SimplicialMeshVertexBase_3`](https://doc.cgal.org/6.0/SMDS_3/classSimplicialMeshVertexBase__3.html) + (and not only [`TriangulationVertexBase_3`](https://doc.cgal.org/6.0/Triangulation_3/classTriangulationVertexBase__3.html)). -### [3D Periodic Mesh Generation](https://doc.cgal.org/5.6/Manual/packages.html#PkgPeriodic3Mesh3) +### [3D Simplicial Mesh Data Structure](https://doc.cgal.org/6.0/Manual/packages.html#PkgSMDS3) -- Periodic Mesh Generation now supports non-cubic domains. -- Deprecated usage of boost parameters in favor of function named parameters. +- **Breaking change**: The template parameters of + [`CGAL::Simplicial_mesh_cell_base_3`](https://doc.cgal.org/6.0/SMDS_3/classCGAL_1_1Simplicial__mesh__cell__base__3.html) + have been modified to enable passing a geometric traits and a custom cell base class. -### [Surface Mesh Simplification](https://doc.cgal.org/5.6/Manual/packages.html#PkgSurfaceMeshSimplification) -- The stop predicates [`Count_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Count__stop__predicate.html) and [`Count_ratio_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Count__ratio__stop__predicate.html) are renamed to [`Edge_count_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Edge__count__stop__predicate.html) and [`Edge_count_ratio_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Edge__count__ratio__stop__predicate.html). Older versions have been deprecated. -- Introduced [`Face_count_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Face__count__stop__predicate.html) and [`Face_count_ratio_stop_predicate`](https://doc.cgal.org/5.6/Surface_mesh_simplification/classCGAL_1_1Surface__mesh__simplification_1_1Face__count__ratio__stop__predicate.html), which can be used to stop the simplification algorithm based on a desired number of faces in the output, or a ratio between input and output face numbers. +### [3D Mesh Generation](https://doc.cgal.org/6.0/Manual/packages.html#PkgMesh3) -### [2D Regularized Boolean Set Operations](https://doc.cgal.org/5.6/Manual/packages.html#PkgBooleanSetOperations2) -- Exposed all required member functions of the [`GeneralPolygonWithHoles_2`](https://doc.cgal.org/5.6/Polygon/classGeneralPolygonWithHoles__2.html) concept (e.g., [`clear_outer_boundary()`](https://doc.cgal.org/5.6/Polygon/classGeneralPolygonWithHoles__2.html#a9f5f035047505a2ccab3e68770f51bc6), [`clear_holes()`](https://cgal.geometryfactory.com/CGAL/doc/master/Polygon/classGeneralPolygonWithHoles__2.html#a2a507be648f127ac605da8c670ea2580), and [`clear()`](https://doc.cgal.org/5.6/Polygon/classGeneralPolygonWithHoles__2.html#a2ca4d9b43cc9216c1b2cdb080a915944) ). +- **Breaking change**: Removed the concept `TriangleAccessor`, the template parameter `TriangleAccessor`, + as well as the class `Triangle_accessor`. These were no longer used for several releases. +- **Breaking change**: Removed the class templates `CGAL::Gray_image_mesh_domain_3`, `CGAL::Implicit_mesh_domain_3`, + and `CGAL::Labeled_image_mesh_domain_3`, which were deprecated since CGAL-4.13. +- Added new meshing criterion `edge_distance`, an upper bound for the distance from the edge to the 1D feature. +- **Breaking change**: the concept `MeshEdgeCriteria_3` was modified to include the new meshing criterion `edge_distance`. -### Known Bug -- MSVC 2015 is still supported by this version of CGAL, but the feature _Segment Cell Iterator_ of the class [`CGAL::Triangulation_3`](https://doc.cgal.org/5.6/Triangulation_3/classCGAL_1_1Triangulation__3.html) does not compile with MSVC 2015. +### [3D Surface Mesh Generation](https://doc.cgal.org/6.0/Manual/packages.html#PkgSurfaceMesher3) + +- This package is deprecated and the package [3D Mesh Generation](https://doc.cgal.org/6.0/Manual/packages.html#PkgMesh3) should + be used instead. + +### [Surface Mesh Parameterization](https://doc.cgal.org/6.0/Manual/packages.html#PkgSurfaceMeshParameterization) + +- **Breaking change**: The method [`CGAL::Surface_mesh_parameterization::LSCM_parameterizer_3`](https://doc.cgal.org/6.0/Surface_mesh_parameterization/classCGAL_1_1Surface__mesh__parameterization_1_1LSCM__parameterizer__3.html) + now requires the Eigen library. +- **Breaking change**: CGAL no longer ships its own version of OpenNL. + +### [Surface Mesh](https://doc.cgal.org/6.0/Manual/packages.html#PkgSurfaceMesh) + +- **Breaking change**: The return type of [`CGAL::Surface_mesh::property_map()`](https://doc.cgal.org/6.0/Surface_mesh/classCGAL_1_1Surface__mesh.html#afc99c7ea179dc1c21a2ab59ed183184a) + has been changed to `std::optional`. + +### [3D Point Set](https://doc.cgal.org/6.0/Manual/packages.html#PkgPointSet3) + +- **Breaking change**: The return type of [`CGAL::Point_set_3::property_map()`](https://doc.cgal.org/6.0/Point_set_3/classCGAL_1_1Point__set__3.html#a571ecc603cd32d78c7effaf86fe120ad) + has been changed to `std::optional`. + +### [Shape Detection](https://doc.cgal.org/6.0/Manual/packages.html#PkgShapeDetection) + +- **Breaking change**: Replaced all instances of `boost::shared_ptr` with `std::shared_ptr`. + +### [2D Straight Skeleton and Polygon Offsetting](https://doc.cgal.org/6.0/Manual/packages.html#PkgStraightSkeleton2) + +- **Breaking change**: Replaced all instances of `boost::shared_ptr` with `std::shared_ptr`. +- **Breaking change**: Replaced all instances of `boost::optional` with `std::optional`. + diff --git a/Maintenance/public_release/announcement/md_annoucement_remove_line_breaks.md b/Maintenance/public_release/announcement/md_annoucement_remove_line_breaks.md new file mode 100644 index 00000000000..4d564f28a10 --- /dev/null +++ b/Maintenance/public_release/announcement/md_annoucement_remove_line_breaks.md @@ -0,0 +1,5 @@ +# Convert Markdown to Github Markdown with long lines + +```shell + pandoc -f markdown -t gfm+hard_line_breaks +``` diff --git a/Maintenance/public_release/scripts/precompiled_demos_zips b/Maintenance/public_release/scripts/precompiled_demos_zips index c1bd6281076..405e0e806b6 100755 --- a/Maintenance/public_release/scripts/precompiled_demos_zips +++ b/Maintenance/public_release/scripts/precompiled_demos_zips @@ -76,6 +76,7 @@ pushd Triangulation_on_sphere_2_Demo_with_dlls; zip -r ../triangulation_on_spher # CGAL-6.0 pushd Lab_Demo_with_dlls; zip -r ../CGALlab.zip *; popd +pushd Arrangement_on_surface_2_earth_Demo_with_dlls; zip -r ../arrangements_2_earth.zip *; popd # check echo CHECK now. The following lines should be empty. diff --git a/Maintenance/test_handling/Summary_Script.js b/Maintenance/test_handling/Summary_Script.js new file mode 100644 index 00000000000..413f0b94d7d --- /dev/null +++ b/Maintenance/test_handling/Summary_Script.js @@ -0,0 +1,320 @@ +const $mainContainer = $('#main_container'); +const $platformContainer = $('#platform_container'); +const $packageContainer = $('#package_container'); +let release = ""; +let packages = []; + +function getAllTestDirectories(data) { + return data.platforms.flatMap(platform => platform.test_directories.map(directory => directory.test_directory)); +} + +function clearPackagesOptions() { + $('#packagesSelector option').each(function() { + if ($(this).val() !== 'all' && !packages.includes($(this).val())) { + $(this).remove(); + } + }); +} + +function filterByPlatform(platform) { + const $packageSelector = $('#packagesSelector'); + $packageSelector.prop('disabled', platform !== 'all'); + $platformContainer.find('.platform').each(function() { + const $this = $(this); + if (platform === 'all' || $this.hasClass(platform)) { + $this.show(); + } else { + $this.hide(); + } + }); +} + +function filterByPackage(package) { + const $platformSelector = $('#platformSelector'); + const $packageContainers = $packageContainer.find('.package'); + if (package === 'all') { + $platformSelector.prop('disabled', false); + $platformContainer.show(); + $packageContainer.hide(); + } else { + $platformSelector.prop('disabled', true); + $platformContainer.hide(); + $packageContainer.show(); + } + $packageContainers.each(function() { + const $this = $(this); + if (package === 'all' || $this.hasClass(package)) { + $this.show(); + } else { + $this.hide(); + } + }); +} + +function filterByLetter(letter) { + const $letterContainers = $mainContainer.find('.letter_container'); + $letterContainers.each(function() { + const $this = $(this); + if (letter === 'all' || $this.hasClass(letter)) { + $this.show(); + } else { + $this.hide(); + } + if ($this.children().length <= 2) { + $this.hide(); + } + }); +} + +function search() { + const searchTerm = $('#searchInput').val().toLowerCase(); + const releaseType = $('#releaseSelector').val(); + const $resultsContainer = $('#searchResults'); + $resultsContainer.empty(); + + if (!searchTerm) { + $resultsContainer.append('

    Please enter a search term.

    '); + return; + } + + const matchingDirectories = []; + + window.data.platforms.forEach(platform => { + platform.test_directories.forEach(directory => { + if (directory.content.toLowerCase().includes(searchTerm)) { + matchingDirectories.push({ + test_directory: directory.test_directory, + platform_name: platform.name + }); + } + }); + }); + + if (matchingDirectories.length === 0) { + $resultsContainer.append('

    No matching directories found.

    '); + } else { + matchingDirectories.forEach(match => { + const link = `${window.data.release}/${match.test_directory}/TestReport_${match.platform_name}.gz`; + $resultsContainer.append(`

    ${match.platform_name} - ${match.test_directory} - ${window.data.release}

    `); + }); + } +} + +function packageContainer(platforms) { + const testDirectories = {}; + + platforms.forEach(platform => { + platform.test_directories.forEach(testDir => { + if (!testDirectories[testDir.test_directory]) { + testDirectories[testDir.test_directory] = {}; + } + if (!testDirectories[testDir.test_directory][testDir.letters]) { + testDirectories[testDir.test_directory][testDir.letters] = []; + } + testDirectories[testDir.test_directory][testDir.letters].push({ + platformName: platform.name, + content: testDir.content + }); + }); + }); + + for (const [testDirectory, letters] of Object.entries(testDirectories)) { + const $container = $('
    ', { class: 'package ' + testDirectory }).appendTo($packageContainer); + $('

    ').text(testDirectory).appendTo($container); + + for (const [letter, platformDetails] of Object.entries(letters)) { + const $letterContainer = $('
    ', { + class: 'letter_container ' + letter, + }).appendTo($container); + $('

    ').text(letter).appendTo($letterContainer); + + platformDetails.forEach(detail => { + const { platformName, content } = detail; + + const $platformContainer = $('
    ', { class: 'platform-container' }).appendTo($letterContainer); + + const $platformLink = $('', { + href: `${release}/${testDirectory}/TestReport_${platformName}.gz`, + text: platformName, + class: 'platform-link' + }).appendTo($platformContainer); + + const $contentSpan = $('
    ', {
    +                    text: content,
    +                    class: 'summary-content',
    +                    css: { display: 'none' }
    +                }).appendTo($letterContainer);
    +
    +                if (content.length > 0) {
    +                    const $toggleButton = $('
    +

    + + + +
    +

    Summary Results of ${release_name}

    + + + +
    +
    + + +
    +
    +
    +
    +
    + + EOF - - my $summary_page_path = "$testresult_dir/summary".substr($release_name,4).".html"; + if (-e $summary_script_src) { + copy($summary_script_src, $summary_script_dest) or die "Copy failed: $!"; + } else { + die "Source file $summary_script_src does not exist."; + } open(my $out, '>', $summary_page_path) or die "Could not open file '$summary_page_path' $!"; print $out $Summary_output; diff --git a/Maintenance/test_handling/testresult.css b/Maintenance/test_handling/testresult.css index f95a62452f9..8c460cdea6b 100644 --- a/Maintenance/test_handling/testresult.css +++ b/Maintenance/test_handling/testresult.css @@ -89,4 +89,171 @@ TABLE.result TD > a.package_name { grid-template-columns: repeat(4, 1fr); gap: 20px; padding: 20px; - } \ No newline at end of file +} + +.toggle-button { + color: #333; + background-color: #f0f0f0; + border: 1px solid #ccc; + cursor: pointer; + text-align: center; + border-radius: 5px; +} + +.summary-content{ + overflow: auto; + max-height: 600px; +} + +.directory_container{ + display: flex; + align-items: center; +} + +.platform-container { + display: flex; + align-items: center; +} + +.platform-link { + margin-right: 10px; +} + +/* TPL table */ + +.tpl-table { + width: auto; + border-collapse: collapse; + margin-top: 10px; + table-layout: fixed; + border: 1px solid #ccc; +} + +.tpl-table th, .tpl-table td { + border: 1px solid #ddd; + padding: 6px 12px; + text-align: left; + white-space: nowrap; +} + +.tpl-table tr:nth-child(even) { + background-color: #a6a6a6; +} + +.tpl-table th { + padding-top: 8px; + padding-bottom: 8px; + background-color: #a6a6a6; + color: #333; + font-weight: normal; +} + +.tpl-toggle-button { + display: inline-block; + padding: 0.3em 0.5em; + font-size: 14px; +} + +.toggle-button:hover { + background-color: #e0e0e0; +} + +.tpl-row { + cursor: pointer; +} + +.tpl-row:hover td { + background-color: #d1d1d1 !important; +} + +/* TPL Modal */ +.modal { + display: none; + position: fixed; + z-index: 1000; + left: 0; + top: 0; + width: 100%; + height: 100%; + background-color: rgba(0, 0, 0, 0.5); +} + +.modal-content { + background-color: white; + margin: 10% auto; + padding: 20px; + border: 1px solid #888; + width: 60%; + max-width: 600px; + box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3); +} + +.close { + color: #aaa; + float: right; + font-size: 28px; + font-weight: bold; + cursor: pointer; +} + +.close:hover, .close:focus { + color: black; + text-decoration: none; + cursor: pointer; +} + +.modal h2 { + margin-top: 0; + color: #333; +} + +.modal p { + margin: 10px 0; + font-size: 14px; + color: #555; +} + +table.tablesorter { + width: 100%; + margin: 20px 0; + border-collapse: collapse; + background-color: #f0f0f0; + color: #333; + font-family: Arial, sans-serif; +} + +table.tablesorter thead th { + background-color: #d9d9d9; + color: #333; + font-weight: bold; + padding: 10px; + border: 1px solid #ccc; + text-align: left; + cursor: pointer; +} + +table.tablesorter thead th.tablesorter-headerAsc { + background-repeat: no-repeat; + background-position: right center; + padding-right: 20px; +} + +table.tablesorter thead th.tablesorter-headerDesc { + background-repeat: no-repeat; + background-position: right center; + padding-right: 20px; +} + +table.tablesorter tbody tr:nth-child(odd) td { + background-color: #e6e6e6; +} + +table.tablesorter tbody tr:nth-child(even) td { + background-color: #f0f0f0; +} + +table.tablesorter tbody td { + padding: 8px; + border: 1px solid #ccc; + text-align: left; +} \ No newline at end of file diff --git a/Maintenance/test_handling/to_zipped_format b/Maintenance/test_handling/to_zipped_format index fdf62712b02..60c98ce2432 100755 --- a/Maintenance/test_handling/to_zipped_format +++ b/Maintenance/test_handling/to_zipped_format @@ -51,7 +51,7 @@ sub reformat_results($) $_ = $line; open (PLATFORM_INFO,">${platform}.info") or return; open (PLATFORM_NEW_RESULTS,">${platform}.new_results") or return; - my ($CGAL_VERSION,$LEDA_VERSION,$COMPILER,$TESTER_NAME,$TESTER_ADDRESS,$GMP,$MPFR,$ZLIB,$OPENGL,$BOOST,$QT,$CMAKE) = ("-","-","-","-","-","-","-","-","-","-","-","-","-","no"); + my ($CGAL_VERSION,$LEDA_VERSION,$COMPILER,$TESTER_NAME,$TESTER_ADDRESS,$GMP,$MPFR,$ZLIB,$OPENGL,$BOOST,$QT,$CMAKE,$TPL) = ("-","-","-","-","-","-","-","-","-","-","-","no","TPL:"); my ($LDFLAGS,$CXXFLAGS) = ("", ""); while (! /^------/) { if(/^\s*$/) { @@ -117,7 +117,7 @@ sub reformat_results($) # if (/BOOST_BIMAP_VERSION = '([^']+)'/) { # $BOOST="$BOOST+bimap"; # } - if (/USING +CXXFLAGS = '([^']*)'/) { + if (/USING +CXXFLAGS = '([^']*)'/ && !$CXXFLAGS) { $CXXFLAGS="$CXXFLAGS $1"; } if (/USING +LDFLAGS = '([^']*)'/) { @@ -132,6 +132,9 @@ sub reformat_results($) # print PLATFORM_NEW_RESULTS $_; # last; # } + if (/^-- Third-party library (.+)$/) { + $TPL = "$TPL $1,"; + } NEXT: if(! ($_= )) { # should never happen!! last; @@ -154,6 +157,7 @@ $QT $LEDA_VERSION $CXXFLAGS $LDFLAGS +$TPL EOF close(PLATFORM_INFO); close(PLATFORM_RESULTS); diff --git a/Matrix_search/doc/Matrix_search/Matrix_search.txt b/Matrix_search/doc/Matrix_search/Matrix_search.txt index 268c96cf716..002c6110c97 100644 --- a/Matrix_search/doc/Matrix_search/Matrix_search.txt +++ b/Matrix_search/doc/Matrix_search/Matrix_search.txt @@ -10,7 +10,7 @@ namespace CGAL { `monotone_matrix_search()` and `sorted_matrix_search()` are techniques that deal with the problem of efficiently finding largest entries in matrices with certain structural properties. Many -concrete problems can be modelled as matrix search problems, and for +concrete problems can be modeled as matrix search problems, and for some of them we provide explicit solutions that allow you to solve them without knowing about the matrix search technique. Examples are, the computation of all furthest neighbors for the vertices of a convex diff --git a/Mesh_2/include/CGAL/Delaunay_mesh_size_criteria_2.h b/Mesh_2/include/CGAL/Delaunay_mesh_size_criteria_2.h index eb3bb083b00..adf57dfe194 100644 --- a/Mesh_2/include/CGAL/Delaunay_mesh_size_criteria_2.h +++ b/Mesh_2/include/CGAL/Delaunay_mesh_size_criteria_2.h @@ -58,7 +58,7 @@ public: const double& size() const { return second; } const double& sine() const { return first; } - // q1 #include #include -#include #include #include diff --git a/Mesh_3/benchmark/Mesh_3/Charting/run_benchmark.py b/Mesh_3/benchmark/Mesh_3/Charting/run_benchmark.py index de6721d43fa..b03c7d27934 100755 --- a/Mesh_3/benchmark/Mesh_3/Charting/run_benchmark.py +++ b/Mesh_3/benchmark/Mesh_3/Charting/run_benchmark.py @@ -158,7 +158,7 @@ def main(argv): cell_scan_time = parse_xml_file(xml_filename, "Cells_scan_time") cell_refine_time = parse_xml_file(xml_filename, "Cells_refine_time") - # Optimisation + # Optimization lloyd_optim_time = parse_xml_file(xml_filename, "Lloyd_optim_time") odt_optim_time = parse_xml_file(xml_filename, "Odt_optim_time") perturber_optim_time = parse_xml_file(xml_filename, "Perturber_optim_time") diff --git a/Mesh_3/doc/Mesh_3/examples.txt b/Mesh_3/doc/Mesh_3/examples.txt index 7f9cb5dc94f..4b853a9847b 100644 --- a/Mesh_3/doc/Mesh_3/examples.txt +++ b/Mesh_3/doc/Mesh_3/examples.txt @@ -7,6 +7,7 @@ \example Mesh_3/mesh_3D_image_with_detection_of_features.cpp \example Mesh_3/mesh_3D_image_with_input_features.cpp \example Mesh_3/mesh_3D_weighted_image.cpp +\example Mesh_3/mesh_3D_weighted_image_with_detection_of_features.cpp \example Mesh_3/random_labeled_image.h \example CGAL/Mesh_3/initialize_triangulation_from_gray_image.h \example CGAL/Mesh_3/initialize_triangulation_from_labeled_image.h diff --git a/Mesh_3/examples/Mesh_3/CMakeLists.txt b/Mesh_3/examples/Mesh_3/CMakeLists.txt index 0202c1fd52b..f259e406cc4 100644 --- a/Mesh_3/examples/Mesh_3/CMakeLists.txt +++ b/Mesh_3/examples/Mesh_3/CMakeLists.txt @@ -26,19 +26,11 @@ if(NOT TARGET CGAL::Eigen3_support) return() endif() -find_package(VTK QUIET COMPONENTS vtkImagingGeneral vtkIOImage NO_MODULE) +find_package(VTK 9.0 + COMPONENTS ImagingGeneral IOImage + QUIET) if(VTK_FOUND) - if(VTK_USE_FILE) - include(${VTK_USE_FILE}) - endif() - if("${VTK_VERSION_MAJOR}" GREATER "5" OR VTK_VERSION VERSION_GREATER 5) - message(STATUS "VTK found") - if(TARGET VTK::IOImage) - set(VTK_LIBRARIES VTK::ImagingGeneral VTK::IOImage) - endif() - else() - message(STATUS "VTK version 6.0 or greater is required") - endif() + message(STATUS "VTK ${VTK_VERSION} found ${VTK_LIBRARIES}") else() message(STATUS "VTK was not found") endif() @@ -123,13 +115,12 @@ create_single_source_cgal_program("mesh_polyhedral_complex_sm.cpp") target_link_libraries(mesh_polyhedral_complex_sm PUBLIC CGAL::Eigen3_support) if(TARGET CGAL::CGAL_ImageIO) - if(VTK_FOUND AND ("${VTK_VERSION_MAJOR}" GREATER "5" OR VTK_VERSION - VERSION_GREATER 5)) + if(VTK_FOUND) create_single_source_cgal_program("mesh_3D_gray_vtk_image.cpp") - target_link_libraries( - mesh_3D_gray_vtk_image - PUBLIC CGAL::Eigen3_support CGAL::CGAL CGAL::CGAL_ImageIO ${VTK_LIBRARIES}) - cgal_add_test(mesh_3D_gray_vtk_image) + target_link_libraries(mesh_3D_gray_vtk_image + PUBLIC CGAL::Eigen3_support + CGAL::CGAL_ImageIO + PRIVATE ${VTK_LIBRARIES}) add_to_cached_list(CGAL_EXECUTABLE_TARGETS mesh_3D_gray_vtk_image) endif() diff --git a/Mesh_3/examples/Mesh_3/mesh_3D_weighted_image_with_detection_of_features.cpp b/Mesh_3/examples/Mesh_3/mesh_3D_weighted_image_with_detection_of_features.cpp index e9f8d339ab9..9d9033a6909 100644 --- a/Mesh_3/examples/Mesh_3/mesh_3D_weighted_image_with_detection_of_features.cpp +++ b/Mesh_3/examples/Mesh_3/mesh_3D_weighted_image_with_detection_of_features.cpp @@ -1,6 +1,3 @@ -#define CGAL_MESH_3_WEIGHTED_IMAGES_DEBUG -#define CGAL_MESH_3_VERBOSE 1 - #include #include @@ -23,18 +20,17 @@ using Mesh_domain = CGAL::Mesh_domain_with_polyline_features_3; /// [Domain definition] #ifdef CGAL_CONCURRENT_MESH_3 -typedef CGAL::Parallel_tag Concurrency_tag; +using Concurrency_tag = CGAL::Parallel_tag; #else -typedef CGAL::Sequential_tag Concurrency_tag; +using Concurrency_tag = CGAL::Sequential_tag; #endif // Triangulation -typedef CGAL::Mesh_triangulation_3::type Tr; - -typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; +using Tr = CGAL::Mesh_triangulation_3::type; +using C3t3 = CGAL::Mesh_complex_3_in_triangulation_3; // Criteria -typedef CGAL::Mesh_criteria_3 Mesh_criteria; +using Mesh_criteria = CGAL::Mesh_criteria_3; // To avoid verbose function and named parameters call using namespace CGAL::parameters; diff --git a/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h b/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h index ec47da8542d..019716cb1ba 100644 --- a/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h +++ b/Mesh_3/include/CGAL/Labeled_mesh_domain_3.h @@ -1097,7 +1097,7 @@ public: Surface_patch operator()(const Point_3& a, const Point_3& b) const { // If f(a) != f(b), then [a,b] intersects some surface. Here we consider - // [a,b] intersects surface_patch labelled (or ). + // [a,b] intersects surface_patch labeled (or ). // It may be false, further rafinement will improve precision const Subdomain_index value_a = r_domain_.function_(a); const Subdomain_index value_b = r_domain_.function_(b); diff --git a/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h b/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h index 4a0e3f131de..e84e7dd933f 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h +++ b/Mesh_3/include/CGAL/Mesh_3/Protect_edges_sizing_field.h @@ -152,7 +152,7 @@ public: Protect_edges_sizing_field(C3T3& c3t3, const MeshDomain& domain, SizingFunction size=SizingFunction(), - const FT minimal_size = FT(-1), + const FT minimal_size = FT(0), const Distance_Function edge_distance = Distance_Function(), const std::size_t maximal_number_of_vertices = 0, Mesh_error_code* error_code = 0 @@ -273,8 +273,7 @@ private: /// Returns `true` if the edge `(va,vb)` is a not good enough approximation /// of its feature. - bool approx_is_too_large(const Vertex_handle& va, - const Vertex_handle& vb, + bool approx_is_too_large(const Edge& e, const bool is_edge_in_complex) const; /// Returns `true` if the balls of `va` and `vb` intersect. @@ -458,10 +457,12 @@ private: dim = -1 - dim; const FT s = field(p, dim, index); - if(s <= FT(0)) { + if(s < minimal_size_) + { std::stringstream msg; msg.precision(17); - msg << "Error: the field is null at "; + msg << "Error: the field is smaller than minimal size (" + << minimal_size_ << ") at "; if(dim == 0) msg << "corner ("; else msg << "point ("; msg << p << ")"; @@ -493,7 +494,7 @@ private: bool use_minimal_size() const { - return minimal_size_ != FT(-1); + return minimal_size_ != FT(0); } Weight minimal_weight() const { @@ -645,7 +646,10 @@ insert_corners() #endif // Get weight (the ball radius is given by the 'query_size' function) - FT w = CGAL::square(query_size(p, 0, p_index)); + const FT query_weight = CGAL::square(query_size(p, 0, p_index)); + FT w = use_minimal_size() + ? (std::min)(minimal_weight_, query_weight) + : query_weight; #if CGAL_MESH_3_PROTECTION_DEBUG & 1 std::cerr << "Weight from sizing field: " << w << std::endl; @@ -716,7 +720,10 @@ insert_point(const Bare_point& p, const Weight& w, int dim, const Index& index, typename GT::Construct_weighted_point_3 cwp = c3t3_.triangulation().geom_traits().construct_weighted_point_3_object(); - const Weighted_point wp = cwp(p,w*weight_modifier); + const FT wwm = use_minimal_size() + ? (std::max)(w * weight_modifier, minimal_weight()) + : w * weight_modifier; + const Weighted_point wp = cwp(p, wwm); typename Tr::Locate_type lt; int li, lj; @@ -734,7 +741,7 @@ insert_point(const Bare_point& p, const Weight& w, int dim, const Index& index, std::cerr << "SPECIAL "; std::cerr << "protecting ball "; if(v == Vertex_handle()) - std::cerr << cwp(p,w*weight_modifier); + std::cerr << cwp(p, wwm); else std::cerr << disp_vert(v); @@ -860,13 +867,11 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index, std::back_inserter(cells_in_conflicts), CGAL::Emptyset_iterator()); - for(typename std::vector::const_iterator - it = cells_in_conflicts.begin(), - end = cells_in_conflicts.end(); it != end; ++it) + for(Cell_handle cit : cells_in_conflicts) { for(int i=0, d=tr.dimension(); i<=d; ++i) { - const Vertex_handle v = (*it)->vertex(i); + const Vertex_handle v = cit->vertex(i); if(c3t3_.triangulation().is_infinite(v)) continue; if(!vertices_in_conflict_zone_set.insert(v).second) @@ -1023,21 +1028,20 @@ insert_balls_on_edges() domain_.get_curves(std::back_inserter(input_features)); // Iterate on edges - for ( typename Input_features::iterator fit = input_features.begin(), - end = input_features.end() ; fit != end ; ++fit ) + for (const Feature_tuple& ft : input_features) { if(forced_stop()) break; - const Curve_index& curve_index = std::get<0>(*fit); + const Curve_index& curve_index = std::get<0>(ft); if ( ! is_treated(curve_index) ) { #if CGAL_MESH_3_PROTECTION_DEBUG & 1 std::cerr << "\n** treat curve #" << curve_index << std::endl; #endif - const Bare_point& p = std::get<1>(*fit).first; - const Bare_point& q = std::get<2>(*fit).first; + const Bare_point& p = std::get<1>(ft).first; + const Bare_point& q = std::get<2>(ft).first; - const Index& p_index = std::get<1>(*fit).second; - const Index& q_index = std::get<2>(*fit).second; + const Index& p_index = std::get<1>(ft).second; + const Index& q_index = std::get<2>(ft).second; Vertex_handle vp,vq; if ( ! domain_.is_loop(curve_index) ) @@ -1178,12 +1182,12 @@ insert_balls(const Vertex_handle& vp, const Weighted_point& vp_wp = c3t3_.triangulation().point(vp); #if ! defined(CGAL_NO_PRECONDITIONS) - if(sp <= 0) { - std::stringstream msg;; + if(sp < minimal_size_) { + std::stringstream msg; msg.precision(17); - msg << "Error: the mesh sizing field is null at point ("; - msg << cp(vp_wp) << ")!"; - CGAL_precondition_msg(sp > 0, msg.str().c_str()); + msg << "Error: the mesh sizing field is smaller than minimal size "; + msg << " at point (" << cp(vp_wp) << ")!"; + CGAL_precondition_msg(sp > minimal_size_, msg.str().c_str()); } #endif // ! CGAL_NO_PRECONDITIONS @@ -1428,7 +1432,7 @@ refine_balls() if( // topology condition non_adjacent_but_intersect(va, vb, is_edge_in_complex) // approximation condition - || (use_distance_field() && approx_is_too_large(va, vb, is_edge_in_complex))) + || (use_distance_field() && approx_is_too_large(*eit, is_edge_in_complex))) { using CGAL::Mesh_3::internal::distance_divisor; @@ -1480,14 +1484,11 @@ refine_balls() new_sizes.clear(); // Update size of balls - for ( typename std::vector >::iterator - it = new_sizes_copy.begin(), - end = new_sizes_copy.end(); - it != end ; ++it ) + for (const std::pair& it : new_sizes_copy) { if(forced_stop()) break; - const Vertex_handle v = it->first; - const FT new_size = it->second; + const Vertex_handle v = it.first; + const FT new_size = it.second; // Set size of the ball to new value if(use_minimal_size() && new_size < minimal_size_) { if(!is_special(v)) { @@ -1557,34 +1558,27 @@ do_balls_intersect(const Vertex_handle& va, const Vertex_handle& vb) const template bool Protect_edges_sizing_field:: -approx_is_too_large(const Vertex_handle& va, const Vertex_handle& vb, const bool is_edge_in_complex) const +approx_is_too_large(const Edge& e, const bool is_edge_in_complex) const { if ( ! is_edge_in_complex ) - { return false; - } - typedef typename Kernel::Point_3 Point_3; - Curve_index curve_index = domain_.curve_index((va->in_dimension() < vb->in_dimension()) ? vb->index() : va->index()); + const Bare_point& pa = e.first->vertex(e.second)->point().point(); + const Bare_point& pb = e.first->vertex(e.third)->point().point(); - const Point_3& pa = va->point().point(); - const Point_3& pb = vb->point().point(); - const Point_3& segment_middle = CGAL::midpoint(pa, pb); - // Obtain the geodesic middle point - FT signed_geodesic_distance = domain_.signed_geodesic_distance(pa, pb, curve_index); - Point_3 geodesic_middle; - if (signed_geodesic_distance >= FT(0)) - { - geodesic_middle = domain_.construct_point_on_curve(pa, curve_index, signed_geodesic_distance / 2); - } - else - { - geodesic_middle = domain_.construct_point_on_curve(pb, curve_index, -signed_geodesic_distance / 2); - } - // Compare distance to the parameter's distance - FT squared_evaluated_distance = CGAL::squared_distance(segment_middle, geodesic_middle); - FT segment_middle_edge_distance = query_distance(segment_middle, 1, curve_index); - return squared_evaluated_distance > CGAL::square(segment_middle_edge_distance); + // Construct the geodesic middle point + const Curve_index curve_index = c3t3_.curve_index(e); + const FT signed_geodesic_distance = domain_.signed_geodesic_distance(pa, pb, curve_index); + const Bare_point geodesic_middle = (signed_geodesic_distance >= FT(0)) + ? domain_.construct_point_on_curve(pa, curve_index, signed_geodesic_distance / 2) + : domain_.construct_point_on_curve(pb, curve_index, -signed_geodesic_distance / 2); + + const Bare_point edge_middle = CGAL::midpoint(pa, pb); + const FT squared_evaluated_distance = CGAL::squared_distance(edge_middle, geodesic_middle); + + // Compare distance to the distance field from criteria + const FT max_distance_to_curve = query_distance(edge_middle, 1, curve_index); + return squared_evaluated_distance > CGAL::square(max_distance_to_curve); } template diff --git a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder_cell_attributes_traits.h b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder_cell_attributes_traits.h index 3bb1e91e2d4..6845cb8a4ba 100644 --- a/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder_cell_attributes_traits.h +++ b/Mesh_3/include/CGAL/Mesh_3/Slivers_exuder_cell_attributes_traits.h @@ -59,7 +59,7 @@ struct Slivers_ex_att_t_aux { return c->slivers_exuder_restore_attributes(attr); } -}; // end partial specialisation Slivers_ex_att_t_aux +}; // end partial specialization Slivers_ex_att_t_aux template struct Slivers_exuder_cell_attributes_traits diff --git a/Mesh_3/include/CGAL/Mesh_3/config.h b/Mesh_3/include/CGAL/Mesh_3/config.h index cc2e5187f9b..3fd66c2f866 100644 --- a/Mesh_3/include/CGAL/Mesh_3/config.h +++ b/Mesh_3/include/CGAL/Mesh_3/config.h @@ -18,7 +18,7 @@ //#define CGAL_MESH_3_VERBOSE 1 -// Use optimisations of Mesh_3 +// Use optimizations of Mesh_3 # define CGAL_CONSTRUCT_INTRUSIVE_LIST_RANGE_CONSTRUCTOR 1 # define CGAL_MESH_3_NEW_GET_FACETS 1 # define CGAL_MESH_3_GET_FACETS_USING_INTRUSIVE_LIST 1 diff --git a/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h b/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h index 61eb0682d83..ddb1ba1109f 100644 --- a/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h +++ b/Mesh_3/include/CGAL/Mesh_domain_with_polyline_features_3.h @@ -252,8 +252,8 @@ public: : (- negative_distance); } else { return (pit <= qit) - ? curve_segment_length(p, q, CGAL::POSITIVE) - : ( - curve_segment_length(p, q, CGAL::NEGATIVE) ); + ? curve_segment_length(p, q, CGAL::POSITIVE, pit, qit) + : ( - curve_segment_length(p, q, CGAL::NEGATIVE, pit, qit) ); } } diff --git a/Mesh_3/include/CGAL/Mesh_edge_criteria_3.h b/Mesh_3/include/CGAL/Mesh_edge_criteria_3.h index 8d6215cd512..f743eb3f0fa 100644 --- a/Mesh_3/include/CGAL/Mesh_edge_criteria_3.h +++ b/Mesh_3/include/CGAL/Mesh_edge_criteria_3.h @@ -177,7 +177,13 @@ public: /// Returns size of tuple (p,dim,index) FT sizing_field(const Point_3& p, const int dim, const Index& index) const - { return (*p_size_)(p,dim,index); } + { + const FT s = (*p_size_)(p, dim, index); + if (min_length_bound_ == FT(0)) + return s; + else + return (std::max)(s, min_length_bound_); + } FT distance_field(const Point_3& p, const int dim, const Index& index) const { diff --git a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_node_with_join.h b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_node_with_join.h index 0c828665cc2..27a3bd4679d 100644 --- a/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_node_with_join.h +++ b/Minkowski_sum_2/include/CGAL/Minkowski_sum_2/AABB_node_with_join.h @@ -65,7 +65,7 @@ public: /** * @brief General traversal query * @param query the query - * @param traits the traversal traits that define the traversal behaviour + * @param traits the traversal traits that define the traversal behavior * @param nb_primitives the number of primitive * * General traversal query. The traits class allows using it for the various @@ -79,7 +79,7 @@ public: /** * @param other_node root node of a tree which we want to traverse in parallel - * @param traits the traversal traits that define the traversal behaviour + * @param traits the traversal traits that define the traversal behavior * @param nb_primitives the number of primitives in this tree * @param nb_primitives_other the number of primitives in the other tree * @param first_stationary if true, the other_node is the translatable tree's root diff --git a/Nef_2/include/CGAL/Nef_2/PM_point_locator.h b/Nef_2/include/CGAL/Nef_2/PM_point_locator.h index ed10484d574..7777ff293db 100644 --- a/Nef_2/include/CGAL/Nef_2/PM_point_locator.h +++ b/Nef_2/include/CGAL/Nef_2/PM_point_locator.h @@ -536,7 +536,7 @@ protected: The efficiency of this point location module is mostly based on heuristics. Therefore worst case bounds are not very expressive. The query operations take up to linear time for subsequent query - operations though they are better in practise. They trigger a one-time + operations though they are better in practice. They trigger a one-time initialization which needs worst case $O(n^2)$ time though runtime tests often show subquadratic results. The necessary space for the query structure is subsumed in the storage space $O(n)$ of the input diff --git a/Nef_2/include/CGAL/Nef_2/gen_point_location.h b/Nef_2/include/CGAL/Nef_2/gen_point_location.h index 1430b785ae0..622eb6b93a3 100644 --- a/Nef_2/include/CGAL/Nef_2/gen_point_location.h +++ b/Nef_2/include/CGAL/Nef_2/gen_point_location.h @@ -320,7 +320,7 @@ class PointLocator { If the ray does not intersect any node or edge of |G|, then |nil| is returned.\\ The class |\Mtype| is generic, it is parameterized with a traits class - |PLocTraits| which widely controls its behaviour. + |PLocTraits| which widely controls its behavior. The traits may even change the return type of a query and its semantics. There are predined traits classes for the LEDA graph types, which are described below in a separate section. diff --git a/Nef_3/doc/Nef_3/Nef_3.txt b/Nef_3/doc/Nef_3/Nef_3.txt index a19fce2c522..d205dd42a11 100644 --- a/Nef_3/doc/Nef_3/Nef_3.txt +++ b/Nef_3/doc/Nef_3/Nef_3.txt @@ -420,7 +420,7 @@ the symbolical value, large but finite, for the size of the infimaximal box. \subsection Nef_3DrawNefPolyhedron Draw a Nef Polyhedron -A nef polyhedron can be visualised by calling the \link PkgDrawNef3 CGAL::draw() \endlink function as shown in the following example. This function opens a new window showing the given Nef Polyhedron. +A nef polyhedron can be visualized by calling the \link PkgDrawNef3 CGAL::draw() \endlink function as shown in the following example. This function opens a new window showing the given Nef Polyhedron. \cgalExample{Nef_3/draw_nef_3.cpp} diff --git a/Nef_3/include/CGAL/Nef_polyhedron_3.h b/Nef_3/include/CGAL/Nef_polyhedron_3.h index 74bb56ba885..bb41e3417a3 100644 --- a/Nef_3/include/CGAL/Nef_polyhedron_3.h +++ b/Nef_3/include/CGAL/Nef_polyhedron_3.h @@ -901,10 +901,11 @@ protected: Unique_hash_map& omit_vertex; int nov, nof; + bool hh; public: Find_holes(Unique_hash_map& omit_vertex_) - : omit_vertex(omit_vertex_), nov(0), nof(0) {} + : omit_vertex(omit_vertex_), nov(0), nof(0), hh(false) {} void visit(Halffacet_const_handle f) { ++nof; @@ -917,10 +918,11 @@ protected: CGAL_For_all(sfc, send) { omit_vertex[sfc->source()->source()] = true; --nov; + hh=true; } } else if(fc.is_shalfloop()) { SHalfloop_const_handle sl(fc); - omit_vertex[sl->incident_sface()->center_vertex()]; + omit_vertex[sl->incident_sface()->center_vertex()] = true; --nov; } else CGAL_error_msg( "wrong handle type"); @@ -940,6 +942,63 @@ protected: int number_of_facets() const { return nof; } + + bool holes_detected() const { + return hh; + } + }; + + class Nested_holes { + + Unique_hash_map& omit_vertex; + int norv, nof; + + public: + Nested_holes(Unique_hash_map& omit_vertex_) + : omit_vertex(omit_vertex_), norv(0), nof(0) {} + + void visit(Halffacet_const_handle f) { + Halffacet_cycle_const_iterator fc = f->facet_cycles_begin(); + CGAL_assertion(fc.is_shalfedge()); + + SHalfedge_around_facet_const_circulator sfc(fc), send(sfc); + bool all_in=true; + bool all_out=true; + CGAL_For_all(sfc, send) { + if (omit_vertex[sfc->source()->source()]) + all_in=false; + else + all_out=false; + } + if (!all_in && !all_out) + { + SHalfedge_around_facet_const_circulator sfc(fc), send(sfc); + ++nof; + CGAL_For_all(sfc, send) { + if (!omit_vertex[sfc->source()->source()]) + { + omit_vertex[sfc->source()->source()]=true; + ++norv; + } + } + } + if (all_in) + ++nof; + } + + void visit(Vertex_const_handle) {} + void visit(SFace_const_handle) {} + void visit(Halfedge_const_handle) {} + void visit(SHalfedge_const_handle) {} + void visit(SHalfloop_const_handle) {} + + int number_of_removed_vertices() const { + return norv; + } + + int number_of_facets() const { + return nof; + } }; class Add_vertices { @@ -998,14 +1057,19 @@ protected: se = SHalfedge_const_handle(fc); CGAL_assertion(se!=0); if(omit_vertex[se->source()->source()]) return; - B.begin_facet(); + SHalfedge_around_facet_const_circulator hc_start(se); SHalfedge_around_facet_const_circulator hc_end(hc_start); + std::vector vids; CGAL_For_all(hc_start,hc_end) { - CGAL_NEF_TRACEN(" add vertex " << hc_start->source()->center_vertex()->point()); - B.add_vertex_to_facet(VI[hc_start->source()->center_vertex()]); + if (omit_vertex[hc_start->source()->center_vertex()]) + { + std::cout << "issue with " << se->source()->source()->point() << "\n"; + return; + } + vids.push_back(VI[hc_start->source()->center_vertex()]); } - B.end_facet(); + B.add_facet (vids.begin(), vids.end()); } void visit(SFace_const_handle) {} @@ -1030,11 +1094,29 @@ protected: Polyhedron_incremental_builder_3 B(hds, true); + // first mark vertices of holes of each halffacet as omitted. Find_holes F(omit_vertex); scd.visit_shell_objects(sf, F); + std::size_t nb_v = F.number_of_vertices(); + std::size_t nb_f = F.number_of_facets(); - B.begin_surface(F.number_of_vertices(), - F.number_of_facets(), + // then if a halffacet contains a vertex marked as omitted, all its vertices + // must be marked as such + if (F.holes_detected()) + { + while(true) + { + Nested_holes F2(omit_vertex); + scd.visit_shell_objects(sf, F2); + if (F2.number_of_removed_vertices()==0) break; + nb_v-=F2.number_of_removed_vertices(); + nb_f=F2.number_of_facets(); + } + } + + + B.begin_surface(nb_v, + nb_f, F.number_of_vertices()+F.number_of_facets()-2); Add_vertices A(B,omit_vertex, VI); diff --git a/Nef_3/include/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h b/Nef_3/include/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h index a5e5e619120..3ecd0e1b805 100644 --- a/Nef_3/include/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h +++ b/Nef_3/include/CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h @@ -25,6 +25,7 @@ #include #include #include +#include #include @@ -81,6 +82,7 @@ struct Shell_polygons_visitor Vertex_index_map& vertex_indices; PolygonRange& polygons; bool triangulate_all_faces; + CGAL::Generic_handle_map Done; Shell_polygons_visitor(Vertex_index_map& vertex_indices, PolygonRange& polygons, @@ -88,6 +90,7 @@ struct Shell_polygons_visitor : vertex_indices( vertex_indices ) , polygons(polygons) , triangulate_all_faces(triangulate_all_faces) + , Done(false) {} std::size_t get_cycle_length( typename Nef_polyhedron::Halffacet_cycle_const_iterator hfc) const @@ -103,6 +106,14 @@ struct Shell_polygons_visitor void visit(typename Nef_polyhedron::Halffacet_const_handle opposite_facet) { + typename Nef_polyhedron::Halffacet_const_handle twin_facet = opposite_facet->twin(); + + // skip when we have to do with the unbounded volume and a surface with boundaries + if ((twin_facet->incident_volume() == opposite_facet->incident_volume()) && Done[twin_facet]) + return; + + Done[opposite_facet] = true; + bool is_marked=opposite_facet->incident_volume()->mark(); CGAL_assertion(Nef_polyhedron::Infi_box::is_standard(opposite_facet->plane())); @@ -351,18 +362,50 @@ void convert_nef_polyhedron_to_polygon_soup(const Nef_polyhedron& nef, typedef Cartesian_converter Converter; typename Nef_polyhedron::Volume_const_iterator vol_it = nef.volumes_begin(), vol_end = nef.volumes_end(); - if ( Nef_polyhedron::Infi_box::extended_kernel() ) ++vol_it; // skip Infi_box - CGAL_assertion ( vol_it != vol_end ); - ++vol_it; // skip unbounded volume + + if (Nef_polyhedron::Infi_box::extended_kernel()) ++vol_it; // skip Infi_box + + if ( vol_it == vol_end ) return; Converter to_output; + bool handling_unbounded_volume = true; + + auto shell_is_closed = [](typename Nef_polyhedron::Shell_entry_const_iterator sfh) + { + typename Nef_polyhedron::SFace_const_handle sf = sfh; + + typename Nef_polyhedron::SFace_cycle_const_iterator fc; + for(fc = sf->sface_cycles_begin(); fc != sf->sface_cycles_end(); ++fc) + { + if (fc.is_shalfedge() ) { + typename Nef_polyhedron::SHalfedge_const_handle e(fc); + typename Nef_polyhedron::SHalfedge_around_sface_const_circulator ec(e),ee(e); + CGAL_For_all(ec,ee) + { + typename Nef_polyhedron::Halffacet_const_handle f = ec->twin()->facet(); + if (f->incident_volume()==f->twin()->incident_volume()) + return false; + } + } + } + + return true; + }; + for (;vol_it!=vol_end;++vol_it) - nef_to_pm::collect_polygon_mesh_info(points, - polygons, - nef, - vol_it->shells_begin(), - to_output, - triangulate_all_faces); + { + for(auto sit = vol_it->shells_begin(); sit != vol_it->shells_end(); ++sit) + { + if ( (handling_unbounded_volume || sit!=vol_it->shells_begin()) && shell_is_closed(sit)) continue; + nef_to_pm::collect_polygon_mesh_info(points, + polygons, + nef, + sit, + to_output, + triangulate_all_faces); + } + handling_unbounded_volume = false; + } } template diff --git a/Nef_3/test/Nef_3/issue_6423.cpp b/Nef_3/test/Nef_3/issue_6423.cpp new file mode 100644 index 00000000000..441dd0b7939 --- /dev/null +++ b/Nef_3/test/Nef_3/issue_6423.cpp @@ -0,0 +1,45 @@ +#include +#include +#include +#include +#include +#include + +typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; +typedef Kernel::Point_3 Point_3; +typedef CGAL::Surface_mesh SurfaceMesh; +typedef CGAL::Nef_polyhedron_3 NefPolyhedron; + + +int main() +{ + SurfaceMesh surfaceMesh; + SurfaceMesh::Vertex_index v0 = surfaceMesh.add_vertex(Point_3(-1, 0, 0)); + SurfaceMesh::Vertex_index v1 = surfaceMesh.add_vertex(Point_3(1, 0, 0)); + SurfaceMesh::Vertex_index v2 = surfaceMesh.add_vertex(Point_3(0, 1, 0)); + + SurfaceMesh::Vertex_index v3 = surfaceMesh.add_vertex(Point_3(-1, 0, 1)); + SurfaceMesh::Vertex_index v4 = surfaceMesh.add_vertex(Point_3(1, 0, 1)); + SurfaceMesh::Vertex_index v5 = surfaceMesh.add_vertex(Point_3(0, 1, 1)); + + surfaceMesh.add_face(v0, v1, v2); + surfaceMesh.add_face(v3, v4, v5); + + make_tetrahedron(Point_3(-1, 0, 10), + Point_3(1, 0, 10), + Point_3(0, 1, 10), + Point_3(-1, 0, 11), + surfaceMesh); + + std::cout << "Before conversion, number_of_faces: " << surfaceMesh.number_of_faces() << std::endl; + + NefPolyhedron nefPoly(surfaceMesh); + std::cout << "NefPolyhedron, number_of_faces: " << nefPoly.number_of_facets() << std::endl; + SurfaceMesh convertedSurfaceMesh; + CGAL::convert_nef_polyhedron_to_polygon_mesh(nefPoly, convertedSurfaceMesh, true); + std::cout << "After conversion, number_of_faces: " << convertedSurfaceMesh.number_of_faces() << std::endl; + std::ofstream("out.off") << convertedSurfaceMesh; + assert(vertices(convertedSurfaceMesh).size()==10); + assert(faces(convertedSurfaceMesh).size()==6); + return EXIT_SUCCESS; +} diff --git a/Number_types/doc/Number_types/CGAL/Gmpfi.h b/Number_types/doc/Number_types/CGAL/Gmpfi.h index b48623b2212..20836152818 100644 --- a/Number_types/doc/Number_types/CGAL/Gmpfi.h +++ b/Number_types/doc/Number_types/CGAL/Gmpfi.h @@ -26,7 +26,7 @@ All interval operations are performed by the \mpfi library. The class `Gmpfi` is counted, but its members are. The default precision of `Gmpfi` is local to each thread and independent of -the default precision of `Gmpfr` (in contrast to the behaviour of the \mpfi +the default precision of `Gmpfr` (in contrast to the behavior of the \mpfi and \mpfr libraries, which share a default precision). diff --git a/Number_types/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h b/Number_types/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h index 2e416946c20..074c3517ed8 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h +++ b/Number_types/include/CGAL/Sqrt_extension/Algebraic_extension_traits.h @@ -22,7 +22,7 @@ template class Algebraic_extension_traits > { /* needed to 'add up' sqrt_extensions in iterator range such that all roots are collected in order to keep operation time minimal all scalar coeffs - are set to 1 by standardise. + are set to 1 by default. TODO .. find a better name, if you want to. */ template diff --git a/Number_types/include/CGAL/Sqrt_extension/Fraction_traits.h b/Number_types/include/CGAL/Sqrt_extension/Fraction_traits.h index 1f884370c74..73ed329a837 100644 --- a/Number_types/include/CGAL/Sqrt_extension/Fraction_traits.h +++ b/Number_types/include/CGAL/Sqrt_extension/Fraction_traits.h @@ -37,7 +37,7 @@ namespace Intern{ /*! \ingroup CGAL_Sqrt_extension \ingroup CGAL_Fraction_traits_spec - \brief Specialisation of CGAL::Fraction_traits for CGAL::Sqrt_extension. + \brief Specialization of CGAL::Fraction_traits for CGAL::Sqrt_extension. * * Extensions provide suitable specializations of \c CGAL::Fraction_traits. * They are decomposable iff their coefficient type is. diff --git a/Number_types/include/CGAL/boost_mp_type.h b/Number_types/include/CGAL/boost_mp_type.h index cf18678c011..9f21e7ba40f 100644 --- a/Number_types/include/CGAL/boost_mp_type.h +++ b/Number_types/include/CGAL/boost_mp_type.h @@ -301,7 +301,7 @@ namespace Boost_MP_internal { const int64_t msb_num = static_cast(boost::multiprecision::msb(xnum)); const int64_t msb_den = static_cast(boost::multiprecision::msb(xden)); -#if 0 // Optimisation for the case of input that are double +#if 0 // Optimization for the case of input that are double // An alternative strategy would be to convert numerator and denominator to // intervals, then divide. However, this would require setting the rounding // mode (and dividing intervals is not completely free). An important diff --git a/Number_types/include/CGAL/leda_integer.h b/Number_types/include/CGAL/leda_integer.h index eedd073aa18..7d47b953c1c 100644 --- a/Number_types/include/CGAL/leda_integer.h +++ b/Number_types/include/CGAL/leda_integer.h @@ -60,7 +60,7 @@ template <> class Algebraic_structure_traits< leda_integer > CGAL_IMPLICIT_INTEROPERABLE_BINARY_OPERATOR( Type ) }; - // Unfortunately the behaviour of leda has changed here several times + // Unfortunately the behavior of leda has changed here several times // The following Div_mod is invariant under these changes // However, the Div and Mod defined below might be more efficient // TODO: recover Div Mod implementation for all leda versions diff --git a/Number_types/test/Number_types/Interval_nt_new.cpp b/Number_types/test/Number_types/Interval_nt_new.cpp index c2481700c7d..0b4e7b06495 100644 --- a/Number_types/test/Number_types/Interval_nt_new.cpp +++ b/Number_types/test/Number_types/Interval_nt_new.cpp @@ -122,7 +122,7 @@ int main() { CGAL_catch_error((bool)(I<=J),CGAL::Uncertain_conversion_exception&); CGAL_catch_error((bool)(I>=J),CGAL::Uncertain_conversion_exception&); CGAL_catch_error((bool)(J> I),CGAL::Uncertain_conversion_exception&); - CGAL_catch_error((bool)(J> I),CGAL::Uncertain_conversion_exception&); + CGAL_catch_error((bool)(J< I),CGAL::Uncertain_conversion_exception&); CGAL_catch_error((bool)(J>=I),CGAL::Uncertain_conversion_exception&); CGAL_catch_error((bool)(J<=I),CGAL::Uncertain_conversion_exception&); diff --git a/Number_types/test/Number_types/Sqrt_extension.h b/Number_types/test/Number_types/Sqrt_extension.h index 825ba19d252..6bd28362bf4 100644 --- a/Number_types/test/Number_types/Sqrt_extension.h +++ b/Number_types/test/Number_types/Sqrt_extension.h @@ -575,7 +575,7 @@ void test_algebraic_extension_traits(){ typedef CGAL::Sqrt_extension RAT2_EXT; typedef CGAL::Sqrt_extension INT2_EXT; - // normalisation factor + // normalization factor typedef CGAL::Algebraic_extension_traits RAT1_EXT_ANT; typedef CGAL::Algebraic_extension_traits INT1_EXT_ANT; typedef CGAL::Algebraic_extension_traits RAT2_EXT_ANT; diff --git a/Optimisation_basic/package_info/Optimisation_basic/description.txt b/Optimisation_basic/package_info/Optimisation_basic/description.txt index 8516e6ed728..28bb613c998 100644 --- a/Optimisation_basic/package_info/Optimisation_basic/description.txt +++ b/Optimisation_basic/package_info/Optimisation_basic/description.txt @@ -1 +1 @@ -Basic stuff for geometric optimisation +Basic stuff for geometric optimization diff --git a/Orthtree/doc/Orthtree/Orthtree.txt b/Orthtree/doc/Orthtree/Orthtree.txt index eb7b2559b2a..38d979f1aed 100644 --- a/Orthtree/doc/Orthtree/Orthtree.txt +++ b/Orthtree/doc/Orthtree/Orthtree.txt @@ -197,7 +197,7 @@ Figure \cgalFigureRef{Orthtree_traversal_fig} shows in which order nodes are visited depending on the traversal method used. \cgalFigureBegin{Orthtree_traversal_fig, quadtree_traversal.png} -%Quadtree visualized as a graph. Each node is labelled according to the +%Quadtree visualized as a graph. Each node is labeled according to the order in which it is visited by the traversal. When using leaves and level traversals, the quadtree is only partially traversed. \cgalFigureEnd diff --git a/Orthtree/include/CGAL/Orthtree.h b/Orthtree/include/CGAL/Orthtree.h index 9774c6b5398..074d90b8bc4 100644 --- a/Orthtree/include/CGAL/Orthtree.h +++ b/Orthtree/include/CGAL/Orthtree.h @@ -1410,7 +1410,7 @@ public: } void dump_box_to_polylines(const Bbox_2& box, std::ostream& os) const { - // dump in 3D for visualisation + // dump in 3D for visualization os << "5 " << box.xmin() << " " << box.ymin() << " 0 " << box.xmin() << " " << box.ymax() << " 0 " diff --git a/Orthtree/include/CGAL/Orthtree/Traversals.h b/Orthtree/include/CGAL/Orthtree/Traversals.h index acd1db941f6..7e06e798351 100644 --- a/Orthtree/include/CGAL/Orthtree/Traversals.h +++ b/Orthtree/include/CGAL/Orthtree/Traversals.h @@ -143,7 +143,6 @@ public: \tparam Tree an instance of `Orthtree` - All tree nodes at another depth are ignored. If the selected depth is All tree nodes at another depth are ignored. If the selected depth is higher than the maximum depth of the orthtree, no node will be traversed. diff --git a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h index 2d2e3878f82..e50c12ae6f7 100644 --- a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h +++ b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_2.h @@ -469,7 +469,7 @@ public: { return construct_segment(ps[0].first, ps[1].first, ps[0].second, ps[1].second); } - /// Converts the Periodic_triangle pt to a Triagle in \f$R^2\f$. + /// Converts the Periodic_triangle pt to a Triangle in \f$R^2\f$. Triangle triangle(const Periodic_triangle &pt) const { Triangle triang = construct_triangle(pt[0].first, pt[1].first, pt[2].first, @@ -2211,7 +2211,7 @@ Gt, Tds >::insert_first(const Point& p) /// Virtual faces, two per periodic domain Face_handle faces[3][3][2]; - // Initialise vertices: + // initialize vertices: vir_vertices[0][0] = _tds.create_vertex(); vir_vertices[0][0]->set_point(p); _virtual_vertices_reverse[vir_vertices[0][0]] = std::vector(); @@ -2221,7 +2221,7 @@ Gt, Tds >::insert_first(const Point& p) { if ((i != 0) || (j != 0)) { - // Initialise virtual vertices out of the domain for debugging + // initialize virtual vertices out of the domain for debugging vir_vertices[i][j] = _tds.create_vertex(); vir_vertices[i][j]->set_point(p); //+Offset(i,j)); _virtual_vertices[vir_vertices[i][j]] = Virtual_vertex( diff --git a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_dummy_12.h b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_dummy_12.h index 465ad8c83b0..562fc28b8bb 100644 --- a/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_dummy_12.h +++ b/Periodic_2_triangulation_2/include/CGAL/Periodic_2_triangulation_dummy_12.h @@ -25,12 +25,12 @@ Periodic_2_triangulation_2::insert_dummy_points() // 6 faces per row, 4 rows Face_handle faces[24]; - // Initialise vertices: + // initialize vertices: for (int i = 0; i < 4; i++) { for (int j = 0; j < 3; j++) { - // Initialise virtual vertices out of the domain for debugging + // initialize virtual vertices out of the domain for debugging vertices[3 * i + j] = _tds.create_vertex(); Point p(j * (1.0 / 3.0) + i * (1.0 / 6.0), i * (1.0 / 4.0) ); p = Point((p.x() > FT(0.9375) ? (std::max)( p.x() - 1, FT(0) ) : p.x()), diff --git a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h index df3be1a4851..33420371bfc 100644 --- a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h +++ b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/Protect_edges_sizing_field.h @@ -1190,7 +1190,7 @@ Protect_edges_sizing_field:: try_to_move_dummy_vertex(const Vertex_handle dummy_vertex, const Weighted_point& new_position) { - // Insert first to maximise likeliness of success + // Insert first to maximize likeliness of success Vertex_handle new_dummy = insert_dummy_point(new_position); if(!try_to_remove_dummy_vertex(dummy_vertex)) diff --git a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/config.h b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/config.h index dc27a86fe57..4b529afbce7 100644 --- a/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/config.h +++ b/Periodic_3_mesh_3/include/CGAL/Periodic_3_mesh_3/config.h @@ -35,7 +35,7 @@ // memory boolean in the vertex base #define CGAL_PERIODIC_TRIANGULATION_USE_VISITED_VERTEX_BOOLEAN -// Avoid optimisations of Mesh_3 +// Avoid optimizations of Mesh_3 #define CGAL_NO_STRUCTURAL_FILTERING #ifdef CGAL_MESH_3_SIZING_FIELD_INEXACT_LOCATE #undef CGAL_MESH_3_SIZING_FIELD_INEXACT_LOCATE diff --git a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/MainWindow.cpp b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/MainWindow.cpp index f4eb7aeb793..fb49efad8c4 100644 --- a/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/MainWindow.cpp +++ b/Periodic_3_triangulation_3/demo/Periodic_Lloyd_3/MainWindow.cpp @@ -119,7 +119,7 @@ MainWindow::loadPoints() for (int i=0 ; i<8 ; i++) { cx += dom[i].x(); cy += dom[i].y(); - cy += dom[i].y(); + cz += dom[i].z(); } CGAL::qglviewer::Vec center(cx/8.,cy/8.,cz/8.); viewer->setSceneCenter(center); @@ -188,7 +188,7 @@ MainWindow::newPoints(int n) for (int i=0 ; i<8 ; i++) { cx += dom[i].x(); cy += dom[i].y(); - cy += dom[i].y(); + cz += dom[i].z(); } CGAL::qglviewer::Vec center(cx/8.,cy/8.,cz/8.); viewer->setSceneCenter(center); @@ -223,5 +223,3 @@ void MainWindow::help() { tr("Could not start Qt Assistant from %1.").arg(app)); } } - - diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h index 63fb9404469..4dba83f3847 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_regular_triangulation_3.h @@ -931,7 +931,7 @@ public: CGAL_assertion(this->int_to_off(offsets[i])[0] == 0 || this->int_to_off(offsets[i])[0] == 1); CGAL_assertion(this->int_to_off(offsets[i])[1] == 0 || this->int_to_off(offsets[i])[1] == 1); - CGAL_assertion(this->int_to_off(offsets[i])[1] == 0 || this->int_to_off(offsets[i])[1] == 1); + CGAL_assertion(this->int_to_off(offsets[i])[2] == 0 || this->int_to_off(offsets[i])[2] == 1); } c->set_offsets(offsets[0], offsets[1], offsets[2], offsets[3]); diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h index c1001de10c5..5848af0a527 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3.h @@ -2784,7 +2784,7 @@ Periodic_3_triangulation_3::create_initial_triangulation(const Point& p) /// Virtual cells, 6 per periodic instance Cell_handle cells[3][3][3][6]; - // Initialise vertices: + // initialize vertices: vir_vertices[0][0][0] = _tds.create_vertex(); vir_vertices[0][0][0]->set_point(p); virtual_vertices_reverse[vir_vertices[0][0][0]] = std::vector(); @@ -2792,7 +2792,7 @@ Periodic_3_triangulation_3::create_initial_triangulation(const Point& p) for(int j=0; j<_cover[1]; j++) { for(int k=0; k<_cover[2]; k++) { if((i!=0)||(j!=0)||(k!=0)) { - // Initialise virtual vertices out of the domain for debugging + // initialize virtual vertices out of the domain for debugging vir_vertices[i][j][k] = _tds.create_vertex(); vir_vertices[i][j][k]->set_point(p); //+Offset(i,j,k)); diff --git a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_36.h b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_36.h index 097a6016360..a1ce85ef1cb 100644 --- a/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_36.h +++ b/Periodic_3_triangulation_3/include/CGAL/Periodic_3_triangulation_3/internal/Periodic_3_triangulation_dummy_36.h @@ -682,11 +682,11 @@ static const int O[216][4] = { Vertex_handle vertices[36]; Cell_handle cells[216]; - // Initialise vertices: + // initialize vertices: for (int i=0; i<4; i++) { for (int j=0; j<3; j++) { for (int k=0; k<3; k++) { - // Initialise virtual vertices out of the domain for debugging + // initialize virtual vertices out of the domain for debugging vertices[9*i+3*j+k] = _tds.create_vertex(); Point p(k*(1.0/3.0) + i*(1.0/6.0), j*(1.0/3.0) + i*(1.0/6.0), i*(1.0/4.0) ); diff --git a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_count_alpha_periodic_3.h b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_count_alpha_periodic_3.h index 7175cc850cf..8ee0d297273 100644 --- a/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_count_alpha_periodic_3.h +++ b/Periodic_3_triangulation_3/test/Periodic_3_triangulation_3/include/CGAL/_count_alpha_periodic_3.h @@ -264,7 +264,7 @@ test_filtration(AS &A, bool verbose) typename AS::NT alpha; if(verbose) { std::cerr << std::endl; - std::cerr << "Analyse filtration " << std::endl; + std::cerr << "Analyze filtration " << std::endl; } for (; filtre_it != filtration.end(); filtre_it++) { if(assign(vertex, *filtre_it)) { diff --git a/Point_set_3/include/CGAL/Point_set_3.h b/Point_set_3/include/CGAL/Point_set_3.h index cda73643534..3ebbe70f809 100644 --- a/Point_set_3/include/CGAL/Point_set_3.h +++ b/Point_set_3/include/CGAL/Point_set_3.h @@ -161,7 +161,7 @@ public: #ifdef DOXYGEN_RUNNING typedef unspecified_type iterator; ///< Iterator type of the point set with value type `Index` is model of `RandomAccessIterator` - typedef unspecified_type const_iterator; ///< Constant iterator type of the point set with value type `Index` is model of `RandomA.ccessIterator` + typedef unspecified_type const_iterator; ///< Constant iterator type of the point set with value type `Index` is model of `RandomAccessIterator` #else typedef typename Index_map::iterator iterator; ///< Iterator type of the point set typedef typename Index_map::const_iterator const_iterator; ///< Constant iterator type of the point set @@ -245,8 +245,8 @@ public: m_base = ps.m_base; m_indices = this->property_map ("index").value(); m_points = this->property_map ("point").value(); - m_normals = this->property_map ("normal").value(); m_nb_removed = ps.m_nb_removed; + copy_properties(ps); return *this; } @@ -257,7 +257,7 @@ public: m_base = ps.m_base; m_indices = this->property_map ("index").value(); m_points = this->property_map ("point").value(); - m_normals = this->property_map ("normal").value(); + copy_properties(ps); m_nb_removed = ps.m_nb_removed; } /// \endcond diff --git a/Point_set_3/test/Point_set_3/CMakeLists.txt b/Point_set_3/test/Point_set_3/CMakeLists.txt index 264891b55ba..2546c7495a8 100644 --- a/Point_set_3/test/Point_set_3/CMakeLists.txt +++ b/Point_set_3/test/Point_set_3/CMakeLists.txt @@ -14,7 +14,7 @@ create_single_source_cgal_program("issue7996.cpp") #Use LAS #disable if MSVC 2017 -if(NOT MSVC_VERSION OR (MSVC_VERSION GREATER_EQUAL 1919 AND MSVC_VERSION LESS 1910)) +if(NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1919 OR MSVC_VERSION LESS 1910) find_package(LASLIB QUIET) include(CGAL_LASLIB_support) if (TARGET CGAL::LASLIB_support) @@ -23,5 +23,5 @@ if(NOT MSVC_VERSION OR (MSVC_VERSION GREATER_EQUAL 1919 AND MSVC_VERSION LESS 1 message(STATUS "NOTICE: the LAS reader test requires LASlib, and will not be compiled.") endif() else() - message(STATUS "NOTICE: the LAS reader does not work with Visual Studio 2017.") + message(STATUS "NOTICE: the LAS reader does not work with your version of Visual Studio 2017.") endif() diff --git a/Point_set_3/test/Point_set_3/point_set_test.cpp b/Point_set_3/test/Point_set_3/point_set_test.cpp index b745fe6e94e..086feabface 100644 --- a/Point_set_3/test/Point_set_3/point_set_test.cpp +++ b/Point_set_3/test/Point_set_3/point_set_test.cpp @@ -28,6 +28,26 @@ void test (bool expr, const char* msg) ++ nb_success; } +bool copy_and_assignement() +{ + Point_set ps1; + ps1.add_property_map("prop", int(3)); + ps1.add_normal_map(); + Point_set ps2 = ps1; + if (!ps2.has_property_map("prop")) return false; + if (!ps2.has_normal_map()) return false; + Point_set ps3(ps1); + if (!ps3.has_property_map("prop")) return false; + if (!ps3.has_normal_map()) return false; + ps1=Point_set(); + Point_set ps4 = ps1; + if (ps4.has_property_map("prop")) return false; + if (ps4.has_normal_map()) return false; + Point_set ps5(ps1); + if (ps5.has_property_map("prop")) return false; + if (ps5.has_normal_map()) return false; + return true; +} int main (int, char**) { @@ -130,7 +150,9 @@ int main (int, char**) std::unordered_set std_hash; boost::unordered_set boost_hash; + test(copy_and_assignement(), "copy and assignement"); + std::cerr << nb_success << "/" << nb_test << " test(s) succeeded." << std::endl; - return EXIT_SUCCESS; + return nb_success==nb_test ? EXIT_SUCCESS : EXIT_FAILURE; } diff --git a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt index e202d670a22..90aa0cdcbd1 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/examples/Point_set_processing_3/CMakeLists.txt @@ -25,13 +25,9 @@ endif() # Activate concurrency? option(CGAL_ACTIVATE_CONCURRENT_PSP3 "Enable concurrency" OFF) -set(CGAL_libs CGAL::CGAL) if(CGAL_ACTIVATE_CONCURRENT_PSP3 OR "$ENV{CGAL_ACTIVATE_CONCURRENT_PSP3}") find_package(TBB REQUIRED) include(CGAL_TBB_support) - if(TARGET CGAL::TBB_support) - set(CGAL_TBB_target ${CGAL_libs} CGAL::TBB_support) - endif() endif() # Executables that do *not* require EIGEN @@ -54,40 +50,63 @@ foreach( target_link_libraries(${target} PRIVATE ${CGAL_libs}) endforeach() -find_package(LASLIB QUIET) -include(CGAL_LASLIB_support) -if(TARGET CGAL::LASLIB_support) - create_single_source_cgal_program("read_las_example.cpp") - target_link_libraries(read_las_example PRIVATE ${CGAL_libs} CGAL::LASLIB_support) +#disable if MSVC 2017 +if(NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1919 OR MSVC_VERSION LESS 1910) + find_package(LASLIB QUIET) + include(CGAL_LASLIB_support) + if (TARGET CGAL::LASLIB_support) + create_single_source_cgal_program("read_las_example.cpp") + create_single_source_cgal_program("write_las_example.cpp") + target_link_libraries(read_las_example PRIVATE CGAL::LASLIB_support) + target_link_libraries(write_las_example PRIVATE CGAL::LASLIB_support) + else() + message(STATUS "NOTICE : the LAS reader test requires LASlib and will not be compiled.") + endif() else() - message(STATUS "NOTICE: the LAS reader example requires LASlib and will not be compiled.") + message(STATUS "NOTICE: the LAS reader does not work with your version of Visual Studio 2017.") endif() # Use Eigen find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater) include(CGAL_Eigen3_support) if(TARGET CGAL::Eigen3_support) - set(CGAL_libs ${CGAL_libs} CGAL::Eigen3_support) # Executables that require Eigen foreach( target - jet_smoothing_example - normal_estimation + callback_example clustering_example edges_example - callback_example - scale_estimation_example - scale_estimation_2d_example hierarchy_simplification_example - normals_example) + jet_smoothing_example + normal_estimation + normals_example + scale_estimation_example + scale_estimation_2d_example) create_single_source_cgal_program("${target}.cpp") - target_link_libraries(${target} PRIVATE ${CGAL_libs}) + target_link_libraries(${target} PRIVATE CGAL::Eigen3_support) endforeach() + + if (TARGET CGAL::TBB_support) + foreach( + target + callback_example + clustering_example + jet_smoothing_example + normal_estimation + normals_example + scale_estimation_example) + target_link_libraries(${target} PRIVATE CGAL::TBB_support) + endforeach() + endif() + if (TARGET CGAL::Eigen3_support AND TARGET CGAL::LASLIB_support) create_single_source_cgal_program( "orient_scanlines_example.cpp" ) - target_link_libraries(orient_scanlines_example PRIVATE ${CGAL_libs} + target_link_libraries(orient_scanlines_example PRIVATE CGAL::Eigen3_support CGAL::LASLIB_support) + if (TARGET CGAL::TBB_support) + target_link_libraries(orient_scanlines_example PRIVATE CGAL::TBB_support) + endif() endif() # Executables that require libpointmatcher @@ -95,18 +114,25 @@ if(TARGET CGAL::Eigen3_support) include(CGAL_pointmatcher_support) if(TARGET CGAL::pointmatcher_support) create_single_source_cgal_program("registration_with_pointmatcher.cpp") - target_link_libraries(registration_with_pointmatcher PRIVATE ${CGAL_libs} + target_link_libraries(registration_with_pointmatcher PRIVATE CGAL::Eigen3_support CGAL::pointmatcher_support) else() message(STATUS "NOTICE: registration with pointmatcher requires libpointmatcher and will not be compiled.") endif() # Executables that require OpenGR - find_package(OpenGR QUIET) - include(CGAL_OpenGR_support) + if (NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1910) + find_package(OpenGR QUIET) + include(CGAL_OpenGR_support) + message( + STATUS + "NOTICE : OpenGR does not support your compiler, registration_with_OpenGR will not be compiled." + ) + endif() + if(TARGET CGAL::OpenGR_support) create_single_source_cgal_program("registration_with_OpenGR.cpp") - target_link_libraries(registration_with_OpenGR PRIVATE ${CGAL_libs} + target_link_libraries(registration_with_OpenGR PRIVATE CGAL::Eigen3_support CGAL::OpenGR_support) else() message(STATUS "NOTICE: registration_with_OpenGR requires OpenGR, and will not be compiled.") @@ -117,7 +143,7 @@ if(TARGET CGAL::Eigen3_support) TARGET CGAL::OpenGR_support) create_single_source_cgal_program("registration_with_opengr_pointmatcher_pipeline.cpp") target_link_libraries( - registration_with_opengr_pointmatcher_pipeline PRIVATE ${CGAL_libs} + registration_with_opengr_pointmatcher_pipeline PRIVATE CGAL::Eigen3_support CGAL::pointmatcher_support CGAL::OpenGR_support) else() message(STATUS "NOTICE: registration with OpenGR and pointmatcher requires both libpointmatcher and OpenGR, and will not be compiled.") @@ -126,3 +152,15 @@ if(TARGET CGAL::Eigen3_support) else() message(STATUS "NOTICE: Some of the executables in this directory require Eigen 3.1 (or greater), and will not be compiled.") endif() + +if(CGAL_ACTIVATE_CONCURRENT_MESH_3 AND TARGET CGAL::TBB_support) + foreach( + target + average_spacing_example + bilateral_smooth_point_set_example + edge_aware_upsample_point_set_example + remove_outliers_example + wlop_simplify_and_regularize_point_set_example) + target_link_libraries(${target} PRIVATE CGAL::TBB_support) + endforeach() +endif() diff --git a/Point_set_processing_3/examples/Point_set_processing_3/read_las_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/read_las_example.cpp index 11d266a2d5b..b15265bcb5f 100644 --- a/Point_set_processing_3/examples/Point_set_processing_3/read_las_example.cpp +++ b/Point_set_processing_3/examples/Point_set_processing_3/read_las_example.cpp @@ -21,7 +21,7 @@ int main(int argc, char*argv[]) // Reads a .las point set file with normal vectors and colors std::ifstream in(fname, std::ios_base::binary); std::vector points; // store points - if(!CGAL::IO::read_LAS_with_properties(in, std::back_inserter (points), + if (!CGAL::IO::read_LAS_with_properties(in, std::back_inserter(points), CGAL::IO::make_las_point_reader(CGAL::First_of_pair_property_map()), std::make_tuple(CGAL::Second_of_pair_property_map(), CGAL::Construct_array(), diff --git a/Point_set_processing_3/examples/Point_set_processing_3/write_las_example.cpp b/Point_set_processing_3/examples/Point_set_processing_3/write_las_example.cpp new file mode 100644 index 00000000000..200d31cc7e4 --- /dev/null +++ b/Point_set_processing_3/examples/Point_set_processing_3/write_las_example.cpp @@ -0,0 +1,45 @@ +#include + +#include +#include +#include + +#include +#include +#include + +// types +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::FT FT; +typedef Kernel::Point_3 Point; +typedef std::array Color; +typedef std::pair PointWithColor; + +int main(int argc, char*argv[]) +{ + const char* fname = "colored_points.las"; + + std::ofstream os(fname, std::ios::binary); + + std::vector points; // store points + points.push_back(std::make_pair(Point(0, 0, 0), Color{ 65535, 0, 0, 0 })); + points.push_back(std::make_pair(Point(1, 0, 0), Color{ 0, 65535, 0, 0 })); + points.push_back(std::make_pair(Point(0, 1, 0), Color{ 0, 0, 65535, 0 })); + points.push_back(std::make_pair(Point(1, 1, 0), Color{ 0, 65535, 65535, 0 })); + points.push_back(std::make_pair(Point(1, 1, 1), Color{ 65535, 65535, 0, 0 })); + + // Writes a .las point set file with colors + if(!CGAL::IO::write_LAS_with_properties(os, points, + CGAL::IO::make_las_point_writer(CGAL::First_of_pair_property_map()), + std::make_tuple(CGAL::Second_of_pair_property_map(), + CGAL::IO::LAS_property::R(), + CGAL::IO::LAS_property::G(), + CGAL::IO::LAS_property::B(), + CGAL::IO::LAS_property::I()))) + { + std::cerr << "Error: cannot write file " << fname << std::endl; + return EXIT_FAILURE; + } + + return EXIT_SUCCESS; +} diff --git a/Point_set_processing_3/include/CGAL/IO/read_las_points.h b/Point_set_processing_3/include/CGAL/IO/read_las_points.h index ebc1744cc7e..c1dc8453fc9 100644 --- a/Point_set_processing_3/include/CGAL/IO/read_las_points.h +++ b/Point_set_processing_3/include/CGAL/IO/read_las_points.h @@ -43,7 +43,7 @@ # pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif -#define USE_AS_DLL +#define USE_AS_DLL 1 #include #undef USE_AS_DLL @@ -384,7 +384,11 @@ bool read_LAS_with_properties(std::istream& is, if(!is) return false; +#if LAS_TOOLS_VERSION < 240319 LASreaderLAS lasreader; +#else + LASreaderLAS lasreader(nullptr); +#endif lasreader.open(is); while(lasreader.read_point()) diff --git a/Point_set_processing_3/include/CGAL/IO/write_las_points.h b/Point_set_processing_3/include/CGAL/IO/write_las_points.h index 400aed2092a..f3a96c919fd 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_las_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_las_points.h @@ -37,7 +37,7 @@ # pragma GCC diagnostic ignored "-Wstrict-aliasing" #endif -#define USE_AS_DLL +#define USE_AS_DLL 1 #include #include #include @@ -84,41 +84,41 @@ make_las_point_writer(PointMap point_map) namespace internal { namespace LAS { - inline void output_value(LASpoint& r, const unsigned short& v, LAS_property::Intensity&) + inline void output_value(LASpoint& r, const unsigned short& v, const LAS_property::Intensity&) { r.set_intensity(v); } - inline void output_value(LASpoint& r, const unsigned char& v, LAS_property::Return_number&) + inline void output_value(LASpoint& r, const unsigned char& v, const LAS_property::Return_number&) { r.set_return_number(v); } - inline void output_value(LASpoint& r, const unsigned char& v, LAS_property::Number_of_returns&) + inline void output_value(LASpoint& r, const unsigned char& v, const LAS_property::Number_of_returns&) { r.set_number_of_returns(v); } - inline void output_value(LASpoint& r, const unsigned char& v, LAS_property::Scan_direction_flag&) + inline void output_value(LASpoint& r, const unsigned char& v, const LAS_property::Scan_direction_flag&) { r.set_scan_direction_flag(v); } - inline void output_value(LASpoint& r, const unsigned char& v, LAS_property::Edge_of_flight_line&) + inline void output_value(LASpoint& r, const unsigned char& v, const LAS_property::Edge_of_flight_line&) { r.set_edge_of_flight_line(v); } - inline void output_value(LASpoint& r, const unsigned char& v, LAS_property::Classification&) + inline void output_value(LASpoint& r, const unsigned char& v, const LAS_property::Classification&) { r.set_classification(v); } - inline void output_value(LASpoint& r, const unsigned char& v, LAS_property::Synthetic_flag&) + inline void output_value(LASpoint& r, const unsigned char& v, const LAS_property::Synthetic_flag&) { r.set_synthetic_flag(v); } - inline void output_value(LASpoint& r, const unsigned char& v, LAS_property::Keypoint_flag&) + inline void output_value(LASpoint& r, const unsigned char& v, const LAS_property::Keypoint_flag&) { r.set_keypoint_flag(v); } - inline void output_value(LASpoint& r, const unsigned char& v, LAS_property::Withheld_flag&) + inline void output_value(LASpoint& r, const unsigned char& v, const LAS_property::Withheld_flag&) { r.set_withheld_flag(v); } - inline void output_value(LASpoint& r, const float& v, LAS_property::Scan_angle&) + inline void output_value(LASpoint& r, const float& v, const LAS_property::Scan_angle&) { r.set_scan_angle_rank(char(v)); } - inline void output_value(LASpoint& r, const unsigned char& v, LAS_property::User_data&) + inline void output_value(LASpoint& r, const unsigned char& v, const LAS_property::User_data&) { r.set_user_data(v); } - inline void output_value(LASpoint& r, const unsigned short& v, LAS_property::Point_source_ID&) + inline void output_value(LASpoint& r, const unsigned short& v, const LAS_property::Point_source_ID&) { r.set_point_source_ID(v); } - inline void output_value(LASpoint& r, const unsigned int& v, LAS_property::Deleted_flag&) + inline void output_value(LASpoint& r, const unsigned int& v, const LAS_property::Deleted_flag&) { r.set_deleted_flag(v); } - inline void output_value(LASpoint& r, const double& v, LAS_property::GPS_time&) + inline void output_value(LASpoint& r, const double& v, const LAS_property::GPS_time&) { r.set_gps_time(v); } - inline void output_value(LASpoint& r, const unsigned short& v, LAS_property::R&) + inline void output_value(LASpoint& r, const unsigned short& v, const LAS_property::R&) { r.set_R(v); } - inline void output_value(LASpoint& r, const unsigned short& v, LAS_property::G&) + inline void output_value(LASpoint& r, const unsigned short& v, const LAS_property::G&) { r.set_G(v); } - inline void output_value(LASpoint& r, const unsigned short& v, LAS_property::B&) + inline void output_value(LASpoint& r, const unsigned short& v, const LAS_property::B&) { r.set_B(v); } - inline void output_value(LASpoint& r, const unsigned short& v, LAS_property::I&) + inline void output_value(LASpoint& r, const unsigned short& v, const LAS_property::I&) { r.set_I(v); } template @@ -134,6 +134,21 @@ namespace LAS { output_value (point, get(current.first, *it), current.second); } + template + void output_tuple(LASpoint& point, const Value& v, const Tuple& t, std::index_sequence) { + (output_value(point, std::get(v), std::get(t)), ...); + } + + template + void output_properties(LASpoint& point, + ForwardIterator it, + std::tuple&& current) + { + output_tuple(point, get(std::get<0>(current), *it), std::tuple(), std::index_sequence_for{}); + } + template (properties)...); } + template + void output_properties(LASpoint& point, + ForwardIterator it, + std::tuple&& current, + NextPropertyHandler&& next, + PropertyHandler&& ... properties) + { + output_tuple(point, get(std::get<0>(current), *it), std::tuple(), std::index_sequence_for{}); + output_properties(point, it, std::forward(next), + std::forward(properties)...); + } + } // namespace LAS } // namespace internal diff --git a/Point_set_processing_3/include/CGAL/IO/write_off_points.h b/Point_set_processing_3/include/CGAL/IO/write_off_points.h index 941bc16d518..e99a2c90bce 100644 --- a/Point_set_processing_3/include/CGAL/IO/write_off_points.h +++ b/Point_set_processing_3/include/CGAL/IO/write_off_points.h @@ -25,7 +25,6 @@ #include #include -#include #include #include diff --git a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt index 7c13d2912e3..a15b69cad1a 100644 --- a/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt +++ b/Point_set_processing_3/test/Point_set_processing_3/CMakeLists.txt @@ -33,7 +33,7 @@ create_single_source_cgal_program( "structuring_test.cpp" ) #Use LAS #disable if MSVC 2017 -if(NOT MSVC_VERSION OR (MSVC_VERSION GREATER_EQUAL 1919 AND MSVC_VERSION LESS 1910)) +if(NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1919 OR MSVC_VERSION LESS 1910) find_package(LASLIB QUIET) include(CGAL_LASLIB_support) if (TARGET CGAL::LASLIB_support) @@ -43,7 +43,7 @@ if(NOT MSVC_VERSION OR (MSVC_VERSION GREATER_EQUAL 1919 AND MSVC_VERSION LESS 1 message(STATUS "NOTICE: the LAS reader test requires LASlib and will not be compiled.") endif() else() - message(STATUS "NOTICE: the LAS reader does not work with Visual Studio 2017.") + message(STATUS "NOTICE: the LAS reader does not work with your version of Visual Studio 2017.") endif() # Use Eigen diff --git a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt index 6d0b470175d..3c8bc894297 100644 --- a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt +++ b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -18,6 +18,9 @@ if(MSVC) message(STATUS "USING RELEASE EXEFLAGS = '${CMAKE_EXE_LINKER_FLAGS} ${CMAKE_EXE_LINKER_FLAGS_RELEASE}'") endif() +# Activate Parallelism in Mesh_3 +option(CGAL_ACTIVATE_CONCURRENT_MESH_3 "Activate parallelism in Mesh_3" OFF) + # Find Eigen3 (requires 3.1.0 or greater) find_package(Eigen3 3.1.0 QUIET) include(CGAL_Eigen3_support) @@ -25,6 +28,8 @@ if(TARGET CGAL::Eigen3_support) # Executables that require Eigen 3 create_single_source_cgal_program("poisson_reconstruction_example.cpp") target_link_libraries(poisson_reconstruction_example PUBLIC CGAL::Eigen3_support) + create_single_source_cgal_program("poisson_and_parallel_mesh_3.cpp") + target_link_libraries(poisson_and_parallel_mesh_3 PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("poisson_reconstruction.cpp") target_link_libraries(poisson_reconstruction PUBLIC CGAL::Eigen3_support) create_single_source_cgal_program("poisson_reconstruction_function.cpp") @@ -34,3 +39,13 @@ if(TARGET CGAL::Eigen3_support) else() message("NOTICE: The examples require Eigen 3.1 (or greater) will not be compiled.") endif() + +# Use TBB for parallelism +if(CGAL_ACTIVATE_CONCURRENT_MESH_3) + find_package(TBB REQUIRED) + include(CGAL_TBB_support) + if(TARGET CGAL::TBB_support) + add_definitions(-DCGAL_CONCURRENT_MESH_3) + target_link_libraries(poisson_and_parallel_mesh_3 PUBLIC CGAL::TBB_support) + endif()#Find TBB +endif()#Parallelism in Mesh_3 diff --git a/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_and_parallel_mesh_3.cpp b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_and_parallel_mesh_3.cpp new file mode 100644 index 00000000000..a415c23aab8 --- /dev/null +++ b/Poisson_surface_reconstruction_3/examples/Poisson_surface_reconstruction_3/poisson_and_parallel_mesh_3.cpp @@ -0,0 +1,181 @@ +#include + +#include + +#include + +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include + +#include +#include +#include +#include + +// Types +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::FT FT; +typedef Kernel::Point_3 Point; + +typedef Kernel::Vector_3 Vector; +typedef std::pair Point_with_normal; +typedef CGAL::First_of_pair_property_map Point_map; +typedef CGAL::Second_of_pair_property_map Normal_map; +typedef Kernel::Sphere_3 Sphere; +typedef std::vector PointList; +typedef CGAL::Polyhedron_3 Polyhedron; +typedef CGAL::Poisson_reconstruction_function Poisson_reconstruction_function; + +namespace params = CGAL::parameters; + +template +void poisson_reconstruction(const PointSet& points, const char* output) +{ + typedef CGAL::Labeled_mesh_domain_3 Mesh_domain; + typedef typename CGAL::Mesh_triangulation_3::type Tr; + typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; + typedef CGAL::Mesh_criteria_3 Mesh_criteria; + + // Poisson options + FT sm_angle = 20.0; // Min triangle angle in degrees. + FT sm_radius = 1.; // Max triangle size w.r.t. point set average spacing. + FT sm_distance = 0.25; // Surface Approximation error w.r.t. point set average spacing. + + CGAL::Real_timer time; + time.start(); + + CGAL::Real_timer total_time; + total_time.start(); + + // Creates implicit function from the read points using the default solver. + + // Note: this method requires an iterator over points + // + property maps to access each point's position and normal. + Poisson_reconstruction_function function(points.begin(), points.end(), + Point_map(), Normal_map()); + + // Computes the Poisson indicator function f() + // at each vertex of the triangulation. + if(!function.compute_implicit_function()) + { + std::cerr << "compute_implicit_function() failed." << std::endl; + return; + } + + time.stop(); + std::cout << "compute_implicit_function() : " << time.time() << " seconds." << std::endl; + time.reset(); + time.start(); + + // Computes average spacing + FT average_spacing = CGAL::compute_average_spacing + (points, 6 /* knn = 1 ring */, params::point_map(Point_map())); + + time.stop(); + std::cout << "Average spacing : " << time.time() << " seconds." << std::endl; + time.reset(); + time.start(); + + // Gets one point inside the implicit surface + // and computes implicit function bounding sphere radius. + const Sphere bsphere = function.bounding_sphere(); + FT radius = std::sqrt(bsphere.squared_radius()); + + // Defines the implicit surface: requires defining a + // conservative bounding sphere centered at inner point. + FT sm_sphere_radius = 5.0 * radius; + FT sm_dichotomy_error = sm_distance * average_spacing / 1000.0; // Dichotomy error must be << sm_distance + std::cout << "dichotomy error = " << sm_dichotomy_error << std::endl; + std::cout << "sm_dichotomy_error / sm_sphere_radius = " << sm_dichotomy_error / sm_sphere_radius << std::endl; + + time.stop(); + std::cout << "Surface created in " << time.time() << " seconds." << std::endl; + time.reset(); + time.start(); + + // Defines surface mesh generation criteria + Mesh_criteria criteria(params::facet_angle = sm_angle, + params::facet_size = sm_radius * average_spacing, + params::facet_distance = sm_distance * average_spacing); + + Mesh_domain domain = Mesh_domain::create_implicit_mesh_domain(function, bsphere, + params::relative_error_bound(sm_dichotomy_error / sm_sphere_radius)); + + // Generates surface mesh with manifold option + std::cout << "Start meshing..."; + std::cout.flush(); + C3t3 c3t3 = CGAL::make_mesh_3(domain, criteria, + params::no_exude() + .no_perturb() + .manifold_with_boundary()); + + time.stop(); + std::cout << "\nTet mesh created in " << time.time() << " seconds." << std::endl; + time.reset(); + time.start(); + + const auto& tr = c3t3.triangulation(); + if(tr.number_of_vertices() == 0) + { + std::cerr << "Triangulation empty!" << std::endl; + return; + } + + // saves reconstructed surface mesh + Polyhedron output_mesh; + CGAL::facets_in_complex_3_to_triangle_mesh(c3t3, output_mesh); + + time.stop(); + std::cout << "Surface extracted in " << time.time() << " seconds." << std::endl; + time.reset(); + time.start(); + + total_time.stop(); + std::cout << "Total time : " << total_time.time() << " seconds." << std::endl; + + CGAL::IO::write_polygon_mesh(output, output_mesh, params::stream_precision(17)); + std::cout << "File written " << output << std::endl; +} + +int main(int argc, char* argv[]) +{ + const std::string file = (argc > 1) ? std::string(argv[1]) + : CGAL::data_file_path("points_3/kitten.xyz"); + + // Reads the point set file in points[]. + // Note: read_points() requires an iterator over points + // + property maps to access each point's position and normal. + PointList points; + if(!CGAL::IO::read_points(file, std::back_inserter(points), + params::point_map(Point_map()) + .normal_map(Normal_map()))) + { + std::cerr << "Error: cannot read file input file!" << std::endl; + return EXIT_FAILURE; + } + + std::cout << "File " << file << " has been read, " << points.size() << " points." << std::endl; + + std::cout << "\n\n### Sequential mode ###" << std::endl; + poisson_reconstruction(points, "out_sequential.off"); + +#ifdef CGAL_LINKED_WITH_TBB + std::cout << "\n\n### Parallel mode ###" << std::endl; + poisson_reconstruction(points, "out_parallel.off"); +#endif + + return EXIT_SUCCESS; +} diff --git a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_implicit_surface_3.h b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_implicit_surface_3.h index f11648362e9..c6d072cf08c 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_implicit_surface_3.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_implicit_surface_3.h @@ -56,7 +56,7 @@ namespace CGAL { gt.compute_squared_radius_3_object()(bounding_sphere); } - FT operator()(Point p) const + FT operator()(const Point& p) const { return func(p); } @@ -120,7 +120,7 @@ namespace CGAL { public: Poisson_implicit_function_wrapper(Poisson_implicit_function f) : function(f) {} - FT operator()(Point p) const + FT operator()(const Point& p) const { return function(p.x(), p.y(), p.z()); } diff --git a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_mesh_cell_criteria_3.h b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_mesh_cell_criteria_3.h index 4c78d772ce5..513d2be4376 100644 --- a/Poisson_surface_reconstruction_3/include/CGAL/Poisson_mesh_cell_criteria_3.h +++ b/Poisson_surface_reconstruction_3/include/CGAL/Poisson_mesh_cell_criteria_3.h @@ -67,7 +67,7 @@ public: double sq_size() const { return second; } double aspect() const { return first; } - // q1 -#include -#include -#include -#include -#include - #include #include #include + #ifdef CGAL_EIGEN3_ENABLED -#include -#else + #include #endif + #include #include #include @@ -44,9 +38,20 @@ #include #include -#include +#ifdef CGAL_LINKED_WITH_TBB + #include +#endif + #include +#include +#include +#include +#include +#include +#include +#include + /*! \file Poisson_reconstruction_function.h */ @@ -282,11 +287,17 @@ private: // contouring and meshing Point m_sink; // Point with the minimum value of operator() - mutable Cell_hint m_hint; // last cell found = hint for next search + +#ifdef CGAL_LINKED_WITH_TBB + mutable tbb::enumerable_thread_specific m_hint; + Cell_handle& get_hint() const { return m_hint.local(); } +#else + mutable Cell_handle m_hint; + Cell_handle& get_hint() const { return m_hint; } +#endif FT average_spacing; - /// function to be used for the different constructors available that are /// doing the same thing but with default template parameters template special_func(const Point& p) const { - Cell_handle hint = m_hint.get(); - hint = m_tr->locate(p, hint); // no hint when we use hierarchy - m_hint.set(hint); + Cell_handle& hint = get_hint(); + hint = m_tr->locate(p, hint); if(m_tr->is_infinite(hint)) { int i = hint->index(m_tr->infinite_vertex()); @@ -616,9 +626,8 @@ public: */ FT operator()(const Point& p) const { - Cell_handle hint = m_hint.get(); + Cell_handle& hint = get_hint(); hint = m_tr->locate(p, hint); - m_hint.set(hint); if(m_tr->is_infinite(hint)) { int i = hint->index(m_tr->infinite_vertex()); diff --git a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt index 8e56915caca..38eedcb7bb5 100644 --- a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt +++ b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/CMakeLists.txt @@ -31,14 +31,6 @@ if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("compare_mesh_3_vs_Poisson_implicit_surface_3.cpp") target_link_libraries(compare_mesh_3_vs_Poisson_implicit_surface_3 PUBLIC CGAL::Eigen3_support) - find_package(TBB QUIET) - include(CGAL_TBB_support) - if (TBB_FOUND) - create_single_source_cgal_program( "poisson_and_parallel_mesh_3.cpp" ) - target_link_libraries(poisson_and_parallel_mesh_3 PUBLIC CGAL::Eigen3_support CGAL::TBB_support) - else() - message(STATUS "NOTICE: The test 'poisson_and_parallel_mesh_3' requires TBB, and will not be compiled.") - endif() else() message("NOTICE: Tests in this directory require Eigen 3.1 (or greater), and will not be compiled.") endif() diff --git a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_and_parallel_mesh_3.cpp b/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_and_parallel_mesh_3.cpp deleted file mode 100644 index 6e584c7aa44..00000000000 --- a/Poisson_surface_reconstruction_3/test/Poisson_surface_reconstruction_3/poisson_and_parallel_mesh_3.cpp +++ /dev/null @@ -1,78 +0,0 @@ -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -#include -#include -#include -#include -#include - -typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; -typedef Kernel::FT FT; -typedef Kernel::Point_3 Point_3; -typedef Kernel::Vector_3 Vector_3; - -typedef std::pair Pwn; -typedef CGAL::First_of_pair_property_map Point_map; -typedef CGAL::Second_of_pair_property_map Vector_map; - -typedef CGAL::Poisson_reconstruction_function Poisson; - -typedef CGAL::Labeled_mesh_domain_3 Implicit_domain; -typedef CGAL::Mesh_triangulation_3::type Mesh_tr; -typedef CGAL::Mesh_complex_3_in_triangulation_3 C3t3; -typedef CGAL::Mesh_criteria_3 Mesh_criteria; - -int main(int, char**) -{ - std::vector points; - - std::ifstream stream(CGAL::data_file_path("points_3/oni.pwn")); - if (!stream || - !CGAL::IO::read_XYZ - (stream, std::back_inserter(points), - CGAL::parameters:: - point_map(Point_map()). - normal_map(Vector_map()))) - { - std::cerr << "Error: cannot read file" << std::endl; - return EXIT_FAILURE; - } - - Poisson poisson (points.begin(), points.end(), Point_map(), Vector_map()); - if (!poisson.compute_implicit_function()) - { - std::cerr << "Error: cannot compute implicit function" << std::endl; - return EXIT_FAILURE; - } - - CGAL::Bbox_3 bbox - = CGAL::bbox_3 (boost::make_transform_iterator - (points.begin(), - CGAL::Property_map_to_unary_function()), - boost::make_transform_iterator - (points.end(), - CGAL::Property_map_to_unary_function())); - - Implicit_domain domain - = Implicit_domain::create_implicit_mesh_domain - (poisson, bbox); - - Mesh_criteria criteria (CGAL::parameters::facet_angle = 30, - CGAL::parameters::facet_size = 4, - CGAL::parameters::facet_distance = 0.1); - C3t3 c3t3 = CGAL::make_mesh_3 (domain, criteria, - CGAL::parameters::manifold()); - - return EXIT_SUCCESS; -} diff --git a/Polygon/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h b/Polygon/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h index 33adad82344..64d05254588 100644 --- a/Polygon/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h +++ b/Polygon/include/CGAL/Polygon_2/Polygon_2_algorithms_impl.h @@ -369,7 +369,7 @@ int which_side_in_slab(Point const &point, Point const &low, Point const &high, // precondition: low.y < point.y < high.y { // first we try to decide on x coordinate values alone - // This is an optimisation (whether this is really faster for + // This is an optimization (whether this is really faster for // a homogeneous kernel is not clear, as comparisons can be expensive. Comparison_result low_x_comp_res = compare_x_2(point, low); Comparison_result high_x_comp_res = compare_x_2(point, high); diff --git a/Polygon/test/Polygon/issue7934.cpp b/Polygon/test/Polygon/issue7934.cpp new file mode 100644 index 00000000000..ca9128cc835 --- /dev/null +++ b/Polygon/test/Polygon/issue7934.cpp @@ -0,0 +1,22 @@ +#include +#include +#include +#include + +using Kernel = CGAL::Exact_predicates_exact_constructions_kernel; +using Point_2 = Kernel::Point_2; +using Polygon_2 = CGAL::Polygon_2; + +int main() +{ + Polygon_2 polygon; + for (int i = 0; i < 200000; ++i) { + polygon.push_back(Point_2(i* 1.04663, 0)); + } + polygon.push_back(Point_2( 3.1415, 3.1415)); + + auto ar = CGAL::polygon_area_2(polygon.vertices_begin(), polygon.vertices_end(), Kernel()); + + std::cout << "done" << std::endl; + return 0; +} \ No newline at end of file diff --git a/Polygon_mesh_processing/doc/Polygon_mesh_processing/examples.txt b/Polygon_mesh_processing/doc/Polygon_mesh_processing/examples.txt index 3aca69fb004..1248c37ab68 100644 --- a/Polygon_mesh_processing/doc/Polygon_mesh_processing/examples.txt +++ b/Polygon_mesh_processing/doc/Polygon_mesh_processing/examples.txt @@ -48,5 +48,5 @@ \example Polygon_mesh_processing/remesh_almost_planar_patches.cpp \example Polygon_mesh_processing/sample_example.cpp \example Polygon_mesh_processing/soup_autorefinement.cpp -*/ +\example Polygon_mesh_processing/isotropic_remeshing_with_allow_move.cpp */ diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt index 718ab1096a9..b0958a8ff4f 100644 --- a/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/CMakeLists.txt @@ -55,6 +55,7 @@ create_single_source_cgal_program("cc_compatible_orientations.cpp") create_single_source_cgal_program("hausdorff_distance_remeshing_example.cpp") create_single_source_cgal_program("hausdorff_bounded_error_distance_example.cpp") create_single_source_cgal_program("isotropic_remeshing_with_custom_sizing_example.cpp") +create_single_source_cgal_program("isotropic_remeshing_with_allow_move.cpp") create_single_source_cgal_program("triangle_mesh_autorefinement.cpp") create_single_source_cgal_program("soup_autorefinement.cpp") @@ -95,30 +96,29 @@ endif() find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) create_single_source_cgal_program("compute_normals_example_OM.cpp") - target_link_libraries(compute_normals_example_OM PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(compute_normals_example_OM PRIVATE CGAL::OpenMesh_support) create_single_source_cgal_program("corefinement_OM_union.cpp") - target_link_libraries(corefinement_OM_union PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(corefinement_OM_union PRIVATE CGAL::OpenMesh_support) if(TARGET CGAL::Eigen3_support) create_single_source_cgal_program("hole_filling_example_OM.cpp") - target_link_libraries(hole_filling_example_OM PRIVATE CGAL::Eigen3_support ${OPENMESH_LIBRARIES}) + target_link_libraries(hole_filling_example_OM PRIVATE CGAL::Eigen3_support CGAL::OpenMesh_support) endif() create_single_source_cgal_program("point_inside_example_OM.cpp") - target_link_libraries(point_inside_example_OM PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(point_inside_example_OM PRIVATE CGAL::OpenMesh_support) create_single_source_cgal_program("stitch_borders_example_OM.cpp") - target_link_libraries(stitch_borders_example_OM PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(stitch_borders_example_OM PRIVATE CGAL::OpenMesh_support) #create_single_source_cgal_program("remove_degeneracies_example.cpp") - #target_link_libraries(remove_degeneracies_example PRIVATE ${OPENMESH_LIBRARIES}) - #target_compile_definitions(remove_degeneracies_example PRIVATE -DCGAL_USE_OPENMESH) + #target_link_libraries(remove_degeneracies_example PRIVATE CGAL::OpenMesh_support) create_single_source_cgal_program("triangulate_faces_example_OM.cpp") - target_link_libraries(triangulate_faces_example_OM PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(triangulate_faces_example_OM PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() diff --git a/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_with_allow_move.cpp b/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_with_allow_move.cpp new file mode 100644 index 00000000000..7ee9fa7bcf7 --- /dev/null +++ b/Polygon_mesh_processing/examples/Polygon_mesh_processing/isotropic_remeshing_with_allow_move.cpp @@ -0,0 +1,75 @@ +#include + +#include +#include +#include +#include +#include + +#include +#include + +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef CGAL::Surface_mesh Mesh; + +typedef boost::graph_traits::halfedge_descriptor halfedge_descriptor; +typedef boost::graph_traits::edge_descriptor edge_descriptor; + +namespace PMP = CGAL::Polygon_mesh_processing; + +struct Allow_no_surface_crossing +{ + using vertex_descriptor = typename boost::graph_traits::vertex_descriptor; + using Point_3 = typename K::Point_3; + + CGAL::Side_of_triangle_mesh m_side_of_tmesh; + + Allow_no_surface_crossing(const Mesh& mesh) + : m_side_of_tmesh(mesh) + {} + + bool operator()(vertex_descriptor, Point_3 src, Point_3 tgt) const + { + const CGAL::Bounded_side s_src = m_side_of_tmesh(src); + const CGAL::Bounded_side s_tgt = m_side_of_tmesh(tgt); + return (s_src == s_tgt); + } +}; + +int main(int argc, char* argv[]) +{ + const std::string filename = (argc > 1) ? std::string(argv[1]) : CGAL::data_file_path("meshes/triceratops.off"); + + Mesh mesh; + if(!PMP::IO::read_polygon_mesh(filename, mesh) || !CGAL::is_triangle_mesh(mesh)) + { + std::cerr << "Invalid input." << std::endl; + return EXIT_FAILURE; + } + + double target_edge_length = (argc > 2) ? std::stod(std::string(argv[2])) : 0.3; + unsigned int nb_iter = (argc > 3) ? std::stoi(std::string(argv[3])) : 1; + unsigned int nb_smoothing = (argc > 4) ? std::stoi(std::string(argv[4])) : 2; + + if (PMP::does_self_intersect(mesh)) + std::cout << "Input mesh self-intersects" << std::endl; + else + std::cout << "Input mesh does not self-intersect" << std::endl; + + Allow_no_surface_crossing shall_move(mesh); + PMP::isotropic_remeshing(faces(mesh), target_edge_length, mesh, + CGAL::parameters::number_of_iterations(nb_iter) + .number_of_relaxation_steps(nb_smoothing) + .allow_move_functor(shall_move) + ); + + if (PMP::does_self_intersect(mesh)) + std::cout << "Output mesh self-intersects" << std::endl; + else + std::cout << "Output mesh does not self-intersect" << std::endl; + + std::cout << "Remeshing done." << std::endl; + CGAL::IO::write_polygon_mesh("out.off", mesh, CGAL::parameters::stream_precision(17)); + + return EXIT_SUCCESS; +} diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/autorefinement.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/autorefinement.h index bfff42fe1bf..a2dafa3dd36 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/autorefinement.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/autorefinement.h @@ -1496,7 +1496,7 @@ void autorefine_triangle_soup(PointRange& soup_points, std::string mode = "parallel"; #endif -// It might be possible to optimise the hardcoded value below +// It might be possible to optimize the hardcoded value below // but the less triangles the faster will anyway be the operation. // So it's probably not critical. #ifdef CGAL_LINKED_WITH_TBB diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h index 4532279b891..dd77b2e9843 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/compute_normal.h @@ -619,7 +619,7 @@ compute_vertex_normal_as_sum_of_weighted_normals(typename boost::graph_traits::null_face()) - continue; + halfedge_descriptor hfo = opposite(hf, mesh_); + if(is_border(hfo, mesh_)) + { + CGAL::Euler::remove_face(h, mesh_); + break; + } vertex_descriptor vc = target(hf, mesh_); vertex_descriptor va = target(next(hf, mesh_), mesh_); vertex_descriptor vb = target(next(next(hf, mesh_), mesh_), mesh_); @@ -1734,7 +1733,6 @@ private: Vector_3 ac(get(vpmap_,va), get(vpmap_,vc)); if (ab * ac < 0) { - halfedge_descriptor hfo = opposite(hf, mesh_); halfedge_descriptor h_ab = prev(hf, mesh_); halfedge_descriptor h_ca = next(hf, mesh_); @@ -1746,6 +1744,16 @@ private: if (!is_flip_topologically_allowed(edge(hf, mesh_))) continue; + // geometric condition for flip --> do not create new degenerate face + vertex_descriptor vd = target(next(hfo, mesh_), mesh_); + if ( collinear( get(vpmap_, va), get(vpmap_, vb), get(vpmap_, vd) ) || + collinear( get(vpmap_, va), get(vpmap_, vc), get(vpmap_, vd) ) ) continue; + + // remove opposite face from the queue (if degenerate) + degenerate_faces.erase(hfo); + degenerate_faces.erase(next(hfo, mesh_)); + degenerate_faces.erase(prev(hfo, mesh_)); + CGAL::Euler::flip_edge(hf, mesh_); done = true; @@ -1769,17 +1777,6 @@ private: short_edges.insert(typename Bimap::value_type(hf, sqlen.value())); } - if(!is_border(hf, mesh_) && - is_degenerate_triangle_face(face(hf, mesh_), mesh_, - parameters::vertex_point_map(vpmap_) - .geom_traits(gt_))) - degenerate_faces.insert(hf); - if(!is_border(hfo, mesh_) && - is_degenerate_triangle_face(face(hfo, mesh_), mesh_, - parameters::vertex_point_map(vpmap_) - .geom_traits(gt_))) - degenerate_faces.insert(hfo); - break; } } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h index 6d2cfa744b5..664782e72b4 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/internal/Side_of_triangle_mesh/Ray_3_Triangle_3_traversal_traits.h @@ -150,7 +150,7 @@ public: //check if the ray source is above or below the triangle and compare it //with the direction of the ray //TODO and if yes return - //this is just an optimisation, the current code is valid + //this is just an optimization, the current code is valid this->m_status.first=boost::logic::indeterminate; this->m_stop=true; diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h index 0a0fdfb4504..e7ef854319b 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/remesh.h @@ -174,7 +174,7 @@ namespace Polygon_mesh_processing { * \cgalParamNBegin{allow_move_functor} * \cgalParamDescription{A function object used to determinate if a vertex move should * be allowed or not during the relaxation step.} -* \cgalParamType{Unary functor that provides `bool operator()(vertex_descriptor v, Point_3 src, Point_3 tgt)` +* \cgalParamType{Functor that provides `bool operator()(vertex_descriptor v, Point_3 src, Point_3 tgt)` * returning `true` * if the vertex `v` can be moved from `src` to `tgt`; * `%Point_3` being the value type of the vertex point map } diff --git a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h index 19adcd48319..a21e4333ec0 100644 --- a/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h +++ b/Polygon_mesh_processing/include/CGAL/Polygon_mesh_processing/repair_degeneracies.h @@ -582,7 +582,7 @@ struct Filter_wrapper_for_cap_needle_removal> tm1; diff --git a/Polygon_repair/test/Polygon_repair/repair_polygon_2_test.cpp b/Polygon_repair/test/Polygon_repair/repair_polygon_2_test.cpp index 1f7e022becf..b1293cebe8a 100644 --- a/Polygon_repair/test/Polygon_repair/repair_polygon_2_test.cpp +++ b/Polygon_repair/test/Polygon_repair/repair_polygon_2_test.cpp @@ -4,18 +4,8 @@ #include -// work around for old compilers (Apple clang < 11 for example) -#define HAS_FILESYSTEM 1 -#if defined(__has_include) -#if !__has_include() -#undef HAS_FILESYSTEM -#define HAS_FILESYSTEM 0 -#endif -#endif -#if HAS_FILESYSTEM - #include #include #include @@ -94,12 +84,3 @@ int main() { return 0; } -#else - -int main() -{ - std::cout << "Warning: filesystem feature is not present on the system, nothing will be tested\n"; - return 0; -} - -#endif diff --git a/Polyhedron/doc/Polyhedron/Polyhedron.txt b/Polyhedron/doc/Polyhedron/Polyhedron.txt index e9d9cb1a5b3..9e7ac47116e 100644 --- a/Polyhedron/doc/Polyhedron/Polyhedron.txt +++ b/Polyhedron/doc/Polyhedron/Polyhedron.txt @@ -385,20 +385,20 @@ polyhedral surface gives alias names renaming face to facet. class Polyhedron_items_3 { public: -template < class Refs, class Traits> -struct Vertex_wrapper { -typedef typename Traits::Point_3 Point; -typedef CGAL::HalfedgeDS_vertex_base Vertex; -}; -template < class Refs, class Traits> -struct Halfedge_wrapper { -typedef CGAL::HalfedgeDS_halfedge_base Halfedge; -}; -template < class Refs, class Traits> -struct Face_wrapper { -typedef typename Traits::Plane_3 Plane; -typedef CGAL::HalfedgeDS_face_base Face; -}; + template < class Refs, class Traits> + struct Vertex_wrapper { + typedef typename Traits::Point_3 Point; + typedef CGAL::HalfedgeDS_vertex_base Vertex; + }; + template < class Refs, class Traits> + struct Halfedge_wrapper { + typedef CGAL::HalfedgeDS_halfedge_base Halfedge; + }; + template < class Refs, class Traits> + struct Face_wrapper { + typedef typename Traits::Plane_3 Plane; + typedef CGAL::HalfedgeDS_face_base Face; + }; }; \endcode @@ -426,7 +426,7 @@ faces but would be for vertices - and add the color attribute. template struct My_face : public CGAL::HalfedgeDS_face_base { -CGAL::IO::Color color; + CGAL::IO::Color color; }; \endcode @@ -440,10 +440,10 @@ used. \code{.cpp} struct My_items : public CGAL::Polyhedron_items_3 { -template -struct Face_wrapper { -typedef My_face Face; -}; + template + struct Face_wrapper { + typedef My_face Face; + }; }; \endcode @@ -479,8 +479,8 @@ works as illustrated above. template struct My_face : public CGAL::HalfedgeDS_face_base { -typedef typename Refs::Vertex_handle Vertex_handle; -Vertex_handle vertex_ref; + typedef typename Refs::Vertex_handle Vertex_handle; + Vertex_handle vertex_ref; }; \endcode diff --git a/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp b/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp index 10542f4f8da..2befa007a23 100644 --- a/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp +++ b/Polyline_simplification_2/demo/Polyline_simplification_2/Polyline_simplification_2.cpp @@ -201,7 +201,9 @@ MainWindow::MainWindow() this->setupOptionsMenu(); this->addAboutDemo(":/cgal/help/about_Polyline_simplification_2.html"); this->addAboutCGAL(); +#if QT_SVG_LIB this->setupExportSVG(action_Export_SVG, graphicsView); +#endif this->addRecentFiles(this->menuFile, this->actionQuit); connect(this, SIGNAL(openRecentFile(QString)), this, SLOT(open(QString))); diff --git a/Polynomial/include/CGAL/Polynomial/bezout_matrix.h b/Polynomial/include/CGAL/Polynomial/bezout_matrix.h index 3b8f3447ec0..4c04acd51a0 100644 --- a/Polynomial/include/CGAL/Polynomial/bezout_matrix.h +++ b/Polynomial/include/CGAL/Polynomial/bezout_matrix.h @@ -172,7 +172,7 @@ symmetric_bezout_matrix Matrix B(d); - // 1st step: Initialisation + // 1st step: initialization for(i=0;im) ? NT(0) : -coeff(f,i+sub)*coeff(g,(j+sub)+1); diff --git a/Polynomial/include/CGAL/Polynomial/determinant.h b/Polynomial/include/CGAL/Polynomial/determinant.h index e7cd0be84ef..0c7cc5644d2 100644 --- a/Polynomial/include/CGAL/Polynomial/determinant.h +++ b/Polynomial/include/CGAL/Polynomial/determinant.h @@ -134,7 +134,7 @@ namespace internal { /*! \ingroup CGAL_determinant * \brief Will determine and execute a suitable determinant routine and * return the determinant of \a A. - * (specialisation for CGAL::Matrix_d) + * (specialization for CGAL::Matrix_d) */ template inline NT determinant(const internal::Simple_matrix& A) @@ -214,7 +214,7 @@ namespace internal { /*! \ingroup CGAL_determinant * \brief Computes the determinant of \a A according to the method proposed * by Berkowitz. - * (specialisation for CGAL::Matrix_d) + * (specialization for CGAL::Matrix_d) * * Note that this routine is completely free of divisions! */ diff --git a/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d_traits_2.h b/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d_traits_2.h index b5e189e51ce..1128457fa92 100644 --- a/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d_traits_2.h +++ b/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d_traits_2.h @@ -5,7 +5,7 @@ namespace CGAL { \ingroup PkgPolytopeDistanceDRef The class `Polytope_distance_d_traits_2` is a traits class for the \f$ d\f$-dimensional -optimisation algorithms using the two-dimensional \cgal kernel. +optimization algorithms using the two-dimensional \cgal kernel. \tparam K must be a model for `Kernel`. diff --git a/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d_traits_3.h b/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d_traits_3.h index 207b4a8bd7b..e5ef4a3c86d 100644 --- a/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d_traits_3.h +++ b/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d_traits_3.h @@ -5,7 +5,7 @@ namespace CGAL { \ingroup PkgPolytopeDistanceDRef The class `Polytope_distance_d_traits_3` is a traits class for the \f$ d\f$-dimensional -optimisation algorithms using the three-dimensional \cgal kernel. +optimization algorithms using the three-dimensional \cgal kernel. \tparam K must be a model for `Kernel`. diff --git a/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d_traits_d.h b/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d_traits_d.h index 37ad80ae56b..18b5197a91f 100644 --- a/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d_traits_d.h +++ b/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Polytope_distance_d_traits_d.h @@ -5,7 +5,7 @@ namespace CGAL { \ingroup PkgPolytopeDistanceDRef The class `Polytope_distance_d_traits_d` is a traits class for the \f$ d\f$-dimensional -optimisation algorithms using the \f$ d\f$-dimensional \cgal kernel. +optimization algorithms using the \f$ d\f$-dimensional \cgal kernel. \tparam K must be a model for `Kernel`. diff --git a/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Width_3.h b/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Width_3.h index 45bacc2bcea..b240e3a3bd5 100644 --- a/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Width_3.h +++ b/Polytope_distance_d/doc/Polytope_distance_d/CGAL/Width_3.h @@ -25,9 +25,10 @@ width-planes. \f$ \mathcal{W(S)}=\mathcal{W}_{d_{opt}}\mathcal{(S)}\f$ -Note: There might be several optimal build directions. Hence +\note There might be several optimal build directions. Hence neither the width-planes nor the direction \f$ \mathbf{d}_{opt}\f$ are -unique - only the width is. +unique - only the width is. There may also be duplicates reported, +different vectors having the same or the opposite directions. \tparam Traits must be a model for `WidthTraits_3`. @@ -54,7 +55,7 @@ Because there is no need for dividing values during the algorithm, the numbers can get really huge (all the computations are made using a lot of multiplications). Therefore it is strongly recommended to use a number type that can handle numbers of arbitrary length (e.g., -`leda_integer` in combination with the homogeneous representation +`Exact_integer` in combination with the homogeneous representation of the points). But these large numbers have a disadvantage: Operations on them are slower as greater the number gets. Therefore it is possible to shorten the numbers by using the compiler flag diff --git a/Polytope_distance_d/doc/Polytope_distance_d/Concepts/AllFurthestNeighborsTraits_2.h b/Polytope_distance_d/doc/Polytope_distance_d/Concepts/AllFurthestNeighborsTraits_2.h index 874782161e7..452ade88fee 100644 --- a/Polytope_distance_d/doc/Polytope_distance_d/Concepts/AllFurthestNeighborsTraits_2.h +++ b/Polytope_distance_d/doc/Polytope_distance_d/Concepts/AllFurthestNeighborsTraits_2.h @@ -16,14 +16,10 @@ convex polygon using the function `all_furthest_neighbors_2()`. \sa `CGAL::all_furthest_neighbors_2()` -\cgalHeading{Notes} - -
      -
    • `AllFurthestNeighborsTraits_2::Less_xy_2` and +\note `AllFurthestNeighborsTraits_2::Less_xy_2` and `AllFurthestNeighborsTraits_2::Orientation_2` are used for (expensive) precondition checking only. Therefore, they need not to be specified, in case that precondition checking is disabled. -
    */ diff --git a/Polytope_distance_d/doc/Polytope_distance_d/Concepts/PolytopeDistanceDTraits.h b/Polytope_distance_d/doc/Polytope_distance_d/Concepts/PolytopeDistanceDTraits.h index 32004e174ba..39d8b30417c 100644 --- a/Polytope_distance_d/doc/Polytope_distance_d/Concepts/PolytopeDistanceDTraits.h +++ b/Polytope_distance_d/doc/Polytope_distance_d/Concepts/PolytopeDistanceDTraits.h @@ -4,7 +4,7 @@ \cgalConcept This concept defines the requirements for traits classes of \f$ d\f$-dimensional -optimisation algorithms. +optimization algorithms. \cgalHasModelsBegin \cgalHasModels{CGAL::Polytope_distance_d_traits_2} diff --git a/Polytope_distance_d/doc/Polytope_distance_d/Concepts/WidthTraits_3.h b/Polytope_distance_d/doc/Polytope_distance_d/Concepts/WidthTraits_3.h index 5686aec87e1..8699ebd7b32 100644 --- a/Polytope_distance_d/doc/Polytope_distance_d/Concepts/WidthTraits_3.h +++ b/Polytope_distance_d/doc/Polytope_distance_d/Concepts/WidthTraits_3.h @@ -24,7 +24,7 @@ class WidthTraits_3 { public: /// \name Types -/// Notes: If you want to compute the width of a polyhedron then you have to make sure that the point type in the traits class and the point type in the polyhedron class are the same! The same holds for `Traits::Plane_3` and `Polyhedron::Plane_3`. +/// \note If you want to compute the width of a polyhedron then you have to make sure that the point type in the traits class and the point type in the polyhedron class are the same! The same holds for `Traits::Plane_3` and `Polyhedron::Plane_3`. /// @{ /*! diff --git a/Polytope_distance_d/examples/Polytope_distance_d/width_simplex.cpp b/Polytope_distance_d/examples/Polytope_distance_d/width_simplex.cpp index b909f263d9c..7463a929641 100644 --- a/Polytope_distance_d/examples/Polytope_distance_d/width_simplex.cpp +++ b/Polytope_distance_d/examples/Polytope_distance_d/width_simplex.cpp @@ -1,20 +1,11 @@ #include #include #include +#include #include #include -#if defined(CGAL_USE_GMP) -#include -typedef CGAL::Gmpz RT; -#elif defined (CGAL_USE_LEDA) -#include -typedef leda_integer RT; -#else -#include -typedef CGAL::MP_Float RT; -#endif - +typedef CGAL::Exact_integer RT; typedef CGAL::Homogeneous Kernel; typedef Kernel::Point_3 Point_3; typedef Kernel::Plane_3 Plane_3; diff --git a/Polytope_distance_d/test/Polytope_distance_d/test_PD.cpp b/Polytope_distance_d/test/Polytope_distance_d/test_PD.cpp index 8ac73723282..64bb8f26197 100644 --- a/Polytope_distance_d/test/Polytope_distance_d/test_PD.cpp +++ b/Polytope_distance_d/test/Polytope_distance_d/test_PD.cpp @@ -13,7 +13,7 @@ // // file : test/Polytope_distance_d/test_PD.C // package : $CGAL_Package: Polytope_distance_d $ -// chapter : Geometric Optimisation +// chapter : Geometric Optimization // // revision : $Id$ // revision_date : $Date$ diff --git a/Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d.h b/Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d.h index d0122d83486..67e7ff08e2b 100644 --- a/Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d.h +++ b/Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d.h @@ -13,7 +13,7 @@ // // file : test/Polytope_distance_d/test_Polytope_distance_d.h // package : $CGAL_Package: Polytope_distance_d $ -// chapter : Geometric Optimisation +// chapter : Geometric Optimization // // revision : $Id$ // revision_date : $Date$ diff --git a/Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d_2.cpp b/Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d_2.cpp index 86d75b83e57..11d7c1efecd 100644 --- a/Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d_2.cpp +++ b/Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d_2.cpp @@ -13,7 +13,7 @@ // // file : test/Polytope_distance_d/test_Polytope_distance_d_2.C // package : $CGAL_Package: Polytope_distance_d $ -// chapter : Geometric Optimisation +// chapter : Geometric Optimization // // source : web/Polytope_distance_d.aw // revision : $Id$ diff --git a/Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d_3.cpp b/Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d_3.cpp index f2f2730a73b..b4b516260d0 100644 --- a/Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d_3.cpp +++ b/Polytope_distance_d/test/Polytope_distance_d/test_Polytope_distance_d_3.cpp @@ -13,7 +13,7 @@ // // file : test/Polytope_distance_d/test_Polytope_distance_d_3.C // package : $CGAL_Package: Polytope_distance_d $ -// chapter : Geometric Optimisation +// chapter : Geometric Optimization // // source : web/Polytope_distance_d.aw // revision : $Id$ diff --git a/Polytope_distance_d/test/Polytope_distance_d/test_width_cube.cpp b/Polytope_distance_d/test/Polytope_distance_d/test_width_cube.cpp index f72484d6f15..4b9f2597abc 100644 --- a/Polytope_distance_d/test/Polytope_distance_d/test_width_cube.cpp +++ b/Polytope_distance_d/test/Polytope_distance_d/test_width_cube.cpp @@ -13,7 +13,7 @@ // // file : test/test_width_cube.C // package : Width_3 (1.6) -// chapter : Geometric Optimisation +// chapter : Geometric Optimization // // revision : $Id$ // revision_date : $Date$ diff --git a/Polytope_distance_d/test/Polytope_distance_d/test_width_simplex.cpp b/Polytope_distance_d/test/Polytope_distance_d/test_width_simplex.cpp index a2bdead6b09..ca13502c108 100644 --- a/Polytope_distance_d/test/Polytope_distance_d/test_width_simplex.cpp +++ b/Polytope_distance_d/test/Polytope_distance_d/test_width_simplex.cpp @@ -13,7 +13,7 @@ // // file : test/test_width_simplex.C // package : Width_3 (1.6) -// chapter : Geometric Optimisation +// chapter : Geometric Optimization // // revision : $Id$ // revision_date : $Date$ diff --git a/Profiling_tools/include/CGAL/Memory_sizer.h b/Profiling_tools/include/CGAL/Memory_sizer.h index 6d0551ef7f9..b7106f412e2 100644 --- a/Profiling_tools/include/CGAL/Memory_sizer.h +++ b/Profiling_tools/include/CGAL/Memory_sizer.h @@ -15,7 +15,7 @@ #include #include -// This has only been implemented for MacOSX/Darwin, Linux and VC++ for now. +// This has only been implemented for macOS/Darwin, Linux and VC++ for now. #if !defined _MSC_VER && !defined __linux__ && !defined __APPLE__ #include diff --git a/Property_map/test/Property_map/CMakeLists.txt b/Property_map/test/Property_map/CMakeLists.txt index 92a3eb097d5..a51a39b66d0 100644 --- a/Property_map/test/Property_map/CMakeLists.txt +++ b/Property_map/test/Property_map/CMakeLists.txt @@ -13,10 +13,8 @@ create_single_source_cgal_program("test_Property_container.cpp") find_package(OpenMesh QUIET) if(OpenMesh_FOUND) message(STATUS "Found OpenMesh") - include(UseOpenMesh) - - target_link_libraries(dynamic_properties_test PRIVATE ${OPENMESH_LIBRARIES}) - target_compile_definitions(dynamic_properties_test PRIVATE -DCGAL_USE_OPENMESH) + include(CGAL_OpenMesh_support) + target_link_libraries(dynamic_properties_test PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Tests will not use OpenMesh.") endif() diff --git a/QP_solver/doc/QP_solver/fig_src/documentation/algorithmicx.sty b/QP_solver/doc/QP_solver/fig_src/documentation/algorithmicx.sty index 0b681debab7..a56c52dd301 100644 --- a/QP_solver/doc/QP_solver/fig_src/documentation/algorithmicx.sty +++ b/QP_solver/doc/QP_solver/fig_src/documentation/algorithmicx.sty @@ -6,7 +6,7 @@ % Based on Peter Williams's algorithmic.sty % % -% *** INITIALISING *** +% *** INITIALIZING *** % % \NeedsTeXFormat{LaTeX2e} diff --git a/QP_solver/test/QP_solver/master_mps_to_derivatives.cpp b/QP_solver/test/QP_solver/master_mps_to_derivatives.cpp index ad6fd7abc89..62ced5959a4 100644 --- a/QP_solver/test/QP_solver/master_mps_to_derivatives.cpp +++ b/QP_solver/test/QP_solver/master_mps_to_derivatives.cpp @@ -320,7 +320,7 @@ void create_free_instance(CGAL::Quadratic_program_from_mps& qp, const char *dir) { // This routine converts the given instance into an equivalent - // problem where all bounds are modelled by additional rows of A and + // problem where all bounds are modeled by additional rows of A and // where all variables are free. // // That is, the quantities c and D do not change, but A, b, and diff --git a/REUSE.toml b/REUSE.toml new file mode 100644 index 00000000000..4efaf5271c5 --- /dev/null +++ b/REUSE.toml @@ -0,0 +1,52 @@ +version = 1 +SPDX-PackageName = "CGAL" +SPDX-PackageSupplier = "CGAL Editorial Board " +SPDX-PackageDownloadLocation = "https://github.com/CGAL/cgal" + +[[annotations]] +path = [ + ".**", + "**.cmake", + "**.md", + ".github/**", + "Maintenance/**", + "**/TODO", + "**/doc/**", + "**/deb/**", + "**/applications/**", + "**/doc_html/**", + "**/scripts/**", + "**/developer_scripts/**", + "**/demo/**", + "**/examples/**", + "**/src/**", + "**/test/**", + "**/benchmarks/**", + "**/benchmark/**", + "**/package_info/**", + "**/data/**", + "**/cmake/**", + "**/*.natvis", +] +precedence = "aggregate" +SPDX-FileCopyrightText = "1995-2024 The CGAL Project" +SPDX-License-Identifier = "CC0-1.0" + +[[annotations]] +path = [ + "REUSE.toml", + "CMakeLists.txt", + "cmake_uninstall.cmake.in", + "GraphicsView/include/CGAL/Qt/ImageInterface.ui", + "GraphicsView/include/CGAL/Qt/resources/qglviewer-icon.xpm", + "Installation/AUTHORS", + "Installation/CMakeLists.txt", + "Installation/README", + "Installation/auxiliary/cgal_create_cmake_script.1", + "Installation/auxiliary/gmp/README", + "Installation/include/CGAL/license/gpl_package_list.txt", + "copyright", +] +precedence = "aggregate" +SPDX-FileCopyrightText = "1995-2024 The CGAL Project" +SPDX-License-Identifier = "CC0-1.0" diff --git a/Ridges_3/doc/Ridges_3/Ridges_3.txt b/Ridges_3/doc/Ridges_3/Ridges_3.txt index e6e30e83d92..b532262f57f 100644 --- a/Ridges_3/doc/Ridges_3/Ridges_3.txt +++ b/Ridges_3/doc/Ridges_3/Ridges_3.txt @@ -45,7 +45,7 @@ functions of the package are provided in Section \ref Ridges_3Examples. For a detailed introduction to ridges and related topics, the reader may consult \cgalCite{cgal:hgygm-ttdpf-99},\cgalCite{cgal:p-gd-01}, as well as -the following survey article \cgalCite{cgal:cp-ssulc-05}. +the survey article \cgalCite{cgal:cp-ssulc-05}. In the sequel, we just introduce the basic notions so as to explain our algorithms. Consider a smooth embedded surface, and denote \f$ k_1\f$ and \f$ k_2\f$ the principal curvatures, with \f$ k_1\geq k_2\f$. Umbilics are @@ -399,7 +399,7 @@ neighborhood. \subsection Ridges_3Exampleprogram Example Program The following program computes ridges and umbilics from an off -file.\cgalFootnote{Model data may be downloaded via ftp://ftp.mpi-sb.mpg.de/pub/outgoing/CGAL/Ridges_3_datafiles.tgz . The mechanical part model has been provided courtesy of Dassault System to produce \cgalFigureRef{figmechanical_crest_filteredintro}, due to copyright issues the available model is not the same, it is provided by the AIM\@SHAPE Shape Repository.} It uses the package \ref PkgJetFitting3 to estimate the differential +file. It uses the package \ref PkgJetFitting3 to estimate the differential quantities. The default output file gives rough data for visualization purpose, a verbose output file may also be asked for. Parameters are @@ -533,11 +533,7 @@ Ridges on the ellipsoid, normals pointing outward. Color coding : \subsection Ridges_3ExampleFilteringofCrestRidgesona Example: Filtering of Crest Ridges on a Mechanical Part \cgalFigureRef{figmechanical_crest_filteredintro} illustrates the filtering -of crest ridges on a mechanical model, and has been computed as follows: - -\code{.cpp} -./Compute_Ridges_Umbilics -f data/mecanic.off -d 4 -m 4 -a 4 -t 4 -\endcode +of crest ridges on a mechanical model. \cgalFigureBegin{figmechanical_crest_filteredintro,mecanic-sub1_crest-jpg.png} Mechanical part (37k pts). Left: All crest lines. Middle: crests filtered diff --git a/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h index 0b11736513c..c3e5aefec98 100644 --- a/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h +++ b/Ridges_3/examples/Ridges_3/PolyhedralSurf_rings.h @@ -25,7 +25,7 @@ protected: typedef std::map Vertex2int_map; Vertex2int_map ring_index_map; - //vertex indices are initialised to -1 + //vertex indices are initialized to -1 void reset_ring_indices(std::vector &vces); //i >= 1; from a start vertex on the current i-1 ring, push non-visited neighbors diff --git a/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h b/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h index 0b11736513c..c3e5aefec98 100644 --- a/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h +++ b/Ridges_3/test/Ridges_3/PolyhedralSurf_rings.h @@ -25,7 +25,7 @@ protected: typedef std::map Vertex2int_map; Vertex2int_map ring_index_map; - //vertex indices are initialised to -1 + //vertex indices are initialized to -1 void reset_ring_indices(std::vector &vces); //i >= 1; from a start vertex on the current i-1 ring, push non-visited neighbors diff --git a/STL_Extension/doc/STL_Extension/PackageDescription.txt b/STL_Extension/doc/STL_Extension/PackageDescription.txt index 552378e03e6..266a3b15f52 100644 --- a/STL_Extension/doc/STL_Extension/PackageDescription.txt +++ b/STL_Extension/doc/STL_Extension/PackageDescription.txt @@ -7,7 +7,7 @@ /// \defgroup PkgSTLExtensionUtilities Utilities /// \ingroup PkgSTLExtensionRef -/// \defgroup PkgSTLExtensionAssertions Assertions and Failure Behaviour +/// \defgroup PkgSTLExtensionAssertions Assertions and Failure Behavior /// \ingroup PkgSTLExtensionRef /*! @@ -16,7 +16,7 @@ \cgalPkgPicture{plusplus.png} \cgalPkgSummaryBegin \cgalPkgAuthors{Michael Hoffmann, Lutz Kettner, Sylvain Pion, and Ron Wein} -\cgalPkgDesc{\cgal is designed in the spirit of the generic programming paradigm to work together with the Standard Template Library (\stl). This package provides non-geometric \stl-like algorithms and datastructures that are not in the \stl standard, as well as functions to change the failure behaviour of assertions.} +\cgalPkgDesc{\cgal is designed in the spirit of the generic programming paradigm to work together with the Standard Template Library (\stl). This package provides non-geometric \stl-like algorithms and datastructures that are not in the \stl standard, as well as functions to change the failure behavior of assertions.} \cgalPkgManuals{Chapter_STL_Extensions_for_CGAL,PkgSTLExtensionRef} \cgalPkgSummaryEnd \cgalPkgShortInfoBegin diff --git a/STL_Extension/test/STL_Extension/CMakeLists.txt b/STL_Extension/test/STL_Extension/CMakeLists.txt index ee978530077..781a6285d45 100644 --- a/STL_Extension/test/STL_Extension/CMakeLists.txt +++ b/STL_Extension/test/STL_Extension/CMakeLists.txt @@ -64,10 +64,10 @@ endif() find_package(OpenMesh QUIET) if(OpenMesh_FOUND) message(STATUS "Found OpenMesh") - include(UseOpenMesh) + include(CGAL_OpenMesh_support) create_single_source_cgal_program("test_hash_OpenMesh.cpp") - target_link_libraries(test_hash_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(test_hash_OpenMesh PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.") endif() diff --git a/Scripts/developer_scripts/cgal_create_package_dir.py b/Scripts/developer_scripts/cgal_create_package_dir.py index 90900b1304d..e2445915d5b 100755 --- a/Scripts/developer_scripts/cgal_create_package_dir.py +++ b/Scripts/developer_scripts/cgal_create_package_dir.py @@ -26,9 +26,8 @@ creationpath = args.creationpath doxystring = \ r"""@INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS} + PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - Put title of project here" -INPUT = ${CMAKE_SOURCE_DIR}/PACKAGENAME/doc/PACKAGENAME/ \ - ${CMAKE_SOURCE_DIR}/PACKAGENAME/include """ descrstring = \ diff --git a/Scripts/developer_scripts/create_internal_release b/Scripts/developer_scripts/create_internal_release index 2db9f7f9ef8..e17165cec0a 100755 --- a/Scripts/developer_scripts/create_internal_release +++ b/Scripts/developer_scripts/create_internal_release @@ -63,7 +63,7 @@ EOF my $TEMPFILE="TEMPFILE.$$"; #----------------------------------------------------# -# Initialisation # +# initialization # #----------------------------------------------------# my ( diff --git a/Scripts/developer_scripts/create_macosx_installer b/Scripts/developer_scripts/create_macosx_installer deleted file mode 100755 index 1fcdc60e1c9..00000000000 --- a/Scripts/developer_scripts/create_macosx_installer +++ /dev/null @@ -1,78 +0,0 @@ -#!/bin/tcsh -# -# create the MacOSX CGAL disk image and package -# -# For releases 3.2 and on -# -# The script assumes that the current directory is the MacOSX_Installer -# directory of the Maintenance package -# -# Author(s): Menelaos Karavelas, 2006 - -# Modify the following lines according to your release and configuration - -# modify the following line for your release -setenv CGALVER $2 - -# modify the following line to reflect the size of the disk image you -# want to create -setenv VOLSIZE 7m - -# modify the following lines if the MacOSX applications reside at different -# paths than the ones shown below -setenv HDIUTIL /usr/bin/hdiutil -setenv PACKAGEMAKERAPP /Developer/Applications/Utilities/PackageMaker.app -setenv PACKAGEMAKER ${PACKAGEMAKERAPP}/Contents/MacOS/PackageMaker - -# this is the directory where the script temporarily puts files -setenv TMP_ROOT /tmp/MacOSX_Installer - -####### DO NOT TOUCH ANYTHING BEYIND THIS POINT ####### -setenv CUR_DIR `pwd` -setenv VOLNAME CGAL-${CGALVER} - -# cleanup files that should not be there -rm -f ${VOLNAME}.dmg -rm -fr ${TMP_ROOT} - -# create a copy of the CGAL package structure -mkdir -p ${TMP_ROOT} -cp -rp Package_root ${TMP_ROOT} -cp -rp Resources ${TMP_ROOT} -cp -rp CGAL-absolute.pmproj ${TMP_ROOT} -cd ${TMP_ROOT} - -# copy the CGAL tarball at its correct place and uncompress it -cp -p $1 Package_root -cd Package_root -tar xvfz CGAL-${CGALVER}.tar.gz -rm -f CGAL-${CGALVER}.tar.gz - -# now the building phase starts -cd .. - -# build the package -${PACKAGEMAKER} -build -ds -proj CGAL-absolute.pmproj -p CGAL.pkg -v - -# create the disk image -${HDIUTIL} create -ov -size ${VOLSIZE} -fs HFS+ -type UDIF -volname ${VOLNAME} CGAL-tmp.dmg - -# mount the disk image -${HDIUTIL} attach CGAL-tmp.dmg - -# move the CGAL package to the disk image -mv CGAL.pkg /Volumes/${VOLNAME} - -# unmount the disk image -${HDIUTIL} detach /Volumes/${VOLNAME} - -# convert the disk image to a read-only one -${HDIUTIL} convert -ov CGAL-tmp.dmg -format UDRO -o CGAL-RO.dmg -rm -f CGAL-tmp.dmg - -# copy the converted disk image to the original directory -cp -p CGAL-RO.dmg ${CUR_DIR}/${VOLNAME}.dmg - -# cleanup temporary files -rm -fr ${TMP_ROOT} - diff --git a/Scripts/developer_scripts/create_new_release b/Scripts/developer_scripts/create_new_release index 692ed94e7fa..bb88cc894ed 100755 --- a/Scripts/developer_scripts/create_new_release +++ b/Scripts/developer_scripts/create_new_release @@ -136,7 +136,7 @@ HTML_DIR="/u/agrion/geometrica/CGAL/Members/Releases" URL="http://cgal.inria.fr/CGAL/Members/Releases" -PATH=$PATH:/usr/local/bin:/usr/bin/gnu +PATH=$PATH:/usr/local/bin:/usr/sbin # Working dir TMPDIR="`pwd`" @@ -323,6 +323,9 @@ if [ -n "$DO_PUBLIC" ]; then zip -q -r ${public_release_name}-library.zip ${public_release_name} mv ${public_release_name}*.tar.xz "${HTML_DIR}/${release_name}-public/" mv ${public_release_name}*.zip "${HTML_DIR}/${release_name}-public/" + if command -v sestatus >/dev/null 2>&1; then + sestatus && restorecon -R "${HTML_DIR}/${release_name}-public" + fi rm -f "$HTML_DIR/CGAL-last-public" ln -s "${release_name}-public" "$HTML_DIR/CGAL-last-public" fi diff --git a/Scripts/developer_scripts/licensecheck b/Scripts/developer_scripts/licensecheck index c470c5b8057..e9a9f4c5be2 100755 --- a/Scripts/developer_scripts/licensecheck +++ b/Scripts/developer_scripts/licensecheck @@ -89,7 +89,7 @@ The two configuration files F and F<~/.devscripts> are sourced by a shell in that order to set configuration variables. Command line options can be used to override configuration file settings. Environment variable settings are -ignored for this purpose. The currently recognised variables are: +ignored for this purpose. The currently recognized variables are: =over 4 diff --git a/Scripts/developer_scripts/run_doxygen_testsuite b/Scripts/developer_scripts/run_doxygen_testsuite index 470eb295d84..5aaab01d981 100755 --- a/Scripts/developer_scripts/run_doxygen_testsuite +++ b/Scripts/developer_scripts/run_doxygen_testsuite @@ -6,7 +6,7 @@ cd /home/cgal-testsuite # Rotate log files on one month: the logfile name contains the number of # the day -LOGFILE=$PWD/doxygen_testsuite-`date '+%d'`.log +LOGFILE=$PWD/doxygen_testsuite-$(date '+%d').log exec > "$LOGFILE" @@ -39,8 +39,8 @@ if [ -r "${CGAL_DOC_BUILD}" ]; then rm -rf "${CGAL_DOC_BUILD}" fi -mkdir ${CGAL_DOC_BUILD} -cd ${CGAL_DOC_BUILD} +mkdir "${CGAL_DOC_BUILD}" +cd "${CGAL_DOC_BUILD}" if [ -r "LATEST" ]; then rm -rf LATEST @@ -52,12 +52,12 @@ if [ ! -f "LATEST" ]; then error "COULD NOT DOWNLOAD LATEST!" fi -for i in `cat LATEST` +for i in $(cat LATEST) do CGAL_LOCATION="${CGAL_URL}/${i}"; CGAL_ZIPFILE="${i}"; done -CGAL_RELEASE_ID=`echo $CGAL_ZIPFILE | sed "s/.tar.gz//"` +CGAL_RELEASE_ID=$(echo "$CGAL_ZIPFILE" | sed "s/.tar.gz//") curl ${CURL_OPTS} "${CGAL_LOCATION}" tar xvzf "${CGAL_ZIPFILE}" && rm "${CGAL_ZIPFILE}" @@ -68,11 +68,16 @@ cd "${CGAL_RELEASE_ID}" PATH=/home/cgal-testsuite/local/bin:$PATH export PATH -cd "$PWD/doc/scripts" +cd "${PWD}/doc/scripts" bash -$- ./process_doc.sh /home/cgal-testsuite/bin/doxygen_1_8_13 /home/cgal-testsuite/bin/doxygen_1_9_6 /srv/CGAL/www/Members/Manual_doxygen_test if head -2 ../../.scm-branch | grep -q cgal/master; then rsync -a --delete "/srv/CGAL/www/Members/Manual_doxygen_test/${CGAL_RELEASE_ID}/output2/" /srv/CGAL/www/doc/master/ fi +if sestatus &>/dev/null && [ -d "/srv/CGAL/www/doc/master/" ] && [ -d "/srv/CGAL/www/Members/Manual_doxygen_test/${CGAL_RELEASE_ID}" ]; then + restorecon -R /srv/CGAL/www/doc/master/ /srv/CGAL/www/Members/Manual_doxygen_test/${CGAL_RELEASE_ID} || error "restorecon command failed" +else + error "SELinux is not enabled or the paths do not exist" +fi rm -rf "${CGAL_DOC_BUILD}" # Then gzip the log file, to save space exec diff --git a/Scripts/developer_scripts/run_testsuite_with_ctest b/Scripts/developer_scripts/run_testsuite_with_ctest index 1785c96e63b..2ed82f53335 100644 --- a/Scripts/developer_scripts/run_testsuite_with_ctest +++ b/Scripts/developer_scripts/run_testsuite_with_ctest @@ -372,6 +372,7 @@ run_test_on_platform() grep -e "^-- USING " "${CGAL_BINARY_DIR}/installation.log"|sort -u >> $RESULT_FILE #Use sed to get the content of DEBUG or RELEASE CXX FLAGS so that Multiconfiguration platforms do provide their CXXXFLAGS to the testsuite page (that greps USING CXXFLAGS to get info) sed -i -E 's/(^-- USING )(DEBUG|RELEASE) (CXXFLAGS)/\1\3/' $RESULT_FILE + sed -n '/^-- Third-party library /p' "${CGAL_BINARY_DIR}/installation.log" >> $RESULT_FILE echo "------------" >> "$RESULT_FILE" #if git branch, create empty scm file for python script if [ -n "${SCRIPTS_DIR}" ]; then diff --git a/Scripts/developer_scripts/tag_pr_per_release.sh b/Scripts/developer_scripts/tag_pr_per_release.sh index 9ff54e99349..e2206e36798 100644 --- a/Scripts/developer_scripts/tag_pr_per_release.sh +++ b/Scripts/developer_scripts/tag_pr_per_release.sh @@ -21,6 +21,12 @@ set -e # Exit the script on first error, for safety +err_report() { + echo "Error (code $?) on line $(caller)" +} + +trap 'err_report $LINENO' ERR + PREVIOUS_MAJOR_RELEASE=$1 CURRENT_RELEASE=$2 diff --git a/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2.txt b/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2.txt index db694f9de60..c8e22d04b12 100644 --- a/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2.txt +++ b/Segment_Delaunay_graph_2/doc/Segment_Delaunay_graph_2/Segment_Delaunay_graph_2.txt @@ -450,7 +450,7 @@ class is used, the possible values are `Field_with_sqrt_tag` and \section secsdg2hierarchy The Segment Delaunay Graph Hierarchy The `Segment_Delaunay_graph_hierarchy_2` -class is the analogue of the `Triangulation_hierarchy_2` or the +class is the analog of the `Triangulation_hierarchy_2` or the `Apollonius_graph_hierarchy_2` classes, applied to the segment Delaunay graph. It consists of a hierarchy of segment Delaunay graphs constructed in a manner analogous to the diff --git a/Shape_detection/doc/Shape_detection/Concepts/NeighborQuery.h b/Shape_detection/doc/Shape_detection/Concepts/NeighborQuery.h index f0522b061ef..3f7f188334f 100644 --- a/Shape_detection/doc/Shape_detection/Concepts/NeighborQuery.h +++ b/Shape_detection/doc/Shape_detection/Concepts/NeighborQuery.h @@ -16,7 +16,7 @@ class NeighborQuery { public: - /// The reference type to the elements of the input range, e.g., a const_iterator of the input range. + /// The reference type to the elements of the input range, e.g., a `const_iterator` of the input range. Must be a model of `Hashable`. typedef unspecified_type Item; /*! diff --git a/Shape_detection/doc/Shape_detection/Concepts/RegionType.h b/Shape_detection/doc/Shape_detection/Concepts/RegionType.h index e1f2551fa5b..efbc11a8eee 100644 --- a/Shape_detection/doc/Shape_detection/Concepts/RegionType.h +++ b/Shape_detection/doc/Shape_detection/Concepts/RegionType.h @@ -24,10 +24,10 @@ public: /// The parameters of the primitive covering the region. typedef unspecified_type Primitive; - /// The reference type to the elements of the input range, e.g., a const_iterator of the input range. + /// The reference type to the elements of the input range, e.g., a `const_iterator` of the input range. Must be a model of `Hashable`. typedef unspecified_type Item; - // The region types is defined by a vector of Items. + // The Region type is defined by a `vector` of items. typedef std::vector Region; /*! @@ -38,11 +38,11 @@ public: typedef unspecified_type Region_index_map; /*! - checks if the item `i` can be added to the region represented by `region`. + checks if the `Item` `i` can be added to the `Region` represented by `region`. `CGAL::Shape_detection::Region_growing` calls this function each time when - trying to add a new item to a region. If this function returns `true`, the - item with the index `i`, is added to the region, otherwise ignored. + trying to add a new item to a `Region`. If this function returns `true`, the + item with the index `i`, is added to the `region`, otherwise ignored. */ bool is_part_of_region( const Item i, @@ -53,8 +53,8 @@ public: checks if `region` satisfies all necessary conditions. `CGAL::Shape_detection::Region_growing` calls this function at the end of each - propagation phase. If this function returns `true`, the region is accepted, - otherwise rejected. If the region is rejected, all its items are released and + propagation phase. If this function returns `true`, the `region` is accepted, + otherwise rejected. If the `region` is rejected, all its items are released and available for region growing again. */ bool is_valid_region( @@ -69,7 +69,7 @@ public: } /*! - enables to update any information about the region represented by the collection of Items `region`. + enables to update any information about the region represented by the collection of items `region`. `CGAL::Shape_detection::Region_growing` calls this function each time when a new seed item is selected. This case can be identified by checking the @@ -77,8 +77,8 @@ public: when enlarging the region. This case can be identified by checking the condition `region.size() > 1`. - This function also returns a Boolean at the first call when a new region - with one seed item is being created. When it is `true`, the new region is + This function also returns a boolean at the first call when a new `region` + with one seed item is being created. When it is `true`, the new `region` is further propagated, otherwise, it is rejected. */ bool update( diff --git a/Shape_detection/examples/Shape_detection/region_growing_with_custom_classes.cpp b/Shape_detection/examples/Shape_detection/region_growing_with_custom_classes.cpp index a1d32efa020..f7058906cfe 100644 --- a/Shape_detection/examples/Shape_detection/region_growing_with_custom_classes.cpp +++ b/Shape_detection/examples/Shape_detection/region_growing_with_custom_classes.cpp @@ -69,7 +69,14 @@ namespace Custom { using Item = std::vector::const_iterator; using Region = std::vector; - using Region_unordered_map = std::unordered_map >; + struct hash_item { + std::size_t operator()(Item i) const { + using boost::hash_value; + return boost::hash_value(i.operator->()); + } + }; + + using Region_unordered_map = std::unordered_map; using Region_index_map = boost::associative_property_map; Region_index_map region_index_map() { diff --git a/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_sorting.h b/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_sorting.h index 209f2cf6186..51f633fd204 100644 --- a/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_sorting.h +++ b/Shape_detection/include/CGAL/Shape_detection/Region_growing/Point_set/Least_squares_plane_fit_sorting.h @@ -44,12 +44,17 @@ namespace Point_set { \tparam PointMap a model of `ReadablePropertyMap` whose key type is the value type of the input range and value type is `Kernel::Point_3` + + \tparam NormalMap + a model of `ReadablePropertyMap` whose key type is the value type of the input + range and value type is `Kernel::Vector_3` */ template< typename GeomTraits, typename Item_, typename NeighborQuery, - typename PointMap> + typename PointMap, + typename NormalMap> class Least_squares_plane_fit_sorting { public: @@ -60,6 +65,7 @@ namespace Point_set { using Traits = GeomTraits; using Neighbor_query = NeighborQuery; using Point_map = PointMap; + using Normal_map = NormalMap; /// \endcond /// Item type. @@ -108,6 +114,10 @@ namespace Point_set { \cgalParamDescription{an instance of `PointMap` that maps an item to `Kernel::Point_3`} \cgalParamDefault{`PointMap()`} \cgalParamNEnd + \cgalParamNBegin{normal_map} + \cgalParamDescription{an instance of `NormalMap` that maps an item to `Kernel::Vector_3`} + \cgalParamDefault{`NormalMap()`} + \cgalParamNEnd \cgalParamNBegin{geom_traits} \cgalParamDescription{an instance of `GeomTraits`} \cgalParamDefault{`GeomTraits()`} @@ -123,6 +133,7 @@ namespace Point_set { const CGAL_NP_CLASS& np = parameters::default_values()) : m_neighbor_query(neighbor_query), m_point_map(Point_set_processing_3_np_helper::get_const_point_map(input_range, np)), + m_normal_map(Point_set_processing_3_np_helper::get_normal_map(input_range, np)), m_traits(parameters::choose_parameter(parameters::get_parameter(np, internal_np::geom_traits))) { CGAL_precondition(input_range.size() > 0); @@ -174,28 +185,76 @@ namespace Point_set { const Seed_range &ordered() { return m_ordered; } + + /*! + \brief the average of the maximal point to fitted plane distance in each neighborhood. + */ + + double mean_distance() { + return mean_d; + } + + /*! + \brief the average of the maximal normal deviation to fitted plane in each neighborhood. + */ + double mean_deviation() { + return mean_dev; + } /// @} private: Neighbor_query& m_neighbor_query; const Point_map m_point_map; + const Normal_map m_normal_map; const Traits m_traits; Seed_range m_ordered; std::vector m_scores; + double mean_d; + double mean_dev; + void compute_scores() { std::vector neighbors; std::size_t idx = 0; + + mean_d = 0; + mean_dev = 0; + for (const Item& item : m_ordered) { neighbors.clear(); m_neighbor_query(item, neighbors); neighbors.push_back(item); - m_scores[idx++] = internal::create_plane( - neighbors, m_point_map, m_traits).second; + auto p = internal::create_plane( + neighbors, m_point_map, m_traits); + + auto plane = p.first; + + double max_dist = 0; + double max_dev = 0; + + for (const Item &n : neighbors) { + double d = CGAL::to_double((get(m_point_map, n) - plane.point()) * plane.orthogonal_vector()); + double dev = acos(CGAL::to_double(CGAL::abs(get(m_normal_map, n) * plane.orthogonal_vector()))); + + if (d > max_dist) + max_dist = d; + + if (dev > max_dev) + max_dev = dev; + } + + mean_d += max_dist; + mean_dev += max_dev; + + m_scores[idx++] = p.second; } + + mean_d /= m_scores.size(); + mean_dev /= m_scores.size(); + mean_dev *= 180 / CGAL_PI; } }; @@ -210,7 +269,8 @@ using Least_squares_plane_fit_sorting_for_point_set = Least_squares_plane_fit_sorting::Kernel, typename PointSet3::Index, NeighborQuery, - typename PointSet3::Point_map>; + typename PointSet3::Point_map, + typename PointSet3::Vector_map>; /*! \ingroup PkgShapeDetectionRGOnPointSet3 diff --git a/Shape_detection/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_region.h b/Shape_detection/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_region.h index 03074231c09..fdc71066581 100644 --- a/Shape_detection/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_region.h +++ b/Shape_detection/include/CGAL/Shape_detection/Region_growing/Polygon_mesh/Least_squares_plane_fit_region.h @@ -19,6 +19,9 @@ // Internal includes. #include #include +#ifdef CGAL_SD_RG_USE_PMP +#include +#endif namespace CGAL { namespace Shape_detection { @@ -83,6 +86,7 @@ namespace Polygon_mesh { using Point_3 = typename GeomTraits::Point_3; using Vector_3 = typename GeomTraits::Vector_3; using Plane_3 = typename GeomTraits::Plane_3; + using Triangle_3 = typename GeomTraits::Triangle_3; using Squared_length_3 = typename GeomTraits::Compute_squared_length_3; using Squared_distance_3 = typename GeomTraits::Compute_squared_distance_3; @@ -156,7 +160,54 @@ namespace Polygon_mesh { m_squared_length_3(m_traits.compute_squared_length_3_object()), m_squared_distance_3(m_traits.compute_squared_distance_3_object()), m_scalar_product_3(m_traits.compute_scalar_product_3_object()), - m_cross_product_3(m_traits.construct_cross_product_vector_3_object()) { + m_cross_product_3(m_traits.construct_cross_product_vector_3_object()), + m_face_normals( get(CGAL::dynamic_face_property_t(), pmesh) ), + m_face_triangulations( get(CGAL::dynamic_face_property_t>(), pmesh) ) + { + +#ifdef CGAL_SD_RG_USE_PMP + auto get_face_normal = [this](Item face, const PolygonMesh& pmesh) + { + return Polygon_mesh_processing::compute_face_normal(face, pmesh, parameters::vertex_point_map(m_vertex_to_point_map)); + }; +#else + auto get_face_normal = [this](Item face, const PolygonMesh& pmesh) -> Vector_3 + { + const auto hedge = halfedge(face, pmesh); + const auto vertices = vertices_around_face(hedge, pmesh); + CGAL_precondition(vertices.size() >= 3); + + auto vertex = vertices.begin(); + const Point_3& p1 = get(m_vertex_to_point_map, *vertex); ++vertex; + const Point_3& p2 = get(m_vertex_to_point_map, *vertex); ++vertex; + Point_3 p3 = get(m_vertex_to_point_map, *vertex); + while(collinear(p1, p2, p3)) + { + if (++vertex == vertices.end()) return NULL_VECTOR; + p3 = get(m_vertex_to_point_map, *vertex); + } + + const Vector_3 u = p2 - p1; + const Vector_3 v = p3 - p1; + return m_cross_product_3(u, v); + }; +#endif + + for (const Item &i : faces(pmesh)) { + put(m_face_normals, i, get_face_normal(i, pmesh)); + std::vector pts; + auto h = halfedge(i, pmesh); + auto s = h; + + do { + pts.push_back(get(m_vertex_to_point_map, target(h, pmesh))); + h = next(h, pmesh); + } while (h != s); + + std::vector face_triangulation; + internal::triangulate_face(pts, face_triangulation); + put(m_face_triangulations, i, face_triangulation); + } CGAL_precondition(faces(m_face_graph).size() > 0); const FT max_distance = parameters::choose_parameter( @@ -234,7 +285,7 @@ namespace Polygon_mesh { const FT squared_distance_threshold = m_distance_threshold * m_distance_threshold; - const Vector_3 face_normal = get_face_normal(query); + const Vector_3 face_normal = get(m_face_normals, query); const FT cos_value = m_scalar_product_3(face_normal, m_normal_of_best_fit); const FT squared_cos_value = cos_value * cos_value; @@ -284,7 +335,7 @@ namespace Polygon_mesh { // The best fit plane will be a plane through this face centroid with // its normal being the face's normal. const Point_3 face_centroid = get_face_centroid(face); - const Vector_3 face_normal = get_face_normal(face); + const Vector_3 face_normal = get(m_face_normals, face); if (face_normal == CGAL::NULL_VECTOR) return false; CGAL_precondition(face_normal != CGAL::NULL_VECTOR); @@ -315,8 +366,8 @@ namespace Polygon_mesh { // This fix is proposed by nh2: // https://github.com/CGAL/cgal/pull/4563 const Plane_3 unoriented_plane_of_best_fit = - internal::create_plane_from_faces( - m_face_graph, region, m_vertex_to_point_map, m_traits).first; + internal::create_plane_from_triangulated_faces( + region, m_face_triangulations, m_traits).first; const Vector_3 unoriented_normal_of_best_fit = unoriented_plane_of_best_fit.orthogonal_vector(); @@ -325,7 +376,7 @@ namespace Polygon_mesh { // Approach: each face gets one vote to keep or flip the current plane normal. long votes_to_keep_normal = 0; for (const auto &face : region) { - const Vector_3 face_normal = get_face_normal(face); + const Vector_3 face_normal = get(m_face_normals, face); const bool agrees = m_scalar_product_3(face_normal, unoriented_normal_of_best_fit) > FT(0); votes_to_keep_normal += (agrees ? 1 : -1); @@ -357,6 +408,9 @@ namespace Polygon_mesh { const Scalar_product_3 m_scalar_product_3; const Cross_product_3 m_cross_product_3; + typename boost::property_map >::const_type m_face_normals; + typename boost::property_map> >::const_type m_face_triangulations; + Plane_3 m_plane_of_best_fit; Vector_3 m_normal_of_best_fit; @@ -383,25 +437,6 @@ namespace Polygon_mesh { return Point_3(x, y, z); } - // Compute normal of the face. - template - Vector_3 get_face_normal(const Face& face) const { - - const auto hedge = halfedge(face, m_face_graph); - const auto vertices = vertices_around_face(hedge, m_face_graph); - CGAL_precondition(vertices.size() >= 3); - - auto vertex = vertices.begin(); - const Point_3& point1 = get(m_vertex_to_point_map, *vertex); ++vertex; - const Point_3& point2 = get(m_vertex_to_point_map, *vertex); ++vertex; - const Point_3& point3 = get(m_vertex_to_point_map, *vertex); - - const Vector_3 u = point2 - point1; - const Vector_3 v = point3 - point1; - const Vector_3 face_normal = m_cross_product_3(u, v); - return face_normal; - } - // The maximum squared distance from the vertices of the face // to the best fit plane. template diff --git a/Shape_detection/include/CGAL/Shape_detection/Region_growing/internal/utils.h b/Shape_detection/include/CGAL/Shape_detection/Region_growing/internal/utils.h index b539bf56e5c..de1827fa376 100644 --- a/Shape_detection/include/CGAL/Shape_detection/Region_growing/internal/utils.h +++ b/Shape_detection/include/CGAL/Shape_detection/Region_growing/internal/utils.h @@ -46,6 +46,11 @@ #include #include #include +#ifdef CGAL_SD_RG_USE_PMP +#include +#else +#include +#endif namespace CGAL { namespace Shape_detection { @@ -61,7 +66,7 @@ namespace internal { mutable T it; }; - // TODO: this should be customisable in named function parameters + // TODO: this should be customizable in named function parameters template::value> struct hash_item {}; @@ -329,6 +334,30 @@ namespace internal { return create_plane(tmp, item_map, traits); } + template + void + triangulate_face(const std::vector& points, + std::vector& triangles) + { +#ifdef CGAL_SD_RG_USE_PMP + std::vector> output; + + Polygon_mesh_processing::triangulate_hole_polyline(points, std::back_inserter(output), parameters::use_2d_constrained_delaunay_triangulation(true)); + + triangles.reserve(output.size()); + for (const auto& t : output) + triangles.emplace_back(points[t.first], points[t.second], points[t.third]); +#else + //use a triangulation using the centroid + std::size_t nb_edges = points.size(); + typename Traits::Point_3 c = CGAL::centroid(points.begin(), points.end()); + triangles.reserve(nb_edges); + for (std::size_t i=0; i(points, triangles); } CGAL_precondition(triangles.size() >= region.size()); IPlane_3 fitted_plane; @@ -395,6 +417,59 @@ namespace internal { return std::make_pair(plane, static_cast(score)); } + template< + typename Traits, + typename Region, + typename FaceToTrianglesMap> + std::pair + create_plane_from_triangulated_faces( + const Region& region, + const FaceToTrianglesMap &face_to_triangles_map, const Traits&) { + + using FT = typename Traits::FT; + using Plane_3 = typename Traits::Plane_3; + using Triangle_3 = typename Traits::Triangle_3; + + using ITraits = CGAL::Exact_predicates_inexact_constructions_kernel; + using IConverter = CGAL::Cartesian_converter; + + using IFT = typename ITraits::FT; + using IPoint_3 = typename ITraits::Point_3; + using ITriangle_3 = typename ITraits::Triangle_3; + using IPlane_3 = typename ITraits::Plane_3; + + std::vector triangles; + CGAL_precondition(region.size() > 0); + triangles.reserve(region.size()); + const IConverter iconverter = IConverter(); + + for (const typename Region::value_type face : region) { + const std::vector& tris = get(face_to_triangles_map, face); + + // Degenerate polygons are omitted. + if (tris.empty()) + continue; + + for (const auto &tri : tris) + triangles.push_back(iconverter(tri)); + } + CGAL_precondition(!triangles.empty()); + IPlane_3 fitted_plane; + IPoint_3 fitted_centroid; + const IFT score = CGAL::linear_least_squares_fitting_3( + triangles.begin(), triangles.end(), + fitted_plane, fitted_centroid, + CGAL::Dimension_tag<2>(), ITraits(), + CGAL::Eigen_diagonalize_traits()); + + const Plane_3 plane( + static_cast(fitted_plane.a()), + static_cast(fitted_plane.b()), + static_cast(fitted_plane.c()), + static_cast(fitted_plane.d())); + return std::make_pair(plane, static_cast(score)); + } + template< typename Traits, typename Region, diff --git a/Shape_detection/test/Shape_detection/test_region_growing_on_point_set_3_with_sorting.cpp b/Shape_detection/test/Shape_detection/test_region_growing_on_point_set_3_with_sorting.cpp index a110f376a22..811f4095f76 100644 --- a/Shape_detection/test/Shape_detection/test_region_growing_on_point_set_3_with_sorting.cpp +++ b/Shape_detection/test/Shape_detection/test_region_growing_on_point_set_3_with_sorting.cpp @@ -30,7 +30,7 @@ using Normal_map = typename Input_range::Vector_map; using Neighbor_query = SD::Point_set::K_neighbor_query; using Plane_region = SD::Point_set::Least_squares_plane_fit_region; -using Plane_sorting = SD::Point_set::Least_squares_plane_fit_sorting; +using Plane_sorting = SD::Point_set::Least_squares_plane_fit_sorting; using Sphere_region = SD::Point_set::Least_squares_sphere_fit_region; using Sphere_sorting = SD::Point_set::Least_squares_sphere_fit_sorting; using Cylinder_region = SD::Point_set::Least_squares_cylinder_fit_region; diff --git a/Shape_detection/test/Shape_detection/test_region_growing_strict.cpp b/Shape_detection/test/Shape_detection/test_region_growing_strict.cpp index 82ed06f3ca4..7f6030e1876 100644 --- a/Shape_detection/test/Shape_detection/test_region_growing_strict.cpp +++ b/Shape_detection/test/Shape_detection/test_region_growing_strict.cpp @@ -312,7 +312,7 @@ bool test_planes_points_with_normals() { using Neighbor_query = CGAL::Shape_detection::Point_set::K_neighbor_query; using Region_type = CGAL::Shape_detection::Point_set::Least_squares_plane_fit_region; - using Sorting_type = CGAL::Shape_detection::Point_set::Least_squares_plane_fit_sorting; + using Sorting_type = CGAL::Shape_detection::Point_set::Least_squares_plane_fit_sorting; using Region_growing = CGAL::Shape_detection::Region_growing; // Create parameter classes. diff --git a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt index 18b828a05df..8fbb2c2bfc5 100644 --- a/Spatial_searching/examples/Spatial_searching/CMakeLists.txt +++ b/Spatial_searching/examples/Spatial_searching/CMakeLists.txt @@ -7,11 +7,6 @@ project(Spatial_searching_Examples) # CGAL and its components find_package(CGAL REQUIRED) -if(MSVC) - # Turn off VC++ warning - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} /wd4244") -endif() - create_single_source_cgal_program("circular_query.cpp") create_single_source_cgal_program("distance_browsing.cpp") create_single_source_cgal_program("iso_rectangle_2_query.cpp") diff --git a/Straight_skeleton_2/examples/Straight_skeleton_2/include/CGAL/input_helpers.h b/Straight_skeleton_2/examples/Straight_skeleton_2/include/CGAL/input_helpers.h index ad41ff7a91f..f4e3e7507a3 100644 --- a/Straight_skeleton_2/examples/Straight_skeleton_2/include/CGAL/input_helpers.h +++ b/Straight_skeleton_2/examples/Straight_skeleton_2/include/CGAL/input_helpers.h @@ -13,12 +13,12 @@ #include #include #include -#include #include #include #include #include +#include template bool read_dat_polygon(const char* filename, @@ -36,7 +36,7 @@ bool read_dat_polygon(const char* filename, } bool is_number_of_CC_in_input = false; - if(CGAL::IO::internal::get_file_extension(filename) == "poly") + if(std::filesystem::path(filename).extension().string() == ".poly") { is_number_of_CC_in_input = true; } @@ -109,8 +109,8 @@ template bool read_input_polygon(const char* filename, PolygonWithHoles& p) { - std::string ext = CGAL::IO::internal::get_file_extension(filename); - if(ext == "dat") + std::string ext = std::filesystem::path(filename).extension().string(); + if(ext == ".dat") { return read_dat_polygon(filename, p); } diff --git a/Stream_support/doc/Stream_support/IOstream.txt b/Stream_support/doc/Stream_support/IOstream.txt index fb4d9fe8afa..89a5ba1f98a 100644 --- a/Stream_support/doc/Stream_support/IOstream.txt +++ b/Stream_support/doc/Stream_support/IOstream.txt @@ -210,11 +210,11 @@ of `Output_rep`. If you do not specialize `Output_rep` for `T`, `T`'s stream output operator is called from within `Output_rep`, by -default. If you want another behaviour for your type `T`, you +default. If you want another behavior for your type `T`, you have to provide a specialization for that type. Furthermore, you can provide specializations with a second template parameter (a formatting tag). The second template parameter defaults to `Null_tag` and means -default behaviour. +default behavior. For example, specializing `Output_rep` for `CORE::BigRat` (without a formatting tag parameter) could look like this: diff --git a/Stream_support/include/CGAL/IO/Color.h b/Stream_support/include/CGAL/IO/Color.h index daee2d37b40..4345c3dd9d9 100644 --- a/Stream_support/include/CGAL/IO/Color.h +++ b/Stream_support/include/CGAL/IO/Color.h @@ -151,13 +151,13 @@ public: /*! returns the \f$i^{th}\f$ component of the rgb color (the - \f$0^{th}\f$ is red, the \f$1^{st}\f$ is blue, etc.). + \f$0^{th}\f$ is red, the \f$1^{st}\f$ is green, the \f$2^{nd}\f$ is blue and the \f$3^{rd}\f$ is alpha). */ unsigned char operator[] (std::size_t i) const { return m_data[i]; } /*! - returns a reference on the \f$i^{th}\f$ component of `c` (the - \f$0^{th}\f$ is red, the \f$1^{st}\f$ is blue, etc.). + returns a reference on the \f$i^{th}\f$ component of the rgb color (the + \f$0^{th}\f$ is red, the \f$1^{st}\f$ is green, the \f$2^{nd}\f$ is blue and the \f$3^{rd}\f$ is alpha). */ unsigned char& operator[] (std::size_t i) { return m_data[i]; } diff --git a/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h b/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h index 94c2f8b5787..4a9a2bbda43 100644 --- a/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h +++ b/Stream_support/include/CGAL/IO/OI/Inventor_ostream.h @@ -59,9 +59,9 @@ public: std::ostream& os() const { - // The behaviour if m_os == nullptr could be changed to return + // The behavior if m_os == nullptr could be changed to return // cerr or a file handle to /dev/null. The latter one would - // mimic the behaviour that one can still use a stream with + // mimic the behavior that one can still use a stream with // an invalid stream, but without producing any output. CGAL_assertion( m_os != nullptr ); return *m_os; diff --git a/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h b/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h index 23d94c3f9d5..a97f36ebff7 100644 --- a/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h +++ b/Stream_support/include/CGAL/IO/VRML/VRML_2_ostream.h @@ -55,9 +55,9 @@ public: std::ostream& os() const { - // The behaviour if m_os == nullptr could be changed to return + // The behavior if m_os == nullptr could be changed to return // cerr or a file handle to /dev/null. The latter one would - // mimic the behaviour that one can still use a stream with + // mimic the behavior that one can still use a stream with // an invalid stream, but without producing any output. CGAL_assertion( m_os != nullptr ); return *m_os; diff --git a/Stream_support/include/CGAL/IO/io.h b/Stream_support/include/CGAL/IO/io.h index aa7d650e72b..74f8dd34bab 100644 --- a/Stream_support/include/CGAL/IO/io.h +++ b/Stream_support/include/CGAL/IO/io.h @@ -152,7 +152,7 @@ typedef IO_rep_is_not_specialized_aux IO_rep_is_not_specialized; The purpose of `Output_rep` is to provide a way to control output formatting that works independently of the object's stream output operator. -If you dont specialize `Output_rep` for `T`, `T`'s stream output operator is called from within `Output_rep`, by default. If you want another behaviour for your type `T`, you have to provide a specialization for that type. Furthermore, you can provide specializations with a second template parameter (a formatting tag). The second template parameter defaults to `Null_tag` and means *default behaviour*. +If you dont specialize `Output_rep` for `T`, `T`'s stream output operator is called from within `Output_rep`, by default. If you want another behavior for your type `T`, you have to provide a specialization for that type. Furthermore, you can provide specializations with a second template parameter (a formatting tag). The second template parameter defaults to `Null_tag` and means *default behavior*. Specializations of `Output_rep` should provide the following features: diff --git a/Stream_support/test/Stream_support/CMakeLists.txt b/Stream_support/test/Stream_support/CMakeLists.txt index 911f06a0bbf..217c1cc1de9 100644 --- a/Stream_support/test/Stream_support/CMakeLists.txt +++ b/Stream_support/test/Stream_support/CMakeLists.txt @@ -13,6 +13,13 @@ find_library( NAMES 3MF DOC "Path to the lib3MF library") +if (NOT MSVC_VERSION OR MSVC_VERSION GREATER_EQUAL 1919 OR MSVC_VERSION LESS 1910) + find_package(LASLIB QUIET) + include(CGAL_LASLIB_support) +else() + message(STATUS "NOTICE : the LAS reader does not work with your version of Visual Studio 2017.") +endif() + # create a target per cppfile file( GLOB cppfiles @@ -30,6 +37,15 @@ foreach(cppfile ${cppfiles}) message(STATUS "NOTICE: Some tests require the lib3MF library, and will not be compiled.") endif() else() - create_single_source_cgal_program("${cppfile}") + if("${cppfile}" STREQUAL "test_LAS.cpp") + if(TARGET CGAL::LASLIB_support) + create_single_source_cgal_program("test_LAS.cpp") + target_link_libraries(test_LAS PRIVATE CGAL::LASLIB_support) + else() + message(STATUS "NOTICE: Some tests require the LASlib library, and will not be compiled.") + endif() + else() + create_single_source_cgal_program("${cppfile}") + endif() endif() endforeach() diff --git a/Stream_support/test/Stream_support/data/colored_points.las b/Stream_support/test/Stream_support/data/colored_points.las new file mode 100644 index 00000000000..102aee9443e Binary files /dev/null and b/Stream_support/test/Stream_support/data/colored_points.las differ diff --git a/Stream_support/test/Stream_support/data/simple_ascii.ply b/Stream_support/test/Stream_support/data/simple_ascii.ply new file mode 100644 index 00000000000..5bc4a19d34f --- /dev/null +++ b/Stream_support/test/Stream_support/data/simple_ascii.ply @@ -0,0 +1,16 @@ +ply +format ascii 1.0 +comment VCGLIB generated +element vertex 3 +property float x +property float y +property float z +property float nx +property float ny +property float nz +element face 0 +property list uchar int vertex_indices +end_header +1 1 1 2 2 2 +3 3 3 4 4 4 +5 5 5 6 6 6 diff --git a/Stream_support/test/Stream_support/issue8155.cpp b/Stream_support/test/Stream_support/issue8155.cpp new file mode 100644 index 00000000000..f92bf9cca84 --- /dev/null +++ b/Stream_support/test/Stream_support/issue8155.cpp @@ -0,0 +1,50 @@ +#include + +#include +#include +#include +#include + +#include +#include +#include +#include + +typedef CGAL::Simple_cartesian Kernel; +typedef Kernel::FT FT; +typedef Kernel::Point_3 Point_3; +typedef Kernel::Vector_3 Vector_3; +typedef std::pair PointVectorPair; +typedef CGAL::First_of_pair_property_map Point_map; +typedef CGAL::Second_of_pair_property_map Normal_map; + +int main() +{ + std::vector pv_pairs; + const std::function lambda = + [&](const PointVectorPair& p) { + FT len = p.second.squared_length(); + if (len > 0 || len != 1.0) { + Vector_3 n = p.second * (1.0 / CGAL::sqrt(len)); + pv_pairs.push_back(std::make_pair(p.first, n)); + } + else pv_pairs.push_back(p); + }; + + pv_pairs.clear(); + std::ifstream file("data/simple_ascii.ply"); + CGAL::IO::read_PLY_with_properties(file, boost::function_output_iterator(lambda), + CGAL::make_ply_point_reader(Point_map()), + CGAL::make_ply_normal_reader(Normal_map())); + + assert(pv_pairs[0].first == Point_3(1, 1, 1)); + assert(pv_pairs[1].first == Point_3(3, 3, 3)); + assert(pv_pairs[2].first == Point_3(5, 5, 5)); + + for (std::size_t i = 0; i < pv_pairs.size(); i++) { + FT dev = CGAL::abs(1.0 - pv_pairs[i].second.squared_length()); + assert(dev < 0.01); + } + + return 0; +} diff --git a/Stream_support/test/Stream_support/test_LAS.cpp b/Stream_support/test/Stream_support/test_LAS.cpp new file mode 100644 index 00000000000..555e80f533a --- /dev/null +++ b/Stream_support/test/Stream_support/test_LAS.cpp @@ -0,0 +1,63 @@ +#include + +#include +#include + +#include +#include +#include + +// types +typedef CGAL::Exact_predicates_inexact_constructions_kernel Kernel; +typedef Kernel::FT FT; +typedef Kernel::Point_3 Point; +typedef std::array Color; +typedef std::pair PointWithColor; + +int main(int argc, char* argv[]) +{ + std::ifstream is("data/colored_points.las"); + + // Reads a .las point set file with normal vectors and colors + std::vector points; // store points + if (!CGAL::IO::read_LAS_with_properties(is, std::back_inserter(points), + CGAL::IO::make_las_point_reader(CGAL::First_of_pair_property_map()), + std::make_tuple(CGAL::Second_of_pair_property_map(), + CGAL::Construct_array(), + CGAL::IO::LAS_property::R(), + CGAL::IO::LAS_property::G(), + CGAL::IO::LAS_property::B(), + CGAL::IO::LAS_property::I()))) + { + std::cerr << "Error: cannot read file data/colored_points.las" << std::endl; + return EXIT_FAILURE; + } + + CGAL_assertion(points.size() == 5); + CGAL_assertion(points[0].second[0] == 65535); + CGAL_assertion(points[0].second[1] == 0); + CGAL_assertion(points[0].second[2] == 0); + CGAL_assertion(points[0].second[3] == 0); + + CGAL_assertion(points[1].second[0] == 0); + CGAL_assertion(points[1].second[1] == 65535); + CGAL_assertion(points[1].second[2] == 0); + CGAL_assertion(points[1].second[3] == 0); + + CGAL_assertion(points[2].second[0] == 0); + CGAL_assertion(points[2].second[1] == 0); + CGAL_assertion(points[2].second[2] == 65535); + CGAL_assertion(points[2].second[3] == 0); + + CGAL_assertion(points[3].second[0] == 0); + CGAL_assertion(points[3].second[1] == 65535); + CGAL_assertion(points[3].second[2] == 65535); + CGAL_assertion(points[3].second[3] == 0); + + CGAL_assertion(points[4].second[0] == 65535); + CGAL_assertion(points[4].second[1] == 65535); + CGAL_assertion(points[4].second[2] == 0); + CGAL_assertion(points[4].second[3] == 0); + + return EXIT_SUCCESS; +} diff --git a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h index cb949abcc30..83ca6a3b4b7 100644 --- a/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h +++ b/Surface_mesh/include/CGAL/Surface_mesh/Surface_mesh.h @@ -870,7 +870,7 @@ public: #endif /// @cond CGAL_DOCUMENT_INTERNALS - // typedefs which make it easier to write the partial specialisation of boost::graph_traits + // typedefs which make it easier to write the partial specialization of boost::graph_traits typedef Vertex_index vertex_index; typedef P vertex_property_type; diff --git a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h index 1da8d0a2396..62f672ded71 100644 --- a/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h +++ b/Surface_mesh_approximation/include/CGAL/Variational_shape_approximation.h @@ -1528,6 +1528,7 @@ private: /*! * @brief finds and approximates the chord connecting the anchors. + * @param boundary_subdivision_ratio the chord subdivision ratio threshold to the chord length or average edge length for boundary edges * @param subdivision_ratio boundary chord approximation recursive split criterion * @param relative_to_chord set `true` if the subdivision_ratio is relative to the chord length (relative sense), * otherwise it's relative to the average edge length (absolute sense). @@ -1853,6 +1854,7 @@ private: * @param chord_begin begin iterator of the chord * @param chord_end end iterator of the chord * @param subdivision_ratio the chord recursive split error threshold + * @param boundary_subdivision_ratio the chord subdivision ratio threshold to the chord length or average edge length for boundary edges * @param relative_to_chord set `true` if the `subdivision_ratio` is relative to the chord length (relative sense), * otherwise it is relative to the average edge length (absolute sense). * @param with_dihedral_angle if set to `true` add dihedral angle weight to the distance. diff --git a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt index ab336b9fb26..b6013ffce75 100644 --- a/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/examples/Surface_mesh_deformation/CMakeLists.txt @@ -33,12 +33,12 @@ if(TARGET CGAL::Eigen3_support) find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") create_single_source_cgal_program("all_roi_assign_example_with_OpenMesh.cpp") target_link_libraries(all_roi_assign_example_with_OpenMesh - PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) + PRIVATE CGAL::OpenMesh_support CGAL::Eigen3_support) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() diff --git a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt index 398dd703748..e8819b7a22b 100644 --- a/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt +++ b/Surface_mesh_deformation/test/Surface_mesh_deformation/CMakeLists.txt @@ -18,12 +18,12 @@ if(TARGET CGAL::Eigen3_support) find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") create_single_source_cgal_program("Cactus_deformation_session_OpenMesh.cpp") target_link_libraries(Cactus_deformation_session_OpenMesh - PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) + PRIVATE CGAL::OpenMesh_support CGAL::Eigen3_support) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() diff --git a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h index b1794891ef5..acd3a20707e 100644 --- a/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h +++ b/Surface_mesh_parameterization/include/CGAL/Surface_mesh_parameterization/Iterative_authalic_parameterizer_3.h @@ -218,7 +218,7 @@ public: for(face_descriptor f : face_range) { - // get area in parameterised mesh + // get area in parameterized mesh const halfedge_descriptor h = halfedge(f, tmesh); const NT a_2D = abs(CGAL::area(get(uvmap, source(h, tmesh)), get(uvmap, target(h, tmesh)), @@ -531,7 +531,7 @@ private: theta_sum += theta; } - // Normalise the angle + // Normalize the angle double factor = 2. / theta_sum; factor *= CGAL_PI; for(int n=0; n -#include #include #include #include diff --git a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h index df10bd113e2..8d77eb0f2a9 100644 --- a/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h +++ b/Surface_mesh_shortest_path/include/CGAL/Surface_mesh_shortest_path/Surface_mesh_shortest_path.h @@ -2134,7 +2134,7 @@ private: std::cout << "event type: " << event->m_type << " " << " time: " << event->m_distanceEstimate << " "; - std::cout << "cancelled? " << event->m_cancelled << " " ; + std::cout << "canceled? " << event->m_cancelled << " " ; if (!event->m_cancelled) { @@ -2200,7 +2200,7 @@ private: } else if (m_debugOutput) { - std::cout << "Found cancelled event for node: " << event->m_parent << std::endl; + std::cout << "Found canceled event for node: " << event->m_parent << std::endl; } delete event; @@ -2416,7 +2416,7 @@ public: \details No change to the internal shortest paths data structure occurs until either `Surface_mesh_shortest_path::build_sequence_tree()` or the first shortest path query is done. - Behaviour is undefined if the source point `it` was already removed. + Behavior is undefined if the source point `it` was already removed. \param it iterator to the source point to be removed */ diff --git a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt index 60135e84d4d..0f63efb7b06 100644 --- a/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt +++ b/Surface_mesh_simplification/examples/Surface_mesh_simplification/CMakeLists.txt @@ -30,11 +30,11 @@ endif() find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") create_single_source_cgal_program("edge_collapse_OpenMesh.cpp") - target_link_libraries(edge_collapse_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(edge_collapse_OpenMesh PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h index d97688dde8b..1d20c428152 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/Policies/Edge_collapse/internal/Lindstrom_Turk_core.h @@ -190,7 +190,7 @@ private : const FT ax=a.x(), ay=a.y(), az=a.z(); const FT bx=b.x(), by=b.y(), bz=b.z(); - auto minor = [](double ai, double bi, double aj, double bj) + auto compute_minor = [](double ai, double bi, double aj, double bj) { // The main idea is that we expect ai and bi (and aj and bj) to have roughly the same magnitude // since this function is used to compute the cross product of two vectors that are defined @@ -201,9 +201,9 @@ private : }; // ay* - FT x = minor(ay, by, az, bz); - FT y = minor(az, bz, ax, bx); - FT z = minor(ax, bx, ay, by); + FT x = compute_minor(ay, by, az, bz); + FT y = compute_minor(az, bz, ax, bx); + FT z = compute_minor(ax, bx, ay, by); return Vector(x, y, z); } diff --git a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Common.h b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Common.h index 4ed45a02d1e..2d3158a7095 100644 --- a/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Common.h +++ b/Surface_mesh_simplification/include/CGAL/Surface_mesh_simplification/internal/Common.h @@ -29,7 +29,6 @@ #include #include #include -#include #include namespace CGAL { diff --git a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt index 674ac89feff..9b86386660b 100644 --- a/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt +++ b/Surface_mesh_skeletonization/examples/Surface_mesh_skeletonization/CMakeLists.txt @@ -31,11 +31,11 @@ if(TARGET CGAL::Eigen3_support) find_package(OpenMesh QUIET) if(OpenMesh_FOUND) - include(UseOpenMesh) + include(CGAL_OpenMesh_support) message(STATUS "Found OpenMesh") create_single_source_cgal_program("MCF_Skeleton_om_example.cpp") - target_link_libraries(MCF_Skeleton_om_example PUBLIC CGAL::Eigen3_support PRIVATE ${OPENMESH_LIBRARIES}) + target_link_libraries(MCF_Skeleton_om_example PUBLIC CGAL::Eigen3_support PRIVATE CGAL::OpenMesh_support) else() message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") endif() diff --git a/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h b/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h index 16caafb4f27..c4aa3b41b05 100644 --- a/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h +++ b/Surface_mesh_topology/include/CGAL/draw_face_graph_with_paths.h @@ -67,7 +67,7 @@ namespace draw_function_for_lcc // template // struct LCC_geom_utils; -// Specialisation for face graph; otherwise use the LCC_geom_utils of LCC. +// Specialization for face graph; otherwise use the LCC_geom_utils of LCC. template struct LCC_geom_utils, Local_kernel, 3> { diff --git a/Surface_mesher/doc/Surface_mesher/Surface_mesher.txt b/Surface_mesher/doc/Surface_mesher/Surface_mesher.txt index 658dc7bae53..df31bc2de1e 100644 --- a/Surface_mesher/doc/Surface_mesher/Surface_mesher.txt +++ b/Surface_mesher/doc/Surface_mesher/Surface_mesher.txt @@ -313,7 +313,7 @@ class is not yet documented because its interface and code have not yet been stabilized. The Surface Mesh Generator demo allows to mesh not only gray level images, -but also segmented images, when voxels are labelled with a domain +but also segmented images, when voxels are labeled with a domain index. Such images are for example the result of a segmentation of 3D medical images. diff --git a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h index fe1060f71eb..182b7cbd811 100644 --- a/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h +++ b/Surface_sweep_2/include/CGAL/Surface_sweep_2/Surface_sweep_2_impl.h @@ -762,7 +762,7 @@ void Surface_sweep_2::_intersect(Subcurve* c1, Subcurve* c2, Multiplicity multiplicity = 0; const Intersection_point* xp_point = std::get_if(&(*vi)); if (xp_point != nullptr) { - Point_2 xp = xp_point->first; + auto xp = xp_point->first; multiplicity = xp_point->second; CGAL_SS_PRINT_TEXT("Found an intersection point"); CGAL_SS_PRINT_EOL(); @@ -919,7 +919,7 @@ _create_overlapping_curve(const X_monotone_curve_2& overlap_cv, left_event = c1->left_event(); } else { - Point_2 left_end = + auto left_end = this->m_traits->construct_min_vertex_2_object()(overlap_cv); left_event = this->_push_event(left_end, Event::DEFAULT, ARR_INTERIOR, ARR_INTERIOR).first; @@ -940,7 +940,7 @@ _create_overlapping_curve(const X_monotone_curve_2& overlap_cv, } else { auto max_vertex = this->m_traits->construct_max_vertex_2_object(); - Point_2 right_end = max_vertex(overlap_cv); + auto right_end = max_vertex(overlap_cv); right_event = this->_push_event(right_end, Event::DEFAULT, ARR_INTERIOR, ARR_INTERIOR).first; } diff --git a/TDS_2/include/CGAL/Triangulation_ds_face_base_2.h b/TDS_2/include/CGAL/Triangulation_ds_face_base_2.h index bb4c448c669..23b59e3affa 100644 --- a/TDS_2/include/CGAL/Triangulation_ds_face_base_2.h +++ b/TDS_2/include/CGAL/Triangulation_ds_face_base_2.h @@ -340,7 +340,7 @@ operator<<(std::ostream &os, const Triangulation_ds_face_base_2 &) return os; } -// Specialisation for void. +// Specialization for void. template <> class Triangulation_ds_face_base_2 { diff --git a/TDS_3/include/CGAL/Triangulation_simplex_3.h b/TDS_3/include/CGAL/Triangulation_simplex_3.h index d00422df1ba..c6245e8bb9f 100644 --- a/TDS_3/include/CGAL/Triangulation_simplex_3.h +++ b/TDS_3/include/CGAL/Triangulation_simplex_3.h @@ -43,7 +43,7 @@ public: // Constructors - // Default constructor initialises to undefined simplex: + // Default constructor initializes to undefined simplex: Triangulation_simplex_3() : ref(-1), ch() { } Triangulation_simplex_3(Vertex_handle vh) { diff --git a/Testsuite/test/post_process_ctest_results.py b/Testsuite/test/post_process_ctest_results.py index 6da4d7de21c..45ea579532b 100644 --- a/Testsuite/test/post_process_ctest_results.py +++ b/Testsuite/test/post_process_ctest_results.py @@ -1,75 +1,169 @@ import sys -import io import re import os +import collections +import logging +from itertools import islice -report_file=sys.argv[1] -report_name=sys.argv[2] -global_report_name=sys.argv[3] -rx=re.compile('(.*Configuring (examples|demo|test)*( in )*(test\/|examples\/|demo\/)*)((?!done)\w+)') -rx_demo=re.compile('.*in demo\/') -rx_examples=re.compile('.*in examples\/') +CONFIG_REGEX = re.compile( + r"(.*Configuring (examples|demo|test) *in *(test/|examples/|demo/))((?!done)\w+)" +) +DEMO_REGEX = re.compile(r".*in demo/") +EXAMPLES_REGEX = re.compile(r'.*in examples/') +SEPARATOR = "------------------------------------------------------------------" + +def find_third_separator(contents): + """Find the position of the third separator line in the contents. + If there are less than 3 separators, then return the position where the third separator + should be inserted. + """ + separator_positions = ( + i for i, line in enumerate(contents) if line.strip() == SEPARATOR + ) + return next(islice(separator_positions, 2, None), len(contents) + 2) + +def last(iterator): + """Return the last item of an iterator or None if empty.""" + return collections.deque(iterator, maxlen=1).pop() + +def find_last(contents, query_string): + """Find the number of the last line matching the query string.""" + position, _ = last(filter(lambda x: x[1].strip() == query_string, enumerate(contents))) + return position + +def read_file_lines(file_path): + """Read the lines of a file and return them as a list.""" + try: + with open(file_path, "r", encoding="utf-8") as file: + return file.readlines() + except IOError as e: + print(f"Error opening file {file_path}: {e}") + return [] + +def write_file_lines(file_path, contents): + """Write the contents to a file. The contents should be a list of strings.""" + try: + with open(file_path, "w", encoding="utf-8") as file: + file.write("".join(contents)) + except IOError as e: + print(f"Error writing to file {file_path}: {e}") + +def mark_package_as_missing_requirements(global_report_file_name, name): + """Mark a package as missing requirements in the global report file.""" + try: + with open(global_report_file_name, "a+", encoding="utf-8") as global_report: + print(f"{name} r", file=global_report) + except IOError as e: + print(f"Error opening global report file {global_report_file_name}: {e}") + +def handle_end_of_package(package_name, report_file_name, lines_to_write): + """Handle the end of a package by inserting the lines to write into the report file.""" + if not lines_to_write: + return + + file_path = f"{package_name}/{report_file_name}" + contents = read_file_lines(file_path) + position = find_third_separator(contents) + + if not any(re.search("- CMake Results .*", content) for content in contents): + lines_to_write.insert(0, f""" +{SEPARATOR} +- CMake Results for {package_name} +{SEPARATOR} + +""") + contents[position:position] = lines_to_write + + write_file_lines(file_path, contents) -#open the Installation report -#For each NAME, check if NAME is a directory. If not, create one, create a -#text report, and write everything that is in the report until the next NAME -#in it. Then, add 'NAME r' in the global report. This should allow to get all -#the NOTICE and other info explaining why the configuration is skipped. +SCM_BRANCH_FILE_CONTENT = read_file_lines(f"{os.getcwd()}/../../../../../.scm-branch") -name="" -is_writing=False -is_ignored=False -global_report=open(global_report_name, "a+") -with open(report_file, "rt") as test_report: - for myline in test_report: - m=rx.match(myline) +def handle_new_package__is_ignored(name, report_file_name, cmake_logs): + """Handle new package creation or update logs if package already exists.""" + if not os.path.isdir(name): + os.mkdir(name) + write_file_lines(f"{name}/{report_file_name}", SCM_BRANCH_FILE_CONTENT) + return True + else: + file_path = f"{name}/{report_file_name}" + contents = read_file_lines(file_path) + position = find_third_separator(contents) - if is_writing: - if m: - is_writing=False - test_report.close() - if is_ignored: - print("{label} {result}".format(label=name, result='r'), file=global_report) - is_ignored=False - else: - test_report.write(myline) - if not is_writing: - if m: - name=m.group(0).replace(m.group(1), "") - if rx_demo.match(myline): - name="{str}_Demo".format(str=name) - elif rx_examples.match(myline): - name="{str}_Examples".format(str=name) - elif name == "libCGAL": - name="libCGAL_shared" - elif name == "libCGAL_Core": - name="libCGALCore_shared" - elif name == "libCGAL_ImageIO": - name="libCGALimageIO_shared" - elif name == "libCGAL_Qt6": - name="libCGALQt6_shared" - if name=="incomplete": - is_writing=False - is_ignored=False - continue - else: - if not os.path.isdir(name): - is_ignored=True - os.mkdir(name) - test_report=open("{dir}/{file}".format(dir=name, file=report_name), "w+") - print(""" -{scm_branch} -""" .format(scm_branch=open("{}/../../../../../.scm-branch".format(os.getcwd()), 'r').read()),file=test_report) - else: - is_ignored=False - test_report=open("{dir}/{file}".format(dir=name, file=report_name), "a+") - test_report.write(" --- CMake Results: --- \n\n") - is_writing=True -if is_writing: - is_writing=False - test_report.close() - if is_ignored: - print("{label} {result}".format(label=name, result='r'), file=global_report) - is_ignored=False -global_report.close() + if not any(re.search("- CMake Logs .*", content) for content in contents): + contents.insert( + position - 1, + SEPARATOR + "\n- CMake Logs from Installation \n" + SEPARATOR + "\n\n", + ) + for log in cmake_logs: + contents.insert(position, log) + position += 1 + + write_file_lines(file_path, contents) + return False + +def retrieve_cmake_logs(file_path): + """Retrieve the CMake logs from a file and return them as a list.""" + logging.debug("Opening file %s", file_path) + contents = read_file_lines(file_path) + + position_begin = 1 + find_last(contents, SEPARATOR) + position_end = 1 + find_last(contents, "== Generating build files for tests ==") + + cmake_logs = contents[position_begin:position_end] + + logging.debug("CMake log beginning is at line %d", position_begin) + logging.debug("CMake log end is at line %d", position_end) + logging.debug("Length of contents is %d", len(contents)) + logging.debug("Length of installation CMake logs is %d", len(cmake_logs)) + logging.debug("Installation CMake logs are %s", "".join(cmake_logs)) + return cmake_logs + +def main(): + """Main function that processes the input report file and performs necessary operations.""" + input_report_file_name = sys.argv[1] + report_file_name = sys.argv[2] + global_report_file_name = sys.argv[3] + + cmake_logs = retrieve_cmake_logs(f"Installation/{report_file_name}") + + package_name = "" + lines_to_write = [] + + for line in read_file_lines(input_report_file_name): + + line_matches_new_package = CONFIG_REGEX.match(line) + if package_name and line_matches_new_package: + handle_end_of_package(package_name, report_file_name, lines_to_write) + lines_to_write = [] + package_name = "" + + if line_matches_new_package: + logging.debug("Found new package %s", line_matches_new_package.group(0)) + logging.debug(" group 1 %s", line_matches_new_package.group(1)) + new_package_name = line_matches_new_package.group(0).replace( + line_matches_new_package.group(1), "" + ) + logging.debug("Setting package name to %s", new_package_name) + package_name = new_package_name + if DEMO_REGEX.match(line): + package_name = f"{package_name}_Demo" + elif EXAMPLES_REGEX.match(line): + package_name = f"{package_name}_Examples" + + if package_name == "incomplete": + package_name = "" + continue + else: + is_ignored = handle_new_package__is_ignored( + package_name, report_file_name, cmake_logs + ) + logging.debug("Is package %s ignored? %s", package_name, is_ignored) + if is_ignored: + mark_package_as_missing_requirements(global_report_file_name, package_name) + + if package_name and not line_matches_new_package and line.strip() != "": + lines_to_write.append(line) + +if __name__ == "__main__": + main() diff --git a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt index e8d94344cfc..49823e27292 100644 --- a/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt +++ b/Tetrahedral_remeshing/doc/Tetrahedral_remeshing/Tetrahedral_remeshing.txt @@ -156,7 +156,7 @@ setting the named parameter `remesh_boundaries` to `false`. It is also possible to define the polyline features as the ones stored as complex edges in a `Mesh_complex_3_in_triangulation_3` -(e.g., generated by the \ref PkgMesh3 package mesh generation algorithms). +(e.g., generated by the \ref PkgMesh3 package). \cgalExample{Tetrahedral_remeshing/mesh_and_remesh_c3t3.cpp } diff --git a/Tetrahedral_remeshing/include/CGAL/Adaptive_remeshing_sizing_field.h b/Tetrahedral_remeshing/include/CGAL/Adaptive_remeshing_sizing_field.h index c651f9b2619..62f97115f82 100644 --- a/Tetrahedral_remeshing/include/CGAL/Adaptive_remeshing_sizing_field.h +++ b/Tetrahedral_remeshing/include/CGAL/Adaptive_remeshing_sizing_field.h @@ -497,7 +497,6 @@ average_edge_length_around(const Vertex_handle v, const Tr& tr, break; } - CGAL_assertion(!edges.empty()); if (edges.empty()) return 0; diff --git a/Three/include/CGAL/Three/Scene_item.h b/Three/include/CGAL/Three/Scene_item.h index b517a9c9108..d6a4f0fc6da 100644 --- a/Three/include/CGAL/Three/Scene_item.h +++ b/Three/include/CGAL/Three/Scene_item.h @@ -64,25 +64,25 @@ public: */ enum OpenGL_program_IDs { - ROGRAM_WITH_LIGHT = 0, //! Used to render a surface or an edge affected by the light. It uses a per fragment lighting model, and renders the selected item brighter. - PROGRAM_WITHOUT_LIGHT, //! Used to render a polyhedron edge or points. It renders in a uniform color and is not affected by light. \attention It renders the selected item in black. - PROGRAM_NO_SELECTION, //! Used to render a polyline or a surface that is not affected by light, like a cutting plane. It renders in a uniform color that does not change with selection. - PROGRAM_WITH_TEXTURE, //! Used to render a textured polyhedron. Affected by light. - PROGRAM_PLANE_TWO_FACES, //! Used to render a two-faced plane. The two faces have a different color. Not affected by light. - PROGRAM_WITH_TEXTURED_EDGES, //! Used to render the edges of a textured polyhedron. Not affected by light. - PROGRAM_INSTANCED, //! Used to display instanced rendered spheres.Affected by light. - PROGRAM_INSTANCED_WIRE, //! Used to display instanced rendered wired spheres. Not affected by light. - PROGRAM_C3T3, //! Used to render a c3t3_item. It discards any fragment on a side of a plane, meaning that nothing is displayed on this side of the plane. Affected by light. - PROGRAM_C3T3_EDGES, //! Used to render the edges of a c3t3_item. It discards any fragment on a side of a plane, meaning that nothing is displayed on this side of the plane. Not affected by light. - PROGRAM_CUTPLANE_SPHERES, //! Used to render the spheres of an item with a cut plane. - PROGRAM_SPHERES, //! Used to render one or several spheres. - PROGRAM_DARK_SPHERES, //! Used to render one or several spheres without light (for picking for example). - PROGRAM_FLAT, /** Used to render flat shading without pre computing normals*/ - PROGRAM_OLD_FLAT, /** Used to render flat shading without pre computing normals without geometry shader*/ - PROGRAM_SOLID_WIREFRAME, //! Used to render edges with width superior to 1. - PROGRAM_NO_INTERPOLATION, //! Used to render faces without interpolating their color. - PROGRAM_HEAT_INTENSITY, //! Used to render special item in Heat_method_plugin - NB_OF_PROGRAMS //! Holds the number of different programs in this enum. + ROGRAM_WITH_LIGHT = 0, //!< Used to render a surface or an edge affected by the light. It uses a per fragment lighting model, and renders the selected item brighter. + PROGRAM_WITHOUT_LIGHT, //!< Used to render a polyhedron edge or points. It renders in a uniform color and is not affected by light. \attention It renders the selected item in black. + PROGRAM_NO_SELECTION, //!< Used to render a polyline or a surface that is not affected by light, like a cutting plane. It renders in a uniform color that does not change with selection. + PROGRAM_WITH_TEXTURE, //!< Used to render a textured polyhedron. Affected by light. + PROGRAM_PLANE_TWO_FACES, //!< Used to render a two-faced plane. The two faces have a different color. Not affected by light. + PROGRAM_WITH_TEXTURED_EDGES, //!< Used to render the edges of a textured polyhedron. Not affected by light. + PROGRAM_INSTANCED, //!< Used to display instanced rendered spheres.Affected by light. + PROGRAM_INSTANCED_WIRE, //!< Used to display instanced rendered wired spheres. Not affected by light. + PROGRAM_C3T3, //!< Used to render a c3t3_item. It discards any fragment on a side of a plane, meaning that nothing is displayed on this side of the plane. Affected by light. + PROGRAM_C3T3_EDGES, //!< Used to render the edges of a c3t3_item. It discards any fragment on a side of a plane, meaning that nothing is displayed on this side of the plane. Not affected by light. + PROGRAM_CUTPLANE_SPHERES, //!< Used to render the spheres of an item with a cut plane. + PROGRAM_SPHERES, //!< Used to render one or several spheres. + PROGRAM_DARK_SPHERES, //!< Used to render one or several spheres without light (for picking for example). + PROGRAM_FLAT, //!< Used to render flat shading without pre computing normals + PROGRAM_OLD_FLAT, //!< Used to render flat shading without pre computing normals without geometry shader + PROGRAM_SOLID_WIREFRAME, //!< Used to render edges with width superior to 1. + PROGRAM_NO_INTERPOLATION, //!< Used to render faces without interpolating their color. + PROGRAM_HEAT_INTENSITY, //!< Used to render special item in Heat_method_plugin + NB_OF_PROGRAMS //!< Holds the number of different programs in this enum. }; typedef CGAL::Bbox_3 Bbox; typedef CGAL::qglviewer::ManipulatedFrame ManipulatedFrame; @@ -375,7 +375,7 @@ public Q_SLOTS: //!Emits an aboutToBeDestroyed() signal. //!Override this function to delete what needs to be deleted on destruction. - //!This might be needed as items are not always deleted right away by Qt and this behaviour may cause simply a + //!This might be needed as items are not always deleted right away by Qt and this behavior may cause simply a //!memory leak, for example when multiple items are created at the same time. virtual void itemAboutToBeDestroyed(Scene_item*); //!Returns the alpha value for the item. @@ -443,6 +443,8 @@ protected: RenderingMode rendering_mode; //!The default context menu. QMenu* defaultContextMenu; + //!Specifies if the context menu should be rebuild on the next call. + bool context_menu_outdated = false; /*! Contains the previous RenderingMode. * This is used to determine if invalidateOpenGLBuffers should be called or not * in certain cases. diff --git a/Three/include/CGAL/Three/Scene_item_rendering_helper.h b/Three/include/CGAL/Three/Scene_item_rendering_helper.h index 83ee418e405..e6928c3dcb6 100644 --- a/Three/include/CGAL/Three/Scene_item_rendering_helper.h +++ b/Three/include/CGAL/Three/Scene_item_rendering_helper.h @@ -110,7 +110,7 @@ public: //! \brief setTriangleContainer sets the `id`th `Triangle_container` to `tc`. //! //! If `id` is bigger than the current size of the container vector, this vector is - //! resized accordingly. This means that for optimisation reasons, containers should be created + //! resized accordingly. This means that for optimization reasons, containers should be created //! decreasingly. //! void setTriangleContainer(std::size_t id, @@ -120,7 +120,7 @@ public: //! \brief setEdgeContainer sets the `id`th `Edge_container` to `tc`. //! //! If `id` is bigger than the current size of the container vector, this vector is - //! resized accordingly. This means that for optimisation reasons, containers should be created + //! resized accordingly. This means that for optimization reasons, containers should be created //! decreasingly. //! void setEdgeContainer(std::size_t id, @@ -130,7 +130,7 @@ public: //! \brief setPointContainer sets the `id`th `Point_container` to `tc`. //! //! If `id` is bigger than the current size of the container vector, this vector is - //! resized accordingly. This means that for optimisation reasons, containers should be created + //! resized accordingly. This means that for optimization reasons, containers should be created //! decreasingly. //! void setPointContainer(std::size_t id, diff --git a/Three/include/CGAL/Three/TextRenderer.h b/Three/include/CGAL/Three/TextRenderer.h index c5c729ec032..f04535841f7 100644 --- a/Three/include/CGAL/Three/TextRenderer.h +++ b/Three/include/CGAL/Three/TextRenderer.h @@ -52,12 +52,7 @@ public : :x(p_x), y(p_y), z(p_z),_3D(p_3D), _is_always_visible(always_visible), m_text(p_text), m_font(font), m_color(p_color) { QFontMetrics fm(m_font); -#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0) _width = float(fm.horizontalAdvance(m_text)+2); -#else - _width = float(fm.width(m_text)+2); -#endif - _height = float(fm.height()); } //!\brief Accessor for the string diff --git a/Three/include/CGAL/Three/Three.h b/Three/include/CGAL/Three/Three.h index 3dac95792a3..e3e6366d5b6 100644 --- a/Three/include/CGAL/Three/Three.h +++ b/Three/include/CGAL/Three/Three.h @@ -31,11 +31,7 @@ # define THREE_EXPORT Q_DECL_IMPORT #endif -#if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) -#define CGAL_QT_SKIP_EMPTY_PARTS QString::SkipEmptyParts -#else #define CGAL_QT_SKIP_EMPTY_PARTS ::Qt::SkipEmptyParts -#endif namespace CGAL{ namespace Three{ diff --git a/Three/include/CGAL/Three/Triangle_container.h b/Three/include/CGAL/Three/Triangle_container.h index cc9ded272b4..5bd1a1dc31a 100644 --- a/Three/include/CGAL/Three/Triangle_container.h +++ b/Three/include/CGAL/Three/Triangle_container.h @@ -49,7 +49,7 @@ struct DEMO_FRAMEWORK_EXPORT Triangle_container :public Primitive_container VColors, //!< Designates the buffer that contains the colors of the smooth vertices. FColors, //!< Designates the buffer that contains the colors of the flat vertices. Texture_map, //!< Designates the buffer that contains the UV map for the texture. - Distances, + Distances, //!< Designates the buffer that contains the distance values for vertices or facets Subdomain_indices, //!< Designates the buffer that contains the subdomains of both cells defining a c3t3 facet. NbOfVbos //!< Designates the size of the VBOs vector for `Triangle_container`s }; diff --git a/Three/include/CGAL/Three/Viewer_interface.h b/Three/include/CGAL/Three/Viewer_interface.h index 2bdba0aadd3..63d6824d613 100644 --- a/Three/include/CGAL/Three/Viewer_interface.h +++ b/Three/include/CGAL/Three/Viewer_interface.h @@ -53,26 +53,26 @@ public: */ enum OpenGL_program_IDs { - PROGRAM_WITH_LIGHT = 0, //! Used to render a surface or an edge affected by the light. It uses a per fragment lighting model, and renders the selected item brighter. - PROGRAM_WITHOUT_LIGHT, //! Used to render a polyhedron edge or points. It renders in a uniform color and is not affected by light. \attention It renders the selected item in black. - PROGRAM_NO_SELECTION, //! Used to render a polyline or a surface that is not affected by light, like a cutting plane. It renders in a uniform color that does not change with selection. - PROGRAM_WITH_TEXTURE, //! Used to render a textured polyhedron. Affected by light. - PROGRAM_PLANE_TWO_FACES, //! Used to render a two-faced plane. The two faces have a different color. Not affected by light. - PROGRAM_WITH_TEXTURED_EDGES, //! Used to render the edges of a textured polyhedron. Not affected by light. - PROGRAM_INSTANCED, //! Used to display instanced rendered spheres.Affected by light. - PROGRAM_INSTANCED_WIRE, //! Used to display instanced rendered wired spheres. Not affected by light. - PROGRAM_C3T3, //! Used to render a c3t3_item. It discards any fragment on a side of a plane, meaning that nothing is displayed on this side of the plane. Affected by light. - PROGRAM_C3T3_EDGES, //! Used to render the edges of a c3t3_item. It discards any fragment on a side of a plane, meaning that nothing is displayed on this side of the plane. Not affected by light. - PROGRAM_CUTPLANE_SPHERES, //! Used to render the spheres of an item with a cut plane. - PROGRAM_SPHERES, //! Used to render one or several spheres. - PROGRAM_DARK_SPHERES, //! Used to render one or several spheres without light (for picking for example). - PROGRAM_FLAT, /** Used to render flat shading without pre computing normals*/ - PROGRAM_OLD_FLAT, /** Used to render flat shading without pre computing normals without geometry shader*/ - PROGRAM_SOLID_WIREFRAME, //! Used to render edges with width superior to 1. - PROGRAM_NO_INTERPOLATION, //! Used to render faces without interpolating their color. - PROGRAM_HEAT_INTENSITY, //! Used to render special item in Heat_method_plugin - PROGRAM_TETRA_FILTERING, //! Used in Scene_tetrahedra_item with Tetrahedra_filtering_plugin - NB_OF_PROGRAMS //! Holds the number of different programs in this enum. + PROGRAM_WITH_LIGHT = 0, //!< Used to render a surface or an edge affected by the light. It uses a per fragment lighting model, and renders the selected item brighter. + PROGRAM_WITHOUT_LIGHT, //!< Used to render a polyhedron edge or points. It renders in a uniform color and is not affected by light. \attention It renders the selected item in black. + PROGRAM_NO_SELECTION, //!< Used to render a polyline or a surface that is not affected by light, like a cutting plane. It renders in a uniform color that does not change with selection. + PROGRAM_WITH_TEXTURE, //!< Used to render a textured polyhedron. Affected by light. + PROGRAM_PLANE_TWO_FACES, //!< Used to render a two-faced plane. The two faces have a different color. Not affected by light. + PROGRAM_WITH_TEXTURED_EDGES, //!< Used to render the edges of a textured polyhedron. Not affected by light. + PROGRAM_INSTANCED, //!< Used to display instanced rendered spheres.Affected by light. + PROGRAM_INSTANCED_WIRE, //!< Used to display instanced rendered wired spheres. Not affected by light. + PROGRAM_C3T3, //!< Used to render a c3t3_item. It discards any fragment on a side of a plane, meaning that nothing is displayed on this side of the plane. Affected by light. + PROGRAM_C3T3_EDGES, //!< Used to render the edges of a c3t3_item. It discards any fragment on a side of a plane, meaning that nothing is displayed on this side of the plane. Not affected by light. + PROGRAM_CUTPLANE_SPHERES, //!< Used to render the spheres of an item with a cut plane. + PROGRAM_SPHERES, //!< Used to render one or several spheres. + PROGRAM_DARK_SPHERES, //!< Used to render one or several spheres without light (for picking for example). + PROGRAM_FLAT, //!< Used to render flat shading without pre computing normals + PROGRAM_OLD_FLAT, //!< Used to render flat shading without pre computing normals without geometry shader + PROGRAM_SOLID_WIREFRAME, //!< Used to render edges with width superior to 1. + PROGRAM_NO_INTERPOLATION, //!< Used to render faces without interpolating their color. + PROGRAM_HEAT_INTENSITY, //!< Used to render special item in Heat_method_plugin + PROGRAM_TETRA_FILTERING, //!< Used in Scene_tetrahedra_item with Tetrahedra_filtering_plugin + NB_OF_PROGRAMS //!< Holds the number of different programs in this enum. }; //! \brief The viewer's QPainter diff --git a/Triangulation/include/CGAL/Triangulation_ds_vertex.h b/Triangulation/include/CGAL/Triangulation_ds_vertex.h index e6819f7431a..00e9fd6f730 100644 --- a/Triangulation/include/CGAL/Triangulation_ds_vertex.h +++ b/Triangulation/include/CGAL/Triangulation_ds_vertex.h @@ -75,7 +75,7 @@ public: return false; } bool found(false); - // These two typename below are OK because TDS fulfils the + // These two typename below are OK because TDS fulfills the // TriangulationDataStructure concept. typename TDS::Full_cell::Vertex_handle_iterator vit(full_cell()->vertices_begin()); typedef typename TDS::Vertex_handle Vertex_handle; diff --git a/Triangulation_2/TODO b/Triangulation_2/TODO index a93ed96ea5b..bbab622affc 100644 --- a/Triangulation_2/TODO +++ b/Triangulation_2/TODO @@ -53,8 +53,8 @@ ou de la face infini - Check if copy constructor and assignment operator of - constrained triangulation transfers the contrained marks. -- Something still tobe done for remove in Constrained + constrained triangulation transfers the contained marks. +- Something still to be done for remove in Constrained Delaunay_constrained and Constrained_triangulation_plus - Harmoniser find_conflicts() avec le 3d - tester entree vrml diff --git a/Triangulation_2/doc/Triangulation_2/Concepts/DelaunayTriangulationTraits_2.h b/Triangulation_2/doc/Triangulation_2/Concepts/DelaunayTriangulationTraits_2.h index f76e24c327a..0ec0e42e70d 100644 --- a/Triangulation_2/doc/Triangulation_2/Concepts/DelaunayTriangulationTraits_2.h +++ b/Triangulation_2/doc/Triangulation_2/Concepts/DelaunayTriangulationTraits_2.h @@ -26,7 +26,6 @@ required if the method `nearest_vertex()` is used. \cgalHasModelsBare{All models of the \cgal concept `Kernel`} \cgalHasModelsBare{`CGAL::Projection_traits_3` (not for dual Voronoi functions)} \cgalHasModelsBare{`CGAL::Projection_traits_xy_3` (not for dual Voronoi functions)} -\cgalHasModelsBare{`CGAL::Projection_traits_xy_3` (not for dual Voronoi functions)} \cgalHasModelsBare{`CGAL::Projection_traits_yz_3` (not for dual Voronoi functions)} \cgalHasModelsBare{`CGAL::Projection_traits_xz_3` (not for dual Voronoi functions)} \cgalHasModelsEnd diff --git a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h index 714e9295b61..caed792fa5e 100644 --- a/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_Delaunay_triangulation_2.h @@ -925,7 +925,7 @@ template < class Gt, class Tds, class Itag > typename Constrained_Delaunay_triangulation_2::Vertex_handle Constrained_Delaunay_triangulation_2:: insert(const Point& a, Locate_type lt, Face_handle loc, int li) -// insert a point p, whose localisation is known (lt, f, i) +// insert a point p, whose localization is known (lt, f, i) // constrained edges are updated // Delaunay property is restored { diff --git a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h index 90d6448f0e5..65ebc4b0fb0 100644 --- a/Triangulation_2/include/CGAL/Constrained_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Constrained_triangulation_2.h @@ -700,7 +700,7 @@ template < class Gt, class Tds, class Itag > typename Constrained_triangulation_2::Vertex_handle Constrained_triangulation_2:: insert(const Point& a, Locate_type lt, Face_handle loc, int li) -// insert a point p, whose localisation is known (lt, f, i) +// insert a point p, whose localization is known (lt, f, i) // in addition to what is done for non constrained triangulations // constrained edges are updated { diff --git a/Triangulation_2/include/CGAL/Regular_triangulation_2.h b/Triangulation_2/include/CGAL/Regular_triangulation_2.h index 54938928e5c..d7cae81c69e 100644 --- a/Triangulation_2/include/CGAL/Regular_triangulation_2.h +++ b/Triangulation_2/include/CGAL/Regular_triangulation_2.h @@ -1491,7 +1491,7 @@ regularize(Vertex_handle v) if(dimension() < 1) return; - //initialise faces_around + //initialize faces_around if(dimension() == 1) { faces_around.push_back(v->face()); faces_around.push_back(v->face()->neighbor(1- v->face()->index(v))); diff --git a/Triangulation_2/include/CGAL/Triangulation_2.h b/Triangulation_2/include/CGAL/Triangulation_2.h index 433ea5cb5af..5078301504b 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2.h +++ b/Triangulation_2/include/CGAL/Triangulation_2.h @@ -1465,7 +1465,7 @@ template typename Triangulation_2::Vertex_handle Triangulation_2:: insert(const Point& p, Locate_type lt, Face_handle loc, int li) - // insert a point p, whose localisation is known (lt, f, i) + // insert a point p, whose localization is known (lt, f, i) { if(number_of_vertices() == 0) { return(insert_first(p)); diff --git a/Triangulation_2/include/CGAL/Triangulation_2/insert_constraints.h b/Triangulation_2/include/CGAL/Triangulation_2/insert_constraints.h index dc08e642db7..9fbd223ac25 100644 --- a/Triangulation_2/include/CGAL/Triangulation_2/insert_constraints.h +++ b/Triangulation_2/include/CGAL/Triangulation_2/insert_constraints.h @@ -84,7 +84,6 @@ namespace CGAL { ConstraintIterator first, ConstraintIterator beyond) { - typedef typename T::Point Point; typedef typename T::Point Point; std::vector points; for (ConstraintIterator s_it=first; s_it!=beyond; ++s_it) diff --git a/Triangulation_3/TODO b/Triangulation_3/TODO index 01707e3e30c..4e4042a5d81 100644 --- a/Triangulation_3/TODO +++ b/Triangulation_3/TODO @@ -32,7 +32,7 @@ Delaunay dual sont effectivement utilisees - remplacer les create_face du remove2D par des create_cell et virer les create_face de la tds -- optimiser remove : +- optimizer remove : - algo d'Olivier si constructions filtrees disponibles (cf Olivier rappel de la reunion a ce sujet) - pour la creation de la TDS_2, on devrait pouvoir faire plus simple, diff --git a/Triangulation_3/benchmark/Triangulation_3/Triangulation_benchmark_3.cpp b/Triangulation_3/benchmark/Triangulation_3/Triangulation_benchmark_3.cpp index fa052480c6b..9d155f287fc 100644 --- a/Triangulation_3/benchmark/Triangulation_3/Triangulation_benchmark_3.cpp +++ b/Triangulation_3/benchmark/Triangulation_3/Triangulation_benchmark_3.cpp @@ -306,7 +306,7 @@ void benchmark_remove(std::vector& pts, if (nb_pts > max_pts) { - std::cerr << "ERROR: nb_pts > max_pts. Cancelling..." << std::endl; + std::cerr << "ERROR: nb_pts > max_pts. Canceling..." << std::endl; return; } diff --git a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_simplex_3.h b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_simplex_3.h index 354b3934cb5..261276c8c15 100644 --- a/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_simplex_3.h +++ b/Triangulation_3/test/Triangulation_3/include/CGAL/_test_cls_triangulation_simplex_3.h @@ -61,7 +61,7 @@ _test_cls_triangulation_simplex_3(const Triangulation &) //######################################################################## Cls t; - // Initialise to a 3D triangulation: + // initialize to a 3D triangulation: t.insert(Point(0,0,0)); t.insert(Point(1,0,0)); t.insert(Point(0,1,0)); diff --git a/copyright b/copyright index b32d3a58fc8..79f53928578 100644 --- a/copyright +++ b/copyright @@ -69,7 +69,6 @@ R = RU Groningen LEDA ETIMU Largest_empty_rect_2 T Linear_cell_complex CNRS - MacOSX F Maintenance ETIMUG Manual ETIMU Manual_tools EIM, Modena Software, Silicon Graphics