From b73fc9eda1a4563a5ae22488fff28764e87d31f0 Mon Sep 17 00:00:00 2001 From: Deepak Rangarajan Date: Wed, 10 Jun 2020 13:02:10 -0400 Subject: [PATCH] Switch to cartesian kernel for polygon as well --- src/csg/cgal_helper_polygon.cpp | 9 ++------- src/csg_cgal_helper.hpp | 3 +-- 2 files changed, 3 insertions(+), 9 deletions(-) diff --git a/src/csg/cgal_helper_polygon.cpp b/src/csg/cgal_helper_polygon.cpp index 2b95b9d..36a2143 100644 --- a/src/csg/cgal_helper_polygon.cpp +++ b/src/csg/cgal_helper_polygon.cpp @@ -1,11 +1,7 @@ #include "csg_cgal_helper.hpp" -#include -#include - namespace { -typedef CGAL::Polygon_2 Polygon; -typedef CGAL::Point_2 Point; +typedef CGAL::Point_2 Point; } // namespace namespace cgal_helper { @@ -32,8 +28,7 @@ Polygon create_polygon(const std::vector> &points, bool inside(const Polygon &polygon, double xx, double yy) { - return CGAL::bounded_side_2(polygon.begin(), polygon.end(), Point(xx, yy), - IK()) == CGAL::ON_BOUNDED_SIDE; + return polygon.has_on_bounded_side(Point(xx, yy)); } } // namespace cgal_helper diff --git a/src/csg_cgal_helper.hpp b/src/csg_cgal_helper.hpp index 0326d23..f4cc688 100644 --- a/src/csg_cgal_helper.hpp +++ b/src/csg_cgal_helper.hpp @@ -10,8 +10,7 @@ namespace cgal_helper { typedef CGAL::Simple_cartesian CK; typedef CGAL::Polyhedron_3 Polyhedron; -typedef CGAL::Exact_predicates_inexact_constructions_kernel IK; -typedef CGAL::Polygon_2 Polygon; +typedef CGAL::Polygon_2 Polygon; Polyhedron create_polyhedron(const std::vector> &points, -- GitLab