From a95bfa77c8058deec4dc905fad0c4916fe16b796 Mon Sep 17 00:00:00 2001 From: Andreas Fabri Date: Wed, 17 Sep 2025 15:27:23 +0100 Subject: [PATCH] The example can also read in a polygon with 3D points --- Stream_support/examples/Stream_support/read_WKT.cpp | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/Stream_support/examples/Stream_support/read_WKT.cpp b/Stream_support/examples/Stream_support/read_WKT.cpp index 9c7ed82d578..0ebd9f27bf9 100644 --- a/Stream_support/examples/Stream_support/read_WKT.cpp +++ b/Stream_support/examples/Stream_support/read_WKT.cpp @@ -1,15 +1,17 @@ #include +#include #include #include #include #include -typedef CGAL::Exact_predicates_exact_constructions_kernel Kernel; +typedef CGAL::Exact_predicates_inexact_constructions_kernel K; +typedef CGAL::Projection_traits_xy_3 Kernel; int main(int argc, char* argv[]) { - typedef CGAL::Point_2 Point; + typedef Kernel::Point_2 Point; typedef std::vector MultiPoint; typedef std::vector LineString; @@ -23,6 +25,7 @@ int main(int argc, char* argv[]) MultiPoint points; MultiLineString polylines; MultiPolygon polygons; + CGAL::IO::read_WKT(is, points,polylines,polygons); for(Point p : points) @@ -30,8 +33,9 @@ int main(int argc, char* argv[]) for(LineString ls : polylines) for(Point p : ls) std::cout<