From 1912aecdfa98cf71308cefc707d9124ad1e33fc6 Mon Sep 17 00:00:00 2001 From: Adrian Mariano Date: Sun, 5 Dec 2021 09:08:27 -0500 Subject: [PATCH] Assert on non-coplanar faces in vnf_slice --- vnf.scad | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vnf.scad b/vnf.scad index 754acda..0abec25 100644 --- a/vnf.scad +++ b/vnf.scad @@ -746,7 +746,10 @@ function _slice_3dpolygons(polys, dir, cuts) = ) flatten([for (poly = polys) let( - plane = plane_from_polygon(poly), + plane = plane_from_polygon(poly) + ) + assert(plane,"Found non-coplanar face.") + let( normal = point3d(plane), pnormal = normal - (normal*I[dir_ind])*I[dir_ind] )