From 726b9c9485c810403dbc34b4a3870df9e5d650f8 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Tue, 10 Sep 2024 08:34:52 +0100 Subject: [PATCH] Show the problem in a test --- BGL/test/BGL/CMakeLists.txt | 3 +++ BGL/test/BGL/test_OpenMesh.cpp | 23 ++++++++++++++++++++++ STL_Extension/include/CGAL/hash_openmesh.h | 4 ++-- 3 files changed, 28 insertions(+), 2 deletions(-) create mode 100644 BGL/test/BGL/test_OpenMesh.cpp diff --git a/BGL/test/BGL/CMakeLists.txt b/BGL/test/BGL/CMakeLists.txt index 074bce74ac2..ed88e574158 100644 --- a/BGL/test/BGL/CMakeLists.txt +++ b/BGL/test/BGL/CMakeLists.txt @@ -62,6 +62,9 @@ if(OpenMesh_FOUND) create_single_source_cgal_program("graph_concept_OpenMesh.cpp") target_link_libraries(graph_concept_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) + + create_single_source_cgal_program("test_OpenMesh.cpp") + target_link_libraries(test_OpenMesh PRIVATE ${OPENMESH_LIBRARIES}) else() message(STATUS "NOTICE: Tests that use OpenMesh will not be compiled.") endif() diff --git a/BGL/test/BGL/test_OpenMesh.cpp b/BGL/test/BGL/test_OpenMesh.cpp new file mode 100644 index 00000000000..bafe9002ee6 --- /dev/null +++ b/BGL/test/BGL/test_OpenMesh.cpp @@ -0,0 +1,23 @@ +#include +#include +#include + +#include + + +typedef OpenMesh::PolyMesh_ArrayKernelT<> Om; +typedef boost::graph_traits< Om > Traits; +typedef Traits::edge_descriptor edge_descriptor; +typedef Traits::halfedge_descriptor halfedge_descriptor; +typedef Traits::vertex_descriptor vertex_descriptor; +typedef Traits::face_descriptor face_descriptor; +//typedef Kernel::Point_3 Point_3; + +int main() +{ + Om om; + for (Om::EdgeHandle ed : edges(om)) { + std::cout << "edge" << std::endl; + } + return 0; +} diff --git a/STL_Extension/include/CGAL/hash_openmesh.h b/STL_Extension/include/CGAL/hash_openmesh.h index eb9c71d58f1..49ae372f3ab 100644 --- a/STL_Extension/include/CGAL/hash_openmesh.h +++ b/STL_Extension/include/CGAL/hash_openmesh.h @@ -36,11 +36,11 @@ public: return false; } } - + /* operator OpenMesh::EdgeHandle () const { return OpenMesh::EdgeHandle(idx()); } - + */ bool operator<(const OMesh_edge& other) const { return this->idx() < other.idx();