mirror of
https://github.com/BelfrySCAD/BOSL2.git
synced 2025-01-01 09:49:45 +00:00
Fixed consistency of plane_from_pointslist()
This commit is contained in:
parent
faf12b6e26
commit
25256f78ad
1 changed files with 3 additions and 4 deletions
|
@ -679,13 +679,12 @@ function plane3pt_indexed(points, i1, i2, i3) =
|
||||||
function plane_from_pointslist(points) =
|
function plane_from_pointslist(points) =
|
||||||
let(
|
let(
|
||||||
points = deduplicate(points),
|
points = deduplicate(points),
|
||||||
indices = find_noncollinear_points(points),
|
indices = sort(find_noncollinear_points(points)),
|
||||||
p1 = points[indices[0]],
|
p1 = points[indices[0]],
|
||||||
p2 = points[indices[1]],
|
p2 = points[indices[1]],
|
||||||
p3 = points[indices[2]],
|
p3 = points[indices[2]],
|
||||||
plane = plane3pt(p1,p2,p3),
|
plane = plane3pt(p1,p2,p3)
|
||||||
out = ((plane.x+plane.y+plane.z)<0)? plane3pt(p1,p3,p2) : plane
|
) plane;
|
||||||
) out;
|
|
||||||
|
|
||||||
|
|
||||||
// Function: plane_normal()
|
// Function: plane_normal()
|
||||||
|
|
Loading…
Reference in a new issue