mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Fixed hull_points() for 2D
This commit is contained in:
parent
3a71633f7f
commit
66b82fc287
2 changed files with 2 additions and 3 deletions
|
@ -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.
|
||||
|
|
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue