Fixed hull_points() for 2D

This commit is contained in:
Revar Desmera 2019-05-01 00:07:55 -07:00
parent 3a71633f7f
commit 66b82fc287
2 changed files with 2 additions and 3 deletions

View file

@ -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.

View file

@ -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);