mirror of
https://github.com/revarbat/BOSL2.git
synced 2025-08-11 19:14:06 +02:00
Fix small bug in hull3d_faces
This commit is contained in:
@@ -168,7 +168,7 @@ function hull3d_faces(points) =
|
|||||||
b = tri[1],
|
b = tri[1],
|
||||||
c = tri[2],
|
c = tri[2],
|
||||||
plane = plane3pt_indexed(points, a, b, c),
|
plane = plane3pt_indexed(points, a, b, c),
|
||||||
d = _find_first_noncoplanar(plane, points, 3)
|
d = _find_first_noncoplanar(plane, points)
|
||||||
)
|
)
|
||||||
d == len(points)
|
d == len(points)
|
||||||
? /* all coplanar*/
|
? /* 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 :
|
(i >= len(points) || !points_on_plane([points[i]],plane))? i :
|
||||||
_find_first_noncoplanar(plane, points, i+1);
|
_find_first_noncoplanar(plane, points, i+1);
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user