From 2ea90b74671356bf1d2aa4bb4a14a66a84423933 Mon Sep 17 00:00:00 2001 From: Adrian Mariano Date: Mon, 13 Sep 2021 22:23:20 -0400 Subject: [PATCH] add fix for duplicate points in polygon_triangulation --- geometry.scad | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/geometry.scad b/geometry.scad index ae70d06..cdcd4f0 100644 --- a/geometry.scad +++ b/geometry.scad @@ -1455,8 +1455,9 @@ function point_in_polygon(point, poly, nonzero=false, eps=EPSILON) = // are considered as vertices of the polygon. // . // The function may issue an error if it finds that the polygon is not simple -// (self-intersecting) or its vertices are collinear. An error may also be issued -// for 3d non planar polygons. +// (self-intersecting) or its vertices are collinear. It can work for 3d non-planar polygons +// if they are close enough to planar but may otherwise issue an error for this case. +// . // For 2d polygons, the output triangles will have the same winding (CW or CCW) of // the input polygon. For 3d polygons, the triangle windings will induce a normal // vector with the same direction of the polygon normal. @@ -1485,7 +1486,7 @@ function polygon_triangulation(poly, ind, eps=EPSILON) = assert(is_undef(ind) || (is_vector(ind) && min(ind)>=0 && max(ind)