Skip to content

Commit 8f3d504

Browse files
authored
Merge pull request #156 from nschloe/cgal-5.3
update for CGAL 5.3
2 parents 46e844b + 5b35bf8 commit 8f3d504

File tree

4 files changed

+21
-4
lines changed

4 files changed

+21
-4
lines changed

justfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ default:
55

66
tag:
77
@if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi
8-
curl -H "Authorization: token `cat ~/.github-access-token`" -d '{"tag_name": "{{version}}"}' https://api.github.com/repos/nschloe/meshio/releases
8+
curl -H "Authorization: token `cat ~/.github-access-token`" -d '{"tag_name": "{{version}}"}' https://api.github.com/repos/nschloe/pygalmesh/releases
99

1010
upload: clean
1111
@if [ "$(git rev-parse --abbrev-ref HEAD)" != "main" ]; then exit 1; fi

setup.cfg

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[metadata]
22
name = pygalmesh
3-
version = 0.9.5
3+
version = 0.9.6
44
author = Nico Schlömer
55
author_email = nico.schloemer@gmail.com
66
description = Python frontend to CGAL's mesh generation capabilities

src/CMakeLists.txt

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ pybind11_add_module(pygalmesh ${pygalmesh_SRCS})
1515
# ADD_LIBRARY(pygalmesh ${pygalmesh_SRCS})
1616
target_link_libraries(pygalmesh PRIVATE ${CGAL_LIBRARIES})
1717

18+
# https://github.com/CGAL/cgal/issues/6002
19+
# find_program(iwyu_path NAMES include-what-you-use iwyu REQUIRED)
20+
# set_property(TARGET pygalmesh PROPERTY CXX_INCLUDE_WHAT_YOU_USE ${iwyu_path})
21+
1822
# execute_process(
1923
# COMMAND python -c "from distutils.sysconfig import get_python_lib; print get_python_lib()"
2024
# OUTPUT_VARIABLE PYTHON_SITE_PACKAGES

src/generate_from_off.cpp

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,12 @@
1515
#include <CGAL/Polygon_mesh_processing/orient_polygon_soup.h>
1616
#include <CGAL/Polygon_mesh_processing/polygon_soup_to_polygon_mesh.h>
1717
#include <CGAL/Polygon_mesh_processing/orientation.h>
18-
#include <CGAL/IO/OFF_reader.h>
18+
19+
#include <CGAL/version_macros.h>
20+
21+
#if CGAL_VERSION_MAJOR >= 5 && CGAL_VERSION_MINOR < 3
22+
#include <CGAL/IO/OFF_reader.h>
23+
#endif
1924

2025
// for sharp features
2126
//#include <CGAL/Polyhedral_mesh_domain_with_features_3.h>
@@ -69,7 +74,15 @@ void generate_from_off(
6974
std::vector<K::Point_3> points;
7075
std::vector<std::vector<std::size_t> > polygons;
7176

72-
if(!input || !CGAL::read_OFF(input, points, polygons) || points.empty())
77+
if(
78+
!input ||
79+
#if CGAL_VERSION_MAJOR >= 5 && CGAL_VERSION_MINOR >= 3
80+
!CGAL::IO::read_OFF(input, points, polygons) ||
81+
#else
82+
!CGAL::read_OFF(input, points, polygons) ||
83+
#endif
84+
points.empty()
85+
)
7386
{
7487
std::stringstream msg;
7588
msg << "Cannot read .off file \"" << infile <<"\""<< std::endl;

0 commit comments

Comments
 (0)