From b8dee94e00e51e35a7240b77eeb6c0efce0fbb5b Mon Sep 17 00:00:00 2001 From: RonaldoCMP Date: Wed, 5 May 2021 22:02:07 +0100 Subject: [PATCH] Fix small bug in hull3d_faces --- hull.scad | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hull.scad b/hull.scad index 6961e1a..1940fc5 100644 --- a/hull.scad +++ b/hull.scad @@ -168,7 +168,7 @@ function hull3d_faces(points) = b = tri[1], c = tri[2], plane = plane3pt_indexed(points, a, b, c), - d = _find_first_noncoplanar(plane, points, 3) + d = _find_first_noncoplanar(plane, points) ) d == len(points) ? /* all coplanar*/ @@ -239,7 +239,7 @@ function _find_conflicts(point, planes) = [ ]; -function _find_first_noncoplanar(plane, points, i) = +function _find_first_noncoplanar(plane, points, i=0) = (i >= len(points) || !points_on_plane([points[i]],plane))? i : _find_first_noncoplanar(plane, points, i+1);