Merge remote-tracking branch 'cgal/master' into Triangulation_3-CDT_3-lrineau

This commit is contained in:
Laurent Rineau 2024-09-09 10:57:33 +02:00
commit 37f3bcfaab
113 changed files with 1475 additions and 662 deletions

View File

@ -12,15 +12,15 @@ jobs:
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: REUSE version - name: REUSE version
uses: fsfe/reuse-action@v3 uses: fsfe/reuse-action@v4
with: with:
args: --version args: --version
- name: REUSE lint - name: REUSE lint
uses: fsfe/reuse-action@v3 uses: fsfe/reuse-action@v4
with: with:
args: --include-submodules lint args: --include-submodules lint
- name: REUSE SPDX SBOM - name: REUSE SPDX SBOM
uses: fsfe/reuse-action@v3 uses: fsfe/reuse-action@v4
with: with:
args: spdx args: spdx
- name: install dependencies - name: install dependencies
@ -30,6 +30,6 @@ jobs:
mkdir -p ./release mkdir -p ./release
cmake -DDESTINATION=./release -DCGAL_VERSION=9.9 -P ./Scripts/developer_scripts/cgal_create_release_with_cmake.cmake cmake -DDESTINATION=./release -DCGAL_VERSION=9.9 -P ./Scripts/developer_scripts/cgal_create_release_with_cmake.cmake
- name: REUSE lint release tarball - name: REUSE lint release tarball
uses: fsfe/reuse-action@v3 uses: fsfe/reuse-action@v4
with: with:
args: --root ./release/CGAL-9.9 --include-submodules lint args: --root ./release/CGAL-9.9 --include-submodules lint

View File

@ -1,12 +0,0 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: CGAL
Upstream-Contact: CGAL Editorial Board <info@cgal.org>
Source: https://github.com/CGAL/cgal
Files: .* *.cmake *.md .github/* Maintenance/* */TODO */doc/* */deb/* */applications/* */doc_html/* */scripts/* */developer_scripts/* */demo/* */examples/* */src/* */test/* */benchmarks/* */benchmark/* */package_info/* */data/* */cmake/*
Copyright: 1995-2023 The CGAL Project
License: CC0-1.0
Files: CMakeLists.txt GraphicsView/include/CGAL/Qt/ImageInterface.ui GraphicsView/include/CGAL/Qt/resources/qglviewer-icon.xpm Installation/AUTHORS Installation/CMakeLists.txt Installation/README Installation/auxiliary/cgal_create_cmake_script.1 Installation/auxiliary/gmp/README Installation/include/CGAL/license/gpl_package_list.txt MacOSX/auxiliary/cgal_app.icns copyright
Copyright: 1995-2023 The CGAL Project
License: CC0-1.0

View File

@ -426,7 +426,7 @@ void test_algebraic_structure_intern(
//commutative //commutative
assert(a+b+c==c+b+a); assert(a+b+c==c+b+a);
assert(a*b*c==c*b*a); assert(a*b*c==c*b*a);
//distributiv //distributive
assert((a-b)*c==a*c-b*c); assert((a-b)*c==a*c-b*c);
assert((a+b)*c==a*c+b*c); assert((a+b)*c==a*c+b*c);
//binom //binom

View File

@ -38,7 +38,6 @@ namespace Qt
{ {
class Callback; class Callback;
class ArrangementGraphicsItemBase; class ArrangementGraphicsItemBase;
class ArrangementGraphicsItemBase;
class GraphicsViewCurveInputBase; class GraphicsViewCurveInputBase;
class GraphicsViewNavigation; class GraphicsViewNavigation;
enum class CurveType; enum class CurveType;

View File

@ -111,13 +111,10 @@ void CurveInputMethod::beginInput_()
static inline void clearPainterPath(QPainterPath& ppath) static inline void clearPainterPath(QPainterPath& ppath)
{ {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 13, 0))
ppath.clear(); ppath.clear();
#else
ppath = {};
#endif
} }
void CurveInputMethod::reset() void CurveInputMethod::reset()
{ {
this->resetInput(); this->resetInput();

View File

@ -67,11 +67,7 @@ void GridGraphicsItem::setSpacing(int spacing_)
static inline qreal static inline qreal
horizontalAdvance(const QFontMetrics& fm, const QString& text) horizontalAdvance(const QFontMetrics& fm, const QString& text)
{ {
#if (QT_VERSION >= QT_VERSION_CHECK(5, 11, 0))
return fm.horizontalAdvance(text); return fm.horizontalAdvance(text);
#else
return fm.boundingRect(text).width();
#endif
} }
void GridGraphicsItem::paint( void GridGraphicsItem::paint(

View File

@ -641,8 +641,7 @@ public:
* \param[in] plane the containing plane. * \param[in] plane the containing plane.
* \param[in] source the source-point direction. * \param[in] source the source-point direction.
* \param[in] target the target-point direction. * \param[in] target the target-point direction.
* \pre Both endpoint lie on the given plane. * \pre Both endpoints lie on the given plane.
* \pre Both endpoint lie on the given plane.
*/ */
X_monotone_curve_2 operator()(const Point_2& source, const Point_2& target, X_monotone_curve_2 operator()(const Point_2& source, const Point_2& target,
const Direction_3& normal) const const Direction_3& normal) const
@ -3113,7 +3112,7 @@ public:
* \param is_directed_right is the arc directed from left to right? * \param is_directed_right is the arc directed from left to right?
* \param is_full is the arc a full circle? * \param is_full is the arc a full circle?
* \param is_degenerate is the arc degenerate (single point)? * \param is_degenerate is the arc degenerate (single point)?
* \pre Both endpoint lie on the given plane. * \pre Both endpoints lie on the given plane.
*/ */
Arr_x_monotone_geodesic_arc_on_sphere_3 Arr_x_monotone_geodesic_arc_on_sphere_3
(const Arr_extended_direction_3& src, (const Arr_extended_direction_3& src,
@ -3312,8 +3311,7 @@ public:
* \param plane the containing plane. * \param plane the containing plane.
* \param source the source-point direction. * \param source the source-point direction.
* \param target the target-point direction. * \param target the target-point direction.
* \pre Both endpoint lie on the given plane. * \pre Both endpoints lie on the given plane.
* \pre Both endpoint lie on the given plane.
*/ */
Arr_x_monotone_geodesic_arc_on_sphere_3 Arr_x_monotone_geodesic_arc_on_sphere_3
(const Arr_extended_direction_3& source, (const Arr_extended_direction_3& source,

View File

@ -1,6 +1,6 @@
# Input is based on the curves and points indexes from intersect.pt # Input is based on the curves and points indexes from intersect.pt
# intersect.xcv. The first two numbers are the numbers of the input curves # intersect.xcv. The first two numbers are the numbers of the input curves
# to be intersected. After that there is the number of intesections and # to be intersected. After that there is the number of intersections and
# 2-3 numbers representing each intersection. Meaning, the input is of the form: # 2-3 numbers representing each intersection. Meaning, the input is of the form:
# intersect <id of 1st x-curve> <id of 2nd x-curve> \ # intersect <id of 1st x-curve> <id of 2nd x-curve> \
# <expected number of intersections> [<type of intersection> \ # <expected number of intersections> [<type of intersection> \

View File

@ -9,9 +9,9 @@ find_package(CGAL REQUIRED)
find_package(OpenMesh) find_package(OpenMesh)
if(OpenMesh_FOUND) if(OpenMesh_FOUND)
include(UseOpenMesh) include(CGAL_OpenMesh_support)
create_single_source_cgal_program("TriMesh.cpp") create_single_source_cgal_program("TriMesh.cpp")
target_link_libraries(TriMesh PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(TriMesh PRIVATE CGAL::OpenMesh_support)
else() else()
message("NOTICE: This project requires OpenMesh and will not be compiled.") message("NOTICE: This project requires OpenMesh and will not be compiled.")
endif() endif()

View File

@ -18,8 +18,8 @@ create_single_source_cgal_program("copy_polyhedron.cpp")
find_package(OpenMesh QUIET) find_package(OpenMesh QUIET)
if(OpenMesh_FOUND) if(OpenMesh_FOUND)
target_link_libraries(copy_polyhedron PRIVATE ${OPENMESH_LIBRARIES}) include(CGAL_OpenMesh_support)
target_compile_definitions(copy_polyhedron PRIVATE -DCGAL_USE_OPENMESH) target_link_libraries(copy_polyhedron PRIVATE CGAL::OpenMesh_support)
else() else()
message(STATUS "NOTICE: The example 'copy_polyhedron' will not use OpenMesh.") message(STATUS "NOTICE: The example 'copy_polyhedron' will not use OpenMesh.")
endif() endif()

View File

@ -62,13 +62,15 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm,
const tm_face_descriptor tm_null_face = boost::graph_traits<TargetMesh>::null_face(); const tm_face_descriptor tm_null_face = boost::graph_traits<TargetMesh>::null_face();
const tm_vertex_descriptor tm_null_vertex = boost::graph_traits<TargetMesh>::null_vertex(); const tm_vertex_descriptor tm_null_vertex = boost::graph_traits<TargetMesh>::null_vertex();
reserve(tm, static_cast<typename boost::graph_traits<TargetMesh>::vertices_size_type>(vertices(tm).size()+vertices(sm).size()), reserve(tm, static_cast<typename boost::graph_traits<TargetMesh>::vertices_size_type>(internal::exact_num_vertices(tm)+internal::exact_num_vertices(sm)),
static_cast<typename boost::graph_traits<TargetMesh>::edges_size_type>(edges(tm).size()+edges(sm).size()), static_cast<typename boost::graph_traits<TargetMesh>::edges_size_type>(internal::exact_num_edges(tm)+internal::exact_num_edges(sm)),
static_cast<typename boost::graph_traits<TargetMesh>::faces_size_type>(faces(tm).size()+faces(sm).size()) ); static_cast<typename boost::graph_traits<TargetMesh>::faces_size_type>(internal::exact_num_faces(tm)+internal::exact_num_faces(sm)) );
//insert halfedges and create each vertex when encountering its halfedge //insert halfedges and create each vertex when encountering its halfedge
std::vector<tm_edge_descriptor> new_edges; std::vector<tm_edge_descriptor> new_edges;
new_edges.reserve(edges(sm).size()); std::vector<tm_halfedge_descriptor> new_vertices;
new_edges.reserve(internal::exact_num_edges(sm));
new_vertices.reserve(internal::exact_num_vertices(sm));
for(sm_edge_descriptor sm_e : edges(sm)) for(sm_edge_descriptor sm_e : edges(sm))
{ {
tm_edge_descriptor tm_e = add_edge(tm); tm_edge_descriptor tm_e = add_edge(tm);
@ -106,6 +108,7 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm,
tm_vertex_descriptor tm_h_tgt = add_vertex(tm); tm_vertex_descriptor tm_h_tgt = add_vertex(tm);
*v2v++=std::make_pair(sm_h_tgt, tm_h_tgt); *v2v++=std::make_pair(sm_h_tgt, tm_h_tgt);
set_halfedge(tm_h_tgt, tm_h, tm); set_halfedge(tm_h_tgt, tm_h, tm);
new_vertices.push_back(tm_h);
set_target(tm_h, tm_h_tgt, tm); set_target(tm_h, tm_h_tgt, tm);
put(tm_vpm, tm_h_tgt, conv(get(sm_vpm, sm_h_tgt))); put(tm_vpm, tm_h_tgt, conv(get(sm_vpm, sm_h_tgt)));
} }
@ -116,6 +119,7 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm,
tm_vertex_descriptor tm_h_src = add_vertex(tm); tm_vertex_descriptor tm_h_src = add_vertex(tm);
*v2v++=std::make_pair(sm_h_src, tm_h_src); *v2v++=std::make_pair(sm_h_src, tm_h_src);
set_halfedge(tm_h_src, tm_h_opp, tm); set_halfedge(tm_h_src, tm_h_opp, tm);
new_vertices.push_back(tm_h_opp);
set_target(tm_h_opp, tm_h_src, tm); set_target(tm_h_opp, tm_h_src, tm);
put(tm_vpm, tm_h_src, conv(get(sm_vpm, sm_h_src))); put(tm_vpm, tm_h_src, conv(get(sm_vpm, sm_h_src)));
} }
@ -163,11 +167,9 @@ void copy_face_graph_impl(const SourceMesh& sm, TargetMesh& tm,
} }
} }
// update halfedge vertex of all but the vertex halfedge // update halfedge vertex of all but the vertex halfedge
for(tm_vertex_descriptor v : vertices(tm)) for(tm_halfedge_descriptor h : new_vertices)
{ {
tm_halfedge_descriptor h = halfedge(v, tm); tm_vertex_descriptor v = target(h, tm);
if (h==boost::graph_traits<TargetMesh>::null_halfedge())
continue;
tm_halfedge_descriptor next_around_vertex=h; tm_halfedge_descriptor next_around_vertex=h;
do{ do{
next_around_vertex=opposite(next(next_around_vertex, tm), tm); next_around_vertex=opposite(next(next_around_vertex, tm), tm);

View File

@ -42,50 +42,31 @@ create_single_source_cgal_program("test_deprecated_io.cpp")
find_package(OpenMesh QUIET) find_package(OpenMesh QUIET)
if(OpenMesh_FOUND) if(OpenMesh_FOUND)
include(UseOpenMesh) include(CGAL_OpenMesh_support)
add_definitions(-DCGAL_USE_OPENMESH)
target_link_libraries(test_clear PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(test_clear PRIVATE CGAL::OpenMesh_support)
target_compile_definitions(test_clear PRIVATE -DCGAL_USE_OPENMESH) target_link_libraries(test_Euler_operations PRIVATE CGAL::OpenMesh_support)
target_link_libraries(test_Euler_operations PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(test_Collapse_edge PRIVATE CGAL::OpenMesh_support)
target_compile_definitions(test_Euler_operations PRIVATE -DCGAL_USE_OPENMESH) target_link_libraries(test_Face_filtered_graph PRIVATE CGAL::OpenMesh_support)
target_link_libraries(test_Collapse_edge PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(test_graph_traits PRIVATE CGAL::OpenMesh_support )
target_compile_definitions(test_Collapse_edge PRIVATE -DCGAL_USE_OPENMESH) target_link_libraries(test_Properties PRIVATE CGAL::OpenMesh_support)
target_link_libraries(test_Face_filtered_graph PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(test_bgl_read_write PRIVATE CGAL::OpenMesh_support)
target_compile_definitions(test_Face_filtered_graph PRIVATE -DCGAL_USE_OPENMESH)
target_link_libraries(test_graph_traits PRIVATE ${OPENMESH_LIBRARIES} )
target_compile_definitions(test_graph_traits PRIVATE -DCGAL_USE_OPENMESH)
target_link_libraries(test_Properties PRIVATE ${OPENMESH_LIBRARIES})
target_compile_definitions(test_Properties PRIVATE -DCGAL_USE_OPENMESH)
target_link_libraries(test_bgl_read_write PRIVATE ${OPENMESH_LIBRARIES})
target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_OPENMESH)
create_single_source_cgal_program("graph_concept_OpenMesh.cpp") create_single_source_cgal_program("graph_concept_OpenMesh.cpp")
target_link_libraries(graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(graph_concept_OpenMesh PRIVATE CGAL::OpenMesh_support)
else() else()
message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.") message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.")
endif() endif()
find_package(VTK QUIET COMPONENTS vtkCommonCore vtkIOCore vtkIOLegacy vtkIOXML vtkFiltersCore vtkFiltersSources) find_package(VTK 9.0 QUIET COMPONENTS CommonCore IOCore IOLegacy IOXML FiltersCore FiltersSources)
if (VTK_FOUND) if (VTK_FOUND AND VTK_LIBRARIES)
if(VTK_USE_FILE) message(STATUS "VTK ${VTK_VERSION} found ${VTK_LIBRARIES}")
include(${VTK_USE_FILE}) target_link_libraries(test_bgl_read_write PRIVATE ${VTK_LIBRARIES})
endif() target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
target_link_libraries(test_deprecated_io PRIVATE ${VTK_LIBRARIES})
if ("${VTK_VERSION_MAJOR}" GREATER "5" OR VTK_VERSION VERSION_GREATER 5) target_compile_definitions(test_deprecated_io PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
if(TARGET VTK::CommonCore) else()
set(VTK_LIBRARIES VTK::CommonCore VTK::IOCore VTK::IOLegacy VTK::IOXML VTK::FiltersCore VTK::FiltersSources) message(STATUS "Tests that use VTK will not be compiled.")
endif()
if(VTK_LIBRARIES)
target_link_libraries(test_bgl_read_write PRIVATE ${VTK_LIBRARIES})
target_compile_definitions(test_bgl_read_write PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
target_link_libraries(test_deprecated_io PRIVATE ${VTK_LIBRARIES})
target_compile_definitions(test_deprecated_io PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
else()
message(STATUS "Tests that use VTK will not be compiled.")
endif()
endif()
endif() #VTK_FOUND endif() #VTK_FOUND
find_path(3MF_INCLUDE_DIR find_path(3MF_INCLUDE_DIR

View File

@ -17,6 +17,7 @@ test_copy_face_graph_nm_umbrella()
T g; T g;
Kernel::Point_3 p(0,0,0); Kernel::Point_3 p(0,0,0);
// make two connected components
CGAL::make_tetrahedron(p, p, p, p, g); CGAL::make_tetrahedron(p, p, p, p, g);
CGAL::make_tetrahedron(p, p, p, p, g); CGAL::make_tetrahedron(p, p, p, p, g);

View File

@ -1104,7 +1104,7 @@ do_intersect(const General_polygon_with_holes_2<General_polygon_2<ArrTraits>>& p
* \param traits a traits object. * \param traits a traits object.
* \return `true` if `pgn1` and `pgn2` intersect in their interior and `false` * \return `true` if `pgn1` and `pgn2` intersect in their interior and `false`
* otherwise. * otherwise.
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. *
* \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`. * \pre `GpsTraits` must be a model of the concept `GeneralPolygonSetTraits_2`.
*/ */
template <typename Polygon, typename GpsTraits> template <typename Polygon, typename GpsTraits>

View File

@ -642,6 +642,7 @@ public:
unsigned int i = 1; unsigned int i = 1;
for (InputIterator itr = begin; itr != end; ++itr, ++i) for (InputIterator itr = begin; itr != end; ++itr, ++i)
{ {
ValidationPolicy::is_valid((*itr), *m_traits);
arr_vec[i].first = new Aos_2(m_traits); arr_vec[i].first = new Aos_2(m_traits);
_insert(*itr, *(arr_vec[i].first)); _insert(*itr, *(arr_vec[i].first));
} }
@ -666,6 +667,7 @@ public:
unsigned int i = 1; unsigned int i = 1;
for (InputIterator itr = begin; itr!=end; ++itr, ++i) for (InputIterator itr = begin; itr!=end; ++itr, ++i)
{ {
ValidationPolicy::is_valid((*itr), *m_traits);
arr_vec[i].first = new Aos_2(m_traits); arr_vec[i].first = new Aos_2(m_traits);
_insert(*itr, *(arr_vec[i].first)); _insert(*itr, *(arr_vec[i].first));
} }

View File

@ -2380,7 +2380,6 @@ void test_circulator_from_iterator() {
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == c); assert( i == c);
assert( i == c);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Circulator j = i; Circulator j = i;
@ -2493,7 +2492,6 @@ void test_circulator_from_iterator() {
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == c); assert( i == c);
assert( i == c);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Circulator j = i; Circulator j = i;
@ -2735,7 +2733,6 @@ void test_circulator_from_iterator() {
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == c); assert( i == c);
assert( i == c);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Circulator j = i; Circulator j = i;
@ -2897,7 +2894,6 @@ void test_circulator_from_iterator() {
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == c); assert( i == c);
assert( i == c);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Circulator j = i; Circulator j = i;
@ -3308,7 +3304,6 @@ void test_circulator_from_iterator() {
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == c); assert( i == c);
assert( i == c);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Circulator j = i; Circulator j = i;
@ -3533,7 +3528,6 @@ void test_circulator_from_iterator() {
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == c); assert( i == c);
assert( i == c);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Circulator j = i; Circulator j = i;
@ -3742,7 +3736,6 @@ void test_circulator_from_container() {
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == c); assert( i == c);
assert( i == c);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Circulator j = i; Circulator j = i;
@ -3855,7 +3848,6 @@ void test_circulator_from_container() {
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == c); assert( i == c);
assert( i == c);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Circulator j = i; Circulator j = i;
@ -4097,7 +4089,6 @@ void test_circulator_from_container() {
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == c); assert( i == c);
assert( i == c);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Circulator j = i; Circulator j = i;
@ -4260,7 +4251,6 @@ void test_circulator_from_container() {
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == c); assert( i == c);
assert( i == c);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Circulator j = i; Circulator j = i;
@ -4671,7 +4661,6 @@ void test_circulator_from_container() {
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == c); assert( i == c);
assert( i == c);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Circulator j = i; Circulator j = i;
@ -4897,7 +4886,6 @@ void test_circulator_from_container() {
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == c); assert( i == c);
assert( i == c);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Circulator j = i; Circulator j = i;

View File

@ -304,7 +304,6 @@ void test_struct(){
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == start); assert( i == start);
assert( i == start);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Struct_circulator j = i; Struct_circulator j = i;
@ -413,7 +412,6 @@ void test_struct(){
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == start); assert( i == start);
assert( i == start);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Struct_const_circulator j = i; Struct_const_circulator j = i;
@ -651,7 +649,6 @@ void test_struct(){
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == start); assert( i == start);
assert( i == start);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Struct_bi_circulator j = i; Struct_bi_circulator j = i;
@ -809,7 +806,6 @@ void test_struct(){
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == start); assert( i == start);
assert( i == start);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Struct_bi_const_circulator j = i; Struct_bi_const_circulator j = i;
@ -969,7 +965,6 @@ void test_class(){
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == start); assert( i == start);
assert( i == start);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Class_circulator j = i; Class_circulator j = i;
@ -1078,7 +1073,6 @@ void test_class(){
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == start); assert( i == start);
assert( i == start);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Class_const_circulator j = i; Class_const_circulator j = i;
@ -1316,7 +1310,6 @@ void test_class(){
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == start); assert( i == start);
assert( i == start);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Class_bi_circulator j = i; Class_bi_circulator j = i;
@ -1474,7 +1467,6 @@ void test_class(){
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == start); assert( i == start);
assert( i == start);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Class_bi_const_circulator j = i; Class_bi_const_circulator j = i;
@ -1891,7 +1883,6 @@ void test_array() {
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == start); assert( i == start);
assert( i == start);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Circulator j = i; Circulator j = i;
@ -2119,7 +2110,6 @@ void test_array() {
assert( ! (i == nullptr)); assert( ! (i == nullptr));
assert( i != nullptr); assert( i != nullptr);
assert( i == start); assert( i == start);
assert( i == start);
// Do I reach myself. // Do I reach myself.
++i; ++i;
Circulator j = i; Circulator j = i;

View File

@ -48,7 +48,7 @@ typedef Classification::Feature::Vertical_dispersion<Kernel, Point_range, Pmap>
int main (int argc, char** argv) int main (int argc, char** argv)
{ {
const std::string filename = (argc > 1) ? argv[1] : CGAL::data_file_path("meshes/b9.ply"); const std::string filename = (argc > 1) ? argv[1] : CGAL::data_file_path("points_3/b9.ply");
std::cerr << "Reading input" << std::endl; std::cerr << "Reading input" << std::endl;
std::vector<Point> pts; std::vector<Point> pts;

View File

@ -48,7 +48,7 @@ typedef Classification::Cluster<Point_set, Pmap> Clu
int main (int argc, char** argv) int main (int argc, char** argv)
{ {
std::string filename = CGAL::data_file_path("meshes/b9.ply"); std::string filename = CGAL::data_file_path("points_3/b9.ply");
std::string filename_config = "data/b9_clusters_config.bin"; std::string filename_config = "data/b9_clusters_config.bin";
if (argc > 1) if (argc > 1)

View File

@ -66,7 +66,7 @@ public:
int main (int argc, char** argv) int main (int argc, char** argv)
{ {
std::string filename (argc > 1 ? argv[1] : CGAL::data_file_path("meshes/b9.ply")); std::string filename (argc > 1 ? argv[1] : CGAL::data_file_path("points_3/b9.ply"));
std::vector<Point> pts; std::vector<Point> pts;
std::cerr << "Reading input" << std::endl; std::cerr << "Reading input" << std::endl;

View File

@ -1780,7 +1780,6 @@ namespace CGAL {
void basic_link_beta_for_involution(Dart_descriptor adart1, Dart_descriptor adart2, void basic_link_beta_for_involution(Dart_descriptor adart1, Dart_descriptor adart2,
unsigned int i) unsigned int i)
{ {
CGAL_assertion( i>=2 && i<=dimension );
CGAL_assertion( i>=2 && i<=dimension ); CGAL_assertion( i>=2 && i<=dimension );
dart_link_beta(adart1, adart2, i); dart_link_beta(adart1, adart2, i);
dart_link_beta(adart2, adart1, i); dart_link_beta(adart2, adart1, i);

View File

@ -28,13 +28,12 @@ create_single_source_cgal_program(cmap_test_split_attribute.cpp)
# Link with OpenMesh if possible # Link with OpenMesh if possible
find_package(OpenMesh QUIET) find_package(OpenMesh QUIET)
if(TARGET OpenMesh::OpenMesh) if(OpenMesh_FOUND)
message(STATUS "Found OpenMesh") message(STATUS "Found OpenMesh")
include(CGAL_OpenMesh_support)
target_link_libraries(Combinatorial_map_copy_test PRIVATE OpenMesh::OpenMesh) target_link_libraries(Combinatorial_map_copy_test PRIVATE CGAL::OpenMesh_support)
target_compile_definitions(Combinatorial_map_copy_test PRIVATE -DCGAL_USE_OPENMESH) target_link_libraries(Combinatorial_map_copy_test_index PRIVATE CGAL::OpenMesh_support)
target_link_libraries(Combinatorial_map_copy_test_index PRIVATE OpenMesh::OpenMesh)
target_compile_definitions(Combinatorial_map_copy_test_index PRIVATE -DCGAL_USE_OPENMESH)
else() else()
message(STATUS "NOTICE: Tests will not use OpenMesh.") message(STATUS "NOTICE: Tests will not use OpenMesh.")
endif() endif()

View File

@ -76,62 +76,13 @@ class External_structure_builder : public Modifier_base<typename Nef_::SNC_and_P
SNC_structure* sncp(sncpl.sncp); SNC_structure* sncp(sncpl.sncp);
SNC_point_locator* pl(sncpl.pl); SNC_point_locator* pl(sncpl.pl);
Unique_hash_map<SHalfedge_handle, SFace_handle> sedge2sface;
/*
SFace_iterator sfi;
CGAL_forall_sfaces(sfi, *sncp) {
SFace_cycle_iterator sfc;
for(sfc = sfi->sface_cycles_begin(); sfc != sfi->sface_cycles_end(); ++sfc) {
if(sfc.is_shalfedge()){
SHalfedge_around_sface_circulator eaf(sfc), end(eaf);
CGAL_For_all(eaf,end) {
SHalfedge_handle se(eaf);
sedge2sface[eaf] = sfi;
}
}
}
}
// CGAL::SNC_io_parser<SNC_structure> O0(std::cerr, *sncp, false);
// O0.print();
SHalfedge_iterator sei;
CGAL_forall_shalfedges(sei, *sncp) {
SHalfedge_handle se(sei);
if(sedge2sface[se] == SFace_handle()) {
SM_decorator SD(&*sei->source()->source());
SFace_handle sf_new = SD.new_sface();
sf_new->mark() = sei->incident_sface()->mark();
CGAL_NEF_TRACEN("new entry sedge " << sei->source()->point()
<< "->" << sei->twin()->source()->point()
<< " at " << sei->source()->source()->point());
SD.link_as_face_cycle(sei, sf_new);
SHalfedge_around_sface_circulator eaf(se), end(eaf);
CGAL_For_all(eaf,end) {
SHalfedge_handle se(eaf);
sedge2sface[eaf] = sf_new;
}
// TODO: relink inner sface cycles
}
}
*/
SNC_point_locator* old_pl = pl; SNC_point_locator* old_pl = pl;
pl = pl->clone(); pl = pl->clone();
sncpl.pl = pl; sncpl.pl = pl;
delete old_pl;
SNC_external_structure C(*sncp,pl); SNC_external_structure C(*sncp,pl);
C.clear_external_structure(); C.clear_external_structure();
C.build_external_structure(); C.build_external_structure();
delete old_pl;
// CGAL::SNC_io_parser<SNC_structure> Ox(std::cerr, *sncp, false);
// Ox.print();
} }
}; };

View File

@ -0,0 +1,53 @@
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Polyhedron_3.h>
#include <CGAL/Nef_polyhedron_3.h>
#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
#include <CGAL/Nef_3/SNC_indexed_items.h>
#include <CGAL/convex_decomposition_3.h>
#include <list>
typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef CGAL::Polyhedron_3<Kernel> Polyhedron_3;
typedef CGAL::Nef_polyhedron_3<Kernel, CGAL::SNC_indexed_items> Nef_polyhedron_3;
typedef Nef_polyhedron_3::Volume_const_iterator Volume_const_iterator;
std::size_t run(std::string path)
{
Polyhedron_3 input;
std::ifstream(path) >> input;
Nef_polyhedron_3 N(input);
CGAL::convex_decomposition_3(N);
std::list<Polyhedron_3> convex_parts;
Volume_const_iterator ci = ++N.volumes_begin();
for( ; ci != N.volumes_end(); ++ci) {
if(ci->mark()) {
Polyhedron_3 P;
N.convert_inner_shell_to_polyhedron(ci->shells_begin(), P);
convex_parts.push_back(P);
}
}
// int i=0;
for (const Polyhedron_3& P : convex_parts)
{
// std::ofstream("out_"+std::to_string(i++)+".off") << std::setprecision(17) << P;
assert(P.size_of_vertices()!=0);
}
return convex_parts.size();
}
int main()
{
std::size_t val = run("data/in1.off");
assert(val==9);
val = run("data/in2.off");
assert(val==10);
val = run("data/in3.off");
assert(val==13);
val = run("data/in4.off");
assert(val==17);
}

View File

@ -0,0 +1,117 @@
OFF 40 76 0
5 -5 4
5 -5 2
5 5 2
5 5 4
5 -5 -2
5 -5 -4
5 5 -4
5 5 -2
-5 5 4
-5 -5 4
-4 -4 4
-4 4 4
4 4 4
4 -4 4
-5 -5 -4
-5 5 -4
-4 4 -4
-4 -4 -4
4 -4 -4
4 4 -4
-5 5 2
-5 -5 2
-5 -5 -2
-5 5 -2
4 4 2
4 -4 2
4 -4 -2
4 4 -2
-4 4 2
-4 -4 2
-4 4 -2
-4 -4 -2
6 -6 2
6 -6 -2
6 6 -2
6 6 2
-6 6 2
-6 -6 2
-6 -6 -2
-6 6 -2
3 0 2 3
3 2 0 1
3 4 6 7
3 6 4 5
3 3 12 0
3 3 11 12
3 11 8 10
3 8 11 3
3 13 0 12
3 10 0 13
3 10 9 0
3 9 10 8
3 5 18 6
3 5 17 18
3 17 14 16
3 14 17 5
3 19 6 18
3 16 6 19
3 16 15 6
3 15 16 14
3 21 8 20
3 8 21 9
3 14 23 15
3 23 14 22
3 2 8 3
3 8 2 20
3 6 23 7
3 23 6 15
3 21 0 9
3 0 21 1
3 14 4 22
3 4 14 5
3 25 12 24
3 12 25 13
3 18 27 19
3 27 18 26
3 10 28 11
3 28 10 29
3 31 16 30
3 16 31 17
3 28 12 11
3 12 28 24
3 16 27 30
3 27 16 19
3 25 10 13
3 10 25 29
3 18 31 26
3 31 18 17
3 32 34 35
3 34 32 33
3 35 2 32
3 35 20 2
3 20 36 21
3 36 20 35
3 1 32 2
3 21 32 1
3 21 37 32
3 37 21 36
3 28 25 24
3 25 28 29
3 33 4 34
3 33 22 4
3 22 38 23
3 38 22 33
3 7 34 4
3 23 34 7
3 23 39 34
3 39 23 38
3 31 27 26
3 27 31 30
3 38 36 39
3 36 38 37
3 34 36 35
3 36 34 39
3 38 32 37
3 32 38 33

View File

@ -0,0 +1,144 @@
OFF
48 92 0
2 2 2
2 -2 2
-2 2 2
-2 -2 2
-2 2 4
2 2 4
-2 -2 4
2 -2 4
5 -5 4
-4 4 4
5 5 4
4 -4 4
-5 -5 4
-4 -4 -4
5 -5 -4
4 4 -4
-5 5 -4
-5 5 4
5 5 -4
-5 -5 -4
4 4 4
4 -4 -2
-4 -4 4
-4 4 -2
-4 4 -4
4 4 -2
4 -4 -4
6 -6 2
5 5 2
-5 5 2
6 6 2
5 -5 2
-5 -5 2
-6 -6 2
5 -5 -2
-5 -5 -2
6 -6 -2
5 5 -2
-5 5 -2
-6 6 -2
-4 -4 -2
-6 6 2
6 6 -2
-6 -6 -2
-4 -4 2
-4 4 2
4 4 2
4 -4 2
3 2 4 5
3 7 6 3
3 5 7 1
3 6 7 5
3 3 6 4
3 5 0 2
3 3 1 7
3 1 0 5
3 5 4 6
3 4 2 3
3 8 28 10
3 28 8 31
3 34 18 37
3 18 34 14
3 10 20 8
3 10 9 20
3 9 17 22
3 17 9 10
3 11 8 20
3 22 8 11
3 22 12 8
3 12 22 17
3 14 26 18
3 14 13 26
3 13 19 24
3 19 13 14
3 15 18 26
3 24 18 15
3 24 16 18
3 16 24 19
3 32 17 29
3 17 32 12
3 19 38 16
3 38 19 35
3 28 17 10
3 17 28 29
3 18 38 37
3 38 18 16
3 32 8 12
3 8 32 31
3 19 34 35
3 34 19 14
3 47 20 46
3 20 47 11
3 26 25 15
3 25 26 21
3 22 45 9
3 45 22 44
3 40 24 23
3 24 40 13
3 45 20 9
3 20 45 46
3 24 25 23
3 25 24 15
3 47 22 11
3 22 47 44
3 26 40 21
3 40 26 13
3 27 42 30
3 42 27 36
3 30 28 27
3 30 29 28
3 29 41 32
3 41 29 30
3 31 27 28
3 32 27 31
3 32 33 27
3 33 32 41
3 2 0 45
3 1 44 47
3 36 34 42
3 36 35 34
3 35 43 38
3 43 35 36
3 37 42 34
3 38 42 37
3 38 39 42
3 39 38 43
3 40 25 21
3 25 40 23
3 43 41 39
3 41 43 33
3 42 41 30
3 41 42 39
3 43 27 33
3 27 43 36
3 44 1 3
3 44 3 45
3 45 3 2
3 46 45 0
3 46 0 47
3 47 0 1

View File

@ -0,0 +1,180 @@
OFF
60 116 0
1 1 4
1 0.33333333333333337 4
1 -1 4
0.33333333333333337 -1 4
-1 -1 4
-1 0.33333333333333337 4
-1 1 4
0.33333333333333337 1 4
-2 2 2
5 -5 4
-4 4 4
5 5 4
4 -4 4
-5 -5 4
-4 -4 -4
5 -5 -4
4 4 -4
-5 5 -4
-5 5 4
5 5 -4
-5 -5 -4
4 4 4
4 -4 -2
-4 -4 4
-4 4 -2
-4 4 -4
4 4 -2
4 -4 -4
6 -6 2
5 5 2
-5 5 2
6 6 2
5 -5 2
-5 -5 2
-6 -6 2
5 -5 -2
-5 -5 -2
6 -6 -2
5 5 -2
-5 5 -2
-6 6 -2
-4 -4 -2
-6 6 2
6 6 -2
-6 -6 -2
-2 -2 2
-4 -4 2
-4 4 2
4 4 2
4 -4 2
2 -2 2
2 2 2
-2 2 4
2 2 4
2 -2 4
-2 -2 4
1 1 2
1 -1 2
-1 -1 2
-1 1 2
3 8 52 53
3 54 55 45
3 53 54 50
3 0 1 53
3 45 55 52
3 53 51 8
3 45 50 54
3 50 51 53
3 4 5 55
3 52 8 45
3 9 29 11
3 29 9 32
3 35 19 38
3 19 35 15
3 11 21 9
3 11 10 21
3 10 18 23
3 18 10 11
3 12 9 21
3 23 9 12
3 23 13 9
3 13 23 18
3 15 27 19
3 15 14 27
3 14 20 25
3 20 14 15
3 16 19 27
3 25 19 16
3 25 17 19
3 17 25 20
3 33 18 30
3 18 33 13
3 20 39 17
3 39 20 36
3 29 18 11
3 18 29 30
3 19 39 38
3 39 19 17
3 33 9 13
3 9 33 32
3 20 35 36
3 35 20 15
3 49 21 48
3 21 49 12
3 27 26 16
3 26 27 22
3 23 47 10
3 47 23 46
3 41 25 24
3 25 41 14
3 47 21 10
3 21 47 48
3 25 26 24
3 26 25 16
3 49 23 12
3 23 49 46
3 27 41 22
3 41 27 14
3 28 43 31
3 43 28 37
3 31 29 28
3 31 30 29
3 30 42 33
3 42 30 31
3 32 28 29
3 33 28 32
3 33 34 28
3 34 33 42
3 8 51 47
3 50 46 49
3 37 35 43
3 37 36 35
3 36 44 39
3 44 36 37
3 38 43 35
3 39 43 38
3 39 40 43
3 40 39 44
3 41 26 22
3 26 41 24
3 44 42 40
3 42 44 34
3 43 42 31
3 42 43 40
3 44 28 34
3 28 44 37
3 46 50 45
3 46 45 47
3 47 45 8
3 48 47 51
3 48 51 49
3 49 51 50
3 52 55 5
3 52 7 53
3 52 5 6
3 53 7 0
3 52 6 7
3 54 53 1
3 54 2 3
3 54 1 2
3 55 54 3
3 55 3 4
3 58 57 56
3 59 56 7
3 2 57 3
3 0 56 1
3 5 59 6
3 56 59 58
3 57 1 56
3 57 2 1
3 58 5 4
3 7 56 0
3 58 3 57
3 4 3 58
3 59 5 58
3 7 6 59

View File

@ -0,0 +1,180 @@
OFF
60 116 0
1 1 4
1 0.5 4
1 -1 4
0.5 -1 4
-1 -1 4
-1 0.5 4
-1 1 4
0.5 1 4
-2 2 2
5 -5 4
-4 4 4
5 5 4
4 -4 4
-5 -5 4
-4 -4 -4
5 -5 -4
4 4 -4
-5 5 -4
-5 5 4
5 5 -4
-5 -5 -4
4 4 4
4 -4 -2
-4 -4 4
-4 4 -2
-4 4 -4
4 4 -2
4 -4 -4
6 -6 2
5 5 2
-5 5 2
6 6 2
5 -5 2
-5 -5 2
-6 -6 2
5 -5 -2
-5 -5 -2
6 -6 -2
5 5 -2
-5 5 -2
-6 6 -2
-4 -4 -2
-6 6 2
6 6 -2
-6 -6 -2
-2 -2 2
-4 -4 2
-4 4 2
4 4 2
4 -4 2
2 -2 2
2 2 2
-2 2 4
2 2 4
2 -2 4
-2 -2 4
1 1 1
1 -1 1
-1 -1 1
-1 1 1
3 8 52 53
3 54 55 45
3 53 54 50
3 0 1 53
3 45 55 52
3 53 51 8
3 45 50 54
3 50 51 53
3 4 5 55
3 52 8 45
3 9 29 11
3 29 9 32
3 35 19 38
3 19 35 15
3 11 21 9
3 11 10 21
3 10 18 23
3 18 10 11
3 12 9 21
3 23 9 12
3 23 13 9
3 13 23 18
3 15 27 19
3 15 14 27
3 14 20 25
3 20 14 15
3 16 19 27
3 25 19 16
3 25 17 19
3 17 25 20
3 33 18 30
3 18 33 13
3 20 39 17
3 39 20 36
3 29 18 11
3 18 29 30
3 19 39 38
3 39 19 17
3 33 9 13
3 9 33 32
3 20 35 36
3 35 20 15
3 49 21 48
3 21 49 12
3 27 26 16
3 26 27 22
3 23 47 10
3 47 23 46
3 41 25 24
3 25 41 14
3 47 21 10
3 21 47 48
3 25 26 24
3 26 25 16
3 49 23 12
3 23 49 46
3 27 41 22
3 41 27 14
3 28 43 31
3 43 28 37
3 31 29 28
3 31 30 29
3 30 42 33
3 42 30 31
3 32 28 29
3 33 28 32
3 33 34 28
3 34 33 42
3 8 51 47
3 50 46 49
3 37 35 43
3 37 36 35
3 36 44 39
3 44 36 37
3 38 43 35
3 39 43 38
3 39 40 43
3 40 39 44
3 41 26 22
3 26 41 24
3 44 42 40
3 42 44 34
3 43 42 31
3 42 43 40
3 44 28 34
3 28 44 37
3 46 50 45
3 46 45 47
3 47 45 8
3 48 47 51
3 48 51 49
3 49 51 50
3 52 55 5
3 52 7 53
3 52 5 6
3 53 7 0
3 52 6 7
3 54 53 1
3 54 2 3
3 54 1 2
3 55 54 3
3 55 3 4
3 58 57 56
3 59 56 7
3 2 57 3
3 0 56 1
3 5 59 6
3 56 59 58
3 57 1 56
3 57 2 1
3 58 5 4
3 7 56 0
3 58 3 57
3 4 3 58
3 59 5 58
3 7 6 59

View File

@ -21,13 +21,13 @@ create_single_source_cgal_program("extreme_indices_3.cpp")
find_package(OpenMesh QUIET) find_package(OpenMesh QUIET)
if(OpenMesh_FOUND) if(OpenMesh_FOUND)
include(UseOpenMesh) include(CGAL_OpenMesh_support)
message(STATUS "Found OpenMesh") message(STATUS "Found OpenMesh")
create_single_source_cgal_program("quickhull_OM_3.cpp") create_single_source_cgal_program("quickhull_OM_3.cpp")
target_link_libraries(quickhull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(quickhull_OM_3 PRIVATE CGAL::OpenMesh_support)
create_single_source_cgal_program("dynamic_hull_OM_3.cpp") create_single_source_cgal_program("dynamic_hull_OM_3.cpp")
target_link_libraries(dynamic_hull_OM_3 PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(dynamic_hull_OM_3 PRIVATE CGAL::OpenMesh_support)
else() else()
message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.")
endif() endif()

View File

@ -160,7 +160,6 @@ private:
assert(are_equal(res_o2o1, expected_result)); assert(are_equal(res_o2o1, expected_result));
do_intersect_check(o1, o2); do_intersect_check(o1, o2);
do_intersect_check(o1, o2);
} }
template <typename O1, typename O2> template <typename O1, typename O2>
@ -169,7 +168,6 @@ private:
const FT res_o1o2 = CGAL::squared_distance(o1, o2); const FT res_o1o2 = CGAL::squared_distance(o1, o2);
const FT res_o2o1 = CGAL::squared_distance(o2, o1); const FT res_o2o1 = CGAL::squared_distance(o2, o1);
do_intersect_check(o1, o2);
do_intersect_check(o1, o2); do_intersect_check(o1, o2);
assert(res_o1o2 <= ubound); assert(res_o1o2 <= ubound);
@ -324,7 +322,7 @@ private:
check_squared_distance(S{p2, p3}, S{p4, p5}, 0); check_squared_distance(S{p2, p3}, S{p4, p5}, 0);
check_squared_distance(S{p2, p3}, S{p5, p4}, 0); check_squared_distance(S{p2, p3}, S{p5, p4}, 0);
check_squared_distance(S{p3, p2}, S{p4, p5}, 0); check_squared_distance(S{p3, p2}, S{p4, p5}, 0);
check_squared_distance(S{p3, p2}, S{p4, p5}, 0); check_squared_distance(S{p3, p2}, S{p5, p4}, 0);
const double lambda_6 = r.get_double(0, 1); const double lambda_6 = r.get_double(0, 1);
const P p6 = p3 + FT(lambda_6) * V{p3 - p2}; const P p6 = p3 + FT(lambda_6) * V{p3 - p2};
@ -332,7 +330,7 @@ private:
check_squared_distance(S{p2, p3}, S{p6, p5}, 0); check_squared_distance(S{p2, p3}, S{p6, p5}, 0);
check_squared_distance(S{p2, p3}, S{p5, p6}, 0); check_squared_distance(S{p2, p3}, S{p5, p6}, 0);
check_squared_distance(S{p3, p2}, S{p6, p5}, 0); check_squared_distance(S{p3, p2}, S{p6, p5}, 0);
check_squared_distance(S{p3, p2}, S{p6, p5}, 0); check_squared_distance(S{p3, p2}, S{p5, p6}, 0);
const double lambda_7 = r.get_double(1, 2); const double lambda_7 = r.get_double(1, 2);
const P p7 = p3 + FT(lambda_7) * V{p3 - p2}; const P p7 = p3 + FT(lambda_7) * V{p3 - p2};

View File

@ -72,23 +72,32 @@ As there is no canonical directory for where to find \boost on Windows,
we recommend that you define the environment variable we recommend that you define the environment variable
`BOOST_ROOT` and set it to where you have installed \boost, e.g., `C:\boost\boost_1_70_0`. `BOOST_ROOT` and set it to where you have installed \boost, e.g., `C:\boost\boost_1_70_0`.
\subsection thirdpartyMPFR GNU Multiple Precision Arithmetic (GMP) and GNU Multiple Precision Floating-Point Reliably (MPFR) Libraries \subsection thirdpartyMP Multi Precision Number Type Library
<b>GMP Version 5.0.1 or later, MPFR Version 3.0.0 or later</b>
The components \cgal, `CGAL_Core`, and `CGAL_Qt6` require GNU Multiple Precision Arithmetic (GMP) and GNU Multiple Precision Floating-Point Reliably (MPFR) Libraries
\gmp and \mpfr which are libraries for multi precision integers and rational numbers, are libraries for multi precision integers and rational numbers, and for multi precision floating point numbers.
and for multi precision floating point numbers.
\cgal combines floating point arithmetic with exact arithmetic
in order to be efficient and reliable. \cgal has a built-in
number type for that, but \gmp and \mpfr provide a faster
solution, and we recommend using them.
These libraries can be obtained from <A HREF="https://gmplib.org/">`https://gmplib.org/`</A> These libraries can be obtained from <A HREF="https://gmplib.org/">`https://gmplib.org/`</A>
and <A HREF="https://www.mpfr.org/">`https://www.mpfr.org/`</A>. and <A HREF="https://www.mpfr.org/">`https://www.mpfr.org/`</A>.
Since Visual \cpp is not properly supported by the \gmp and \mpfr projects, Since Visual \cpp is not properly supported by the \gmp and \mpfr projects,
we provide precompiled versions of \gmp and \mpfr, which can be downloaded we provide precompiled versions of \gmp and \mpfr, which can be downloaded
from the <a href="https://github.com/CGAL/cgal/releases">assets of a release</a>. from the <a href="https://github.com/CGAL/cgal/releases">assets of a release</a>.
Version supported are <b>GMP Version 5.0.1 or later, MPFR Version 3.0.0 or later</b>.
The \boost library also provides a module for multi precision integers and rational numbers:
<A HREF="https://www.boost.org/doc/libs/release/libs/multiprecision/doc/html/index.html">\boost multiprecision</A>.
Versions supported are <b>\boost Version 1.72 or later</b>.
The components \cgal, and `CGAL_Qt6` require either \gmp and \mpfr, or \boost multiprecision
for multi precision numbers. `CGAL_Core` requires \boost multiprecision.
\cgal combines floating point arithmetic with exact arithmetic
in order to be efficient and reliable. \cgal has a built-in
number type for that, but previous alternatives are faster
solutions, and we recommend using one of them.
The CMake variable `CGAL_CMAKE_EXACT_NT_BACKEND` can be used to select
the library that will be used internally for multi precision number types.
\section secoptional3rdpartysoftware Optional Third Party Libraries \section secoptional3rdpartysoftware Optional Third Party Libraries

View File

@ -36,7 +36,7 @@ Using \cgal requires a few core components to be previously installed:
<li> a supported compiler (see Section \ref seccompilers),</li> <li> a supported compiler (see Section \ref seccompilers),</li>
<li> \ref seccmake,</li> <li> \ref seccmake,</li>
<li> \ref thirdpartyBoost,</li> <li> \ref thirdpartyBoost,</li>
<li> \ref thirdpartyMPFR.</li> <li> a \ref thirdpartyMP.</li>
</ul> </ul>
Optional third-party software might be required to build examples and demos shipped with \cgal, Optional third-party software might be required to build examples and demos shipped with \cgal,

View File

@ -6,7 +6,7 @@
15.9, 16.0, 17.0 (\visualstudio 2017, 2019, and 2022). 15.9, 16.0, 17.0 (\visualstudio 2017, 2019, and 2022).
\cgal is a library that has mandatory dependencies that must be first installed: \cgal is a library that has mandatory dependencies that must be first installed:
\ref thirdpartyBoost and \ref thirdpartyMPFR. \ref thirdpartyBoost and a \ref thirdpartyMP.
You have two options to install \cgal and its dependencies: you can either use You have two options to install \cgal and its dependencies: you can either use
the *Vcpkg library manager*, which will automatically install an appropriate version of the *Vcpkg library manager*, which will automatically install an appropriate version of

View File

@ -92400,7 +92400,7 @@ some 2 curves cross exponentially many times."
@inproceedings{kn-afrmt-97 @inproceedings{kn-afrmt-97
, author = "Yoshiyuki Kusakari and Takao Nishizeki" , author = "Yoshiyuki Kusakari and Takao Nishizeki"
, title = "An Algorithm for Finding a Region with the Minimum Total {$L_1$}-Distance from Prescibed Terminals" , title = "An Algorithm for Finding a Region with the Minimum Total {$L_1$}-Distance from Prescribed Terminals"
, booktitle = "Proc. 8th Annu. Internat. Sympos. Algorithms Comput." , booktitle = "Proc. 8th Annu. Internat. Sympos. Algorithms Comput."
, nickname = "ISAAC '97" , nickname = "ISAAC '97"
, site = "Singapore" , site = "Singapore"

View File

@ -30,7 +30,6 @@ are needed from `rnd` for each point.
\sa `CGAL::points_on_segment_2()` \sa `CGAL::points_on_segment_2()`
\sa `CGAL::points_on_square_grid_2()` \sa `CGAL::points_on_square_grid_2()`
\sa `CGAL::random_selection()` \sa `CGAL::random_selection()`
\sa `CGAL::random_selection()`
\sa `std::random_shuffle()` \sa `std::random_shuffle()`
*/ */

View File

@ -105,7 +105,7 @@ void Generic_random_point_generator<Id, ObjectFromIdMap, GeneratorOnObject, P>:
); );
// generate the points // generate the points
GeneratorOnObject pointCreator(object_from_id_map(ids[target])); GeneratorOnObject pointCreator(object_from_id_map(ids[target]), random);
this->d_item = *pointCreator; this->d_item = *pointCreator;
} }

View File

@ -478,7 +478,6 @@ public:
qreal bufferTextureMaxU() const { return bufferTextureMaxU_; } qreal bufferTextureMaxU() const { return bufferTextureMaxU_; }
/*! Same as bufferTextureMaxU(), but for the v texture coordinate. */ /*! Same as bufferTextureMaxU(), but for the v texture coordinate. */
qreal bufferTextureMaxV() const { return bufferTextureMaxV_; } qreal bufferTextureMaxV() const { return bufferTextureMaxV_; }
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
// These methods are part of the QGLWidget public API. // These methods are part of the QGLWidget public API.
// As of version 2.7.0, the use of QOpenGLWidget instead means that they have // As of version 2.7.0, the use of QOpenGLWidget instead means that they have
// to be provided for backward compatibility. // to be provided for backward compatibility.
@ -486,7 +485,6 @@ public:
const QFont &font = QFont()); const QFont &font = QFont());
void renderText(double x, double y, double z, const QString &str, void renderText(double x, double y, double z, const QString &str,
const QFont &font = QFont()); const QFont &font = QFont());
#endif
public Q_SLOTS: public Q_SLOTS:
void copyBufferToTexture(GLint, GLenum = GL_NONE); void copyBufferToTexture(GLint, GLenum = GL_NONE);

View File

@ -354,7 +354,6 @@ camera is manipulated) : main drawing method. Should be overloaded. \arg
postDraw() : display of visual hints (world axis, FPS...) */ postDraw() : display of visual hints (world axis, FPS...) */
CGAL_INLINE_FUNCTION CGAL_INLINE_FUNCTION
void CGAL::QGLViewer::paintGL() { void CGAL::QGLViewer::paintGL() {
makeCurrent();
// Clears screen, set model view matrix... // Clears screen, set model view matrix...
preDraw(); preDraw();
// Used defined method. Default calls draw() // Used defined method. Default calls draw()
@ -364,7 +363,6 @@ void CGAL::QGLViewer::paintGL() {
draw(); draw();
// Add visual hints: axis, camera, grid... // Add visual hints: axis, camera, grid...
postDraw(); postDraw();
doneCurrent();
Q_EMIT drawFinished(true); Q_EMIT drawFinished(true);
} }
@ -720,7 +718,6 @@ CGAL_INLINE_FUNCTION
void CGAL::QGLViewer::drawLight(GLenum, qreal ) const { void CGAL::QGLViewer::drawLight(GLenum, qreal ) const {
} }
#if (QT_VERSION >= QT_VERSION_CHECK(5, 4, 0))
CGAL_INLINE_FUNCTION CGAL_INLINE_FUNCTION
void CGAL::QGLViewer::renderText(int x, int y, const QString &str, void CGAL::QGLViewer::renderText(int x, int y, const QString &str,
const QFont &font) { const QFont &font) {
@ -742,7 +739,6 @@ void CGAL::QGLViewer::renderText(double x, double y, double z, const QString &st
const Vec proj = camera_->projectedCoordinatesOf(Vec(x, y, z)); const Vec proj = camera_->projectedCoordinatesOf(Vec(x, y, z));
renderText(int(proj.x), int(proj.y), str, font); renderText(int(proj.x), int(proj.y), str, font);
} }
#endif
/*! Draws \p text at position \p x, \p y (expressed in screen coordinates /*! Draws \p text at position \p x, \p y (expressed in screen coordinates
pixels, origin in the upper left corner of the widget). pixels, origin in the upper left corner of the widget).

View File

@ -25,7 +25,6 @@
#include <CGAL/squared_distance_3.h> #include <CGAL/squared_distance_3.h>
#include <CGAL/number_utils.h> #include <CGAL/number_utils.h>
#include <CGAL/Iterator_range.h> #include <CGAL/Iterator_range.h>
#include <CGAL/Iterator_range.h>
#include <CGAL/boost/graph/helpers.h> #include <CGAL/boost/graph/helpers.h>
#include <CGAL/boost/graph/copy_face_graph.h> #include <CGAL/boost/graph/copy_face_graph.h>
#include <CGAL/Heat_method_3/internal/V2V.h> #include <CGAL/Heat_method_3/internal/V2V.h>

View File

@ -1,12 +0,0 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: CGAL
Upstream-Contact: CGAL Editorial Board <info@cgal.org>
Source: https://github.com/CGAL/cgal
Files: *.cmake *.md doc/* doc_html/* scripts/* developer_scripts/* package_info/* demo/* examples/* src/* test/* benchmarks/* benchmark/* data/* cmake/*
Copyright: 1995-2023 The CGAL Project
License: CC0-1.0
Files: include/CGAL/Qt/ImageInterface.ui include/CGAL/Qt/resources/qglviewer-icon.xpm AUTHORS CMakeLists.txt README auxiliary/cgal_create_cmake_script.1 auxiliary/gmp/README include/CGAL/license/gpl_package_list.txt auxiliary/cgal_app.icns copyright VERSION
Copyright: 1995-2023 The CGAL Project
License: CC0-1.0

View File

@ -13,6 +13,8 @@ Release date: June 2024
- LLVM Clang version 15.0.7 or later (on Linux) - LLVM Clang version 15.0.7 or later (on Linux)
- Apple Clang compiler versions 10.0.1, 12.0.5, and 15.0.0 (on macOS) - Apple Clang compiler versions 10.0.1, 12.0.5, and 15.0.0 (on macOS)
- The minimal supported version of Boost is now 1.72.0. - The minimal supported version of Boost is now 1.72.0.
- GMP/MPFR are no longer mandatory to use CGAL, [Boost.Multiprecision](https://www.boost.org/doc/libs/1_72_0/libs/multiprecision/doc/html/index.html).
can be used instead.
- The CGAL `Core` library is no longer based on GMP, but on - The CGAL `Core` library is no longer based on GMP, but on
[Boost.Multiprecision](https://www.boost.org/doc/libs/1_72_0/libs/multiprecision/doc/html/index.html). [Boost.Multiprecision](https://www.boost.org/doc/libs/1_72_0/libs/multiprecision/doc/html/index.html).
Either GMP backend or Boost backend can be used. Either GMP backend or Boost backend can be used.
@ -144,10 +146,6 @@ Release date: June 2024
to the [`GenericMap`](https://doc.cgal.org/6.0/Combinatorial_map/classGenericMap.html) to the [`GenericMap`](https://doc.cgal.org/6.0/Combinatorial_map/classGenericMap.html)
concept, which enables users to insert an edge between two different faces in order to create faces with holes. concept, which enables users to insert an edge between two different faces in order to create faces with holes.
- Added new meshing criterion `edge_distance`, an upper bound for the distance from the edge to the 1D feature.
- **Breaking change**: the concept `MeshEdgeCriteria_3` was modified to include the new meshing criterion `edge_distance`.
### [Quadtrees, Octrees, and Orthtrees](https://doc.cgal.org/6.0/Manual/packages.html#PkgOrthtree) ### [Quadtrees, Octrees, and Orthtrees](https://doc.cgal.org/6.0/Manual/packages.html#PkgOrthtree)
- **Breaking change**: - **Breaking change**:
@ -225,6 +223,9 @@ Release date: June 2024
as well as the class `Triangle_accessor`. These were no longer used for several releases. as well as the class `Triangle_accessor`. These were no longer used for several releases.
- **Breaking change**: Removed the class templates `CGAL::Gray_image_mesh_domain_3`, `CGAL::Implicit_mesh_domain_3`, - **Breaking change**: Removed the class templates `CGAL::Gray_image_mesh_domain_3`, `CGAL::Implicit_mesh_domain_3`,
and `CGAL::Labeled_image_mesh_domain_3`, which were deprecated since CGAL-4.13. and `CGAL::Labeled_image_mesh_domain_3`, which were deprecated since CGAL-4.13.
- Added new meshing criterion `edge_distance`, an upper bound for the distance from the edge to the 1D feature.
- **Breaking change**: the concept `MeshEdgeCriteria_3` was modified to include the new meshing criterion `edge_distance`.
### [3D Surface Mesh Generation](https://doc.cgal.org/6.0/Manual/packages.html#PkgSurfaceMesher3) ### [3D Surface Mesh Generation](https://doc.cgal.org/6.0/Manual/packages.html#PkgSurfaceMesher3)

View File

@ -934,7 +934,7 @@ if(CGAL_BRANCH_BUILD)
find_package(Doxygen REQUIRED) find_package(Doxygen REQUIRED)
find_package(Eigen3 REQUIRED) find_package(Eigen3 REQUIRED)
find_package(Qt6 COMPONENTS Core Widgets OpenGL Gui REQUIRED) find_package(Qt6 COMPONENTS Core Widgets OpenGL Gui REQUIRED)
find_package(VTK COMPONENTS vtkImagingGeneral vtkIOImage NO_MODULE) find_package(VTK COMPONENTS ImagingGeneral IOImage NO_MODULE)
if(VTK_FOUND) if(VTK_FOUND)
get_target_property(VTK_INCLUDE_DIRS VTK::IOImage INTERFACE_INCLUDE_DIRECTORIES) get_target_property(VTK_INCLUDE_DIRS VTK::IOImage INTERFACE_INCLUDE_DIRECTORIES)
endif() endif()

47
Installation/REUSE.toml Normal file
View File

@ -0,0 +1,47 @@
version = 1
SPDX-PackageName = "CGAL"
SPDX-PackageSupplier = "CGAL Editorial Board <info@cgal.org>"
SPDX-PackageDownloadLocation = "https://github.com/CGAL/cgal"
[[annotations]]
path = [
"**.cmake",
"**.md",
"doc/**",
"doc_html/**",
"scripts/**",
"developer_scripts/**",
"package_info/**",
"demo/**",
"examples/**",
"src/**",
"test/**",
"benchmarks/**",
"benchmark/**",
"data/**",
"cmake/**",
"**/*.natvis",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "1995-2024 The CGAL Project"
SPDX-License-Identifier = "CC0-1.0"
[[annotations]]
path = [
"REUSE.toml",
"lib/cmake/CGAL/CGALConfig-installation-dirs.cmake.in",
"include/CGAL/Qt/ImageInterface.ui",
"include/CGAL/Qt/resources/qglviewer-icon.xpm",
"AUTHORS",
"CMakeLists.txt",
"README",
"auxiliary/cgal_create_cmake_script.1",
"auxiliary/gmp/README",
"include/CGAL/license/gpl_package_list.txt",
"auxiliary/cgal_app.icns",
"copyright",
"VERSION",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "1995-2024 The CGAL Project"
SPDX-License-Identifier = "CC0-1.0"

View File

@ -0,0 +1,17 @@
if(OpenMesh_FOUND AND NOT TARGET CGAL::OpenMesh_support)
add_library(CGAL::OpenMesh_support INTERFACE IMPORTED)
if(TARGET OpenMeshCore)
target_link_libraries(CGAL::OpenMesh_support INTERFACE OpenMeshCore)
endif()
if(TARGET OpenMeshTools)
target_link_libraries(CGAL::OpenMesh_support INTERFACE OpenMeshTools)
endif()
target_compile_definitions(CGAL::OpenMesh_support
INTERFACE "CGAL_USE_OPENMESH;NOMINMAX;_USE_MATH_DEFINES")
endif()

View File

@ -1,79 +0,0 @@
#This modules tries to find OpenMesh
# Once done this will define
#
# OpenMesh_FOUND - system has OpenMesh
# OPENMESH_INCLUDE_DIR - OpenMesh include directory
# OPENMESH_LIBRARIES - OpenMesh libraries
#
find_package(OpenMesh NO_MODULE QUIET)
# Is it already configured?
if (NOT OpenMesh_FOUND)
find_path(OPENMESH_INCLUDE_DIR
NAMES OpenMesh/Core/Mesh/ArrayKernel.hh
HINTS ENV OPENMESH_INC_DIR
ENV OPENMESH_DIR
/usr/include
/usr/local/include
PATH_SUFFIXES src
DOC "The directory containing the OpenMesh header files WITHOUT the OpenMesh prefix"
)
find_library(OPENMESH_LIBRARY_RELEASE NAMES "OpenMeshCore"
HINTS ENV OPENMESH_LIB_DIR
ENV OPENMESH_DIR
PATH_SUFFIXES lib
DOC "Path to the OpenMeshCore library"
)
find_library(OPENMESH_LIBRARY_DEBUG NAMES "OpenMeshCored"
HINTS ENV OPENMESH_LIB_DIR
ENV OPENMESH_DIR
PATH_SUFFIXES lib
DOC "Path to the OpenMeshCored library"
)
if(OPENMESH_LIBRARY_RELEASE)
if(OPENMESH_LIBRARY_DEBUG)
set(OPENMESH_LIBRARIES optimized ${OPENMESH_LIBRARY_RELEASE} debug ${OPENMESH_LIBRARY_DEBUG})
else()
set(OPENMESH_LIBRARIES ${OPENMESH_LIBRARY_RELEASE})
endif()
endif()
endif()
include( FindPackageHandleStandardArgs )
find_package_handle_standard_args(OpenMesh
REQUIRED_VARS OPENMESH_INCLUDE_DIR OPENMESH_LIBRARIES
FOUND_VAR OpenMesh_FOUND
)
if(OpenMesh_FOUND AND NOT TARGET OpenMesh::OpenMesh)
add_library(OpenMesh::OpenMesh UNKNOWN IMPORTED)
if(TARGET OpenMeshCore)
target_link_libraries(OpenMesh::OpenMesh INTERFACE OpenMeshCore)
return()
endif()
set_target_properties(OpenMesh::OpenMesh PROPERTIES
INTERFACE_COMPILE_DEFINITIONS "CGAL_USE_OPENMESH;NOMINMAX;_USE_MATH_DEFINES"
INTERFACE_INCLUDE_DIRECTORIES "${OPENMESH_INCLUDE_DIR}")
if(OPENMESH_LIBRARY_RELEASE)
set_property(TARGET OpenMesh::OpenMesh APPEND PROPERTY
IMPORTED_CONFIGURATIONS RELEASE)
set_target_properties(OpenMesh::OpenMesh PROPERTIES
IMPORTED_LOCATION_RELEASE "${OPENMESH_LIBRARY_RELEASE}")
endif()
if(OPENMESH_LIBRARY_DEBUG)
set_property(TARGET OpenMesh::OpenMesh APPEND PROPERTY
IMPORTED_CONFIGURATIONS DEBUG)
set_target_properties(OpenMesh::OpenMesh PROPERTIES
IMPORTED_LOCATION_DEBUG "${OPENMESH_LIBRARY_DEBUG}")
endif()
endif()

View File

@ -1,5 +0,0 @@
# This module setups the compiler for using the OpenMesh library.
# It assumes that find_package(OpenMesh) was already called.
include_directories ( ${OPENMESH_INCLUDE_DIR} )
add_definitions( -DNOMINMAX -D_USE_MATH_DEFINES )

View File

@ -38,11 +38,8 @@ do_intersect(const typename K::Line_3& l,
if(p0p1s == COLLINEAR) if(p0p1s == COLLINEAR)
return true; return true;
CGAL::Orientation stp0 = pred(r.source(), r.second_point(), l.point(0)); typename K::Point_3 lst = l.point(0) + (r.point(1) - r.point(0));
if(stp0 == COLLINEAR) return (pred(l.point(0), l.point(1), r.point(0), lst) != CGAL::POSITIVE);
return Ray_3_has_on_collinear_Point_3(r,l.point(0),k);
return (p0p1s != stp0);
} }
template <class K> template <class K>

View File

@ -232,6 +232,10 @@ public:
check_no_intersection(L(p(0,0,0),p(1,0,0)), R(p(3,0,1),p(6,0,1))); check_no_intersection(L(p(0,0,0),p(1,0,0)), R(p(3,0,1),p(6,0,1)));
check_no_intersection(L(p(0,0,0),p(1,0,0)), R(p(0,2,0),p(0,4,0))); check_no_intersection(L(p(0,0,0),p(1,0,0)), R(p(0,2,0),p(0,4,0)));
check_no_intersection(L(p(0,0,0),p(1,0,0)), R(p(6,2,0),p(5,4,0))); check_no_intersection(L(p(0,0,0),p(1,0,0)), R(p(6,2,0),p(5,4,0)));
check_no_intersection(L(p(0,0,0),p(0,1,0)), R(p(1,-1,0),p(1,0,0)));
check_no_intersection(L(p(0,-10,0),p(0,-9,0)), R(p(1,-1,0),p(2,0,0)));
check_no_intersection(L(p(0,-10,0),p(0,0,0)), R(p(1,-1,0),p(2,0,0)));
check_no_intersection(L(p(0,0,0),p(0,1,0)), R(p(1,-1,0),p(2,0,0)));
// Point intersection // Point intersection
check_intersection (L(p(0,0,0),p(1,0,0)), R(p(3,0,0),p(6,4,0)), check_intersection (L(p(0,0,0),p(1,0,0)), R(p(3,0,0),p(6,4,0)),

View File

@ -74,6 +74,14 @@ public:
check_no_intersection (R(p(0,0,0), p(1,0,0)), R(p(0,1,0), p(0,2,0))); check_no_intersection (R(p(0,0,0), p(1,0,0)), R(p(0,1,0), p(0,2,0)));
check_no_intersection (R(p(0,0,0), p(1,0,0)), R(p(-1,0,0), p(-1,-1,0))); check_no_intersection (R(p(0,0,0), p(1,0,0)), R(p(-1,0,0), p(-1,-1,0)));
check_no_intersection (R(p(1,-1,0), p(2,0,0)), R(p(2,-1,0), p(3,0,0)));
check_no_intersection (R(p(1,-1,0), p(2,0,0)), R(p(2,-1,0), p(3,-1,0)));
check_no_intersection (R(p(1,-1,0), p(2,0,0)), R(p(2,-1,0), p(3,-2,0)));
check_no_intersection (R(p(0,0,0), p(0,1,0)), R(p(0,-1,0), p(1,-1,0)));
check_no_intersection (R(p(0,0,0), p(0,1,0)), R(p(-1,-3,0),p(2,0,0)));
check_no_intersection (R(p(0,0,0), p(0,1,0)), R(p(-2,-4,0),p(-1,-3,0)));
check_no_intersection (R(p(0,0,0), p(0,1,0)), R(p(1,-1,0), p(2,0,0)));
// Point // Point
check_intersection (R(p(0,0,0), p(1,0,0)), R(p(0,0,0), p(-1,0,0)), check_intersection (R(p(0,0,0), p(1,0,0)), R(p(0,0,0), p(-1,0,0)),
p(0,0,0)); p(0,0,0));
@ -88,6 +96,10 @@ public:
check_intersection (R(p(0,0,0), p(1,0,0)), R(p(1,-2,0), p(1,-1,0)), check_intersection (R(p(0,0,0), p(1,0,0)), R(p(1,-2,0), p(1,-1,0)),
p(1,0,0)); p(1,0,0));
check_intersection (R(p(0,0,0), p(1,0,0)), R(p(1,-2,0), p(1,-1,0)),
p(1,0,0));
// Segment // Segment
check_intersection (R(p(0,0,0), p(1,0,0)), R(p(2,0,0), p(-3,0,0)), check_intersection (R(p(0,0,0), p(1,0,0)), R(p(2,0,0), p(-3,0,0)),
S(p(0,0,0), p(2,0,0)), false); S(p(0,0,0), p(2,0,0)), false);
@ -161,6 +173,8 @@ public:
for(int i=0; i<N; ++i) for(int i=0; i<N; ++i)
{ {
P c = random_point(), q = random_point(); P c = random_point(), q = random_point();
while(c==q)
q = random_point();
Sph sph(c, CGAL::squared_distance(c, q)); Sph sph(c, CGAL::squared_distance(c, q));
// single point // single point

View File

@ -9,7 +9,6 @@
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Exact_predicates_exact_constructions_kernel.h> #include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Dimension.h>
#include <CGAL/Dimension.h> #include <CGAL/Dimension.h>
template < typename K > template < typename K >

View File

@ -27,10 +27,8 @@ int& code_to_call_before_creation_of_QCoreApplication(int& i) {
fmt.setOption(QSurfaceFormat::DebugContext); fmt.setOption(QSurfaceFormat::DebugContext);
QSurfaceFormat::setDefaultFormat(fmt); QSurfaceFormat::setDefaultFormat(fmt);
//for windows // for windows
#if (QT_VERSION >= QT_VERSION_CHECK(5, 3, 0)) /// @TODO remove all calls to QT_VERSION_CHECK about Qt5
QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL); QCoreApplication::setAttribute(Qt::AA_UseDesktopOpenGL);
#endif
return i; return i;
} }

View File

@ -668,15 +668,7 @@ void MainWindow::loadPlugins()
} }
} }
QString env_path = qgetenv("LAB_DEMO_PLUGINS_PATH"); QString env_path = qgetenv("LAB_DEMO_PLUGINS_PATH");
#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0))
QChar separator = QDir::listSeparator(); QChar separator = QDir::listSeparator();
#else
#if defined(_WIN32)
QChar separator = ';';
#else
QChar separator = ':';
#endif
#endif
if(!env_path.isEmpty()) { if(!env_path.isEmpty()) {
#if defined(_WIN32) #if defined(_WIN32)
QString path = qgetenv("PATH"); QString path = qgetenv("PATH");
@ -2657,17 +2649,10 @@ void MainWindow::resetHeader()
sceneView->header()->setSectionResizeMode(Scene::RenderingModeColumn, QHeaderView::ResizeToContents); sceneView->header()->setSectionResizeMode(Scene::RenderingModeColumn, QHeaderView::ResizeToContents);
sceneView->header()->setSectionResizeMode(Scene::ABColumn, QHeaderView::Fixed); sceneView->header()->setSectionResizeMode(Scene::ABColumn, QHeaderView::Fixed);
sceneView->header()->setSectionResizeMode(Scene::VisibleColumn, QHeaderView::Fixed); sceneView->header()->setSectionResizeMode(Scene::VisibleColumn, QHeaderView::Fixed);
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
sceneView->header()->resizeSection(Scene::ColorColumn, sceneView->header()->fontMetrics().horizontalAdvance("_#_")); sceneView->header()->resizeSection(Scene::ColorColumn, sceneView->header()->fontMetrics().horizontalAdvance("_#_"));
sceneView->resizeColumnToContents(Scene::RenderingModeColumn); sceneView->resizeColumnToContents(Scene::RenderingModeColumn);
sceneView->header()->resizeSection(Scene::ABColumn, sceneView->header()->fontMetrics().horizontalAdvance(QString("_AB_"))); sceneView->header()->resizeSection(Scene::ABColumn, sceneView->header()->fontMetrics().horizontalAdvance(QString("_AB_")));
sceneView->header()->resizeSection(Scene::VisibleColumn, sceneView->header()->fontMetrics().horizontalAdvance(QString("_View_"))); sceneView->header()->resizeSection(Scene::VisibleColumn, sceneView->header()->fontMetrics().horizontalAdvance(QString("_View_")));
#else
sceneView->header()->resizeSection(Scene::ColorColumn, sceneView->header()->fontMetrics().width("_#_"));
sceneView->resizeColumnToContents(Scene::RenderingModeColumn);
sceneView->header()->resizeSection(Scene::ABColumn, sceneView->header()->fontMetrics().width(QString("_AB_")));
sceneView->header()->resizeSection(Scene::VisibleColumn, sceneView->header()->fontMetrics().width(QString("_View_")));
#endif
} }
void MainWindow::reset_default_loaders() void MainWindow::reset_default_loaders()

View File

@ -43,38 +43,23 @@ target_link_libraries(surf_io_plugin PUBLIC scene_surface_mesh_item)
cgal_lab_plugin(lcc_io_plugin lcc_io_plugin KEYWORDS Viewer) cgal_lab_plugin(lcc_io_plugin lcc_io_plugin KEYWORDS Viewer)
target_link_libraries(lcc_io_plugin PUBLIC scene_lcc_item) target_link_libraries(lcc_io_plugin PUBLIC scene_lcc_item)
find_package(VTK QUIET COMPONENTS vtkCommonCore vtkIOCore vtkIOLegacy vtkIOXML find_package(VTK 9.0 QUIET COMPONENTS CommonCore IOCore IOLegacy IOXML FiltersCore FiltersSources)
vtkFiltersCore vtkFiltersSources)
set_package_properties( set_package_properties(
VTK PROPERTIES VTK PROPERTIES
DESCRIPTION "A library for image processing." DESCRIPTION "A library for image processing."
PURPOSE "Can be used for I/O (DICOM, VTU, VTP.") PURPOSE "Can be used for I/O (DICOM, VTU, VTP).")
cgal_lab_plugin(triangulation_3_io_plugin triangulation_3_io_plugin KEYWORDS Viewer) cgal_lab_plugin(triangulation_3_io_plugin triangulation_3_io_plugin KEYWORDS Viewer)
target_link_libraries(triangulation_3_io_plugin PUBLIC scene_triangulation_3_item) target_link_libraries(triangulation_3_io_plugin PUBLIC scene_triangulation_3_item)
if(VTK_FOUND) if(VTK_FOUND AND VTK_LIBRARIES)
if(VTK_USE_FILE) message(STATUS "VTK ${VTK_VERSION} found ${VTK_LIBRARIES}")
include(${VTK_USE_FILE}) cgal_lab_plugin(vtk_plugin VTK_io_plugin KEYWORDS Viewer Mesh_3)
endif() target_link_libraries(vtk_plugin PUBLIC scene_surface_mesh_item scene_polylines_item scene_c3t3_item scene_points_with_normal_item
if("${VTK_VERSION_MAJOR}" GREATER "5" OR VTK_VERSION VERSION_GREATER 5) ${VTK_LIBRARIES})
if(TARGET VTK::CommonCore) target_compile_definitions(vtk_plugin PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
set(VTK_LIBRARIES VTK::CommonCore VTK::IOCore VTK::IOLegacy VTK::IOXML
VTK::FiltersCore VTK::FiltersSources)
endif()
if(VTK_LIBRARIES)
cgal_lab_plugin(vtk_plugin VTK_io_plugin KEYWORDS Viewer Mesh_3)
target_link_libraries(vtk_plugin PUBLIC scene_surface_mesh_item scene_polylines_item scene_c3t3_item scene_points_with_normal_item
${VTK_LIBRARIES})
target_compile_definitions(vtk_plugin PRIVATE -DCGAL_USE_VTK -DNOMINMAX)
else()
message(STATUS "NOTICE: the vtk IO plugin needs VTK libraries and will not be compiled.")
endif()
else()
message(STATUS "NOTICE: the vtk IO plugin needs VTK 6.0 or greater and will not be compiled (incorrect version found).")
endif()
else() else()
message(STATUS "NOTICE: the vtk IO plugin needs VTK 6.0 or greater and will not be compiled.") message(STATUS "NOTICE: the vtk IO plugin needs VTK 9.0 or greater and will not be compiled.")
endif() endif()
cgal_lab_plugin(xyz_plugin XYZ_io_plugin KEYWORDS Viewer PointSetProcessing Classification) cgal_lab_plugin(xyz_plugin XYZ_io_plugin KEYWORDS Viewer PointSetProcessing Classification)
target_link_libraries(xyz_plugin PUBLIC scene_points_with_normal_item) target_link_libraries(xyz_plugin PUBLIC scene_points_with_normal_item)

View File

@ -37,21 +37,9 @@ if(ITK_FOUND)
target_link_libraries(mesh_3_plugin PUBLIC CGAL::ITK_support) target_link_libraries(mesh_3_plugin PUBLIC CGAL::ITK_support)
endif(ITK_FOUND) endif(ITK_FOUND)
find_package(VTK QUIET COMPONENTS vtkImagingGeneral vtkIOImage vtkIOXML NO_MODULE) find_package(VTK 9.0 QUIET COMPONENTS ImagingGeneral IOImage IOXML NO_MODULE)
if(VTK_FOUND) if(VTK_FOUND AND VTK_LIBRARIES)
if(VTK_USE_FILE) message(STATUS "VTK ${VTK_VERSION} found ${VTK_LIBRARIES}")
include(${VTK_USE_FILE})
endif()
if("${VTK_VERSION_MAJOR}" GREATER "5" OR VTK_VERSION VERSION_GREATER 5)
if(TARGET VTK::IOImage)
set(VTK_LIBRARIES VTK::IOImage VTK::ImagingGeneral VTK::IOXML)
endif()
if(NOT VTK_LIBRARIES)
message(STATUS "NOTICE: DICOM files (.dcm) require the VTK libraries, and will not be readable.")
endif()
else()
message(STATUS "NOTICE: DICOM files (.dcm) require the VTK libraries, and will not be readable.")
endif()
else() else()
message(STATUS "NOTICE: DICOM files (.dcm) require the VTK libraries, and will not be readable.") message(STATUS "NOTICE: DICOM files (.dcm) require the VTK libraries, and will not be readable.")
endif() endif()

View File

@ -705,11 +705,7 @@ private:
// Find the right width for the label to accommodate at least 9999 // Find the right width for the label to accommodate at least 9999
QFontMetrics metric = x_cubeLabel->fontMetrics(); QFontMetrics metric = x_cubeLabel->fontMetrics();
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
x_cubeLabel->setFixedWidth(metric.horizontalAdvance(QString(".9999."))); x_cubeLabel->setFixedWidth(metric.horizontalAdvance(QString(".9999.")));
#else
x_cubeLabel->setFixedWidth(metric.width(QString(".9999.")));
#endif
x_cubeLabel->setText("0"); x_cubeLabel->setText("0");
x_cubeLabel->setValidator(validator); x_cubeLabel->setValidator(validator);
@ -735,11 +731,7 @@ private:
// Find the right width for the label to accommodate at least 9999 // Find the right width for the label to accommodate at least 9999
QFontMetrics metric = y_cubeLabel->fontMetrics(); QFontMetrics metric = y_cubeLabel->fontMetrics();
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
y_cubeLabel->setFixedWidth(metric.horizontalAdvance(QString(".9999."))); y_cubeLabel->setFixedWidth(metric.horizontalAdvance(QString(".9999.")));
#else
y_cubeLabel->setFixedWidth(metric.width(QString(".9999.")));
#endif
y_cubeLabel->setText("0"); y_cubeLabel->setText("0");
y_cubeLabel->setValidator(validator); y_cubeLabel->setValidator(validator);
y_slider = new QSlider(mw); y_slider = new QSlider(mw);
@ -764,11 +756,7 @@ private:
// Find the right width for the label to accommodate at least 9999 // Find the right width for the label to accommodate at least 9999
QFontMetrics metric = z_cubeLabel->fontMetrics(); QFontMetrics metric = z_cubeLabel->fontMetrics();
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
z_cubeLabel->setFixedWidth(metric.horizontalAdvance(QString(".9999."))); z_cubeLabel->setFixedWidth(metric.horizontalAdvance(QString(".9999.")));
#else
z_cubeLabel->setFixedWidth(metric.width(QString(".9999.")));
#endif
z_cubeLabel->setText("0"); z_cubeLabel->setText("0");
z_cubeLabel->setValidator(validator); z_cubeLabel->setValidator(validator);
z_slider = new QSlider(mw); z_slider = new QSlider(mw);

View File

@ -750,7 +750,9 @@ void Mesh_3_plugin::mesh_3(const Mesh_type mesh_type,
} }
} }
if(mesh_type != Mesh_type::SURFACE_ONLY && !material_ids_valid) if(mesh_type != Mesh_type::SURFACE_ONLY
&& !material_ids_valid
&& bounding_sm_item != nullptr)
{ {
sm_items.removeAll(make_not_null(bounding_sm_item)); sm_items.removeAll(make_not_null(bounding_sm_item));
} }

View File

@ -171,8 +171,10 @@ log() const
.arg(detect_connected_components); .arg(detect_connected_components);
res << QString("use weights: %1").arg(weights_ptr != nullptr); res << QString("use weights: %1").arg(weights_ptr != nullptr);
} }
res << QString("use aabb tree: %1").arg(use_sizing_field_with_aabb_tree); if(use_sizing_field_with_aabb_tree)
res << QString("manifold: %1").arg(manifold); res << QString("use sizing field with aabb tree: %1").arg(use_sizing_field_with_aabb_tree);
if(manifold)
res << QString("manifold: %1").arg(manifold);
return res; return res;
} }

View File

@ -250,11 +250,7 @@ protected:
} }
case QEvent::Wheel: { case QEvent::Wheel: {
QWheelEvent* event = static_cast<QWheelEvent*>(ev); QWheelEvent* event = static_cast<QWheelEvent*>(ev);
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
QPoint pos = event->pos();
#else
QPointF pos = event->position(); QPointF pos = event->position();
#endif
QPointF old_pos = v->mapToScene(pos.x(), pos.y()); QPointF old_pos = v->mapToScene(pos.x(), pos.y());
if(event->angleDelta().y() <0) if(event->angleDelta().y() <0)
v->scale(1.2, 1.2); v->scale(1.2, 1.2);

View File

@ -59,7 +59,6 @@ void compute(SMesh* sMesh,
namespace PMP = CGAL::Polygon_mesh_processing; namespace PMP = CGAL::Polygon_mesh_processing;
typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic_kernel; typedef CGAL::Exact_predicates_inexact_constructions_kernel Epic_kernel;
typedef Epic_kernel::Point_3 Point; typedef Epic_kernel::Point_3 Point;
typedef Epic_kernel::Point_3 Point;
typedef Epic_kernel::Vector_3 Vector; typedef Epic_kernel::Vector_3 Vector;
typedef boost::graph_traits<SMesh>::vertex_descriptor Vertex_descriptor; typedef boost::graph_traits<SMesh>::vertex_descriptor Vertex_descriptor;

View File

@ -142,11 +142,7 @@ protected:
} }
case QEvent::Wheel: { case QEvent::Wheel: {
QWheelEvent* event = static_cast<QWheelEvent*>(ev); QWheelEvent* event = static_cast<QWheelEvent*>(ev);
#if QT_VERSION < QT_VERSION_CHECK(5, 14, 0)
QPoint pos = event->pos();
#else
QPointF pos = event->position(); QPointF pos = event->position();
#endif
QPointF old_pos = v->mapToScene(pos.x(), pos.y()); QPointF old_pos = v->mapToScene(pos.x(), pos.y());
if(event->angleDelta().y() <0) if(event->angleDelta().y() <0)
v->scale(1.2, 1.2); v->scale(1.2, 1.2);

View File

@ -74,7 +74,7 @@ Scene_textured_surface_mesh_item_priv::compute_normals_and_vertices(void) const
faces_buffer.resize(0); faces_buffer.resize(0);
typedef boost::graph_traits<SMesh>::face_iterator face_iterator; typedef boost::graph_traits<SMesh>::face_iterator face_iterator;
typedef boost::graph_traits<SMesh>::face_iterator face_iterator;
const CGAL::qglviewer::Vec offset = static_cast<CGAL::Three::Viewer_interface*>(CGAL::QGLViewer::QGLViewerPool().first())->offset(); const CGAL::qglviewer::Vec offset = static_cast<CGAL::Three::Viewer_interface*>(CGAL::QGLViewer::QGLViewerPool().first())->offset();
//Faces //Faces

View File

@ -1152,13 +1152,7 @@ void Viewer::drawVisualHints()
//Prints the displayMessage //Prints the displayMessage
QFont font = QFont(); QFont font = QFont();
QFontMetrics fm(font); QFontMetrics fm(font);
TextItem *message_text = new TextItem(float(10 + TextItem *message_text = new TextItem(float(10 + fm.horizontalAdvance(d->message)/2),
#if QT_VERSION >= QT_VERSION_CHECK(5, 11, 0)
fm.horizontalAdvance(d->message)/2)
#else
fm.width(d->message)/2)
#endif
,
float(height()-20), float(height()-20),
0, d->message, false, 0, d->message, false,
QFont(), Qt::gray ); QFont(), Qt::gray );

View File

@ -18,10 +18,8 @@ include_directories(BEFORE "/usr/include/libxml2/")
# add_definitions("-g") # add_definitions("-g")
# OpenMesh # OpenMesh
set(OPENMESH_DIR "${CMAKE_CURRENT_SOURCE_DIR}/openmesh")
find_package(OpenMesh REQUIRED) find_package(OpenMesh REQUIRED)
include_directories(${OPENMESH_INCLUDE_DIR}) include(CGAL_OpenMesh_support)
link_directories(${OPENMESH_LIBRARY_DIR})
# Polyhedron # Polyhedron
add_executable(polyhedron_performance performance_2.h polyhedron_performance.h add_executable(polyhedron_performance performance_2.h polyhedron_performance.h
@ -42,7 +40,7 @@ target_link_libraries(surface_mesh_performance surface_mesh)
# Open_mesh # Open_mesh
add_executable(openmesh_performance performance_2.h openmesh_performance.h add_executable(openmesh_performance performance_2.h openmesh_performance.h
openmesh_performance.cpp) openmesh_performance.cpp)
target_link_libraries(openmesh_performance ${OPENMESH_LIBRARIES}) target_link_libraries(openmesh_performance CGAL::OpenMesh_support)
# CGoGN # CGoGN
find_package(Qt REQUIRED) find_package(Qt REQUIRED)
@ -91,4 +89,4 @@ target_link_libraries(
Zinri Zinri
z z
${QT_LIBRARIES} ${QT_LIBRARIES}
${OPENMESH_LIBRARIES}) CGAL::OpenMesh_support)

View File

@ -1,40 +0,0 @@
# Find OpenMesh. If found, this will define
#
# OPENMESH_FOUND - Successfully found OpenMesh
# OPENMESH_INCLUDE_DIR - OpenMesh include directory
# OPENMESH_LIBRARIES - OpenMesh libraries
# OPENMESH_LIBRARY_DIR - OpenMesh library directory
#
if(DEFINED OPENMESH_INCLUDE_DIR)
set(OPENMESH_FIND_QUIETLY TRUE)
else()
find_path(OPENMESH_INCLUDE_DIR OpenMesh/Core/Mesh/PolyMeshT.hh
PATHS
/usr/local/include
/usr/include
$ENV{OPENMESH_DIR}/include
${OPENMESH_DIR}/include
)
if(DEFINED OPENMESH_INCLUDE_DIR)
message(STATUS "Found OpenMesh: " ${OPENMESH_INCLUDE_DIR})
set(OPENMESH_FOUND true)
if(WIN32)
set(OPENMESH_LIBRARY_DIR "${OPENMESH_INCLUDE_DIR}/../lib"
CACHE PATH "OpenMesh library directory")
else()
set(OPENMESH_LIBRARY_DIR "${OPENMESH_INCLUDE_DIR}/../lib/OpenMesh"
CACHE PATH "OpenMesh library directory")
endif()
set(OPENMESH_LIBRARIES "OpenMeshCore;OpenMeshTools"
CACHE STRING "OpenMesh libraries")
else()
set(OPENMESH_FOUND FALSE)
endif()
endif()

View File

@ -19,7 +19,7 @@ class Release:
"""return the command to create and publish the release""" """return the command to create and publish the release"""
return ( return (
f"PATH=/home/lrineau/bin-cmake3:/bin:/usr/bin:/home/lrineau/bin; cd {self.cwd} &&" f"PATH=/home/lrineau/bin-cmake3:/bin:/usr/bin:/home/lrineau/bin; cd {self.cwd} &&"
+ " /usr/bin/time scl enable rh-git29 -- " + " /usr/bin/time -v bash -x "
+ f"$HOME/bin/create_release {self.repo}{self.extra_options} --do-it" + f"$HOME/bin/create_release {self.repo}{self.extra_options} --do-it"
) )

View File

@ -13,8 +13,8 @@ from cgal_release import release, integration, master, beta_release, master, bet
# Define a dictionary that maps day of the week to an action # Define a dictionary that maps day of the week to an action
actions = { actions = {
"Monday": integration, "Monday": integration,
"Tuesday": integration, "Tuesday": release("5.5"), #integration,
"Wednesday": integration, "Wednesday": release("5.6"), #integration,
"Thursday": integration, "Thursday": integration,
"Friday": release("5.5"), "Friday": release("5.5"),
"Saturday": release("5.6"), "Saturday": release("5.6"),

View File

@ -11,6 +11,8 @@
PATH=/home/lrineau/bin-cmake3:/bin:/usr/bin:/home/lrineau/bin PATH=/home/lrineau/bin-cmake3:/bin:/usr/bin:/home/lrineau/bin
LC_CTYPE=en_US.UTF-8 LC_CTYPE=en_US.UTF-8
DOCKER_HOST=unix:///run/podman/podman.sock
CONTAINER_HOST=unix:///run/podman/podman.sock
# Update testsuite result pages # Update testsuite result pages
5,15,25,35,45,55 * * * * cd $HOME/CGAL/collect_and_public_testresults; ./treat_result_collection || echo ERROR 5,15,25,35,45,55 * * * * cd $HOME/CGAL/collect_and_public_testresults; ./treat_result_collection || echo ERROR
@ -61,7 +63,7 @@ LC_CTYPE=en_US.UTF-8
# Launch our Docker testsuite , at 21:36, # Launch our Docker testsuite , at 21:36,
# after a pull of all new images at 20:23. # after a pull of all new images at 20:23.
06 20 * * * for i in $(cat /home/lrineau/.config/CGAL/test_cgal_docker_images); do docker pull $i; done; docker rmi $(docker images | awk '/<none>/ {print $3}') 06 20 * * * for i in $(cat /home/lrineau/.config/CGAL/test_cgal_docker_images); do docker pull $i; done; docker rmi $(docker images | awk '/<none>/ {print $3}')
36 21 * * * cd /home/lrineau/Git/cgal-testsuite-dockerfiles && /usr/bin/time ./test_cgal.py --use-fedora-selinux-policy --force-rm --max-cpus 12 --container-cpus 4 --jobs 5 --upload-results --images $($HOME/bin/docker_images_to_test_today) 36 21 * * * cd /home/lrineau/Git/cgal-testsuite-dockerfiles && /usr/bin/time ./test_cgal.py --use-fedora-selinux-policy --force-rm --max-cpus 20 --container-cpus 8 --jobs 10 --upload-results --images $($HOME/bin/docker_images_to_test_today)
# Dump the crontab to SVN every hour at minute 18 # Dump the crontab to SVN every hour at minute 18
@ -71,10 +73,10 @@ LC_CTYPE=en_US.UTF-8
#0 * * * * docker inspect --format='{{json .State.Health.Status}}' cgal-mediawiki-docker_wiki_1 | grep -q '"healthy"' || docker logs cgal-mediawiki-docker_wiki_1 #0 * * * * docker inspect --format='{{json .State.Health.Status}}' cgal-mediawiki-docker_wiki_1 | grep -q '"healthy"' || docker logs cgal-mediawiki-docker_wiki_1
# cgal->cgal2 with git-multimail # cgal->cgal2 with git-multimail
*/5 * * * * cd $HOME/Git/cgal-dev-pusher.git && $HOME/bin/git-fetch-and-push-to-multimail cgal-dev cgal-dev-receiver #*/5 * * * * cd $HOME/Git/cgal-dev-pusher.git && $HOME/bin/git-fetch-and-push-to-multimail cgal-dev cgal-dev-receiver
*/5 * * * * cd $HOME/Git/cgal-pusher.git && $HOME/bin/git-fetch-and-push-to-multimail cgal cgal-receiver #*/5 * * * * cd $HOME/Git/cgal-pusher.git && $HOME/bin/git-fetch-and-push-to-multimail cgal cgal-receiver
*/5 * * * * cd $HOME/Git/cgal-students-pusher.git && $HOME/bin/git-fetch-and-push-to-multimail cgal-public-dev cgal-students-receiver #*/5 * * * * cd $HOME/Git/cgal-students-pusher.git && $HOME/bin/git-fetch-and-push-to-multimail cgal-public-dev cgal-students-receiver
*/5 * * * * cd $HOME/Git/cgal-web-pusher.git && $HOME/bin/git-fetch-and-push-to-multimail cgal-web cgal-web-receiver #*/5 * * * * cd $HOME/Git/cgal-web-pusher.git && $HOME/bin/git-fetch-and-push-to-multimail cgal-web cgal-web-receiver
#################################### ####################################
# Old stuff # Old stuff

View File

@ -103,13 +103,13 @@ sub write_select()
print OUTPUTV '<option disabled selected value="">(select a release)', "</option>\n"; print OUTPUTV '<option disabled selected value="">(select a release)', "</option>\n";
my %results; my %results;
foreach $_ (glob("results-*.shtml")) { foreach $_ (glob("results-*.shtml")) {
my $ctime = (stat($_))[10]; my $mtime = (stat($_))[9];
$results{$_} = $ctime; $results{$_} = $mtime;
} }
foreach $_ (sort { $results{$b} <=> $results{$a} } keys %results) { foreach $_ (sort { $results{$b} <=> $results{$a} } keys %results) {
$_ =~ /results-${pattern}(\.\d+)?(-.*|)\.shtml/ || next; $_ =~ /results-${pattern}(\.\d+)?(-.*|)\.shtml/ || next;
my $ctime = (stat($_))[10]; my $mtime = (stat($_))[9];
my $date = time2str('%a %Y/%m/%d', $ctime); my $date = time2str('%a %Y/%m/%d', $mtime);
print OUTPUTV '<option value="', $_, '">'; print OUTPUTV '<option value="', $_, '">';
($filename) = m/results-(.*?)\.shtml\s*/; ($filename) = m/results-(.*?)\.shtml\s*/;
# printf OUTPUTV "%-20s (last modified: %s)</option>\n", $filename, $date; # printf OUTPUTV "%-20s (last modified: %s)</option>\n", $filename, $date;

View File

@ -117,7 +117,7 @@ sub reformat_results($)
# if (/BOOST_BIMAP_VERSION = '([^']+)'/) { # if (/BOOST_BIMAP_VERSION = '([^']+)'/) {
# $BOOST="$BOOST+bimap"; # $BOOST="$BOOST+bimap";
# } # }
if (/USING +CXXFLAGS = '([^']*)'/) { if (/USING +CXXFLAGS = '([^']*)'/ && !$CXXFLAGS) {
$CXXFLAGS="$CXXFLAGS $1"; $CXXFLAGS="$CXXFLAGS $1";
} }
if (/USING +LDFLAGS = '([^']*)'/) { if (/USING +LDFLAGS = '([^']*)'/) {

View File

@ -10,7 +10,6 @@
#include <CGAL/Delaunay_mesher_2.h> #include <CGAL/Delaunay_mesher_2.h>
#include <CGAL/Delaunay_mesh_face_base_2.h> #include <CGAL/Delaunay_mesh_face_base_2.h>
#include <CGAL/Delaunay_mesh_size_criteria_2.h> #include <CGAL/Delaunay_mesh_size_criteria_2.h>
#include <CGAL/Delaunay_mesh_size_criteria_2.h>
#include <CGAL/Delaunay_mesher_no_edge_refinement_2.h> #include <CGAL/Delaunay_mesher_no_edge_refinement_2.h>
#include <CGAL/IO/File_poly.h> #include <CGAL/IO/File_poly.h>

View File

@ -26,19 +26,11 @@ if(NOT TARGET CGAL::Eigen3_support)
return() return()
endif() endif()
find_package(VTK QUIET COMPONENTS vtkImagingGeneral vtkIOImage NO_MODULE) find_package(VTK 9.0
COMPONENTS ImagingGeneral IOImage
QUIET)
if(VTK_FOUND) if(VTK_FOUND)
if(VTK_USE_FILE) message(STATUS "VTK ${VTK_VERSION} found ${VTK_LIBRARIES}")
include(${VTK_USE_FILE})
endif()
if("${VTK_VERSION_MAJOR}" GREATER "5" OR VTK_VERSION VERSION_GREATER 5)
message(STATUS "VTK found")
if(TARGET VTK::IOImage)
set(VTK_LIBRARIES VTK::ImagingGeneral VTK::IOImage)
endif()
else()
message(STATUS "VTK version 6.0 or greater is required")
endif()
else() else()
message(STATUS "VTK was not found") message(STATUS "VTK was not found")
endif() endif()
@ -123,13 +115,12 @@ create_single_source_cgal_program("mesh_polyhedral_complex_sm.cpp")
target_link_libraries(mesh_polyhedral_complex_sm PUBLIC CGAL::Eigen3_support) target_link_libraries(mesh_polyhedral_complex_sm PUBLIC CGAL::Eigen3_support)
if(TARGET CGAL::CGAL_ImageIO) if(TARGET CGAL::CGAL_ImageIO)
if(VTK_FOUND AND ("${VTK_VERSION_MAJOR}" GREATER "5" OR VTK_VERSION if(VTK_FOUND)
VERSION_GREATER 5))
create_single_source_cgal_program("mesh_3D_gray_vtk_image.cpp") create_single_source_cgal_program("mesh_3D_gray_vtk_image.cpp")
target_link_libraries( target_link_libraries(mesh_3D_gray_vtk_image
mesh_3D_gray_vtk_image PUBLIC CGAL::Eigen3_support
PUBLIC CGAL::Eigen3_support CGAL::CGAL CGAL::CGAL_ImageIO ${VTK_LIBRARIES}) CGAL::CGAL_ImageIO
cgal_add_test(mesh_3D_gray_vtk_image) PRIVATE ${VTK_LIBRARIES})
add_to_cached_list(CGAL_EXECUTABLE_TARGETS mesh_3D_gray_vtk_image) add_to_cached_list(CGAL_EXECUTABLE_TARGETS mesh_3D_gray_vtk_image)
endif() endif()

View File

@ -152,7 +152,7 @@ public:
Protect_edges_sizing_field(C3T3& c3t3, Protect_edges_sizing_field(C3T3& c3t3,
const MeshDomain& domain, const MeshDomain& domain,
SizingFunction size=SizingFunction(), SizingFunction size=SizingFunction(),
const FT minimal_size = FT(-1), const FT minimal_size = FT(0),
const Distance_Function edge_distance = Distance_Function(), const Distance_Function edge_distance = Distance_Function(),
const std::size_t maximal_number_of_vertices = 0, const std::size_t maximal_number_of_vertices = 0,
Mesh_error_code* error_code = 0 Mesh_error_code* error_code = 0
@ -273,8 +273,7 @@ private:
/// Returns `true` if the edge `(va,vb)` is a not good enough approximation /// Returns `true` if the edge `(va,vb)` is a not good enough approximation
/// of its feature. /// of its feature.
bool approx_is_too_large(const Vertex_handle& va, bool approx_is_too_large(const Edge& e,
const Vertex_handle& vb,
const bool is_edge_in_complex) const; const bool is_edge_in_complex) const;
/// Returns `true` if the balls of `va` and `vb` intersect. /// Returns `true` if the balls of `va` and `vb` intersect.
@ -458,10 +457,12 @@ private:
dim = -1 - dim; dim = -1 - dim;
const FT s = field(p, dim, index); const FT s = field(p, dim, index);
if(s <= FT(0)) { if(s < minimal_size_)
{
std::stringstream msg; std::stringstream msg;
msg.precision(17); msg.precision(17);
msg << "Error: the field is null at "; msg << "Error: the field is smaller than minimal size ("
<< minimal_size_ << ") at ";
if(dim == 0) msg << "corner ("; if(dim == 0) msg << "corner (";
else msg << "point ("; else msg << "point (";
msg << p << ")"; msg << p << ")";
@ -493,7 +494,7 @@ private:
bool use_minimal_size() const bool use_minimal_size() const
{ {
return minimal_size_ != FT(-1); return minimal_size_ != FT(0);
} }
Weight minimal_weight() const Weight minimal_weight() const
{ {
@ -645,7 +646,10 @@ insert_corners()
#endif #endif
// Get weight (the ball radius is given by the 'query_size' function) // Get weight (the ball radius is given by the 'query_size' function)
FT w = CGAL::square(query_size(p, 0, p_index)); const FT query_weight = CGAL::square(query_size(p, 0, p_index));
FT w = use_minimal_size()
? (std::min)(minimal_weight_, query_weight)
: query_weight;
#if CGAL_MESH_3_PROTECTION_DEBUG & 1 #if CGAL_MESH_3_PROTECTION_DEBUG & 1
std::cerr << "Weight from sizing field: " << w << std::endl; std::cerr << "Weight from sizing field: " << w << std::endl;
@ -716,7 +720,10 @@ insert_point(const Bare_point& p, const Weight& w, int dim, const Index& index,
typename GT::Construct_weighted_point_3 cwp = typename GT::Construct_weighted_point_3 cwp =
c3t3_.triangulation().geom_traits().construct_weighted_point_3_object(); c3t3_.triangulation().geom_traits().construct_weighted_point_3_object();
const Weighted_point wp = cwp(p,w*weight_modifier); const FT wwm = use_minimal_size()
? (std::max)(w * weight_modifier, minimal_weight())
: w * weight_modifier;
const Weighted_point wp = cwp(p, wwm);
typename Tr::Locate_type lt; typename Tr::Locate_type lt;
int li, lj; int li, lj;
@ -734,7 +741,7 @@ insert_point(const Bare_point& p, const Weight& w, int dim, const Index& index,
std::cerr << "SPECIAL "; std::cerr << "SPECIAL ";
std::cerr << "protecting ball "; std::cerr << "protecting ball ";
if(v == Vertex_handle()) if(v == Vertex_handle())
std::cerr << cwp(p,w*weight_modifier); std::cerr << cwp(p, wwm);
else else
std::cerr << disp_vert(v); std::cerr << disp_vert(v);
@ -860,13 +867,11 @@ smart_insert_point(const Bare_point& p, Weight w, int dim, const Index& index,
std::back_inserter(cells_in_conflicts), std::back_inserter(cells_in_conflicts),
CGAL::Emptyset_iterator()); CGAL::Emptyset_iterator());
for(typename std::vector<Cell_handle>::const_iterator for(Cell_handle cit : cells_in_conflicts)
it = cells_in_conflicts.begin(),
end = cells_in_conflicts.end(); it != end; ++it)
{ {
for(int i=0, d=tr.dimension(); i<=d; ++i) for(int i=0, d=tr.dimension(); i<=d; ++i)
{ {
const Vertex_handle v = (*it)->vertex(i); const Vertex_handle v = cit->vertex(i);
if(c3t3_.triangulation().is_infinite(v)) if(c3t3_.triangulation().is_infinite(v))
continue; continue;
if(!vertices_in_conflict_zone_set.insert(v).second) if(!vertices_in_conflict_zone_set.insert(v).second)
@ -1023,21 +1028,20 @@ insert_balls_on_edges()
domain_.get_curves(std::back_inserter(input_features)); domain_.get_curves(std::back_inserter(input_features));
// Iterate on edges // Iterate on edges
for ( typename Input_features::iterator fit = input_features.begin(), for (const Feature_tuple& ft : input_features)
end = input_features.end() ; fit != end ; ++fit )
{ {
if(forced_stop()) break; if(forced_stop()) break;
const Curve_index& curve_index = std::get<0>(*fit); const Curve_index& curve_index = std::get<0>(ft);
if ( ! is_treated(curve_index) ) if ( ! is_treated(curve_index) )
{ {
#if CGAL_MESH_3_PROTECTION_DEBUG & 1 #if CGAL_MESH_3_PROTECTION_DEBUG & 1
std::cerr << "\n** treat curve #" << curve_index << std::endl; std::cerr << "\n** treat curve #" << curve_index << std::endl;
#endif #endif
const Bare_point& p = std::get<1>(*fit).first; const Bare_point& p = std::get<1>(ft).first;
const Bare_point& q = std::get<2>(*fit).first; const Bare_point& q = std::get<2>(ft).first;
const Index& p_index = std::get<1>(*fit).second; const Index& p_index = std::get<1>(ft).second;
const Index& q_index = std::get<2>(*fit).second; const Index& q_index = std::get<2>(ft).second;
Vertex_handle vp,vq; Vertex_handle vp,vq;
if ( ! domain_.is_loop(curve_index) ) if ( ! domain_.is_loop(curve_index) )
@ -1178,12 +1182,12 @@ insert_balls(const Vertex_handle& vp,
const Weighted_point& vp_wp = c3t3_.triangulation().point(vp); const Weighted_point& vp_wp = c3t3_.triangulation().point(vp);
#if ! defined(CGAL_NO_PRECONDITIONS) #if ! defined(CGAL_NO_PRECONDITIONS)
if(sp <= 0) { if(sp < minimal_size_) {
std::stringstream msg;; std::stringstream msg;
msg.precision(17); msg.precision(17);
msg << "Error: the mesh sizing field is null at point ("; msg << "Error: the mesh sizing field is smaller than minimal size ";
msg << cp(vp_wp) << ")!"; msg << " at point (" << cp(vp_wp) << ")!";
CGAL_precondition_msg(sp > 0, msg.str().c_str()); CGAL_precondition_msg(sp > minimal_size_, msg.str().c_str());
} }
#endif // ! CGAL_NO_PRECONDITIONS #endif // ! CGAL_NO_PRECONDITIONS
@ -1428,7 +1432,7 @@ refine_balls()
if( // topology condition if( // topology condition
non_adjacent_but_intersect(va, vb, is_edge_in_complex) non_adjacent_but_intersect(va, vb, is_edge_in_complex)
// approximation condition // approximation condition
|| (use_distance_field() && approx_is_too_large(va, vb, is_edge_in_complex))) || (use_distance_field() && approx_is_too_large(*eit, is_edge_in_complex)))
{ {
using CGAL::Mesh_3::internal::distance_divisor; using CGAL::Mesh_3::internal::distance_divisor;
@ -1480,14 +1484,11 @@ refine_balls()
new_sizes.clear(); new_sizes.clear();
// Update size of balls // Update size of balls
for ( typename std::vector<std::pair<Vertex_handle,FT> >::iterator for (const std::pair<Vertex_handle,FT>& it : new_sizes_copy)
it = new_sizes_copy.begin(),
end = new_sizes_copy.end();
it != end ; ++it )
{ {
if(forced_stop()) break; if(forced_stop()) break;
const Vertex_handle v = it->first; const Vertex_handle v = it.first;
const FT new_size = it->second; const FT new_size = it.second;
// Set size of the ball to new value // Set size of the ball to new value
if(use_minimal_size() && new_size < minimal_size_) { if(use_minimal_size() && new_size < minimal_size_) {
if(!is_special(v)) { if(!is_special(v)) {
@ -1557,34 +1558,27 @@ do_balls_intersect(const Vertex_handle& va, const Vertex_handle& vb) const
template <typename C3T3, typename MD, typename Sf, typename Df> template <typename C3T3, typename MD, typename Sf, typename Df>
bool bool
Protect_edges_sizing_field<C3T3, MD, Sf, Df>:: Protect_edges_sizing_field<C3T3, MD, Sf, Df>::
approx_is_too_large(const Vertex_handle& va, const Vertex_handle& vb, const bool is_edge_in_complex) const approx_is_too_large(const Edge& e, const bool is_edge_in_complex) const
{ {
if ( ! is_edge_in_complex ) if ( ! is_edge_in_complex )
{
return false; return false;
}
typedef typename Kernel::Point_3 Point_3;
Curve_index curve_index = domain_.curve_index((va->in_dimension() < vb->in_dimension()) ? vb->index() : va->index()); const Bare_point& pa = e.first->vertex(e.second)->point().point();
const Bare_point& pb = e.first->vertex(e.third)->point().point();
const Point_3& pa = va->point().point(); // Construct the geodesic middle point
const Point_3& pb = vb->point().point(); const Curve_index curve_index = c3t3_.curve_index(e);
const Point_3& segment_middle = CGAL::midpoint(pa, pb); const FT signed_geodesic_distance = domain_.signed_geodesic_distance(pa, pb, curve_index);
// Obtain the geodesic middle point const Bare_point geodesic_middle = (signed_geodesic_distance >= FT(0))
FT signed_geodesic_distance = domain_.signed_geodesic_distance(pa, pb, curve_index); ? domain_.construct_point_on_curve(pa, curve_index, signed_geodesic_distance / 2)
Point_3 geodesic_middle; : domain_.construct_point_on_curve(pb, curve_index, -signed_geodesic_distance / 2);
if (signed_geodesic_distance >= FT(0))
{ const Bare_point edge_middle = CGAL::midpoint(pa, pb);
geodesic_middle = domain_.construct_point_on_curve(pa, curve_index, signed_geodesic_distance / 2); const FT squared_evaluated_distance = CGAL::squared_distance(edge_middle, geodesic_middle);
}
else // Compare distance to the distance field from criteria
{ const FT max_distance_to_curve = query_distance(edge_middle, 1, curve_index);
geodesic_middle = domain_.construct_point_on_curve(pb, curve_index, -signed_geodesic_distance / 2); return squared_evaluated_distance > CGAL::square(max_distance_to_curve);
}
// Compare distance to the parameter's distance
FT squared_evaluated_distance = CGAL::squared_distance(segment_middle, geodesic_middle);
FT segment_middle_edge_distance = query_distance(segment_middle, 1, curve_index);
return squared_evaluated_distance > CGAL::square(segment_middle_edge_distance);
} }
template <typename C3T3, typename MD, typename Sf, typename Df> template <typename C3T3, typename MD, typename Sf, typename Df>

View File

@ -252,8 +252,8 @@ public:
: (- negative_distance); : (- negative_distance);
} else { } else {
return (pit <= qit) return (pit <= qit)
? curve_segment_length(p, q, CGAL::POSITIVE) ? curve_segment_length(p, q, CGAL::POSITIVE, pit, qit)
: ( - curve_segment_length(p, q, CGAL::NEGATIVE) ); : ( - curve_segment_length(p, q, CGAL::NEGATIVE, pit, qit) );
} }
} }

View File

@ -177,7 +177,13 @@ public:
/// Returns size of tuple (p,dim,index) /// Returns size of tuple (p,dim,index)
FT sizing_field(const Point_3& p, const int dim, const Index& index) const FT sizing_field(const Point_3& p, const int dim, const Index& index) const
{ return (*p_size_)(p,dim,index); } {
const FT s = (*p_size_)(p, dim, index);
if (min_length_bound_ == FT(0))
return s;
else
return (std::max)(s, min_length_bound_);
}
FT distance_field(const Point_3& p, const int dim, const Index& index) const FT distance_field(const Point_3& p, const int dim, const Index& index) const
{ {

View File

@ -901,10 +901,11 @@ protected:
Unique_hash_map<Vertex_const_handle, bool>& omit_vertex; Unique_hash_map<Vertex_const_handle, bool>& omit_vertex;
int nov, nof; int nov, nof;
bool hh;
public: public:
Find_holes(Unique_hash_map<Vertex_const_handle, bool>& omit_vertex_) Find_holes(Unique_hash_map<Vertex_const_handle, bool>& omit_vertex_)
: omit_vertex(omit_vertex_), nov(0), nof(0) {} : omit_vertex(omit_vertex_), nov(0), nof(0), hh(false) {}
void visit(Halffacet_const_handle f) { void visit(Halffacet_const_handle f) {
++nof; ++nof;
@ -917,10 +918,11 @@ protected:
CGAL_For_all(sfc, send) { CGAL_For_all(sfc, send) {
omit_vertex[sfc->source()->source()] = true; omit_vertex[sfc->source()->source()] = true;
--nov; --nov;
hh=true;
} }
} else if(fc.is_shalfloop()) { } else if(fc.is_shalfloop()) {
SHalfloop_const_handle sl(fc); SHalfloop_const_handle sl(fc);
omit_vertex[sl->incident_sface()->center_vertex()]; omit_vertex[sl->incident_sface()->center_vertex()] = true;
--nov; --nov;
} else } else
CGAL_error_msg( "wrong handle type"); CGAL_error_msg( "wrong handle type");
@ -940,6 +942,63 @@ protected:
int number_of_facets() const { int number_of_facets() const {
return nof; return nof;
} }
bool holes_detected() const {
return hh;
}
};
class Nested_holes {
Unique_hash_map<Vertex_const_handle, bool>& omit_vertex;
int norv, nof;
public:
Nested_holes(Unique_hash_map<Vertex_const_handle, bool>& omit_vertex_)
: omit_vertex(omit_vertex_), norv(0), nof(0) {}
void visit(Halffacet_const_handle f) {
Halffacet_cycle_const_iterator fc = f->facet_cycles_begin();
CGAL_assertion(fc.is_shalfedge());
SHalfedge_around_facet_const_circulator sfc(fc), send(sfc);
bool all_in=true;
bool all_out=true;
CGAL_For_all(sfc, send) {
if (omit_vertex[sfc->source()->source()])
all_in=false;
else
all_out=false;
}
if (!all_in && !all_out)
{
SHalfedge_around_facet_const_circulator sfc(fc), send(sfc);
++nof;
CGAL_For_all(sfc, send) {
if (!omit_vertex[sfc->source()->source()])
{
omit_vertex[sfc->source()->source()]=true;
++norv;
}
}
}
if (all_in)
++nof;
}
void visit(Vertex_const_handle) {}
void visit(SFace_const_handle) {}
void visit(Halfedge_const_handle) {}
void visit(SHalfedge_const_handle) {}
void visit(SHalfloop_const_handle) {}
int number_of_removed_vertices() const {
return norv;
}
int number_of_facets() const {
return nof;
}
}; };
class Add_vertices { class Add_vertices {
@ -998,14 +1057,19 @@ protected:
se = SHalfedge_const_handle(fc); se = SHalfedge_const_handle(fc);
CGAL_assertion(se!=0); CGAL_assertion(se!=0);
if(omit_vertex[se->source()->source()]) return; if(omit_vertex[se->source()->source()]) return;
B.begin_facet();
SHalfedge_around_facet_const_circulator hc_start(se); SHalfedge_around_facet_const_circulator hc_start(se);
SHalfedge_around_facet_const_circulator hc_end(hc_start); SHalfedge_around_facet_const_circulator hc_end(hc_start);
std::vector<std::size_t> vids;
CGAL_For_all(hc_start,hc_end) { CGAL_For_all(hc_start,hc_end) {
CGAL_NEF_TRACEN(" add vertex " << hc_start->source()->center_vertex()->point()); if (omit_vertex[hc_start->source()->center_vertex()])
B.add_vertex_to_facet(VI[hc_start->source()->center_vertex()]); {
std::cout << "issue with " << se->source()->source()->point() << "\n";
return;
}
vids.push_back(VI[hc_start->source()->center_vertex()]);
} }
B.end_facet(); B.add_facet (vids.begin(), vids.end());
} }
void visit(SFace_const_handle) {} void visit(SFace_const_handle) {}
@ -1030,11 +1094,29 @@ protected:
Polyhedron_incremental_builder_3<HDS> B(hds, true); Polyhedron_incremental_builder_3<HDS> B(hds, true);
// first mark vertices of holes of each halffacet as omitted.
Find_holes F(omit_vertex); Find_holes F(omit_vertex);
scd.visit_shell_objects(sf, F); scd.visit_shell_objects(sf, F);
std::size_t nb_v = F.number_of_vertices();
std::size_t nb_f = F.number_of_facets();
B.begin_surface(F.number_of_vertices(), // then if a halffacet contains a vertex marked as omitted, all its vertices
F.number_of_facets(), // must be marked as such
if (F.holes_detected())
{
while(true)
{
Nested_holes F2(omit_vertex);
scd.visit_shell_objects(sf, F2);
if (F2.number_of_removed_vertices()==0) break;
nb_v-=F2.number_of_removed_vertices();
nb_f=F2.number_of_facets();
}
}
B.begin_surface(nb_v,
nb_f,
F.number_of_vertices()+F.number_of_facets()-2); F.number_of_vertices()+F.number_of_facets()-2);
Add_vertices A(B,omit_vertex, VI); Add_vertices A(B,omit_vertex, VI);

View File

@ -25,6 +25,7 @@
#include <CGAL/Triangulation_vertex_base_with_info_2.h> #include <CGAL/Triangulation_vertex_base_with_info_2.h>
#include <CGAL/Triangulation_face_base_with_info_2.h> #include <CGAL/Triangulation_face_base_with_info_2.h>
#include <CGAL/Kernel/global_functions_3.h> #include <CGAL/Kernel/global_functions_3.h>
#include <CGAL/Nef_S2/Generic_handle_map.h>
#include <unordered_map> #include <unordered_map>
@ -81,6 +82,7 @@ struct Shell_polygons_visitor
Vertex_index_map& vertex_indices; Vertex_index_map& vertex_indices;
PolygonRange& polygons; PolygonRange& polygons;
bool triangulate_all_faces; bool triangulate_all_faces;
CGAL::Generic_handle_map<bool> Done;
Shell_polygons_visitor(Vertex_index_map& vertex_indices, Shell_polygons_visitor(Vertex_index_map& vertex_indices,
PolygonRange& polygons, PolygonRange& polygons,
@ -88,6 +90,7 @@ struct Shell_polygons_visitor
: vertex_indices( vertex_indices ) : vertex_indices( vertex_indices )
, polygons(polygons) , polygons(polygons)
, triangulate_all_faces(triangulate_all_faces) , triangulate_all_faces(triangulate_all_faces)
, Done(false)
{} {}
std::size_t get_cycle_length( typename Nef_polyhedron::Halffacet_cycle_const_iterator hfc) const std::size_t get_cycle_length( typename Nef_polyhedron::Halffacet_cycle_const_iterator hfc) const
@ -103,6 +106,14 @@ struct Shell_polygons_visitor
void visit(typename Nef_polyhedron::Halffacet_const_handle opposite_facet) void visit(typename Nef_polyhedron::Halffacet_const_handle opposite_facet)
{ {
typename Nef_polyhedron::Halffacet_const_handle twin_facet = opposite_facet->twin();
// skip when we have to do with the unbounded volume and a surface with boundaries
if ((twin_facet->incident_volume() == opposite_facet->incident_volume()) && Done[twin_facet])
return;
Done[opposite_facet] = true;
bool is_marked=opposite_facet->incident_volume()->mark(); bool is_marked=opposite_facet->incident_volume()->mark();
CGAL_assertion(Nef_polyhedron::Infi_box::is_standard(opposite_facet->plane())); CGAL_assertion(Nef_polyhedron::Infi_box::is_standard(opposite_facet->plane()));
@ -351,18 +362,50 @@ void convert_nef_polyhedron_to_polygon_soup(const Nef_polyhedron& nef,
typedef Cartesian_converter<Nef_Kernel, Output_kernel> Converter; typedef Cartesian_converter<Nef_Kernel, Output_kernel> Converter;
typename Nef_polyhedron::Volume_const_iterator vol_it = nef.volumes_begin(), typename Nef_polyhedron::Volume_const_iterator vol_it = nef.volumes_begin(),
vol_end = nef.volumes_end(); vol_end = nef.volumes_end();
if ( Nef_polyhedron::Infi_box::extended_kernel() ) ++vol_it; // skip Infi_box
CGAL_assertion ( vol_it != vol_end ); if (Nef_polyhedron::Infi_box::extended_kernel()) ++vol_it; // skip Infi_box
++vol_it; // skip unbounded volume
if ( vol_it == vol_end ) return;
Converter to_output; Converter to_output;
bool handling_unbounded_volume = true;
auto shell_is_closed = [](typename Nef_polyhedron::Shell_entry_const_iterator sfh)
{
typename Nef_polyhedron::SFace_const_handle sf = sfh;
typename Nef_polyhedron::SFace_cycle_const_iterator fc;
for(fc = sf->sface_cycles_begin(); fc != sf->sface_cycles_end(); ++fc)
{
if (fc.is_shalfedge() ) {
typename Nef_polyhedron::SHalfedge_const_handle e(fc);
typename Nef_polyhedron::SHalfedge_around_sface_const_circulator ec(e),ee(e);
CGAL_For_all(ec,ee)
{
typename Nef_polyhedron::Halffacet_const_handle f = ec->twin()->facet();
if (f->incident_volume()==f->twin()->incident_volume())
return false;
}
}
}
return true;
};
for (;vol_it!=vol_end;++vol_it) for (;vol_it!=vol_end;++vol_it)
nef_to_pm::collect_polygon_mesh_info(points, {
polygons, for(auto sit = vol_it->shells_begin(); sit != vol_it->shells_end(); ++sit)
nef, {
vol_it->shells_begin(), if ( (handling_unbounded_volume || sit!=vol_it->shells_begin()) && shell_is_closed(sit)) continue;
to_output, nef_to_pm::collect_polygon_mesh_info(points,
triangulate_all_faces); polygons,
nef,
sit,
to_output,
triangulate_all_faces);
}
handling_unbounded_volume = false;
}
} }
template <class Nef_polyhedron, class Polygon_mesh> template <class Nef_polyhedron, class Polygon_mesh>

View File

@ -0,0 +1,45 @@
#include <CGAL/Exact_predicates_exact_constructions_kernel.h>
#include <CGAL/Nef_polyhedron_3.h>
#include <CGAL/IO/Nef_polyhedron_iostream_3.h>
#include <CGAL/boost/graph/convert_nef_polyhedron_to_polygon_mesh.h>
#include <CGAL/boost/graph/generators.h>
#include <CGAL/Surface_mesh.h>
typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel;
typedef Kernel::Point_3 Point_3;
typedef CGAL::Surface_mesh<Point_3> SurfaceMesh;
typedef CGAL::Nef_polyhedron_3<Kernel> NefPolyhedron;
int main()
{
SurfaceMesh surfaceMesh;
SurfaceMesh::Vertex_index v0 = surfaceMesh.add_vertex(Point_3(-1, 0, 0));
SurfaceMesh::Vertex_index v1 = surfaceMesh.add_vertex(Point_3(1, 0, 0));
SurfaceMesh::Vertex_index v2 = surfaceMesh.add_vertex(Point_3(0, 1, 0));
SurfaceMesh::Vertex_index v3 = surfaceMesh.add_vertex(Point_3(-1, 0, 1));
SurfaceMesh::Vertex_index v4 = surfaceMesh.add_vertex(Point_3(1, 0, 1));
SurfaceMesh::Vertex_index v5 = surfaceMesh.add_vertex(Point_3(0, 1, 1));
surfaceMesh.add_face(v0, v1, v2);
surfaceMesh.add_face(v3, v4, v5);
make_tetrahedron(Point_3(-1, 0, 10),
Point_3(1, 0, 10),
Point_3(0, 1, 10),
Point_3(-1, 0, 11),
surfaceMesh);
std::cout << "Before conversion, number_of_faces: " << surfaceMesh.number_of_faces() << std::endl;
NefPolyhedron nefPoly(surfaceMesh);
std::cout << "NefPolyhedron, number_of_faces: " << nefPoly.number_of_facets() << std::endl;
SurfaceMesh convertedSurfaceMesh;
CGAL::convert_nef_polyhedron_to_polygon_mesh(nefPoly, convertedSurfaceMesh, true);
std::cout << "After conversion, number_of_faces: " << convertedSurfaceMesh.number_of_faces() << std::endl;
std::ofstream("out.off") << convertedSurfaceMesh;
assert(vertices(convertedSurfaceMesh).size()==10);
assert(faces(convertedSurfaceMesh).size()==6);
return EXIT_SUCCESS;
}

View File

@ -122,7 +122,7 @@ int main() {
CGAL_catch_error((bool)(I<=J),CGAL::Uncertain_conversion_exception&); CGAL_catch_error((bool)(I<=J),CGAL::Uncertain_conversion_exception&);
CGAL_catch_error((bool)(I>=J),CGAL::Uncertain_conversion_exception&); CGAL_catch_error((bool)(I>=J),CGAL::Uncertain_conversion_exception&);
CGAL_catch_error((bool)(J> I),CGAL::Uncertain_conversion_exception&); CGAL_catch_error((bool)(J> I),CGAL::Uncertain_conversion_exception&);
CGAL_catch_error((bool)(J> I),CGAL::Uncertain_conversion_exception&); CGAL_catch_error((bool)(J< I),CGAL::Uncertain_conversion_exception&);
CGAL_catch_error((bool)(J>=I),CGAL::Uncertain_conversion_exception&); CGAL_catch_error((bool)(J>=I),CGAL::Uncertain_conversion_exception&);
CGAL_catch_error((bool)(J<=I),CGAL::Uncertain_conversion_exception&); CGAL_catch_error((bool)(J<=I),CGAL::Uncertain_conversion_exception&);

View File

@ -143,7 +143,6 @@ public:
\tparam Tree an instance of `Orthtree` \tparam Tree an instance of `Orthtree`
All tree nodes at another depth are ignored. If the selected depth is
All tree nodes at another depth are ignored. If the selected depth is All tree nodes at another depth are ignored. If the selected depth is
higher than the maximum depth of the orthtree, no node will be traversed. higher than the maximum depth of the orthtree, no node will be traversed.

View File

@ -119,7 +119,7 @@ MainWindow::loadPoints()
for (int i=0 ; i<8 ; i++) { for (int i=0 ; i<8 ; i++) {
cx += dom[i].x(); cx += dom[i].x();
cy += dom[i].y(); cy += dom[i].y();
cy += dom[i].y(); cz += dom[i].z();
} }
CGAL::qglviewer::Vec center(cx/8.,cy/8.,cz/8.); CGAL::qglviewer::Vec center(cx/8.,cy/8.,cz/8.);
viewer->setSceneCenter(center); viewer->setSceneCenter(center);
@ -188,7 +188,7 @@ MainWindow::newPoints(int n)
for (int i=0 ; i<8 ; i++) { for (int i=0 ; i<8 ; i++) {
cx += dom[i].x(); cx += dom[i].x();
cy += dom[i].y(); cy += dom[i].y();
cy += dom[i].y(); cz += dom[i].z();
} }
CGAL::qglviewer::Vec center(cx/8.,cy/8.,cz/8.); CGAL::qglviewer::Vec center(cx/8.,cy/8.,cz/8.);
viewer->setSceneCenter(center); viewer->setSceneCenter(center);
@ -223,5 +223,3 @@ void MainWindow::help() {
tr("Could not start Qt Assistant from %1.").arg(app)); tr("Could not start Qt Assistant from %1.").arg(app));
} }
} }

View File

@ -931,7 +931,7 @@ public:
CGAL_assertion(this->int_to_off(offsets[i])[0] == 0 || this->int_to_off(offsets[i])[0] == 1); CGAL_assertion(this->int_to_off(offsets[i])[0] == 0 || this->int_to_off(offsets[i])[0] == 1);
CGAL_assertion(this->int_to_off(offsets[i])[1] == 0 || this->int_to_off(offsets[i])[1] == 1); CGAL_assertion(this->int_to_off(offsets[i])[1] == 0 || this->int_to_off(offsets[i])[1] == 1);
CGAL_assertion(this->int_to_off(offsets[i])[1] == 0 || this->int_to_off(offsets[i])[1] == 1); CGAL_assertion(this->int_to_off(offsets[i])[2] == 0 || this->int_to_off(offsets[i])[2] == 1);
} }
c->set_offsets(offsets[0], offsets[1], offsets[2], offsets[3]); c->set_offsets(offsets[0], offsets[1], offsets[2], offsets[3]);

View File

@ -25,7 +25,6 @@
#include <iostream> #include <iostream>
#include <fstream> #include <fstream>
#include <fstream>
#include <iterator> #include <iterator>
#include <type_traits> #include <type_traits>

View File

@ -48,5 +48,5 @@
\example Polygon_mesh_processing/remesh_almost_planar_patches.cpp \example Polygon_mesh_processing/remesh_almost_planar_patches.cpp
\example Polygon_mesh_processing/sample_example.cpp \example Polygon_mesh_processing/sample_example.cpp
\example Polygon_mesh_processing/soup_autorefinement.cpp \example Polygon_mesh_processing/soup_autorefinement.cpp
*/
*/ */

View File

@ -95,30 +95,29 @@ endif()
find_package(OpenMesh QUIET) find_package(OpenMesh QUIET)
if(OpenMesh_FOUND) if(OpenMesh_FOUND)
include(UseOpenMesh) include(CGAL_OpenMesh_support)
create_single_source_cgal_program("compute_normals_example_OM.cpp") create_single_source_cgal_program("compute_normals_example_OM.cpp")
target_link_libraries(compute_normals_example_OM PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(compute_normals_example_OM PRIVATE CGAL::OpenMesh_support)
create_single_source_cgal_program("corefinement_OM_union.cpp") create_single_source_cgal_program("corefinement_OM_union.cpp")
target_link_libraries(corefinement_OM_union PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(corefinement_OM_union PRIVATE CGAL::OpenMesh_support)
if(TARGET CGAL::Eigen3_support) if(TARGET CGAL::Eigen3_support)
create_single_source_cgal_program("hole_filling_example_OM.cpp") create_single_source_cgal_program("hole_filling_example_OM.cpp")
target_link_libraries(hole_filling_example_OM PRIVATE CGAL::Eigen3_support ${OPENMESH_LIBRARIES}) target_link_libraries(hole_filling_example_OM PRIVATE CGAL::Eigen3_support CGAL::OpenMesh_support)
endif() endif()
create_single_source_cgal_program("point_inside_example_OM.cpp") create_single_source_cgal_program("point_inside_example_OM.cpp")
target_link_libraries(point_inside_example_OM PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(point_inside_example_OM PRIVATE CGAL::OpenMesh_support)
create_single_source_cgal_program("stitch_borders_example_OM.cpp") create_single_source_cgal_program("stitch_borders_example_OM.cpp")
target_link_libraries(stitch_borders_example_OM PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(stitch_borders_example_OM PRIVATE CGAL::OpenMesh_support)
#create_single_source_cgal_program("remove_degeneracies_example.cpp") #create_single_source_cgal_program("remove_degeneracies_example.cpp")
#target_link_libraries(remove_degeneracies_example PRIVATE ${OPENMESH_LIBRARIES}) #target_link_libraries(remove_degeneracies_example PRIVATE CGAL::OpenMesh_support)
#target_compile_definitions(remove_degeneracies_example PRIVATE -DCGAL_USE_OPENMESH)
create_single_source_cgal_program("triangulate_faces_example_OM.cpp") create_single_source_cgal_program("triangulate_faces_example_OM.cpp")
target_link_libraries(triangulate_faces_example_OM PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(triangulate_faces_example_OM PRIVATE CGAL::OpenMesh_support)
else() else()
message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.")
endif() endif()

View File

@ -114,9 +114,9 @@ endif()
find_package(OpenMesh QUIET) find_package(OpenMesh QUIET)
if(OpenMesh_FOUND) if(OpenMesh_FOUND)
include(UseOpenMesh) include(CGAL_OpenMesh_support)
create_single_source_cgal_program("remeshing_test_P_SM_OM.cpp") create_single_source_cgal_program("remeshing_test_P_SM_OM.cpp")
target_link_libraries(remeshing_test_P_SM_OM PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(remeshing_test_P_SM_OM PRIVATE CGAL::OpenMesh_support)
else() else()
message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.") message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.")
endif() endif()

View File

@ -385,20 +385,20 @@ polyhedral surface gives alias names renaming face to facet.
class Polyhedron_items_3 { class Polyhedron_items_3 {
public: public:
template < class Refs, class Traits> template < class Refs, class Traits>
struct Vertex_wrapper { struct Vertex_wrapper {
typedef typename Traits::Point_3 Point; typedef typename Traits::Point_3 Point;
typedef CGAL::HalfedgeDS_vertex_base<Refs, CGAL::Tag_true, Point> Vertex; typedef CGAL::HalfedgeDS_vertex_base<Refs, CGAL::Tag_true, Point> Vertex;
}; };
template < class Refs, class Traits> template < class Refs, class Traits>
struct Halfedge_wrapper { struct Halfedge_wrapper {
typedef CGAL::HalfedgeDS_halfedge_base<Refs> Halfedge; typedef CGAL::HalfedgeDS_halfedge_base<Refs> Halfedge;
}; };
template < class Refs, class Traits> template < class Refs, class Traits>
struct Face_wrapper { struct Face_wrapper {
typedef typename Traits::Plane_3 Plane; typedef typename Traits::Plane_3 Plane;
typedef CGAL::HalfedgeDS_face_base<Refs, CGAL::Tag_true, Plane> Face; typedef CGAL::HalfedgeDS_face_base<Refs, CGAL::Tag_true, Plane> Face;
}; };
}; };
\endcode \endcode
@ -426,7 +426,7 @@ faces but would be for vertices - and add the color attribute.
template <class Refs> template <class Refs>
struct My_face : public CGAL::HalfedgeDS_face_base<Refs> { struct My_face : public CGAL::HalfedgeDS_face_base<Refs> {
CGAL::IO::Color color; CGAL::IO::Color color;
}; };
\endcode \endcode
@ -440,10 +440,10 @@ used.
\code{.cpp} \code{.cpp}
struct My_items : public CGAL::Polyhedron_items_3 { struct My_items : public CGAL::Polyhedron_items_3 {
template <class Refs, class Traits> template <class Refs, class Traits>
struct Face_wrapper { struct Face_wrapper {
typedef My_face<Refs> Face; typedef My_face<Refs> Face;
}; };
}; };
\endcode \endcode
@ -479,8 +479,8 @@ works as illustrated above.
template <class Refs> template <class Refs>
struct My_face : public CGAL::HalfedgeDS_face_base<Refs> { struct My_face : public CGAL::HalfedgeDS_face_base<Refs> {
typedef typename Refs::Vertex_handle Vertex_handle; typedef typename Refs::Vertex_handle Vertex_handle;
Vertex_handle vertex_ref; Vertex_handle vertex_ref;
}; };
\endcode \endcode

View File

@ -13,10 +13,8 @@ create_single_source_cgal_program("test_Property_container.cpp")
find_package(OpenMesh QUIET) find_package(OpenMesh QUIET)
if(OpenMesh_FOUND) if(OpenMesh_FOUND)
message(STATUS "Found OpenMesh") message(STATUS "Found OpenMesh")
include(UseOpenMesh) include(CGAL_OpenMesh_support)
target_link_libraries(dynamic_properties_test PRIVATE CGAL::OpenMesh_support)
target_link_libraries(dynamic_properties_test PRIVATE ${OPENMESH_LIBRARIES})
target_compile_definitions(dynamic_properties_test PRIVATE -DCGAL_USE_OPENMESH)
else() else()
message(STATUS "NOTICE: Tests will not use OpenMesh.") message(STATUS "NOTICE: Tests will not use OpenMesh.")
endif() endif()

53
REUSE.toml Normal file
View File

@ -0,0 +1,53 @@
version = 1
SPDX-PackageName = "CGAL"
SPDX-PackageSupplier = "CGAL Editorial Board <info@cgal.org>"
SPDX-PackageDownloadLocation = "https://github.com/CGAL/cgal"
[[annotations]]
path = [
".**",
"**.cmake",
"**.md",
".github/**",
"Maintenance/**",
"**/TODO",
"**/doc/**",
"**/deb/**",
"**/applications/**",
"**/doc_html/**",
"**/scripts/**",
"**/developer_scripts/**",
"**/demo/**",
"**/examples/**",
"**/src/**",
"**/test/**",
"**/benchmarks/**",
"**/benchmark/**",
"**/package_info/**",
"**/data/**",
"**/cmake/**",
"**/*.natvis",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "1995-2024 The CGAL Project"
SPDX-License-Identifier = "CC0-1.0"
[[annotations]]
path = [
"REUSE.toml",
"CMakeLists.txt",
"cmake_uninstall.cmake.in",
"GraphicsView/include/CGAL/Qt/ImageInterface.ui",
"GraphicsView/include/CGAL/Qt/resources/qglviewer-icon.xpm",
"Installation/AUTHORS",
"Installation/CMakeLists.txt",
"Installation/README",
"Installation/auxiliary/cgal_create_cmake_script.1",
"Installation/auxiliary/gmp/README",
"Installation/include/CGAL/license/gpl_package_list.txt",
"MacOSX/auxiliary/cgal_app.icns",
"copyright",
]
precedence = "aggregate"
SPDX-FileCopyrightText = "1995-2024 The CGAL Project"
SPDX-License-Identifier = "CC0-1.0"

View File

@ -45,7 +45,7 @@ functions of the package are provided in Section \ref Ridges_3Examples.
For a detailed introduction to ridges and related topics, the reader For a detailed introduction to ridges and related topics, the reader
may consult may consult
\cgalCite{cgal:hgygm-ttdpf-99},\cgalCite{cgal:p-gd-01}, as well as \cgalCite{cgal:hgygm-ttdpf-99},\cgalCite{cgal:p-gd-01}, as well as
the following survey article \cgalCite{cgal:cp-ssulc-05}. the survey article \cgalCite{cgal:cp-ssulc-05}.
In the sequel, we just introduce the basic notions so as to explain In the sequel, we just introduce the basic notions so as to explain
our algorithms. Consider a smooth embedded surface, and denote \f$ k_1\f$ our algorithms. Consider a smooth embedded surface, and denote \f$ k_1\f$
and \f$ k_2\f$ the principal curvatures, with \f$ k_1\geq k_2\f$. Umbilics are and \f$ k_2\f$ the principal curvatures, with \f$ k_1\geq k_2\f$. Umbilics are
@ -399,7 +399,7 @@ neighborhood.
\subsection Ridges_3Exampleprogram Example Program \subsection Ridges_3Exampleprogram Example Program
The following program computes ridges and umbilics from an off The following program computes ridges and umbilics from an off
file.\cgalFootnote{Model data may be downloaded via ftp://ftp.mpi-sb.mpg.de/pub/outgoing/CGAL/Ridges_3_datafiles.tgz . The mechanical part model has been provided courtesy of Dassault System to produce \cgalFigureRef{figmechanical_crest_filteredintro}, due to copyright issues the available model is not the same, it is provided by the AIM\@SHAPE Shape Repository.} It uses the package \ref PkgJetFitting3 to estimate the differential file. It uses the package \ref PkgJetFitting3 to estimate the differential
quantities. quantities.
The default output file gives rough data for visualization purpose, a The default output file gives rough data for visualization purpose, a
verbose output file may also be asked for. Parameters are verbose output file may also be asked for. Parameters are
@ -533,11 +533,7 @@ Ridges on the ellipsoid, normals pointing outward. Color coding :
\subsection Ridges_3ExampleFilteringofCrestRidgesona Example: Filtering of Crest Ridges on a Mechanical Part \subsection Ridges_3ExampleFilteringofCrestRidgesona Example: Filtering of Crest Ridges on a Mechanical Part
\cgalFigureRef{figmechanical_crest_filteredintro} illustrates the filtering \cgalFigureRef{figmechanical_crest_filteredintro} illustrates the filtering
of crest ridges on a mechanical model, and has been computed as follows: of crest ridges on a mechanical model.
\code{.cpp}
./Compute_Ridges_Umbilics -f data/mecanic.off -d 4 -m 4 -a 4 -t 4
\endcode
\cgalFigureBegin{figmechanical_crest_filteredintro,mecanic-sub1_crest-jpg.png} \cgalFigureBegin{figmechanical_crest_filteredintro,mecanic-sub1_crest-jpg.png}
Mechanical part (37k pts). Left: All crest lines. Middle: crests filtered Mechanical part (37k pts). Left: All crest lines. Middle: crests filtered

View File

@ -64,10 +64,10 @@ endif()
find_package(OpenMesh QUIET) find_package(OpenMesh QUIET)
if(OpenMesh_FOUND) if(OpenMesh_FOUND)
message(STATUS "Found OpenMesh") message(STATUS "Found OpenMesh")
include(UseOpenMesh) include(CGAL_OpenMesh_support)
create_single_source_cgal_program("test_hash_OpenMesh.cpp") create_single_source_cgal_program("test_hash_OpenMesh.cpp")
target_link_libraries(test_hash_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) target_link_libraries(test_hash_OpenMesh PRIVATE CGAL::OpenMesh_support)
else() else()
message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.") message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.")
endif() endif()

View File

@ -26,6 +26,7 @@ creationpath = args.creationpath
doxystring = \ doxystring = \
r"""@INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS} r"""@INCLUDE = ${CGAL_DOC_PACKAGE_DEFAULTS}
PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - Put title of project here" PROJECT_NAME = "CGAL ${CGAL_DOC_VERSION} - Put title of project here"
""" """

View File

@ -323,6 +323,9 @@ if [ -n "$DO_PUBLIC" ]; then
zip -q -r ${public_release_name}-library.zip ${public_release_name} zip -q -r ${public_release_name}-library.zip ${public_release_name}
mv ${public_release_name}*.tar.xz "${HTML_DIR}/${release_name}-public/" mv ${public_release_name}*.tar.xz "${HTML_DIR}/${release_name}-public/"
mv ${public_release_name}*.zip "${HTML_DIR}/${release_name}-public/" mv ${public_release_name}*.zip "${HTML_DIR}/${release_name}-public/"
if command -v sestatus >/dev/null 2>&1; then
sestatus && restorecon -R "${HTML_DIR}/${release_name}-public"
fi
rm -f "$HTML_DIR/CGAL-last-public" rm -f "$HTML_DIR/CGAL-last-public"
ln -s "${release_name}-public" "$HTML_DIR/CGAL-last-public" ln -s "${release_name}-public" "$HTML_DIR/CGAL-last-public"
fi fi

View File

@ -6,7 +6,7 @@ cd /home/cgal-testsuite
# Rotate log files on one month: the logfile name contains the number of # Rotate log files on one month: the logfile name contains the number of
# the day # the day
LOGFILE=$PWD/doxygen_testsuite-`date '+%d'`.log LOGFILE=$PWD/doxygen_testsuite-$(date '+%d').log
exec > "$LOGFILE" exec > "$LOGFILE"
@ -39,8 +39,8 @@ if [ -r "${CGAL_DOC_BUILD}" ]; then
rm -rf "${CGAL_DOC_BUILD}" rm -rf "${CGAL_DOC_BUILD}"
fi fi
mkdir ${CGAL_DOC_BUILD} mkdir "${CGAL_DOC_BUILD}"
cd ${CGAL_DOC_BUILD} cd "${CGAL_DOC_BUILD}"
if [ -r "LATEST" ]; then if [ -r "LATEST" ]; then
rm -rf LATEST rm -rf LATEST
@ -52,12 +52,12 @@ if [ ! -f "LATEST" ]; then
error "COULD NOT DOWNLOAD LATEST!" error "COULD NOT DOWNLOAD LATEST!"
fi fi
for i in `cat LATEST` for i in $(cat LATEST)
do do
CGAL_LOCATION="${CGAL_URL}/${i}"; CGAL_LOCATION="${CGAL_URL}/${i}";
CGAL_ZIPFILE="${i}"; CGAL_ZIPFILE="${i}";
done done
CGAL_RELEASE_ID=`echo $CGAL_ZIPFILE | sed "s/.tar.gz//"` CGAL_RELEASE_ID=$(echo "$CGAL_ZIPFILE" | sed "s/.tar.gz//")
curl ${CURL_OPTS} "${CGAL_LOCATION}" curl ${CURL_OPTS} "${CGAL_LOCATION}"
tar xvzf "${CGAL_ZIPFILE}" && rm "${CGAL_ZIPFILE}" tar xvzf "${CGAL_ZIPFILE}" && rm "${CGAL_ZIPFILE}"
@ -68,11 +68,16 @@ cd "${CGAL_RELEASE_ID}"
PATH=/home/cgal-testsuite/local/bin:$PATH PATH=/home/cgal-testsuite/local/bin:$PATH
export PATH export PATH
cd "$PWD/doc/scripts" cd "${PWD}/doc/scripts"
bash -$- ./process_doc.sh /home/cgal-testsuite/bin/doxygen_1_8_13 /home/cgal-testsuite/bin/doxygen_1_9_6 /srv/CGAL/www/Members/Manual_doxygen_test bash -$- ./process_doc.sh /home/cgal-testsuite/bin/doxygen_1_8_13 /home/cgal-testsuite/bin/doxygen_1_9_6 /srv/CGAL/www/Members/Manual_doxygen_test
if head -2 ../../.scm-branch | grep -q cgal/master; then if head -2 ../../.scm-branch | grep -q cgal/master; then
rsync -a --delete "/srv/CGAL/www/Members/Manual_doxygen_test/${CGAL_RELEASE_ID}/output2/" /srv/CGAL/www/doc/master/ rsync -a --delete "/srv/CGAL/www/Members/Manual_doxygen_test/${CGAL_RELEASE_ID}/output2/" /srv/CGAL/www/doc/master/
fi fi
if sestatus &>/dev/null && [ -d "/srv/CGAL/www/doc/master/" ] && [ -d "/srv/CGAL/www/Members/Manual_doxygen_test/${CGAL_RELEASE_ID}" ]; then
restorecon -R /srv/CGAL/www/doc/master/ /srv/CGAL/www/Members/Manual_doxygen_test/${CGAL_RELEASE_ID} || error "restorecon command failed"
else
error "SELinux is not enabled or the paths do not exist"
fi
rm -rf "${CGAL_DOC_BUILD}" rm -rf "${CGAL_DOC_BUILD}"
# Then gzip the log file, to save space # Then gzip the log file, to save space
exec exec

View File

@ -19,6 +19,9 @@
// Internal includes. // Internal includes.
#include <CGAL/Shape_detection/Region_growing/internal/property_map.h> #include <CGAL/Shape_detection/Region_growing/internal/property_map.h>
#include <CGAL/Shape_detection/Region_growing/internal/utils.h> #include <CGAL/Shape_detection/Region_growing/internal/utils.h>
#ifdef CGAL_SD_RG_USE_PMP
#include <CGAL/Polygon_mesh_processing/compute_normal.h>
#endif
namespace CGAL { namespace CGAL {
namespace Shape_detection { namespace Shape_detection {
@ -83,6 +86,7 @@ namespace Polygon_mesh {
using Point_3 = typename GeomTraits::Point_3; using Point_3 = typename GeomTraits::Point_3;
using Vector_3 = typename GeomTraits::Vector_3; using Vector_3 = typename GeomTraits::Vector_3;
using Plane_3 = typename GeomTraits::Plane_3; using Plane_3 = typename GeomTraits::Plane_3;
using Triangle_3 = typename GeomTraits::Triangle_3;
using Squared_length_3 = typename GeomTraits::Compute_squared_length_3; using Squared_length_3 = typename GeomTraits::Compute_squared_length_3;
using Squared_distance_3 = typename GeomTraits::Compute_squared_distance_3; using Squared_distance_3 = typename GeomTraits::Compute_squared_distance_3;
@ -156,7 +160,54 @@ namespace Polygon_mesh {
m_squared_length_3(m_traits.compute_squared_length_3_object()), m_squared_length_3(m_traits.compute_squared_length_3_object()),
m_squared_distance_3(m_traits.compute_squared_distance_3_object()), m_squared_distance_3(m_traits.compute_squared_distance_3_object()),
m_scalar_product_3(m_traits.compute_scalar_product_3_object()), m_scalar_product_3(m_traits.compute_scalar_product_3_object()),
m_cross_product_3(m_traits.construct_cross_product_vector_3_object()) { m_cross_product_3(m_traits.construct_cross_product_vector_3_object()),
m_face_normals( get(CGAL::dynamic_face_property_t<Vector_3>(), pmesh) ),
m_face_triangulations( get(CGAL::dynamic_face_property_t<std::vector<Triangle_3>>(), pmesh) )
{
#ifdef CGAL_SD_RG_USE_PMP
auto get_face_normal = [this](Item face, const PolygonMesh& pmesh)
{
return Polygon_mesh_processing::compute_face_normal(face, pmesh, parameters::vertex_point_map(m_vertex_to_point_map));
};
#else
auto get_face_normal = [this](Item face, const PolygonMesh& pmesh) -> Vector_3
{
const auto hedge = halfedge(face, pmesh);
const auto vertices = vertices_around_face(hedge, pmesh);
CGAL_precondition(vertices.size() >= 3);
auto vertex = vertices.begin();
const Point_3& p1 = get(m_vertex_to_point_map, *vertex); ++vertex;
const Point_3& p2 = get(m_vertex_to_point_map, *vertex); ++vertex;
Point_3 p3 = get(m_vertex_to_point_map, *vertex);
while(collinear(p1, p2, p3))
{
if (++vertex == vertices.end()) return NULL_VECTOR;
p3 = get(m_vertex_to_point_map, *vertex);
}
const Vector_3 u = p2 - p1;
const Vector_3 v = p3 - p1;
return m_cross_product_3(u, v);
};
#endif
for (const Item &i : faces(pmesh)) {
put(m_face_normals, i, get_face_normal(i, pmesh));
std::vector<Point_3> pts;
auto h = halfedge(i, pmesh);
auto s = h;
do {
pts.push_back(get(m_vertex_to_point_map, target(h, pmesh)));
h = next(h, pmesh);
} while (h != s);
std::vector<Triangle_3> face_triangulation;
internal::triangulate_face<GeomTraits>(pts, face_triangulation);
put(m_face_triangulations, i, face_triangulation);
}
CGAL_precondition(faces(m_face_graph).size() > 0); CGAL_precondition(faces(m_face_graph).size() > 0);
const FT max_distance = parameters::choose_parameter( const FT max_distance = parameters::choose_parameter(
@ -234,7 +285,7 @@ namespace Polygon_mesh {
const FT squared_distance_threshold = const FT squared_distance_threshold =
m_distance_threshold * m_distance_threshold; m_distance_threshold * m_distance_threshold;
const Vector_3 face_normal = get_face_normal(query); const Vector_3 face_normal = get(m_face_normals, query);
const FT cos_value = m_scalar_product_3(face_normal, m_normal_of_best_fit); const FT cos_value = m_scalar_product_3(face_normal, m_normal_of_best_fit);
const FT squared_cos_value = cos_value * cos_value; const FT squared_cos_value = cos_value * cos_value;
@ -284,7 +335,7 @@ namespace Polygon_mesh {
// The best fit plane will be a plane through this face centroid with // The best fit plane will be a plane through this face centroid with
// its normal being the face's normal. // its normal being the face's normal.
const Point_3 face_centroid = get_face_centroid(face); const Point_3 face_centroid = get_face_centroid(face);
const Vector_3 face_normal = get_face_normal(face); const Vector_3 face_normal = get(m_face_normals, face);
if (face_normal == CGAL::NULL_VECTOR) return false; if (face_normal == CGAL::NULL_VECTOR) return false;
CGAL_precondition(face_normal != CGAL::NULL_VECTOR); CGAL_precondition(face_normal != CGAL::NULL_VECTOR);
@ -315,8 +366,8 @@ namespace Polygon_mesh {
// This fix is proposed by nh2: // This fix is proposed by nh2:
// https://github.com/CGAL/cgal/pull/4563 // https://github.com/CGAL/cgal/pull/4563
const Plane_3 unoriented_plane_of_best_fit = const Plane_3 unoriented_plane_of_best_fit =
internal::create_plane_from_faces( internal::create_plane_from_triangulated_faces(
m_face_graph, region, m_vertex_to_point_map, m_traits).first; region, m_face_triangulations, m_traits).first;
const Vector_3 unoriented_normal_of_best_fit = const Vector_3 unoriented_normal_of_best_fit =
unoriented_plane_of_best_fit.orthogonal_vector(); unoriented_plane_of_best_fit.orthogonal_vector();
@ -325,7 +376,7 @@ namespace Polygon_mesh {
// Approach: each face gets one vote to keep or flip the current plane normal. // Approach: each face gets one vote to keep or flip the current plane normal.
long votes_to_keep_normal = 0; long votes_to_keep_normal = 0;
for (const auto &face : region) { for (const auto &face : region) {
const Vector_3 face_normal = get_face_normal(face); const Vector_3 face_normal = get(m_face_normals, face);
const bool agrees = const bool agrees =
m_scalar_product_3(face_normal, unoriented_normal_of_best_fit) > FT(0); m_scalar_product_3(face_normal, unoriented_normal_of_best_fit) > FT(0);
votes_to_keep_normal += (agrees ? 1 : -1); votes_to_keep_normal += (agrees ? 1 : -1);
@ -357,6 +408,9 @@ namespace Polygon_mesh {
const Scalar_product_3 m_scalar_product_3; const Scalar_product_3 m_scalar_product_3;
const Cross_product_3 m_cross_product_3; const Cross_product_3 m_cross_product_3;
typename boost::property_map<Face_graph, CGAL::dynamic_face_property_t<Vector_3> >::const_type m_face_normals;
typename boost::property_map<Face_graph, CGAL::dynamic_face_property_t<std::vector<Triangle_3>> >::const_type m_face_triangulations;
Plane_3 m_plane_of_best_fit; Plane_3 m_plane_of_best_fit;
Vector_3 m_normal_of_best_fit; Vector_3 m_normal_of_best_fit;
@ -383,25 +437,6 @@ namespace Polygon_mesh {
return Point_3(x, y, z); return Point_3(x, y, z);
} }
// Compute normal of the face.
template<typename Face>
Vector_3 get_face_normal(const Face& face) const {
const auto hedge = halfedge(face, m_face_graph);
const auto vertices = vertices_around_face(hedge, m_face_graph);
CGAL_precondition(vertices.size() >= 3);
auto vertex = vertices.begin();
const Point_3& point1 = get(m_vertex_to_point_map, *vertex); ++vertex;
const Point_3& point2 = get(m_vertex_to_point_map, *vertex); ++vertex;
const Point_3& point3 = get(m_vertex_to_point_map, *vertex);
const Vector_3 u = point2 - point1;
const Vector_3 v = point3 - point1;
const Vector_3 face_normal = m_cross_product_3(u, v);
return face_normal;
}
// The maximum squared distance from the vertices of the face // The maximum squared distance from the vertices of the face
// to the best fit plane. // to the best fit plane.
template<typename Face> template<typename Face>

View File

@ -46,6 +46,11 @@
#include <CGAL/boost/iterator/counting_iterator.hpp> #include <CGAL/boost/iterator/counting_iterator.hpp>
#include <CGAL/Exact_predicates_inexact_constructions_kernel.h> #include <CGAL/Exact_predicates_inexact_constructions_kernel.h>
#include <CGAL/Iterator_range.h> #include <CGAL/Iterator_range.h>
#ifdef CGAL_SD_RG_USE_PMP
#include <CGAL/Polygon_mesh_processing/triangulate_hole.h>
#else
#include <CGAL/centroid.h>
#endif
namespace CGAL { namespace CGAL {
namespace Shape_detection { namespace Shape_detection {
@ -61,7 +66,7 @@ namespace internal {
mutable T it; mutable T it;
}; };
// TODO: this should be customisable in named function parameters // TODO: this should be customizable in named function parameters
template<class T, bool = CGAL::is_iterator<T>::value> template<class T, bool = CGAL::is_iterator<T>::value>
struct hash_item {}; struct hash_item {};
@ -329,6 +334,30 @@ namespace internal {
return create_plane(tmp, item_map, traits); return create_plane(tmp, item_map, traits);
} }
template <class Traits>
void
triangulate_face(const std::vector<typename Traits::Point_3>& points,
std::vector<typename Traits::Triangle_3>& triangles)
{
#ifdef CGAL_SD_RG_USE_PMP
std::vector<CGAL::Triple<int, int, int>> output;
Polygon_mesh_processing::triangulate_hole_polyline(points, std::back_inserter(output), parameters::use_2d_constrained_delaunay_triangulation(true));
triangles.reserve(output.size());
for (const auto& t : output)
triangles.emplace_back(points[t.first], points[t.second], points[t.third]);
#else
//use a triangulation using the centroid
std::size_t nb_edges = points.size();
typename Traits::Point_3 c = CGAL::centroid(points.begin(), points.end());
triangles.reserve(nb_edges);
for (std::size_t i=0; i<nb_edges-1; ++i)
triangles.emplace_back(points[i], points[i+1], c);
triangles.emplace_back(points.back(), points.front(), c);
#endif
}
template< template<
typename Traits, typename Traits,
typename FaceGraph, typename FaceGraph,
@ -369,14 +398,7 @@ namespace internal {
if (points.size()==3) if (points.size()==3)
triangles.push_back(ITriangle_3(points[0], points[1], points[2])); triangles.push_back(ITriangle_3(points[0], points[1], points[2]));
else else
{ triangulate_face<ITraits>(points, triangles);
//use a triangulation using the centroid
std::size_t nb_edges = points.size();
IPoint_3 c = CGAL::centroid(points.begin(), points.end());
points.push_back(points.front());
for (std::size_t i=0; i<nb_edges; ++i)
triangles.push_back(ITriangle_3(points[i], points[i+1], c));
}
} }
CGAL_precondition(triangles.size() >= region.size()); CGAL_precondition(triangles.size() >= region.size());
IPlane_3 fitted_plane; IPlane_3 fitted_plane;
@ -395,6 +417,59 @@ namespace internal {
return std::make_pair(plane, static_cast<FT>(score)); return std::make_pair(plane, static_cast<FT>(score));
} }
template<
typename Traits,
typename Region,
typename FaceToTrianglesMap>
std::pair<typename Traits::Plane_3, typename Traits::FT>
create_plane_from_triangulated_faces(
const Region& region,
const FaceToTrianglesMap &face_to_triangles_map, const Traits&) {
using FT = typename Traits::FT;
using Plane_3 = typename Traits::Plane_3;
using Triangle_3 = typename Traits::Triangle_3;
using ITraits = CGAL::Exact_predicates_inexact_constructions_kernel;
using IConverter = CGAL::Cartesian_converter<Traits, ITraits>;
using IFT = typename ITraits::FT;
using IPoint_3 = typename ITraits::Point_3;
using ITriangle_3 = typename ITraits::Triangle_3;
using IPlane_3 = typename ITraits::Plane_3;
std::vector<ITriangle_3> triangles;
CGAL_precondition(region.size() > 0);
triangles.reserve(region.size());
const IConverter iconverter = IConverter();
for (const typename Region::value_type face : region) {
const std::vector<Triangle_3>& tris = get(face_to_triangles_map, face);
// Degenerate polygons are omitted.
if (tris.empty())
continue;
for (const auto &tri : tris)
triangles.push_back(iconverter(tri));
}
CGAL_precondition(!triangles.empty());
IPlane_3 fitted_plane;
IPoint_3 fitted_centroid;
const IFT score = CGAL::linear_least_squares_fitting_3(
triangles.begin(), triangles.end(),
fitted_plane, fitted_centroid,
CGAL::Dimension_tag<2>(), ITraits(),
CGAL::Eigen_diagonalize_traits<IFT, 3>());
const Plane_3 plane(
static_cast<FT>(fitted_plane.a()),
static_cast<FT>(fitted_plane.b()),
static_cast<FT>(fitted_plane.c()),
static_cast<FT>(fitted_plane.d()));
return std::make_pair(plane, static_cast<FT>(score));
}
template< template<
typename Traits, typename Traits,
typename Region, typename Region,

View File

@ -0,0 +1,16 @@
ply
format ascii 1.0
comment VCGLIB generated
element vertex 3
property float x
property float y
property float z
property float nx
property float ny
property float nz
element face 0
property list uchar int vertex_indices
end_header
1 1 1 2 2 2
3 3 3 4 4 4
5 5 5 6 6 6

View File

@ -0,0 +1,50 @@
#include <CGAL/Simple_cartesian.h>
#include <CGAL/config.h>
#include <CGAL/IO/read_ply_points.h>
#include <CGAL/property_map.h>
#include <boost/iterator/function_output_iterator.hpp>
#include <cassert>
#include <fstream>
#include <string>
#include <vector>
typedef CGAL::Simple_cartesian<double> Kernel;
typedef Kernel::FT FT;
typedef Kernel::Point_3 Point_3;
typedef Kernel::Vector_3 Vector_3;
typedef std::pair<Point_3, Vector_3> PointVectorPair;
typedef CGAL::First_of_pair_property_map<PointVectorPair> Point_map;
typedef CGAL::Second_of_pair_property_map<PointVectorPair> Normal_map;
int main()
{
std::vector<PointVectorPair> pv_pairs;
const std::function<void(const PointVectorPair& p)> lambda =
[&](const PointVectorPair& p) {
FT len = p.second.squared_length();
if (len > 0 || len != 1.0) {
Vector_3 n = p.second * (1.0 / CGAL::sqrt(len));
pv_pairs.push_back(std::make_pair(p.first, n));
}
else pv_pairs.push_back(p);
};
pv_pairs.clear();
std::ifstream file("data/simple_ascii.ply");
CGAL::IO::read_PLY_with_properties<PointVectorPair>(file, boost::function_output_iterator(lambda),
CGAL::make_ply_point_reader(Point_map()),
CGAL::make_ply_normal_reader(Normal_map()));
assert(pv_pairs[0].first == Point_3(1, 1, 1));
assert(pv_pairs[1].first == Point_3(3, 3, 3));
assert(pv_pairs[2].first == Point_3(5, 5, 5));
for (std::size_t i = 0; i < pv_pairs.size(); i++) {
FT dev = CGAL::abs(1.0 - pv_pairs[i].second.squared_length());
assert(dev < 0.01);
}
return 0;
}

View File

@ -33,12 +33,12 @@ if(TARGET CGAL::Eigen3_support)
find_package(OpenMesh QUIET) find_package(OpenMesh QUIET)
if(OpenMesh_FOUND) if(OpenMesh_FOUND)
include(UseOpenMesh) include(CGAL_OpenMesh_support)
message(STATUS "Found OpenMesh") message(STATUS "Found OpenMesh")
create_single_source_cgal_program("all_roi_assign_example_with_OpenMesh.cpp") create_single_source_cgal_program("all_roi_assign_example_with_OpenMesh.cpp")
target_link_libraries(all_roi_assign_example_with_OpenMesh target_link_libraries(all_roi_assign_example_with_OpenMesh
PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) PRIVATE CGAL::OpenMesh_support CGAL::Eigen3_support)
else() else()
message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.")
endif() endif()

View File

@ -18,12 +18,12 @@ if(TARGET CGAL::Eigen3_support)
find_package(OpenMesh QUIET) find_package(OpenMesh QUIET)
if(OpenMesh_FOUND) if(OpenMesh_FOUND)
include(UseOpenMesh) include(CGAL_OpenMesh_support)
message(STATUS "Found OpenMesh") message(STATUS "Found OpenMesh")
create_single_source_cgal_program("Cactus_deformation_session_OpenMesh.cpp") create_single_source_cgal_program("Cactus_deformation_session_OpenMesh.cpp")
target_link_libraries(Cactus_deformation_session_OpenMesh target_link_libraries(Cactus_deformation_session_OpenMesh
PRIVATE ${OPENMESH_LIBRARIES} CGAL::Eigen3_support) PRIVATE CGAL::OpenMesh_support CGAL::Eigen3_support)
else() else()
message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.") message(STATUS "NOTICE: Examples that use OpenMesh will not be compiled.")
endif() endif()

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