Assert on non-coplanar faces in vnf_slice

This commit is contained in:
Adrian Mariano 2021-12-05 09:08:27 -05:00
parent 3e292c21cc
commit 1912aecdfa

View file

@ -746,7 +746,10 @@ function _slice_3dpolygons(polys, dir, cuts) =
) )
flatten([for (poly = polys) flatten([for (poly = polys)
let( let(
plane = plane_from_polygon(poly), plane = plane_from_polygon(poly)
)
assert(plane,"Found non-coplanar face.")
let(
normal = point3d(plane), normal = point3d(plane),
pnormal = normal - (normal*I[dir_ind])*I[dir_ind] pnormal = normal - (normal*I[dir_ind])*I[dir_ind]
) )