Merge remote-tracking branch 'cgal/master' into SLS-Weighted_skeleton-GF

This commit is contained in:
Mael Rouxel-Labbé 2023-03-20 10:06:38 +01:00
commit 85911f1b64
455 changed files with 37232 additions and 12468 deletions

View File

@ -159,7 +159,8 @@ jobs:
with:
script: |
const error = process.env.ERRORMSG
const msg = "There was an error while building the doc: \n"+error
const job_url = `${context.serverUrl}/CGAL/cgal/actions/runs/${context.runId}`
const msg = "There was an error while building the doc: \n"+error + "\n" + job_url
github.rest.issues.createComment({
owner: "CGAL",
repo: "cgal",

View File

@ -0,0 +1,30 @@
table {
margin-left: auto;
margin-right: auto;
margin-bottom: 24px;
border-spacing: 0;
border-bottom: 2px solid black;
border-top: 2px solid black;
}
table th {
padding: 3px 10px;
background-color: white;
border-top: none;
border-left: none;
border-right: none;
border-bottom: 1px solid black;
}
table td {
padding: 3px 10px;
border-top: none;
border-left: none;
border-bottom: none;
border-right: none;
}
table tr.odd {
background-color: #f0f0f0;
}
table tr.even {
background-color: #e0e0e0;
}

View File

@ -0,0 +1,43 @@
name: List workflow last run
on:
workflow_dispatch:
schedule:
- cron: "0 10 * * 1"
env:
GH_TOKEN: ${{ github.token }}
jobs:
list_workflow:
runs-on: ubuntu-latest
outputs:
messages: ${{ steps.cat_output.outputs.message }}
steps:
- name: checkout
uses: actions/checkout@v3
- name: run script
run: |
chmod +x ./Scripts/developer_scripts/list_cgal_workflows_last_run.sh
./Scripts/developer_scripts/list_cgal_workflows_last_run.sh > output.md
- name: convert markdown to html
run: |
sudo apt-get update && sudo apt-get install -y pandoc
pandoc -f markdown -t html --self-contained --css=.github/workflows/list_workflow_last_run.css -o output.html output.md
- name: set_output
id: cat_output
run: |
delimiter="$(openssl rand -hex 8)"
echo "message<<${delimiter}" >> "${GITHUB_OUTPUT}"
echo "Subject:List workflow run \nContent-Type: text/html; charset=\"UTF-8\"\n" >> "${GITHUB_OUTPUT}"
echo "<html><body>" >> "${GITHUB_OUTPUT}"
cat output.html >> "${GITHUB_OUTPUT}"
echo "</body></html>" >> "${GITHUB_OUTPUT}"
echo "${delimiter}" >> "${GITHUB_OUTPUT}"
call_send_email:
needs: list_workflow
uses: ./.github/workflows/send_email.yml
with:
message: ${{needs.list_workflow.outputs.messages}}
secrets:
email: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_TO }}
private_key: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_SSH_PRIVATE_KEY }}
user: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_SSH_USER }}
host: ${{ secrets.CGAL_SEND_WORKFLOW_LIST_EMAIL_SSH_HOST }}

31
.github/workflows/send_email.yml vendored Normal file
View File

@ -0,0 +1,31 @@
name: Send Email using SSH
on:
workflow_call:
inputs:
message:
description: 'Message to send'
required: true
type: string
secrets:
email:
required: true
private_key:
required: true
user:
required: true
host:
required: true
jobs:
send_email:
runs-on: ubuntu-latest
steps:
- name: install ssh keys
run: |
install -m 600 -D /dev/null ~/.ssh/id_rsa
echo "${{ secrets.private_key }}" > ~/.ssh/id_rsa
ssh-keyscan -H ${{ secrets.host }} > ~/.ssh/known_hosts
- name: send email via ssh
run: |
echo -e '${{ inputs.message }}' | ssh ${{ secrets.user }}@${{ secrets.host }} "/sbin/sendmail -t ${{ secrets.email }}"

38
.github/workflows/wiki_notification.yml vendored Normal file
View File

@ -0,0 +1,38 @@
name: Wiki Notification
on: gollum
jobs:
prepare_email:
runs-on: ubuntu-latest
outputs:
messages: ${{ steps.set-result.outputs.result }}
steps:
- name: get informations and prepare email
uses: actions/github-script@v6
id: set-result
with:
result-encoding: string
script: |
const payload = context.payload;
const actor = payload.sender;
const pages = payload.pages;
let messages = "Subject:Updates to CGAL Wiki \nContent-Type: text/html\n";
messages += "<html><body>";
messages += `<p>The following CGAL Wiki page were modified by <a href="${actor.html_url}">"${actor.login}"</a>:</p><ul>\n`
for (const page of pages){
messages += `<li><a href="${page.html_url}">${page.title}</a> (link to <a href="${page.html_url}/_compare/${page.sha}%5E...${page.sha}">the diff</a>)</li>\n`;
}
messages += "</ul></body></html>";
console.log( messages );
return messages;
call_send_email:
needs: prepare_email
uses: ./.github/workflows/send_email.yml
with:
message: ${{needs.prepare_email.outputs.messages}}
secrets:
email: ${{ secrets.CGAL_SEND_WIKI_EMAIL_TO }}
private_key: ${{ secrets.CGAL_SEND_WIKI_EMAIL_SSH_PRIVATE_KEY }}
user: ${{ secrets.CGAL_SEND_WIKI_EMAIL_SSH_USER }}
host: ${{ secrets.CGAL_SEND_WIKI_EMAIL_SSH_HOST }}

View File

@ -6,12 +6,14 @@ project(AABB_traits_benchmark)
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core)
# google benchmark
find_package(benchmark)
if (benchmark_FOUND)
create_single_source_cgal_program("tree_creation.cpp")
target_link_libraries(tree_creation benchmark::benchmark)
endif()
create_single_source_cgal_program("test.cpp")
create_single_source_cgal_program("tree_construction.cpp")
# google benchmark
find_package(benchmark QUIET)
if(benchmark_FOUND)
create_single_source_cgal_program("tree_creation.cpp")
target_link_libraries(tree_creation benchmark::benchmark)
else()
message(STATUS "NOTICE: The benchmark 'tree_creation.cpp' requires the Google benchmark library, and will not be compiled.")
endif()

View File

@ -5,6 +5,7 @@ project(AABB_tree_Demo)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
if(NOT POLICY CMP0070 AND POLICY CMP0053)
@ -31,10 +32,8 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
include(AddFileDependencies)
qt5_generate_moc("MainWindow.h"
"${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp")
add_file_dependencies(MainWindow_moc.cpp
"${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h")
qt5_generate_moc("MainWindow.h" "${CMAKE_CURRENT_BINARY_DIR}/MainWindow_moc.cpp")
add_file_dependencies(MainWindow_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/MainWindow.h")
qt5_generate_moc("Viewer.h" "${CMAKE_CURRENT_BINARY_DIR}/Viewer_moc.cpp")
add_file_dependencies(Viewer_moc.cpp "${CMAKE_CURRENT_SOURCE_DIR}/Viewer.h")
@ -62,8 +61,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
cgal_add_compilation_test(AABB_demo)
else(CGAL_Qt5_FOUND
AND Qt5_FOUND)
else(CGAL_Qt5_FOUND AND Qt5_FOUND)
set(AABB_MISSING_DEPS "")
@ -75,11 +73,6 @@ else(CGAL_Qt5_FOUND
set(AABB_MISSING_DEPS "Qt5, ${AABB_MISSING_DEPS}")
endif()
message(
STATUS
"NOTICE: This demo requires ${AABB_MISSING_DEPS}and will not be compiled."
)
message("NOTICE: This demo requires ${AABB_MISSING_DEPS}, and will not be compiled.")
endif(
CGAL_Qt5_FOUND
AND Qt5_FOUND)
endif(CGAL_Qt5_FOUND AND Qt5_FOUND)

View File

@ -8,7 +8,7 @@
\cgalPkgDescriptionBegin{3D Fast Intersection and Distance Computation,PkgAABBTree}
\cgalPkgPicture{aabb-teaser-thumb.png}
\cgalPkgSummaryBegin
\cgalPkgAuthors{Pierre Alliez, Stéphane Tayeb, Camille Wormser}
\cgalPkgAuthors{Pierre Alliez, Stéphane Tayeb, and Camille Wormser}
\cgalPkgDesc{The AABB (axis-aligned bounding box) tree component offers a static data structure and algorithms to perform efficient intersection and distance queries on sets of finite 3D geometric objects.}
\cgalPkgManuals{Chapter_3D_Fast_Intersection_and_Distance_Computation,PkgAABBTreeRef}
\cgalPkgSummaryEnd

View File

@ -143,18 +143,18 @@ struct AABB_covered_triangle_tree_traits
// Primitive ID --> box vector pos --> Bounding Box
using BPMB = internal::Vector_property_map<CGAL::Bbox_3>;
using BPM = CGAL::Property_map_binder<IDPM, BPMB>;
using BPM = CGAL::Compose_property_map<IDPM, BPMB>;
// Primitive ID --> point vector pos --> Reference Point
using RPPMB = internal::Vector_property_map<Point>;
using RPPM = CGAL::Property_map_binder<IDPM, RPPMB>;
using RPPM = CGAL::Compose_property_map<IDPM, RPPMB>;
// Primitive ID --> Datum pos vector pos --> Datum pos --> Datum
// The vector of data has size nf, but the vector of datum pos has size tree.size()
using DPPMB = internal::Vector_property_map<std::size_t>; // pos --> Datum pos
using DPPM = CGAL::Property_map_binder<IDPM, DPPMB>; // PID --> Datum pos
using DPPM = CGAL::Compose_property_map<IDPM, DPPMB>; // PID --> Datum pos
using DPMB = internal::Vector_property_map<Triangle_3>; // Datum pos --> Datum
using DPM = CGAL::Property_map_binder<DPPM, DPMB>; // PID --> Datum
using DPM = CGAL::Compose_property_map<DPPM, DPMB>; // PID --> Datum
using Primitive = CGAL::AABB_primitive<ID, DPM, RPPM,
CGAL::Tag_true /*external pmaps*/,
@ -207,7 +207,7 @@ public:
: Base(traits),
m_sq_length(square(max_length)),
m_dppmb(), m_bpm(), m_rppm(), m_dpmb(),
m_dpm(DPPM(m_dppmb/*first binder's value_map*/)/*second binder's key map*/, m_dpmb)
m_dpm(DPPM(Default(), m_dppmb/*first binder's value_map*/)/*second binder's key map*/, m_dpmb)
{
initialize_tree_property_maps();
}

View File

@ -9,7 +9,7 @@
\cgalPkgDescriptionBegin{Advancing Front Surface Reconstruction,PkgAdvancingFrontSurfaceReconstruction}
\cgalPkgPicture{afsr-detail.png}
\cgalPkgSummaryBegin
\cgalPkgAuthors{Tran Kai Frank Da, David Cohen-Steiner}
\cgalPkgAuthors{Tran Kai Frank Da and David Cohen-Steiner}
\cgalPkgDesc{This package provides a greedy algorithm for surface reconstruction from an
unorganized point set. Starting from a seed facet, a piecewise linear
surface is grown by adding Delaunay triangles one by one. The most

View File

@ -4,15 +4,13 @@ project(Algebraic_kernel_d_Examples)
find_package(CGAL REQUIRED COMPONENTS Core)
find_package(MPFI QUIET)
if(MPFI_FOUND AND NOT CGAL_DISABLE_GMP)
include(${MPFI_USE_FILE})
include(CGAL_VersionUtils)
create_single_source_cgal_program("Compare_1.cpp")
create_single_source_cgal_program("Construct_algebraic_real_1.cpp")
create_single_source_cgal_program("Isolate_1.cpp")
create_single_source_cgal_program("Sign_at_1.cpp")
create_single_source_cgal_program("Solve_1.cpp")
else()
message(STATUS "This program requires the CGAL, CGAL_Core and MPFI libraries, and will not be compiled.")
message("NOTICE: This project requires the MPFI library and GMP support, and will not be compiled.")
endif()

View File

@ -4,48 +4,33 @@ project(Algebraic_kernel_d_Tests)
# CGAL and its components
find_package(CGAL REQUIRED COMPONENTS Core)
find_package(RS3 QUIET)
find_package(MPFI QUIET)
if(MPFI_FOUND)
message(STATUS "Found MPFI")
include(${MPFI_USE_FILE})
endif()
find_package(RS3 QUIET)
if(RS3_FOUND)
message(STATUS "Found RS3")
include(${RS3_USE_FILE})
endif()
# Boost and its components
find_package(Boost)
if(NOT Boost_FOUND)
message(
STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
# include for local directory
include_directories(BEFORE include)
# Creating entries for all .cpp/.C files with "main" routine
# ##########################################################
create_single_source_cgal_program("cyclic.cpp")
create_single_source_cgal_program("Descartes.cpp")
if(NOT CGAL_DISABLE_GMP)
create_single_source_cgal_program("Algebraic_curve_kernel_2.cpp")
create_single_source_cgal_program("algebraic_curve_kernel_2_tools.cpp")
create_single_source_cgal_program("Algebraic_kernel_d_1_LEDA.cpp")
create_single_source_cgal_program(
"Algebraic_kernel_d_1_CORE_Integer_rational.cpp")
create_single_source_cgal_program(
"Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp")
create_single_source_cgal_program(
"Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp")
create_single_source_cgal_program(
"Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp")
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_Integer_rational.cpp")
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtII_rational.cpp")
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtRI_rational.cpp")
create_single_source_cgal_program("Algebraic_kernel_d_1_CORE_SqrtRR_rational.cpp")
create_single_source_cgal_program("Algebraic_kernel_d_1_GMP.cpp")
create_single_source_cgal_program("Algebraic_kernel_d_2.cpp")
@ -54,14 +39,13 @@ if(NOT CGAL_DISABLE_GMP)
create_single_source_cgal_program("Curve_analysis_2.cpp")
create_single_source_cgal_program("Curve_pair_analysis_2.cpp")
create_single_source_cgal_program("Real_embeddable_traits_extension.cpp")
if(RS_FOUND)
create_single_source_cgal_program("Algebraic_kernel_rs_gmpq_d_1.cpp")
create_single_source_cgal_program("Algebraic_kernel_rs_gmpz_d_1.cpp")
else()
message(
STATUS
"NOTICE: Some tests require the RS library, and will not be compiled.")
message(STATUS "NOTICE: Some tests require the RS library, and will not be compiled.")
endif()
else()
message(STATUS "NOTICE: Some tests require the CGAL_Core library, and will not be compiled.")
message(STATUS "NOTICE: Some tests require GMP support, and will not be compiled.")
endif()

View File

@ -8,7 +8,7 @@
\cgalPkgDescriptionBegin{2D Alpha Shapes,PkgAlphaShapes2}
\cgalPkgPicture{alpha-detail.png}
\cgalPkgSummaryBegin
\cgalPkgAuthors{Tran Kai Frank Da}
\cgalPkgAuthor{Tran Kai Frank Da}
\cgalPkgDesc{This package offers a data structure encoding the whole family of alpha-complexes related to a given 2D Delaunay or regular triangulation. In particular, the data structure allows to retrieve the alpha-complex for any alpha value, the whole spectrum of critical alpha values and a filtration on the triangulation faces (this filtration is based on the first alpha value for which each face is included on the alpha-complex).}
\cgalPkgManuals{Chapter_2D_Alpha_Shapes,PkgAlphaShapes2Ref}
\cgalPkgSummaryEnd

View File

@ -6,6 +6,7 @@ project(Alpha_shapes_3_Demo)
# Find includes in corresponding build directories
set(CMAKE_INCLUDE_CURRENT_DIR ON)
# Instruct CMake to run moc automatically when needed.
set(CMAKE_AUTOMOC ON)
if(NOT POLICY CMP0070 AND POLICY CMP0053)
@ -46,8 +47,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
else()
message(
STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled."
)
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -9,7 +9,7 @@
\cgalPkgDescriptionBegin{3D Alpha Wrapping,PkgAlphaWrap3}
\cgalPkgPicture{alpha_wrap_3.jpg}
\cgalPkgSummaryBegin
\cgalPkgAuthors{Pierre Alliez, David Cohen-Steiner, Michael Hemmer, Cédric Portaneri, Mael Rouxel-Labbé}
\cgalPkgAuthors{Pierre Alliez, David Cohen-Steiner, Michael Hemmer, Cédric Portaneri, and Mael Rouxel-Labbé}
\cgalPkgDesc{This component takes a 3D triangle mesh, a triangle soup, or a point set as input, and generates
a valid triangulated surface mesh that strictly contains the input (watertight, intersection-free
and 2-manifold). The algorithm proceeds by shrink-wrapping

View File

@ -175,18 +175,18 @@ struct AABB_tree_splitter_traits
// Primitive ID --> box vector pos --> Bounding Box
using BPMB = internal::Vector_property_map<CGAL::Bbox_3>;
using BPM = CGAL::Property_map_binder<IDPM, BPMB>;
using BPM = CGAL::Compose_property_map<IDPM, BPMB>;
// Primitive ID --> point vector pos --> Reference Point
using RPPMB = internal::Vector_property_map<Point>;
using RPPM = CGAL::Property_map_binder<IDPM, RPPMB>;
using RPPM = CGAL::Compose_property_map<IDPM, RPPMB>;
// Primitive ID --> Datum pos vector pos --> Datum pos --> Datum
// The vector of data has size nf, but the vector of datum pos has size tree.size()
using DPPMB = internal::Vector_property_map<std::size_t>; // pos --> Datum pos
using DPPM = CGAL::Property_map_binder<IDPM, DPPMB>; // PID --> Datum pos
using DPPM = CGAL::Compose_property_map<IDPM, DPPMB>; // PID --> Datum pos
using DPMB = internal::Vector_property_map<Triangle_3>; // Datum pos --> Datum
using DPM = CGAL::Property_map_binder<DPPM, DPMB>; // PID --> Datum
using DPM = CGAL::Compose_property_map<DPPM, DPMB>; // PID --> Datum
using Primitive = CGAL::AABB_primitive<ID, DPM, RPPM,
CGAL::Tag_true /*external pmaps*/,
@ -236,7 +236,7 @@ public:
:
m_sq_alpha(square(alpha)),
m_dppmb(), m_bpm(), m_rppm(), m_dpmb(),
m_dpm(DPPM(m_dppmb/*first binder's value_map*/)/*second binder's key map*/, m_dpmb)
m_dpm(DPPM(Default(), m_dppmb/*first binder's value_map*/)/*second binder's key map*/, m_dpmb)
{ }
protected:

View File

@ -303,7 +303,7 @@ void test_points_API(const std::string& ps_filename,
int main(int argc, char** argv)
{
const std::string tm_filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/polygon_mesh.off"); // mesh
const std::string tm_filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/building.off"); // mesh
const std::string ts_filename = (argc > 2) ? argv[2] : CGAL::data_file_path("meshes/oblong-shuffled.off"); // triangle soup
const std::string ss_filename = (argc > 3) ? argv[3] : CGAL::data_file_path("images/420.polylines.txt"); // segment soup
const std::string ps_filename = (argc > 4) ? argv[4] : CGAL::data_file_path("points_3/b9_training.ply"); // point set

View File

@ -6,7 +6,7 @@ project(Arithmetic_kernel_Tests)
find_package(CGAL REQUIRED COMPONENTS Core)
find_package(GMP QUIET)
find_package(GMP)
if(GMP_FOUND)
@ -18,7 +18,7 @@ if(GMP_FOUND)
include_directories(include)
find_package(MPFI)
find_package(MPFI QUIET)
if(MPFI_FOUND)
include(${MPFI_USE_FILE})
@ -27,16 +27,13 @@ if(GMP_FOUND)
# version needs GMP>=4.2, so we require this dependency only here and
# not in FindMPFI.cmake
if(_IS_GMP_VERSION_TO_LOW)
message(
STATUS
"MPFI tests need GMP>=4.2, some of the tests will not be compiled")
message(STATUS "NOTICE: MPFI tests need GMP>=4.2, some of the tests will not be compiled")
else(_IS_GMP_VERSION_TO_LOW)
include(${MPFI_USE_FILE})
create_single_source_cgal_program("GMP_arithmetic_kernel.cpp")
endif(_IS_GMP_VERSION_TO_LOW)
else(MPFI_FOUND)
message(
STATUS "MPFI is not present, some of the tests will not be compiled.")
message(STATUS "NOTICE: MPFI is not present, some of the tests will not be compiled.")
endif(MPFI_FOUND)
create_single_source_cgal_program("Arithmetic_kernel.cpp")
@ -46,7 +43,6 @@ if(GMP_FOUND)
else()
message(
STATUS "This program requires the CGAL library, and will not be compiled.")
message("NOTICE: This project requires GMP support, and will not be compiled.")
endif()

View File

@ -1,7 +1,7 @@
#ifndef LEXICAL_CAST_HPP
#define LEXICAL_CAST_HPP
/*! This files provides lexical casts from std::string to any one of the number
/*! This file provides lexical casts from std::string to any one of the number
* types we intend to use in the benchmark, and a lexical cast does not exist.
* It is inspired by boost::lexical_cast
*/

View File

@ -12,10 +12,10 @@ if(POLICY CMP0071)
cmake_policy(SET CMP0071 NEW)
endif()
find_package(CGAL QUIET COMPONENTS Qt5 OPTIONAL_COMPONENTS Core)
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core Qt5)
find_package(Qt5 QUIET COMPONENTS Gui Widgets)
if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND)
if (CGAL_Qt5_FOUND AND Qt5_FOUND)
include(${CGAL_USE_FILE})
add_compile_definitions(QT_NO_KEYWORDS)
include_directories( BEFORE ./ )
@ -110,10 +110,10 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND)
${CGAL_Qt5_RESOURCE_FILES}
${CGAL_Qt5_MOC_FILES})
target_link_libraries(arrangement_2 Qt5::Core Qt5::Gui Qt5::Widgets)
target_link_libraries(arrangement_2 CGAL::CGAL CGAL::CGAL_Qt5)
target_link_libraries(arrangement_2 PRIVATE Qt5::Core Qt5::Gui Qt5::Widgets)
target_link_libraries(arrangement_2 PRIVATE CGAL::CGAL CGAL::CGAL_Qt5)
if(CGAL_Core_FOUND)
target_link_libraries(arrangement_2 CGAL::CGAL_Core)
target_link_libraries(arrangement_2 PRIVATE CGAL::CGAL_Core)
endif()
add_to_cached_list(CGAL_EXECUTABLE_TARGETS arrangement_2)
@ -124,15 +124,11 @@ if (CGAL_FOUND AND CGAL_Qt5_FOUND AND Qt5_FOUND)
else()
set(MISSING_DEPS "")
if(NOT CGAL_FOUND)
set(MISSING_DEPS "CGAL, ${MISSING_DEPS}")
endif()
if(NOT CGAL_Qt5_FOUND)
set(MISSING_DEPS "the CGAL Qt5 library, ${MISSING_DEPS}")
endif()
if(NOT Qt5_FOUND)
set(MISSING_DEPS "Qt5, ${MISSING_DEPS}")
endif()
message(STATUS
"NOTICE: This demo requires ${MISSING_DEPS} and will not be compiled.")
message("NOTICE: This demo requires ${MISSING_DEPS} and will not be compiled.")
endif()

View File

@ -1,7 +1,7 @@
#ifndef CGAL_TEST_CONFIGURATION_H
#define CGAL_TEST_CONFIGURATION_H
/*! This files contains define statements, include statement, and typedef
/*! This file contains define statements, include statement, and typedef
* of the number types, kernel, and traits used.
*
*/

View File

@ -7,23 +7,6 @@ project(BGL_LCC_Examples)
# CGAL and its components
find_package(CGAL REQUIRED)
# Boost and its components
find_package(Boost REQUIRED)
if(NOT Boost_FOUND)
message(
STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
# include for local directory
# Creating entries for all C++ files with "main" routine
# ##########################################################
# create a target per cppfile
file(
GLOB_RECURSE cppfiles

View File

@ -7,38 +7,11 @@ project(BGL_OpenMesh_Examples)
# CGAL and its components
find_package(CGAL REQUIRED)
# Boost and its components
find_package(Boost REQUIRED)
if(NOT Boost_FOUND)
message(
STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
find_package(OpenMesh QUIET)
find_package(OpenMesh)
if(OpenMesh_FOUND)
include(UseOpenMesh)
else()
message(
STATUS "NOTICE: These examples require OpenMesh and will not be compiled.")
return()
endif()
# include for local directory
# include for local package
# Creating entries for all C++ files with "main" routine
# ##########################################################
if(OpenMesh_FOUND)
create_single_source_cgal_program("TriMesh.cpp")
target_link_libraries(TriMesh PRIVATE ${OPENMESH_LIBRARIES})
else()
message("NOTICE: This project requires OpenMesh and will not be compiled.")
endif()

View File

@ -8,25 +8,5 @@ project(BGL_graphcut_Examples)
# CGAL and its components
find_package(CGAL REQUIRED)
# Boost and its components
find_package(Boost REQUIRED)
if(NOT Boost_FOUND)
message(
STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
# include for local directory
# include for local package
# Creating entries for all C++ files with "main" routine
# ##########################################################
create_single_source_cgal_program("alpha_expansion_example.cpp")
create_single_source_cgal_program(
"face_selection_borders_regularization_example.cpp")
create_single_source_cgal_program("face_selection_borders_regularization_example.cpp")

View File

@ -7,54 +7,28 @@ project(BGL_polyhedron_3_Examples)
# CGAL and its components
find_package(CGAL REQUIRED)
# Boost and its components
find_package(Boost REQUIRED)
if(NOT Boost_FOUND)
message(
STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
# include for local directory
# include for local package
# Creating entries for all C++ files with "main" routine
# ##########################################################
create_single_source_cgal_program("distance.cpp")
create_single_source_cgal_program("incident_vertices.cpp")
create_single_source_cgal_program("kruskal.cpp")
create_single_source_cgal_program("kruskal_with_stored_id.cpp")
create_single_source_cgal_program("normals.cpp")
create_single_source_cgal_program("range.cpp")
create_single_source_cgal_program("transform_iterator.cpp")
create_single_source_cgal_program("copy_polyhedron.cpp")
find_package( OpenMesh QUIET )
find_package(OpenMesh QUIET)
if(OpenMesh_FOUND)
target_link_libraries( copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES} )
target_compile_definitions( copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH )
target_link_libraries(copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES})
target_compile_definitions(copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH)
else()
message(STATUS "Examples that use OpenMesh will not be compiled.")
message(STATUS "NOTICE: The example 'copy_polyhedron' will not use OpenMesh.")
endif()
find_package( METIS )
find_package(METIS QUIET)
include(CGAL_METIS_support)
if( TARGET CGAL::METIS_support )
create_single_source_cgal_program( "polyhedron_partition.cpp" )
target_link_libraries( polyhedron_partition PUBLIC CGAL::METIS_support)
if(TARGET CGAL::METIS_support)
create_single_source_cgal_program("polyhedron_partition.cpp")
target_link_libraries(polyhedron_partition PUBLIC CGAL::METIS_support)
else()
message( STATUS "Examples that use the METIS library will not be compiled." )
message(STATUS "NOTICE: The example 'polyhedron_partition' requires the METIS library, and will not be compiled.")
endif()

View File

@ -3,8 +3,6 @@ project(BGL_surface_mesh_Examples)
find_package(CGAL REQUIRED)
# include for local package
create_single_source_cgal_program("prim.cpp")
create_single_source_cgal_program("gwdwg.cpp")
create_single_source_cgal_program("seam_mesh.cpp")
@ -12,11 +10,11 @@ create_single_source_cgal_program("write_inp.cpp")
create_single_source_cgal_program("surface_mesh_dual.cpp")
create_single_source_cgal_program("connected_components.cpp")
find_package(METIS)
find_package(METIS QUIET)
include(CGAL_METIS_support)
if( TARGET CGAL::METIS_support )
create_single_source_cgal_program( "surface_mesh_partition.cpp" )
target_link_libraries( surface_mesh_partition PUBLIC CGAL::METIS_support )
if(TARGET CGAL::METIS_support)
create_single_source_cgal_program("surface_mesh_partition.cpp")
target_link_libraries(surface_mesh_partition PUBLIC CGAL::METIS_support)
else()
message(STATUS "Examples that use the METIS library will not be compiled.")
message(STATUS "NOTICE: Examples that use the METIS library will not be compiled.")
endif()

View File

@ -588,31 +588,31 @@ struct Face_filtered_graph
return selected_halfedges.count();
}
Property_map_binder<FIM, typename Pointer_property_map<typename boost::property_traits<FIM>::value_type>::type>
Compose_property_map<FIM, typename Pointer_property_map<typename boost::property_traits<FIM>::value_type>::type>
get_face_index_map() const
{
is_imap_in_use.set(0);
initialize_face_indices();
return bind_property_maps(fimap, make_property_map(face_indices));
return make_compose_property_map(fimap, make_property_map(face_indices));
}
Property_map_binder<VIM, typename Pointer_property_map<typename boost::property_traits<VIM>::value_type>::type>
Compose_property_map<VIM, typename Pointer_property_map<typename boost::property_traits<VIM>::value_type>::type>
get_vertex_index_map() const
{
is_imap_in_use.set(1);
initialize_vertex_indices();
return bind_property_maps(vimap, make_property_map(vertex_indices) );
return make_compose_property_map(vimap, make_property_map(vertex_indices) );
}
Property_map_binder<HIM, typename Pointer_property_map<typename boost::property_traits<HIM>::value_type >::type>
Compose_property_map<HIM, typename Pointer_property_map<typename boost::property_traits<HIM>::value_type >::type>
get_halfedge_index_map() const
{
is_imap_in_use.set(2);
initialize_halfedge_indices();
return bind_property_maps(himap, make_property_map(halfedge_indices) );
return make_compose_property_map(himap, make_property_map(halfedge_indices) );
}
/// returns `true` if around any vertex of a selected face there is at most a single umbrella
@ -1322,7 +1322,7 @@ struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost
typedef CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap> FFG;
typedef typename FFG::FIM FIM;
typedef typename CGAL::Property_map_binder<FIM,
typedef typename CGAL::Compose_property_map<FIM,
typename CGAL::Pointer_property_map<
typename boost::property_traits<FIM>::value_type>::type> type;
typedef type const_type;
@ -1334,7 +1334,7 @@ struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost
typedef CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap> FFG;
typedef typename FFG::VIM VIM;
typedef typename CGAL::Property_map_binder<VIM,
typedef typename CGAL::Compose_property_map<VIM,
typename CGAL::Pointer_property_map<
typename boost::property_traits<VIM>::value_type>::type> type;
typedef type const_type;
@ -1346,7 +1346,7 @@ struct property_map<CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap>, boost
typedef CGAL::Face_filtered_graph<Graph, FIMap, VIMap, HIMap> FFG;
typedef typename FFG::HIM HIM;
typedef typename CGAL::Property_map_binder<HIM,
typedef typename CGAL::Compose_property_map<HIM,
typename CGAL::Pointer_property_map<
typename boost::property_traits<HIM>::value_type>::type> type;
typedef type const_type;

View File

@ -15,6 +15,8 @@
#include <CGAL/iterator.h>
#include <CGAL/Kernel_traits.h>
#include <CGAL/Origin.h>
#include <CGAL/iterator.h>
#include <CGAL/Default.h>
#include <CGAL/Named_function_parameters.h>
#include <CGAL/property_map.h>
@ -276,34 +278,37 @@ public:
typedef typename CGAL::Identity_property_map<const Dummy_point> const_type;
};
template <class PointRange, class NamedParameters, typename NP_TAG = internal_np::point_t>
template <class PointRange, class NamedParameters, class PointMap = Default, class NormalMap = Default>
struct Point_set_processing_3_np_helper
{
typedef typename std::iterator_traits<typename PointRange::iterator>::value_type Value_type;
typedef CGAL::Identity_property_map<Value_type> DefaultPMap;
typedef CGAL::Identity_property_map<const Value_type> DefaultConstPMap;
typedef typename Default::Get<PointMap, CGAL::Identity_property_map<Value_type>>::type DefaultPMap;
typedef typename Default::Get<PointMap, CGAL::Identity_property_map<const Value_type>>::type DefaultConstPMap;
typedef typename internal_np::Lookup_named_param_def<NP_TAG,
NamedParameters,
DefaultPMap>::type Point_map;
typedef typename internal_np::Lookup_named_param_def<NP_TAG,
NamedParameters,
DefaultConstPMap>::type Const_point_map;
typedef typename internal_np::Lookup_named_param_def<internal_np::point_t,
NamedParameters,DefaultPMap> ::type Point_map; // public
typedef typename internal_np::Lookup_named_param_def<internal_np::point_t,
NamedParameters,DefaultConstPMap> ::type Const_point_map; // public
typedef typename boost::property_traits<Point_map>::value_type Point;
typedef typename Kernel_traits<Point>::Kernel Default_geom_traits;
typedef typename internal_np::Lookup_named_param_def<internal_np::geom_traits_t,
NamedParameters,
Default_geom_traits>::type Geom_traits;
typedef typename internal_np::Lookup_named_param_def <
internal_np::geom_traits_t,
NamedParameters,
Default_geom_traits
> ::type Geom_traits; // public
typedef typename Geom_traits::FT FT;
typedef typename Geom_traits::FT FT; // public
typedef Constant_property_map<Value_type, typename Geom_traits::Vector_3> DummyNormalMap;
typedef typename Default::Get<NormalMap, DummyNormalMap>::type DefaultNMap;
typedef typename internal_np::Lookup_named_param_def<internal_np::normal_t,
NamedParameters,
DummyNormalMap>::type Normal_map;
typedef typename internal_np::Lookup_named_param_def<
internal_np::normal_t,
NamedParameters,
DefaultNMap
> ::type Normal_map; // public
static Point_map get_point_map(PointRange&, const NamedParameters& np)
{

View File

@ -7,100 +7,44 @@ project(BGL_Tests)
# CGAL and its components
find_package(CGAL REQUIRED)
# Boost and its components
find_package(Boost)
if(NOT Boost_FOUND)
message(
STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
create_single_source_cgal_program("test_split.cpp")
create_single_source_cgal_program("next.cpp")
create_single_source_cgal_program("test_circulator.cpp")
create_single_source_cgal_program("test_Gwdwg.cpp")
create_single_source_cgal_program("test_bgl_dual.cpp")
create_single_source_cgal_program("graph_concept_Polyhedron_3.cpp")
create_single_source_cgal_program("graph_concept_Dual.cpp")
create_single_source_cgal_program("graph_concept_Triangulation_2.cpp")
create_single_source_cgal_program("graph_concept_Surface_mesh.cpp")
create_single_source_cgal_program("graph_concept_Seam_mesh_Surface_mesh.cpp")
create_single_source_cgal_program("graph_concept_Gwdwg_Surface_mesh.cpp")
create_single_source_cgal_program("graph_concept_Linear_cell_complex.cpp")
create_single_source_cgal_program("graph_concept_Arrangement_2.cpp")
create_single_source_cgal_program("graph_concept_Derived.cpp" )
create_single_source_cgal_program("test_clear.cpp" )
create_single_source_cgal_program("test_helpers.cpp")
create_single_source_cgal_program("test_Has_member_clear.cpp")
create_single_source_cgal_program("test_Has_member_id.cpp")
create_single_source_cgal_program("test_bgl_read_write.cpp")
create_single_source_cgal_program("graph_concept_Face_filtered_graph.cpp")
create_single_source_cgal_program("test_Manifold_face_removal.cpp")
create_single_source_cgal_program("test_Regularize_face_selection_borders.cpp")
create_single_source_cgal_program("test_Face_filtered_graph.cpp")
create_single_source_cgal_program("test_Euler_operations.cpp")
create_single_source_cgal_program("test_test_face.cpp" )
create_single_source_cgal_program("test_Collapse_edge.cpp" )
create_single_source_cgal_program("test_Collapse_edge_with_constraints.cpp" )
create_single_source_cgal_program("test_graph_traits.cpp")
create_single_source_cgal_program("test_Properties.cpp")
create_single_source_cgal_program("bench_read_from_stream_vs_add_face_and_add_faces.cpp")
create_single_source_cgal_program("graph_traits_inheritance.cpp" )
create_single_source_cgal_program("test_deprecated_io.cpp")
find_package(OpenMesh QUIET)
if(OpenMesh_FOUND)
include(UseOpenMesh)
add_definitions(-DCGAL_USE_OPENMESH)
else()
message(STATUS "Tests that use OpenMesh will not be compiled.")
endif()
# include for local package
# Creating entries for all .cpp/.C files with "main" routine
# ##########################################################
if(OpenMesh_FOUND)
create_single_source_cgal_program("graph_concept_OpenMesh.cpp")
target_link_libraries(graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES})
endif()
create_single_source_cgal_program("test_split.cpp")
create_single_source_cgal_program("next.cpp")
create_single_source_cgal_program("test_circulator.cpp")
create_single_source_cgal_program("test_Gwdwg.cpp")
create_single_source_cgal_program("test_bgl_dual.cpp")
create_single_source_cgal_program("graph_concept_Polyhedron_3.cpp")
create_single_source_cgal_program("graph_concept_Dual.cpp")
create_single_source_cgal_program("graph_concept_Triangulation_2.cpp")
create_single_source_cgal_program("graph_concept_Surface_mesh.cpp")
create_single_source_cgal_program("graph_concept_Seam_mesh_Surface_mesh.cpp")
create_single_source_cgal_program("graph_concept_Gwdwg_Surface_mesh.cpp")
create_single_source_cgal_program("graph_concept_Linear_cell_complex.cpp")
create_single_source_cgal_program("graph_concept_Arrangement_2.cpp")
create_single_source_cgal_program( "graph_concept_Derived.cpp" )
create_single_source_cgal_program( "test_clear.cpp" )
create_single_source_cgal_program("test_helpers.cpp")
create_single_source_cgal_program("test_Has_member_clear.cpp")
create_single_source_cgal_program("test_Has_member_id.cpp")
create_single_source_cgal_program("test_bgl_read_write.cpp")
create_single_source_cgal_program("graph_concept_Face_filtered_graph.cpp")
create_single_source_cgal_program("test_Manifold_face_removal.cpp")
create_single_source_cgal_program("test_Regularize_face_selection_borders.cpp")
create_single_source_cgal_program("test_Face_filtered_graph.cpp")
create_single_source_cgal_program("test_Euler_operations.cpp")
create_single_source_cgal_program( "test_test_face.cpp" )
create_single_source_cgal_program( "test_Collapse_edge.cpp" )
create_single_source_cgal_program( "test_Collapse_edge_with_constraints.cpp" )
create_single_source_cgal_program("test_graph_traits.cpp")
create_single_source_cgal_program("test_Properties.cpp")
create_single_source_cgal_program(
"bench_read_from_stream_vs_add_face_and_add_faces.cpp")
create_single_source_cgal_program( "graph_traits_inheritance.cpp" )
create_single_source_cgal_program("test_deprecated_io.cpp")
if(OpenMesh_FOUND)
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})
@ -115,6 +59,11 @@ if(OpenMesh_FOUND)
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)
create_single_source_cgal_program("graph_concept_OpenMesh.cpp")
target_link_libraries(graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES})
else()
message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.")
endif()
find_package(VTK QUIET COMPONENTS vtkCommonCore vtkIOCore vtkIOLegacy vtkIOXML vtkFiltersCore vtkFiltersSources)
@ -150,5 +99,5 @@ if(3MF_LIBRARIES AND 3MF_INCLUDE_DIR AND EXISTS "${3MF_INCLUDE_DIR}/Model/COM/N
target_link_libraries(test_3mf_to_sm PRIVATE ${3MF_LIBRARIES})
target_compile_definitions(test_3mf_to_sm PRIVATE -DCGAL_LINKED_WITH_3MF)
else()
message(STATUS "NOTICE : This program requires the lib3MF library, and will not be compiled.")
message(STATUS "NOTICE: The test 'test_3mf_to_sm' requires the lib3MF library, and will not be compiled.")
endif()

View File

@ -6,8 +6,6 @@ project(Barycentric_coordinates_2_Benchmarks)
cmake_minimum_required(VERSION 3.1...3.23)
find_package(CGAL REQUIRED COMPONENTS Core)
include(${CGAL_USE_FILE})
include(CGAL_CreateSingleSourceCGALProgram)
create_single_source_cgal_program("benchmark_segment_coordinates.cpp")
create_single_source_cgal_program("benchmark_triangle_coordinates.cpp")
@ -19,12 +17,10 @@ create_single_source_cgal_program("benchmark_mv_34_vertices.cpp")
find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater)
include(CGAL_Eigen3_support)
if(TARGET CGAL::Eigen3_support)
create_single_source_cgal_program("benchmark_hm_4_vertices.cpp")
target_link_libraries(benchmark_hm_4_vertices PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("benchmark_hm_n_vertices.cpp")
target_link_libraries(benchmark_hm_n_vertices PUBLIC CGAL::Eigen3_support)
else()
message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.")
message(STATUS "NOTICE: Several benchmarks require the Eigen library, and will not be compiled.")
endif()

View File

@ -20,14 +20,12 @@ create_single_source_cgal_program("deprecated_coordinates.cpp")
find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater)
include(CGAL_Eigen3_support)
if(TARGET CGAL::Eigen3_support)
create_single_source_cgal_program("affine_coordinates.cpp")
target_link_libraries(affine_coordinates PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("harmonic_coordinates.cpp")
target_link_libraries(harmonic_coordinates PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("shape_deformation.cpp")
target_link_libraries(shape_deformation PUBLIC CGAL::Eigen3_support)
else()
message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.")
message(STATUS "NOTICE: Several examples require the Eigen library, and will not be compiled.")
endif()

View File

@ -45,7 +45,6 @@ create_single_source_cgal_program("test_dh_deprecated_api.cpp")
find_package(Eigen3 3.1.0 QUIET) # (3.1.0 or greater)
include(CGAL_Eigen3_support)
if(TARGET CGAL::Eigen3_support)
create_single_source_cgal_program("test_hm_unit_square.cpp")
target_link_libraries(test_hm_unit_square PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("test_hm_const_linear_precision.cpp")
@ -56,7 +55,6 @@ if(TARGET CGAL::Eigen3_support)
target_link_libraries(test_bc_projection_traits PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("test_bc_all_coordinates.cpp")
target_link_libraries(test_bc_all_coordinates PUBLIC CGAL::Eigen3_support)
else()
message(NOTICE "Several coordinates require the Eigen library, and will not be compiled.")
message(STATUS "NOTICE: Several tests require the Eigen library, and will not be compiled.")
endif()

View File

@ -737,7 +737,7 @@ namespace CGAL {
/*! determines whether two polygons intersect in their interior.
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
*/
template <typename Kernel, typename Container>
@ -755,7 +755,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
* bso_ssectraits_sel for more information.
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
*/
template <typename Kernel, typename Container, typename UsePolylines>
@ -766,7 +766,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
/*! determines whether two polygons intersect in their interior.
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
*/
template <typename Kernel, typename Container>
@ -785,7 +785,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
* information.
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
*/
template <typename Kernel, typename Container, typename UsePolylines>
@ -796,7 +796,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
/*! determines whether two polygons intersect in their interior.
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
*/
template <typename Kernel, typename Container>
@ -815,7 +815,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
* information.
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
*/
template <typename Kernel, typename Container, typename UsePolylines>
@ -826,7 +826,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
/*! determines whether two polygons with holes intersect in their interior.
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
*/
template <typename Kernel, typename Container>
@ -844,7 +844,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
* \ref bso_ssectraits_sel for more information.
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
*/
template <typename Kernel, typename Container, typename UsePolylines>
@ -855,7 +855,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
/*! determines whether two general polygons intersect in their interior.
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
* \pre `%ArrTraits` must be a model of the concept
* `ArrangementDirectionalXMonotoneTraits_2`.
@ -867,7 +867,7 @@ bool do_intersect(const General_polygon_2<ArrTraits>& pgn1,
/*! determines whether two general polygons intersect in their interior.
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
* \pre `%ArrTraits` must be a model of the concept
* `ArrangementDirectionalXMonotoneTraits_2`.
@ -880,7 +880,7 @@ do_intersect(const General_polygon_2<ArrTraits>& pgn1,
/*! determines whether two general polygons intersect in their interior.
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
* \pre `%ArrTraits` must be a model of the concept
* `ArrangementDirectionalXMonotoneTraits_2`.
@ -893,7 +893,7 @@ bool do_intersect(const General_polygon_with_holes_2<General_polygon_2<ArrTraits
* interior.
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
*/
template <typename Polygon>
@ -1001,7 +1001,7 @@ bool do_intersect(InputIterator1 begin1, InputIterator1 end1,
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \param traits a traits object.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
*/
@ -1014,7 +1014,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \param traits a traits object.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
*/
@ -1028,7 +1028,7 @@ bool do_intersect(const Polygon_2<Kernel, Container>& pgn1,
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \param traits a traits object.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
*/
@ -1041,7 +1041,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \param traits a traits object.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise.
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
*/
@ -1054,7 +1054,7 @@ bool do_intersect(const Polygon_with_holes_2<Kernel, Container>& pgn1,
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \param traits a traits object.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \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 `%ArrTraits` must be a model of the concept
@ -1069,7 +1069,7 @@ bool do_intersect(const General_polygon_2<ArrTraits>& pgn1,
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \param traits a traits object.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \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 `%ArrTraits` must be a model of the concept
@ -1085,7 +1085,7 @@ do_intersect(const General_polygon_2<ArrTraits>& pgn1,
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \param traits a traits object.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \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 `%ArrTraits` must be a model of the concept
@ -1102,7 +1102,7 @@ do_intersect(const General_polygon_with_holes_2<General_polygon_2<ArrTraits>>& p
* \param pgn1 the 1st input polygon.
* \param pgn2 the 2nd input polygon.
* \param traits a traits object.
* \return `true` if `pgn1` and `pgn2` intersect in their interiro and `false`
* \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`.

View File

@ -18,8 +18,5 @@ endforeach()
if(CGAL_Qt5_FOUND)
target_link_libraries(draw_polygon_set PUBLIC CGAL::CGAL_Basic_viewer)
else()
message(
STATUS
"NOTICE: The example draw_polygon_set requires Qt and drawing will be disabled."
)
message(STATUS "NOTICE: The example 'draw_polygon_set' requires Qt and drawing will be disabled.")
endif()

View File

@ -6,18 +6,16 @@ project(Box_intersection_d_Tests)
find_package(CGAL REQUIRED)
find_package(TBB)
include(CGAL_TBB_support)
create_single_source_cgal_program("automated_test.cpp")
create_single_source_cgal_program("benchmark_box_intersection.cpp")
create_single_source_cgal_program("random_set_test.cpp")
create_single_source_cgal_program("test_box_grid.cpp")
create_single_source_cgal_program("test_Has_member_report.cpp")
find_package(TBB QUIET)
include(CGAL_TBB_support)
if(TARGET CGAL::TBB_support)
target_link_libraries(test_box_grid PUBLIC CGAL::TBB_support)
else()
message(
STATUS "NOTICE: Intel TBB was not found. Sequential code will be used.")
message(STATUS "NOTICE: Intel TBB was not found. Parallel code will not be used.")
endif()

View File

@ -5,27 +5,8 @@ project(Core_Examples)
find_package(CGAL REQUIRED COMPONENTS Core)
if(NOT CGAL_Core_FOUND)
message(
STATUS
"This project requires the CGAL_Core library, and will not be compiled.")
message("NOTICE: This project requires the CGAL_Core library, and will not be compiled.")
return()
endif()
# Boost and its components
find_package(Boost)
if(NOT Boost_FOUND)
message(
STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
# Creating entries for all .cpp/.C files with "main" routine
# ##########################################################
create_single_source_cgal_program("delaunay.cpp")

View File

@ -6,15 +6,7 @@ project(CGALimageIO_Examples)
find_package(CGAL REQUIRED COMPONENTS ImageIO)
if(CGAL_ImageIO_FOUND)
create_single_source_cgal_program("convert_raw_image_to_inr.cpp")
create_single_source_cgal_program("test_imageio.cpp")
create_single_source_cgal_program("extract_a_sub_image.cpp")
create_single_source_cgal_program("slice_image.cpp")
else()
message(
STATUS
"NOTICE: This demo needs the CGAL ImageIO library, and will not be compiled."
)
endif()
create_single_source_cgal_program("convert_raw_image_to_inr.cpp")
create_single_source_cgal_program("test_imageio.cpp")
create_single_source_cgal_program("extract_a_sub_image.cpp")
create_single_source_cgal_program("slice_image.cpp")

View File

@ -20,7 +20,7 @@
#include <stdlib.h>
#include <stdio.h>
#include <boost/cstdint.hpp> // for uint32_t, etc.
#include <cstdint> // for uint32_t, etc.
#ifdef CGAL_USE_ZLIB
#include <zlib.h>
@ -562,38 +562,50 @@ struct Word_type_generator<WK_FLOAT, sign, 8>
template <>
struct Word_type_generator<WK_FIXED, SGN_SIGNED, 1>
{
// typedef boost::int8_t type;
// typedef std::int8_t type;
typedef char type;
};
template <>
struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 1>
{
typedef boost::uint8_t type;
typedef std::uint8_t type;
};
template <>
struct Word_type_generator<WK_FIXED, SGN_SIGNED, 2>
{
typedef boost::int16_t type;
typedef std::int16_t type;
};
template <>
struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 2>
{
typedef boost::uint16_t type;
typedef std::uint16_t type;
};
template <>
struct Word_type_generator<WK_FIXED, SGN_SIGNED, 4>
{
typedef boost::int32_t type;
typedef std::int32_t type;
};
template <>
struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 4>
{
typedef boost::uint32_t type;
typedef std::uint32_t type;
};
template <>
struct Word_type_generator<WK_FIXED, SGN_SIGNED, 8>
{
typedef std::int64_t type;
};
template <>
struct Word_type_generator<WK_FIXED, SGN_UNSIGNED, 8>
{
typedef std::uint64_t type;
};
template <WORD_KIND wordKind, SIGN sign, std::size_t wdim>

View File

@ -9,8 +9,5 @@ find_package(CGAL REQUIRED COMPONENTS ImageIO)
if(WITH_CGAL_ImageIO)
create_single_source_cgal_program("test_trilinear_interpolation.cpp")
else()
message(
STATUS
"NOTICE: Some tests require the CGAL_ImageIO library, and will not be compiled."
)
message("NOTICE: This project requires the CGAL_ImageIO library, and will not be compiled.")
endif()

View File

@ -22,26 +22,21 @@ find_package(CGAL REQUIRED COMPONENTS Core)
include(${CGAL_USE_FILE})
find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater)
include(CGAL_Eigen3_support)
if(NOT TARGET CGAL::Eigen3_support)
message(
STATUS
"NOTICE: This project requires the Eigen library, and will not be compiled."
)
message("NOTICE: This project requires the Eigen library, and will not be compiled.")
return()
endif()
find_package(IPE 7)
if(IPE_FOUND)
if ( NOT ${IPE_VERSION} EQUAL "7")
message("-- Error: ${IPE_VERSION} is not a supported version of IPE (only 7 is).")
if(NOT ${IPE_VERSION} EQUAL "7")
message("NOTICE: ${IPE_VERSION} is not a supported version of IPE (only 7 is).")
set(IPE_FOUND FALSE)
endif()
endif()
if(IPE_FOUND AND IPE_VERSION)
message("-- Using IPE version ${IPE_VERSION} compatibility.")
@ -119,5 +114,5 @@ if(IPE_FOUND AND IPE_VERSION)
cgal_add_compilation_test(simple_triangulation)
else()
message(STATUS "NOTICE: This program requires the Ipe include files and library, and will not be compiled.")
message("NOTICE: This project requires the Ipe include files and library, and will not be compiled.")
endif()

View File

@ -41,6 +41,23 @@ plane_from_points(const typename R::Point_3 &p,
return PlaneC3<R>(a, b, c, d);
}
template <class R>
CGAL_KERNEL_LARGE_INLINE
PlaneC3<R>
plane_from_points(Origin,
const typename R::Point_3 &q,
const typename R::Point_3 &r)
{
typename R::FT a, b, c, d(0);
plane_from_pointsC3( /* origin, */
q.x(), q.y(), q.z(),
r.x(), r.y(), r.z(),
a, b, c);
return PlaneC3<R>(a, b, c, d);
}
template <class R>
CGAL_KERNEL_LARGE_INLINE
PlaneC3<R>
@ -53,7 +70,7 @@ plane_from_point_direction(const typename R::Point_3 &p,
return PlaneC3<R>(A, B, C, D);
}
template <class R>
template <class R>
CGAL_KERNEL_LARGE_INLINE
PlaneC3<R>
plane_from_point_direction(Origin,

View File

@ -240,6 +240,22 @@ plane_from_pointsC3(const FT &px, const FT &py, const FT &pz,
pd = - pa*rx - pb*ry - pc*rz;
}
template <class FT>
CGAL_KERNEL_MEDIUM_INLINE
void
plane_from_pointsC3( /* origin */
const FT &qx, const FT &qy, const FT &qz,
const FT &rx, const FT &ry, const FT &rz,
FT &pa, FT &pb, FT &pc /* , zero */ )
{
pa = qy*rz - ry*qz;
pb = qz*rx - rz*qx;
pc = qx*ry - rx*qy;
}
template <class FT>
CGAL_KERNEL_MEDIUM_INLINE
void

View File

@ -33,8 +33,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
else()
message(
STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled."
)
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -701,7 +701,13 @@ typedef Iterator_from_circulator< C, const_reference, const_pointer>
template <class Container>
class Circulator_from_container {
typedef Circulator_from_container<Container> Self;
typedef typename Container::iterator iterator;
typedef typename Container::iterator container_iterator;
typedef typename Container::const_iterator container_const_iterator;
typedef std::conditional_t<
std::is_const<Container>::value,
container_const_iterator,
container_iterator
> iterator;
typedef std::iterator_traits<iterator> iterator_traits;
public:
typedef typename iterator_traits::value_type value_type;

View File

@ -65,7 +65,7 @@ Data structures specialized to classify clusters.
\cgalPkgPicture{data_classif.png}
\cgalPkgSummaryBegin
\cgalPkgAuthors{Simon Giraudot, Florent Lafarge}
\cgalPkgAuthors{Simon Giraudot and Florent Lafarge}
\cgalPkgDesc{This component implements an algorithm that classifies a data set into a user-defined set of labels (such as ground, vegetation, buildings, etc.). A flexible API is provided so that users can classify any type of data, compute their own local features on the input data set, and define their own labels.}
\cgalPkgManuals{Chapter_Classification, PkgClassificationRef}
\cgalPkgSummaryEnd

View File

@ -7,15 +7,6 @@ project(Classification_Examples)
# CGAL and its components
find_package(CGAL REQUIRED)
# Boost and its components
find_package(Boost REQUIRED)
if(NOT Boost_FOUND)
message(
STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
set(Classification_dependencies_met TRUE)
find_package(Boost OPTIONAL_COMPONENTS serialization iostreams)
@ -23,44 +14,29 @@ include(CGAL_Boost_serialization_support)
include(CGAL_Boost_iostreams_support)
if(NOT TARGET CGAL::Boost_serialization_support)
message(
STATUS
"NOTICE: This project requires Boost Serialization, and will not be compiled."
)
message("NOTICE: This project requires Boost Serialization, and will not be compiled.")
set(Classification_dependencies_met FALSE)
endif()
if(NOT TARGET CGAL::Boost_iostreams_support)
message(
STATUS
"NOTICE: This project requires Boost IO Streams, and will not be compiled."
)
message("NOTICE: This project requires Boost IO Streams, and will not be compiled.")
set(Classification_dependencies_met FALSE)
endif()
find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning
include(CGAL_OpenCV_support)
if(NOT TARGET CGAL::OpenCV_support)
message(
STATUS
"NOTICE: OpenCV was not found. OpenCV random forest predicate for classification won't be available."
)
endif()
find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater)
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
include(CGAL_Eigen3_support)
if(NOT TARGET CGAL::Eigen3_support)
message(
STATUS "This project requires the Eigen library, and will not be compiled.")
message("NOTICE: This project requires the Eigen library, and will not be compiled.")
set(Classification_dependencies_met FALSE)
endif()
find_package(TBB QUIET)
include(CGAL_TBB_support)
if(NOT Classification_dependencies_met)
return()
endif()
find_package(TBB QUIET)
include(CGAL_TBB_support)
create_single_source_cgal_program( "example_classification.cpp" )
create_single_source_cgal_program( "example_ethz_random_forest.cpp" )
create_single_source_cgal_program( "example_feature.cpp" )
@ -70,10 +46,15 @@ create_single_source_cgal_program( "example_cluster_classification.cpp" )
create_single_source_cgal_program( "gis_tutorial_example.cpp" )
create_single_source_cgal_program( "example_deprecated_conversion.cpp" )
if (TARGET CGAL::OpenCV_support)
find_package(OpenCV QUIET COMPONENTS core ml) # Need core + machine learning
include(CGAL_OpenCV_support)
if(TARGET CGAL::OpenCV_support)
message(STATUS "Found OpenCV")
create_single_source_cgal_program( "example_opencv_random_forest.cpp" )
target_link_libraries(example_opencv_random_forest
PUBLIC CGAL::OpenCV_support)
target_link_libraries(example_opencv_random_forest PUBLIC CGAL::OpenCV_support)
else()
message("NOTICE: OpenCV was not found. OpenCV random forest predicate for classification won't be available.")
endif()
foreach(target
@ -87,9 +68,9 @@ foreach(target
gis_tutorial_example
example_deprecated_conversion)
if(TARGET ${target})
target_link_libraries(
${target} PUBLIC CGAL::Eigen3_support CGAL::Boost_iostreams_support
CGAL::Boost_serialization_support)
target_link_libraries(${target} PUBLIC CGAL::Eigen3_support
CGAL::Boost_iostreams_support
CGAL::Boost_serialization_support)
if(TARGET CGAL::TBB_support)
target_link_libraries(${target} PUBLIC CGAL::TBB_support)
endif()

View File

@ -30,9 +30,9 @@ typedef Point_set::Property_map<int> Imap;
typedef Point_set::Property_map<unsigned char> UCmap;
typedef CGAL::Shape_detection::Point_set::Sphere_neighbor_query<Kernel, Point_set, Pmap> Neighbor_query;
typedef CGAL::Shape_detection::Point_set::Least_squares_plane_fit_region<Kernel, Point_set, Pmap, Vmap> Region_type;
typedef CGAL::Shape_detection::Region_growing<Point_set, Neighbor_query, Region_type> Region_growing;
typedef CGAL::Shape_detection::Point_set::Sphere_neighbor_query_for_point_set<Point_set> Neighbor_query;
typedef CGAL::Shape_detection::Point_set::Least_squares_plane_fit_region_for_point_set<Point_set> Region_type;
typedef CGAL::Shape_detection::Region_growing<Neighbor_query, Region_type> Region_growing;
namespace Classification = CGAL::Classification;
namespace Feature = CGAL::Classification::Feature;
@ -111,25 +111,24 @@ int main (int argc, char** argv)
const double max_accepted_angle = 25.0;
const std::size_t min_region_size = 10;
Neighbor_query neighbor_query (
pts,
search_sphere_radius,
pts.point_map());
Region_type region_type (
pts,
max_distance_to_plane, max_accepted_angle, min_region_size,
pts.point_map(), pts.normal_map());
Neighbor_query neighbor_query = CGAL::Shape_detection::Point_set::make_sphere_neighbor_query (
pts, CGAL::parameters::sphere_radius(search_sphere_radius)
.point_map(pts.point_map()));
Region_type region_type = CGAL::Shape_detection::Point_set::make_least_squares_plane_fit_region(
pts, CGAL::parameters::maximum_distance(max_distance_to_plane)
.maximum_angle(max_accepted_angle)
.minimum_region_size(min_region_size));
Region_growing region_growing (
pts, neighbor_query, region_type);
std::vector<Cluster> clusters;
region_growing.detect
(boost::make_function_output_iterator
([&](const std::vector<std::size_t>& region) -> void {
([&](const std::pair<Kernel::Plane_3, std::vector<Point_set::Index>>& region) -> void {
// Create a new cluster.
Classification::Cluster<Point_set, Pmap> cluster (pts, pts.point_map());
for (const std::size_t idx : region)
for (Point_set::Index idx : region.second)
cluster.insert(idx);
clusters.push_back(cluster);
}));

View File

@ -7,15 +7,6 @@ project(Classification_Tests)
# CGAL and its components
find_package(CGAL REQUIRED)
# Boost and its components
find_package(Boost REQUIRED)
if(NOT Boost_FOUND)
message(
STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
set(Classification_dependencies_met TRUE)
find_package(Boost OPTIONAL_COMPONENTS serialization iostreams)
@ -23,42 +14,36 @@ include(CGAL_Boost_serialization_support)
include(CGAL_Boost_iostreams_support)
if(NOT TARGET CGAL::Boost_serialization_support)
message(
STATUS
"NOTICE: This project requires Boost Serialization, and will not be compiled."
)
set(Classification_dependencies_met FALSE)
endif()
if(NOT TARGET CGAL::Boost_iostreams_support)
message(
STATUS
"NOTICE: This project requires Boost IO Streams, and will not be compiled."
)
message("NOTICE: This project requires Boost Serialization, and will not be compiled.")
set(Classification_dependencies_met FALSE)
endif()
find_package(Eigen3 3.1.0 REQUIRED) #(3.1.0 or greater)
if(NOT TARGET CGAL::Boost_iostreams_support)
message("NOTICE: This project requires Boost IO Streams, and will not be compiled.")
set(Classification_dependencies_met FALSE)
endif()
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
include(CGAL_Eigen3_support)
if(NOT TARGET CGAL::Eigen3_support)
message(
STATUS "This project requires the Eigen library, and will not be compiled.")
message("NOTICE: This project requires the Eigen library, and will not be compiled.")
set(Classification_dependencies_met FALSE)
endif()
find_package(TBB QUIET)
include(CGAL_TBB_support)
if(NOT Classification_dependencies_met)
return()
endif()
find_package(TBB QUIET)
include(CGAL_TBB_support)
create_single_source_cgal_program("test_classification_point_set.cpp")
create_single_source_cgal_program("test_classification_io.cpp")
foreach(target test_classification_point_set test_classification_io)
target_link_libraries(
${target} PUBLIC CGAL::Eigen3_support CGAL::Boost_iostreams_support
CGAL::Boost_serialization_support)
target_link_libraries(${target} PUBLIC CGAL::Eigen3_support
CGAL::Boost_iostreams_support
CGAL::Boost_serialization_support)
if(TARGET CGAL::TBB_support)
target_link_libraries(${target} PUBLIC CGAL::TBB_support)
endif()

View File

@ -27,6 +27,12 @@ cgal_add_compilation_test(Combinatorial_map_copy_test_index)
# Link with OpenMesh if possible
find_package(OpenMesh QUIET)
if(TARGET OpenMesh::OpenMesh)
message(STATUS "Found OpenMesh")
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)
else()
message(STATUS "NOTICE: Tests will not use OpenMesh.")
endif()

View File

@ -7,7 +7,7 @@
\cgalPkgPicture{Logo-ConeSpanners.png}
\cgalPkgSummaryBegin
\cgalPkgAuthors{Weisheng Si, Quincy Tse and Frédérik Paradis}
\cgalPkgAuthors{Weisheng Si, Quincy Tse, and Frédérik Paradis}
\cgalPkgDesc{This package provides functors for constructing two kinds of cone-based spanners:
Yao graph and Theta graph, given a set of vertices on the plane and the directions of cone boundaries.
Both exact and inexact constructions are supported.

View File

@ -1,7 +1,7 @@
cmake_minimum_required(VERSION 3.1...3.23)
project(Cone_spanners_2_Examples)
find_package(CGAL REQUIRED QUIET OPTIONAL_COMPONENTS Core)
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Core)
find_package(LEDA QUIET)
if(CGAL_Core_FOUND OR LEDA_FOUND)
@ -20,12 +20,6 @@ if(CGAL_Core_FOUND OR LEDA_FOUND)
foreach(cppfile ${cppfiles})
create_single_source_cgal_program("${cppfile}")
endforeach()
else()
message(
STATUS
"This program requires the CGAL_Core library (or LEDA), and will not be compiled."
)
message("NOTICE: This program requires the CGAL_Core library (or LEDA), and will not be compiled.")
endif()

View File

@ -6,23 +6,11 @@ project(Cone_spanners_2_Tests)
find_package(CGAL REQUIRED COMPONENTS Core)
if(CGAL_Core_FOUND)
include_directories(BEFORE "include")
# create a target per cppfile
file(
GLOB cppfiles
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
foreach(cppfile ${cppfiles})
create_single_source_cgal_program("${cppfile}")
endforeach()
else()
message(
STATUS
"This program requires the CGAL and CGAL_Core libraries, and will not be compiled."
)
endif()
# create a target per cppfile
file(
GLOB cppfiles
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
foreach(cppfile ${cppfiles})
create_single_source_cgal_program("${cppfile}")
endforeach()

View File

@ -7,59 +7,27 @@ project(Convex_hull_3_Examples)
# CGAL and its components
find_package(CGAL REQUIRED)
# Boost and its components
find_package(Boost REQUIRED)
if(NOT Boost_FOUND)
message(
STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
find_package(OpenMesh QUIET)
if(OpenMesh_FOUND)
include(UseOpenMesh)
else()
message(STATUS "Examples that use OpenMesh will not be compiled.")
endif()
# include for local directory
# include for local package
# Creating entries for all C++ files with "main" routine
# ##########################################################
create_single_source_cgal_program("quickhull_indexed_triangle_set_3.cpp")
create_single_source_cgal_program("dynamic_hull_3.cpp")
create_single_source_cgal_program("dynamic_hull_LCC_3.cpp")
create_single_source_cgal_program("dynamic_hull_SM_3.cpp")
create_single_source_cgal_program("halfspace_intersection_3.cpp")
create_single_source_cgal_program("lloyd_algorithm.cpp")
create_single_source_cgal_program("quickhull_3.cpp")
create_single_source_cgal_program("graph_hull_3.cpp")
create_single_source_cgal_program("quickhull_any_dim_3.cpp")
create_single_source_cgal_program("extreme_points_3_sm.cpp")
create_single_source_cgal_program("extreme_indices_3.cpp")
find_package(OpenMesh QUIET)
if(OpenMesh_FOUND)
create_single_source_cgal_program("quickhull_OM_3.cpp")
create_single_source_cgal_program("dynamic_hull_OM_3.cpp")
include(UseOpenMesh)
message(STATUS "Found OpenMesh")
create_single_source_cgal_program("quickhull_OM_3.cpp")
target_link_libraries(quickhull_OM_3 PRIVATE ${OPENMESH_LIBRARIES})
create_single_source_cgal_program("dynamic_hull_OM_3.cpp")
target_link_libraries(dynamic_hull_OM_3 PRIVATE ${OPENMESH_LIBRARIES})
else()
message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.")
endif()

View File

@ -6,14 +6,6 @@ project(Convex_hull_3_Tests)
find_package(CGAL REQUIRED)
find_package(OpenMesh QUIET)
if(OpenMesh_FOUND)
include(UseOpenMesh)
else()
message(STATUS "Examples that use OpenMesh will not be compiled.")
endif()
include_directories(BEFORE "include")
# create a target per cppfile

10986
Data/data/meshes/am.off Normal file

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

Binary file not shown.

File diff suppressed because one or more lines are too long

View File

@ -6,7 +6,7 @@ A base can be created using the script `cgal_create_CMakeLists`. Its usage is de
\section seclink Linking with CGAL
To link with the \cgal library, use the following:
\code
find_package(CGAL)
find_package(CGAL REQUIRED)
add_executable(my_executable my_source_file.cpp)
target_link_libraries(my_executable CGAL::CGAL)
\endcode

View File

@ -3270,6 +3270,14 @@ pages = "207--221"
year={1998}
}
@techreport{cgal:hssz-gmcabonbc-97,
title={A generalized marching cubes algorithm based on non-binary classifications},
author={H-C. Hege and M. Seebass and D. Stalling and M. Zöckler},
number={SC 97-05},
year={1997}
}
% ----------------------------------------------------------------------------
% END OF BIBFILE
% ----------------------------------------------------------------------------

View File

@ -7,8 +7,8 @@
var all_versions = [
'master',
'latest',
'5.5.1',
'5.4.3',
'5.5.2',
'5.4.4',
'5.3.2',
'5.2.4',
'5.1.5',

View File

@ -7,8 +7,8 @@
var all_versions = [
'master',
'latest',
'5.5.1',
'5.4.3',
'5.5.2',
'5.4.4',
'5.3.2',
'5.2.4',
'5.1.5',

View File

@ -7,8 +7,8 @@
var all_versions = [
'master',
'latest',
'5.5.1',
'5.4.3',
'5.5.2',
'5.4.4',
'5.3.2',
'5.2.4',
'5.1.5',

View File

@ -7,8 +7,8 @@
var all_versions = [
'master',
'latest',
'5.5.1',
'5.4.3',
'5.5.2',
'5.4.4',
'5.3.2',
'5.2.4',
'5.1.5',

View File

@ -341,7 +341,7 @@ ALIASES = "cgal=%CGAL" \
"cgalPkgShortInfoBegin=<div class=\"PkgShortInfo\">" \
"cgalPkgShortInfoEnd=</div>" \
"cgalPkgAuthor{1}=<div class=\"PkgAuthors\">\1</div>" \
"cgalPkgAuthors{1}=<div class=\"PkgAuthors\">\1</div>" \
"cgalPkgAuthors{1}=\cgalPkgAuthor{\1}" \
"cgalPkgDesc{1}=<div class=\"PkgDescription\">\1</div>" \
"cgalPkgSince{1}=<B>Introduced in:</B> \cgal \1<BR>" \
"cgalPkgDependsOn{1}=<B>Depends on:</B> \1 <BR>" \

View File

@ -7,8 +7,8 @@
var all_versions = [
'master',
'latest',
'5.5.1',
'5.4.3',
'5.5.2',
'5.4.4',
'5.3.2',
'5.2.4',
'5.1.5',

View File

@ -8,8 +8,6 @@ add_executable(bench_simple_comparisons bench_simple_comparisons.cpp)
find_package(CGAL REQUIRED COMPONENTS Core)
include(${CGAL_USE_FILE})
add_executable(bench_orientation_3 "orientation_3.cpp")
target_link_libraries(bench_orientation_3 ${CGAL_LIBRARIES}
${CGAL_3RD_PARTY_LIBRARIES})

View File

@ -38,13 +38,6 @@
#include <boost/mpl/has_xxx.hpp>
#include <boost/preprocessor/facilities/expand.hpp>
#include <boost/preprocessor/repetition/repeat_from_to.hpp>
#include <boost/preprocessor/repetition/repeat.hpp>
#include <boost/preprocessor/repetition/enum_params.hpp>
#include <boost/preprocessor/repetition/enum_binary_params.hpp>
#include <boost/preprocessor/repetition/enum.hpp>
#include <iostream>
#include <iterator>
#include <string>
@ -797,13 +790,6 @@ public:
}
};
// Macro helpers to build the kernel objects
#define CGAL_PARAM(z, n, t) std::declval<t##n>()
#define CGAL_TYPEMAP_AC(z, n, t) typedef typename Type_mapper< t##n, LK, AK >::type A##n;
#define CGAL_TYPEMAP_EC(z, n, t) typedef typename Type_mapper< t##n, LK, EK >::type E##n;
#define CGAL_LEXACT(z,n,t) CGAL::exact( l##n )
#define CGAL_LARGS(z, n, t) L##n const& l##n
#undef CGAL_LAZY_PRINT_TYPEID
template < typename K1, typename K2 >
@ -1973,15 +1959,11 @@ struct Lazy_construction_variant {
// you are on your own
};
#define CGAL_RESULT(z, n, d) \
template< typename F, BOOST_PP_ENUM_PARAMS(n, class T) > \
struct result<F( BOOST_PP_ENUM_PARAMS(n, T) )> { \
BOOST_PP_REPEAT(n, CGAL_TYPEMAP_AC, T) \
typedef typename Type_mapper< \
decltype(std::declval<AC>()(BOOST_PP_ENUM(n, CGAL_PARAM, A))), AK, LK>::type type; \
};
BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_RESULT, _)
template <typename F, class... T>
struct result<F(T...)>
{
typedef typename Type_mapper<decltype(std::declval<AC>()(std::declval<typename Type_mapper<T,LK,AK>::type>()...)),AK,LK>::type type;
};
template <typename L1, typename L2>
decltype(auto)
@ -2120,26 +2102,23 @@ struct Lazy_construction<LK, AC, EC, E2A_, true> {
CGAL_NO_UNIQUE_ADDRESS AC ac;
CGAL_NO_UNIQUE_ADDRESS EC ec;
#define CGAL_CONSTRUCTION_OPERATOR(z, n, d ) \
template<BOOST_PP_ENUM_PARAMS(n, class L)> \
decltype(auto) \
operator()( BOOST_PP_ENUM(n, CGAL_LARGS, _) ) const { \
typedef Lazy< AT, ET, E2A> Handle; \
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); \
{ \
Protect_FPU_rounding<Protection> P; \
try { \
return result_type( Handle(new Lazy_rep_n<AT, ET, AC, EC, E2A, noprune, BOOST_PP_ENUM_PARAMS(n, L)>(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)))); \
} catch (Uncertain_conversion_exception&) {} \
} \
CGAL_BRANCH_PROFILER_BRANCH(tmp); \
Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST); \
CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); \
return result_type( Handle(new Lazy_rep_0<AT,ET,E2A>(ec( BOOST_PP_ENUM(n, CGAL_LEXACT, _) ))) ); \
template <class... L>
decltype(auto)
operator()(const L&... l) const {
typedef Lazy < AT, ET, E2A > Handle;
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
{
Protect_FPU_rounding<Protection> P;
try {
return result_type(Handle(new Lazy_rep_n< AT, ET, AC, EC, E2A, noprune, L...>(ac, ec, l...)));
} catch (Uncertain_conversion_exception&) {}
}
CGAL_BRANCH_PROFILER_BRANCH(tmp);
Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST);
return result_type(Handle(new Lazy_rep_0< AT, ET, E2A >(ec(CGAL::exact(l)...))));
}
// arity 1-8
BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_CONSTRUCTION_OPERATOR, _)
// nullary
decltype(auto)
@ -2149,8 +2128,6 @@ struct Lazy_construction<LK, AC, EC, E2A_, true> {
return result_type( Handle() );
}
#undef CGAL_CONSTRUCTION_OPERATOR
};
@ -2174,35 +2151,32 @@ struct Lazy_construction<LK, AC, EC, E2A_, false>
CGAL_NO_UNIQUE_ADDRESS AC ac;
CGAL_NO_UNIQUE_ADDRESS EC ec;
// acquire the result_type of the approximate kernel, map it back to the lazy kernel object
BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_RESULT, _)
template <typename F, class... T>
struct result<F(T...)>
{
typedef typename Type_mapper<decltype(std::declval<AC>()(std::declval<typename Type_mapper<T,LK,AK>::type>()...)),AK,LK>::type type;
};
#define CGAL_CONSTRUCTION_OPERATOR(z, n, d) \
template<BOOST_PP_ENUM_PARAMS(n, class L)> \
decltype(auto) \
operator()( BOOST_PP_ENUM(n, CGAL_LARGS, _) ) const { \
BOOST_PP_REPEAT(n, CGAL_TYPEMAP_EC, L) \
BOOST_PP_REPEAT(n, CGAL_TYPEMAP_AC, L) \
typedef typename Type_mapper<decltype(std::declval<EC>()(BOOST_PP_ENUM(n, CGAL_PARAM, E))),EK,EK>::type ET; \
typedef typename Type_mapper<decltype(std::declval<AC>()(BOOST_PP_ENUM(n, CGAL_PARAM, A))),AK,AK>::type AT; \
typedef Lazy< AT, ET, E2A> Handle; \
typedef typename result<Lazy_construction(BOOST_PP_ENUM_PARAMS(n, L))>::type result_type; \
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp); \
{ \
Protect_FPU_rounding<Protection> P; \
try { \
return result_type( Handle(new Lazy_rep_n<AT, ET, AC, EC, E2A, noprune, BOOST_PP_ENUM_PARAMS(n, L)>(ac, ec, BOOST_PP_ENUM_PARAMS(n, l)))); \
} catch (Uncertain_conversion_exception&) {} \
} \
CGAL_BRANCH_PROFILER_BRANCH(tmp); \
Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST); \
CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST); \
return result_type( Handle(new Lazy_rep_0<AT,ET,E2A>(ec( BOOST_PP_ENUM(n, CGAL_LEXACT, _) ))) ); \
template <class... L>
decltype(auto)
operator()(const L&... l) const {
typedef typename Type_mapper<decltype(std::declval<EC>()(std::declval<typename Type_mapper<L, LK, EK>::type>()...)),EK,EK>::type ET;
typedef typename Type_mapper<decltype(std::declval<AC>()(std::declval<typename Type_mapper<L, LK, AK>::type>()...)),AK,AK>::type AT;
typedef Lazy<AT, ET, E2A> Handle;
typedef typename result<Lazy_construction(L...)>::type result_type;
CGAL_BRANCH_PROFILER(std::string(" failures/calls to : ") + std::string(CGAL_PRETTY_FUNCTION), tmp);
{
Protect_FPU_rounding<Protection> P;
try {
return result_type(Handle(new Lazy_rep_n<AT, ET, AC, EC, E2A, noprune, L...> (ac, ec, l...)));
} catch (Uncertain_conversion_exception&) {}
}
CGAL_BRANCH_PROFILER_BRANCH(tmp);
Protect_FPU_rounding<!Protection> P2(CGAL_FE_TONEAREST);
CGAL_expensive_assertion(FPU_get_cw() == CGAL_FE_TONEAREST);
return result_type(Handle(new Lazy_rep_0<AT, ET, E2A> (ec(CGAL::exact(l)...))));
}
// arity 1-8
BOOST_PP_REPEAT_FROM_TO(1, 9, CGAL_CONSTRUCTION_OPERATOR, _)
// nullary
decltype(auto)
operator()() const
@ -2218,10 +2192,6 @@ struct Lazy_construction<LK, AC, EC, E2A_, false>
} //namespace CGAL
#undef CGAL_TYPEMAP_AC
#undef CGAL_TYPEMAP_EC
#undef CGAL_LEXACT
#undef CGAL_LARGS
#include <CGAL/enable_warnings.h>

View File

@ -7,20 +7,10 @@ project(Generalized_map_Tests)
# CGAL and its components
find_package(CGAL REQUIRED)
# Boost and its components
find_package(Boost REQUIRED)
if(NOT Boost_FOUND)
message(
STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
set(hfiles Generalized_map_2_test.h Generalized_map_3_test.h
Generalized_map_4_test.h GMap_test_insertions.h)
set(hfiles Generalized_map_2_test.h
Generalized_map_3_test.h
Generalized_map_4_test.h
GMap_test_insertions.h)
create_single_source_cgal_program("Generalized_map_test.cpp" ${hfiles})

View File

@ -6,12 +6,17 @@ project(Generator_example)
find_package(CGAL REQUIRED COMPONENTS Core)
include(${CGAL_USE_FILE})
find_package(Boost REQUIRED program_options)
include_directories(${Boost_PROGRAM_OPTIONS_INCLUDE_DIR})
add_definitions("-DCGAL_USE_BOOST_PROGRAM_OPTIONS")
list(APPEND CGAL_3RD_PARTY_LIBRARIES ${Boost_PROGRAM_OPTIONS_LIBRARY})
create_single_source_cgal_program("random_grid.cpp")
create_single_source_cgal_program("random_disc_2.cpp")
find_package(Boost COMPONENTS program_options)
if(Boost_PROGRAM_OPTIONS_FOUND)
create_single_source_cgal_program("random_grid.cpp")
create_single_source_cgal_program("random_disc_2.cpp")
if(TARGET Boost::program_options)
target_link_libraries(random_grid PRIVATE Boost::program_options)
target_link_libraries(random_disc_2 PRIVATE Boost::program_options)
else()
target_link_libraries(random_grid PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY})
target_link_libraries(random_disc_2 PRIVATE ${Boost_PROGRAM_OPTIONS_LIBRARY})
endif()
else()
message("NOTICE: The benchmarks requires Boost Program Options, and will not be compiled.")
endif()

View File

@ -6,23 +6,34 @@ project(Generator_Examples)
find_package(CGAL REQUIRED)
# Use Eigen
create_single_source_cgal_program("ball_d.cpp")
create_single_source_cgal_program("combination_enumerator.cpp")
create_single_source_cgal_program("cube_d.cpp")
create_single_source_cgal_program("grid_d.cpp")
create_single_source_cgal_program("name_pairs.cpp")
create_single_source_cgal_program("random_convex_hull_2.cpp")
create_single_source_cgal_program("random_convex_set.cpp")
create_single_source_cgal_program("random_degenerate_point_set.cpp")
create_single_source_cgal_program("random_grid.cpp")
create_single_source_cgal_program("random_points_in_triangles_2.cpp")
create_single_source_cgal_program("random_points_in_triangles_3.cpp")
create_single_source_cgal_program("random_points_on_triangle_mesh_2.cpp")
create_single_source_cgal_program("random_points_on_triangle_mesh_3.cpp")
create_single_source_cgal_program("random_points_tetrahedron_and_triangle_3.cpp")
create_single_source_cgal_program("random_points_triangle_2.cpp")
create_single_source_cgal_program("random_polygon2.cpp")
create_single_source_cgal_program("random_polygon.cpp")
create_single_source_cgal_program("random_segments1.cpp")
create_single_source_cgal_program("random_segments2.cpp")
create_single_source_cgal_program("sphere_d.cpp")
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
include(CGAL_Eigen3_support)
# create a target per cppfile
file(
GLOB cppfiles
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
foreach(cppfile ${cppfiles})
if(NOT (${cppfile} STREQUAL "random_points_in_tetrahedral_mesh_3.cpp")
OR NOT (${cppfile} STREQUAL "random_points_on_tetrahedral_mesh_3.cpp")
OR TARGET CGAL::Eigen3_support)
create_single_source_cgal_program("${cppfile}")
if(TARGET CGAL::Eigen3_support)
get_filename_component(target ${cppfile} NAME_WE)
target_link_libraries(${target} PUBLIC CGAL::Eigen3_support)
endif()
endif()
endforeach()
if(TARGET CGAL::Eigen3_support)
create_single_source_cgal_program("random_points_in_tetrahedral_mesh_3.cpp")
target_link_libraries(random_points_in_tetrahedral_mesh_3 PRIVATE CGAL::Eigen3_support)
create_single_source_cgal_program("random_points_on_tetrahedral_mesh_3.cpp")
target_link_libraries(random_points_on_tetrahedral_mesh_3 PRIVATE CGAL::Eigen3_support)
else()
message(STATUS "NOTICE: Some examples use Eigen, and will not be compiled.")
endif()

View File

@ -6,22 +6,20 @@ project(Generator_Tests)
find_package(CGAL REQUIRED)
# Use Eigen
create_single_source_cgal_program("random_hull_test.cpp")
create_single_source_cgal_program("random_poly_test.cpp")
create_single_source_cgal_program("rcs_test.cpp")
create_single_source_cgal_program("test_combination_enumerator.cpp")
create_single_source_cgal_program("test_generators.cpp")
create_single_source_cgal_program("test_tetrahedron_3.cpp")
create_single_source_cgal_program("test_triangle_2.cpp")
create_single_source_cgal_program("test_triangle_3.cpp")
find_package(Eigen3 3.1.0 QUIET) #(3.1.0 or greater)
include(CGAL_Eigen3_support)
# create a target per cppfile
file(
GLOB cppfiles
RELATIVE ${CMAKE_CURRENT_SOURCE_DIR}
${CMAKE_CURRENT_SOURCE_DIR}/*.cpp)
foreach(cppfile ${cppfiles})
if(NOT (${cppfile} STREQUAL "generic_random_test.cpp") OR TARGET
CGAL::Eigen3_support)
create_single_source_cgal_program("${cppfile}")
if(TARGET CGAL::Eigen3_support)
get_filename_component(target ${cppfile} NAME_WE)
target_link_libraries(${target} PUBLIC CGAL::Eigen3_support)
endif()
endif()
endforeach()
if(TARGET CGAL::Eigen3_support)
create_single_source_cgal_program("generic_random_test.cpp")
target_link_libraries(generic_random_test PRIVATE CGAL::Eigen3_support)
else()
message(STATUS "NOTICE: The test 'generic_random_test' uses Eigen, and will not be compiled.")
endif()

View File

@ -22,9 +22,7 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
add_definitions(-DQT_NO_KEYWORDS)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
#--------------------------------
# The "Delaunay" demo: Alpha_shapes_2
#--------------------------------
# UI files (Qt Designer files)
qt5_wrap_ui(DT_UI_FILES Alpha_shapes_2.ui)
@ -46,10 +44,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
cgal_add_compilation_test(Alpha_shapes_2)
else()
message(
STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -45,10 +45,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
cgal_add_compilation_test(Apollonius_graph_2)
else()
message(
STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -24,9 +24,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
add_definitions(-DQT_NO_KEYWORDS)
set(CMAKE_AUTOMOC ON)
#----------------------------------------------
# The "Bounding volumes" demo: Bounding_volumes
#----------------------------------------------
# UI files (Qt Designer files)
qt5_wrap_ui(DT_UI_FILES Bounding_volumes.ui)
@ -53,7 +50,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
else()
message(
STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -22,9 +22,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
#--------------------------------
# The demo: Circular_kernel_2
#--------------------------------
# UI files (Qt Designer files)
qt5_wrap_ui(DT_UI_FILES Circular_kernel_2.ui)
@ -51,7 +48,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
else()
message(
STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -22,9 +22,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
#--------------------------------
# Demo: Generator_2
#--------------------------------
# UI files (Qt Designer files)
qt5_wrap_ui(DT_UI_FILES Generator_2.ui)
@ -45,8 +42,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
cgal_add_compilation_test(Generator_2)
else()
message(
STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled."
)
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -31,7 +31,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
cgal_add_compilation_test(min)
else()
message(
STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -24,9 +24,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
#--------------------------------
# The "L1 Voronoi diagram" demo: L1_voronoi_diagram_2
#--------------------------------
# UI files (Qt Designer files)
qt5_wrap_ui(DT_UI_FILES L1_voronoi_diagram_2.ui)
@ -51,7 +48,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
else()
message(
STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -23,9 +23,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
#--------------------------------
# Demo: Largest_empty_rectangle_2
#--------------------------------
# UI files (Qt Designer files)
qt5_wrap_ui(DT_UI_FILES Largest_empty_rectangle_2.ui)
@ -46,8 +43,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
cgal_add_compilation_test(Largest_empty_rectangle_2)
else()
message(
STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled."
)
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -21,9 +21,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
#--------------------------------
# The "2D Periodic triangulation" demo: Periodic_2_triangulation_2
#--------------------------------
# UI files (Qt Designer files)
qt5_wrap_ui(DT_UI_FILES Periodic_2_triangulation_2.ui)
@ -58,7 +55,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
cgal_add_compilation_test(Periodic_2_Delaunay_triangulation_2)
else()
message(
STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -15,13 +15,10 @@ endif()
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5 Core)
find_package(Eigen3 3.1.0) #(requires 3.1.0 or greater)
find_package(Eigen3 3.1.0 QUIET) #(requires 3.1.0 or greater)
include(CGAL_Eigen3_support)
if(NOT TARGET CGAL::Eigen3_support)
message(
STATUS
"NOTICE: This project requires the Eigen library, and will not be compiled."
)
message("NOTICE: This demo requires the Eigen library, and will not be compiled.")
return()
endif()
@ -36,9 +33,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
add_definitions(-DCGAL_USE_CORE)
endif()
#--------------------------------
# Demo: Polygon_2
#--------------------------------
# UI files (Qt Designer files)
qt5_wrap_ui(DT_UI_FILES Polygon_2.ui)
@ -60,10 +54,5 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
cgal_add_compilation_test(Polygon_2)
else()
message(
STATUS
"NOTICE: This demo requires CGAL, CGAL_Core, and Qt5, and will not be compiled."
)
message("NOTICE: This demo requires CGAL, CGAL_Core, and Qt5, and will not be compiled.")
endif()

View File

@ -29,9 +29,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
include(${CGAL_USE_FILE})
add_definitions(-DQT_NO_KEYWORDS)
#--------------------------------
# The "Segment Voronoi" demo: Segment_voronoi_2
#--------------------------------
# UI files (Qt Designer files)
qt5_wrap_ui(CDT_UI_FILES Segment_voronoi_2.ui)
@ -50,10 +47,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
cgal_add_compilation_test(Segment_voronoi_2)
else()
message(
STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -28,9 +28,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
include(${CGAL_USE_FILE})
add_definitions(-DQT_NO_KEYWORDS)
#--------------------------------
# The "Segment Voronoi Linf" demo: Segment_voronoi_linf_2
#--------------------------------
# UI files (Qt Designer files)
qt5_wrap_ui(CDT_UI_FILES Segment_voronoi_2.ui)
@ -50,8 +47,5 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
cgal_add_compilation_test(Segment_voronoi_linf_2)
else()
message(
STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -22,7 +22,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
add_definitions(-DQT_NO_KEYWORDS)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
#--------------------------------
# UI files (Qt Designer files)
qt5_wrap_ui(DT_UI_FILES Snap_rounding_2.ui)
@ -44,10 +43,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
include(${CGAL_MODULES_DIR}/CGAL_add_test.cmake)
cgal_add_compilation_test(Snap_rounding_2)
else()
message(
STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -23,9 +23,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
#--------------------------------
# Demo: Spatial_searching_2
#--------------------------------
# UI files (Qt Designer files)
qt5_wrap_ui(DT_UI_FILES Spatial_searching_2.ui)
@ -46,8 +43,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
cgal_add_compilation_test(Spatial_searching_2)
else()
message(
STATUS "NOTICE: This demo requires CGAL, and Qt5, and will not be compiled."
)
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -23,7 +23,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
set(CMAKE_INCLUDE_CURRENT_DIR ON)
set(CMAKE_AUTOMOC ON)
#--------------------------------
# UI files (Qt Designer files)
qt5_wrap_ui(DT_UI_FILES Stream_lines_2.ui)
@ -48,7 +47,6 @@ if(CGAL_Qt5_FOUND AND Qt5_FOUND)
else()
message(
STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
endif()

View File

@ -19,10 +19,8 @@ set(CMAKE_INCLUDE_CURRENT_DIR TRUE)
find_package(CGAL REQUIRED OPTIONAL_COMPONENTS Qt5)
find_package(Qt5 QUIET COMPONENTS Widgets)
if(NOT CGAL_Qt5_FOUND
OR NOT Qt5_FOUND)
message(
STATUS "NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
if(NOT CGAL_Qt5_FOUND OR NOT Qt5_FOUND)
message("NOTICE: This demo requires CGAL and Qt5, and will not be compiled.")
return()
endif()

View File

@ -7,25 +7,6 @@ project(Hash_map)
# CGAL and its components
find_package(CGAL REQUIRED)
# Boost and its components
find_package(Boost REQUIRED)
if(NOT Boost_FOUND)
message(
STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
# include for local directory
# include for local package
# Creating entries for all .cpp/.C files with "main" routine
# ##########################################################
create_single_source_cgal_program("hm.cpp")
create_single_source_cgal_program("foreach.cpp")
create_single_source_cgal_program("triangulation.cpp")

View File

@ -12,7 +12,7 @@
\cgalPkgPicture{heat-method-small.png}
\cgalPkgSummaryBegin
\cgalPkgAuthors{Keenan Crane, Christina Vaz, Andreas Fabri}
\cgalPkgAuthors{Keenan Crane, Christina Vaz, and Andreas Fabri}
\cgalPkgDesc{The package provides an algorithm that solves the single- or
multiple-source shortest path problem by returning an approximation of the geodesic distance
for all vertices of a triangle mesh to the closest vertex in a given set of

View File

@ -7,35 +7,16 @@ project(Heat_method_3_Examples)
# CGAL and its components
find_package(CGAL REQUIRED)
# Boost and its components
find_package(Boost REQUIRED)
if(NOT Boost_FOUND)
message(
STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
find_package(Eigen3 3.3.0)
find_package(Eigen3 3.3.0 QUIET)
include(CGAL_Eigen3_support)
if(NOT TARGET CGAL::Eigen3_support)
message(
STATUS
"This project requires the Eigen library (3.3 or greater), and will not be compiled."
)
message("NOTICE: These examples require the Eigen library (3.3 or greater), and will not be compiled.")
return()
endif()
# include for local directory
include_directories(BEFORE include)
# Creating entries for all C++ files with "main" routine
# ##########################################################
create_single_source_cgal_program("heat_method.cpp")
target_link_libraries(heat_method PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("heat_method_polyhedron.cpp")
@ -43,5 +24,4 @@ target_link_libraries(heat_method_polyhedron PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("heat_method_surface_mesh.cpp")
target_link_libraries(heat_method_surface_mesh PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("heat_method_surface_mesh_direct.cpp")
target_link_libraries(heat_method_surface_mesh_direct
PUBLIC CGAL::Eigen3_support)
target_link_libraries(heat_method_surface_mesh_direct PUBLIC CGAL::Eigen3_support)

View File

@ -7,42 +7,21 @@ project(Heat_method_3_Tests)
# CGAL and its components
find_package(CGAL REQUIRED)
# Boost and its components
find_package(Boost REQUIRED)
if(NOT Boost_FOUND)
message(
STATUS "This project requires the Boost library, and will not be compiled.")
return()
endif()
find_package(Eigen3 3.3.0)
find_package(Eigen3 3.3.0 QUIET)
include(CGAL_Eigen3_support)
if(NOT TARGET CGAL::Eigen3_support)
message(
STATUS
"This project requires the Eigen library (3.3 or greater), and will not be compiled."
)
message("NOTICE: These tests require the Eigen library (3.3 or greater), and will not be compiled.")
return()
endif()
# include for local directory
include_directories(BEFORE include)
# Creating entries for all C++ files with "main" routine
# ##########################################################
create_single_source_cgal_program("heat_method_concept.cpp")
target_link_libraries(heat_method_concept PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("heat_method_surface_mesh_test.cpp")
target_link_libraries(heat_method_surface_mesh_test PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("heat_method_surface_mesh_direct_test.cpp")
target_link_libraries(heat_method_surface_mesh_direct_test
PUBLIC CGAL::Eigen3_support)
target_link_libraries(heat_method_surface_mesh_direct_test PUBLIC CGAL::Eigen3_support)
create_single_source_cgal_program("heat_method_surface_mesh_intrinsic_test.cpp")
target_link_libraries(heat_method_surface_mesh_intrinsic_test
PUBLIC CGAL::Eigen3_support)
target_link_libraries(heat_method_surface_mesh_intrinsic_test PUBLIC CGAL::Eigen3_support)

View File

@ -48,6 +48,7 @@ public:
PlaneH3() {}
PlaneH3(const Point_3&, const Point_3&, const Point_3& );
PlaneH3(Origin, const Point_3&, const Point_3& );
PlaneH3(const RT& a, const RT& b,
const RT& c, const RT& d );
PlaneH3(const Point_3&, const Ray_3& );
@ -175,6 +176,16 @@ PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
const typename PlaneH3<R>::Point_3& r)
{ new_rep(p,q,r); }
template < class R >
CGAL_KERNEL_INLINE
PlaneH3<R>::PlaneH3(Origin,
const typename PlaneH3<R>::Point_3& q,
const typename PlaneH3<R>::Point_3& r)
{
typename PlaneH3<R>::Point_3 p(0,0,0);
new_rep(p,q,r);
}
template < class R >
CGAL_KERNEL_INLINE
PlaneH3<R>::PlaneH3(const RT& a, const RT& b,
@ -190,37 +201,37 @@ PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p ,
template < class R >
CGAL_KERNEL_INLINE
PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
const typename PlaneH3<R>::Segment_3& s)
const typename PlaneH3<R>::Segment_3& s)
{ new_rep(p, s.source(), s.target() ); }
template < class R >
CGAL_KERNEL_INLINE
PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p ,
const typename PlaneH3<R>::Ray_3& r)
const typename PlaneH3<R>::Ray_3& r)
{ new_rep(p, r.start(), r.start() + r.direction().to_vector() ); }
template < class R >
CGAL_KERNEL_INLINE
PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Line_3& l ,
const typename PlaneH3<R>::Point_3& p)
const typename PlaneH3<R>::Point_3& p)
{ new_rep(l.point(0), p, l.point(1) ); }
template < class R >
CGAL_KERNEL_INLINE
PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Segment_3& s,
const typename PlaneH3<R>::Point_3& p)
const typename PlaneH3<R>::Point_3& p)
{ new_rep(s.source(), p, s.target() ); }
template < class R >
CGAL_KERNEL_INLINE
PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Ray_3& r,
const typename PlaneH3<R>::Point_3& p)
const typename PlaneH3<R>::Point_3& p)
{ new_rep(r.start(), p, r.start() + r.direction().to_vector() ); }
template < class R >
CGAL_KERNEL_INLINE
PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
const typename PlaneH3<R>::Direction_3& d)
const typename PlaneH3<R>::Direction_3& d)
{
Vector_3 ov = d.to_vector();
new_rep( ov.hx()*p.hw(),
@ -232,7 +243,7 @@ PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
template < class R >
CGAL_KERNEL_INLINE
PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
const typename PlaneH3<R>::Vector_3& ov)
const typename PlaneH3<R>::Vector_3& ov)
{
new_rep( ov.hx()*p.hw(),
ov.hy()*p.hw(),
@ -254,8 +265,8 @@ PlaneH3<R>::PlaneH3(Origin,
template < class R >
CGAL_KERNEL_INLINE
PlaneH3<R>::PlaneH3(const typename PlaneH3<R>::Point_3& p,
const typename PlaneH3<R>::Direction_3& d1,
const typename PlaneH3<R>::Direction_3& d2)
const typename PlaneH3<R>::Direction_3& d1,
const typename PlaneH3<R>::Direction_3& d2)
{ new_rep( p, p + d1.to_vector(), p + d2.to_vector() ); }
template < class R >

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