From 8dd0102d4ec6bb9b2144379aff621d5655320a17 Mon Sep 17 00:00:00 2001 From: Marius Kintel Date: Wed, 11 Feb 2015 13:58:45 -0500 Subject: [PATCH] Bugfix: We sometimes did output extra null-triangles if the tessellator left consecutive unused vertices --- cgal/data/self-intersecting.polygon | 4 ++++ src/GeometryUtils.cc | 22 ++++++++++++++++------ 2 files changed, 20 insertions(+), 6 deletions(-) create mode 100644 cgal/data/self-intersecting.polygon diff --git a/cgal/data/self-intersecting.polygon b/cgal/data/self-intersecting.polygon new file mode 100644 index 00000000..9b8c0d34 --- /dev/null +++ b/cgal/data/self-intersecting.polygon @@ -0,0 +1,4 @@ +10,10,0 +0,10,0 +0,0,0 +-1,0,0 diff --git a/src/GeometryUtils.cc b/src/GeometryUtils.cc index 46f02e79..24a837e4 100644 --- a/src/GeometryUtils.cc +++ b/src/GeometryUtils.cc @@ -139,23 +139,30 @@ bool GeometryUtils::tessellatePolygonWithHoles(const IndexedPolygons &polygons, std::vector vflags(inputSize); // Inits with 0's IndexedTriangle tri; + IndexedTriangle mappedtri; for (int t=0;t