From 66b82fc287eb66300018d10ce18a81847b140421 Mon Sep 17 00:00:00 2001 From: Revar Desmera Date: Wed, 1 May 2019 00:07:55 -0700 Subject: [PATCH] Fixed hull_points() for 2D --- geometry.scad | 3 +-- hull.scad | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/geometry.scad b/geometry.scad index f85b8ad..d65e0b7 100644 --- a/geometry.scad +++ b/geometry.scad @@ -291,8 +291,7 @@ function simplify_path_indexed(points, path, eps=EPSILON, _a=0, _b=2, _acc=[]) = // point_in_polygon(point, path) // Description: // This function tests whether the given point is inside, outside or on the boundary of -// the specified polygon using the Winding Number method: -// - (http://geomalgorithms.com/a03-_inclusion.html) +// the specified polygon using the Winding Number method. // The polygon is given as a list of points, not including the repeated end point. // Returns -1 if the point is outside the polyon. // Returns 0 if the point is on the boundary. diff --git a/hull.scad b/hull.scad index 7164b86..73771ab 100644 --- a/hull.scad +++ b/hull.scad @@ -62,7 +62,7 @@ module hull_points(points, fast=false) { } } else { perim = hull(points); - if (len(perim[0]) == 2) { + if (is_num(perim[0])) { polygon(points=points, paths=[perim]); } else { polyhedron(points=points, faces=perim);