From 1ea86206bb91098321497dbd4f0ede74bd7d3192 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Thu, 28 Apr 2022 09:33:02 +0800 Subject: [PATCH] use for comp --- src/surface/sf_thickenT.scad | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) diff --git a/src/surface/sf_thickenT.scad b/src/surface/sf_thickenT.scad index 3c4432a6..b15480d6 100644 --- a/src/surface/sf_thickenT.scad +++ b/src/surface/sf_thickenT.scad @@ -43,7 +43,7 @@ module sf_thickenT(points, thickness, triangles = undef, direction = "BOTH", con dir_v = direction / norm(direction); mid = sorted(points)[leng_pts / 2]; tri = cnn_tris[search([mid], points)[0]][0]; - nv = _face_normal([points[tri[0]], points[tri[1]], points[tri[2]]]); + nv = _face_normal([for(i = [0:2]) points[tri[i]]]); off = dir_v * thickness; pts = [for(p = points) p + off]; @@ -60,11 +60,7 @@ module sf_thickenT(points, thickness, triangles = undef, direction = "BOTH", con let( normals = [ for(tri = cnn_tris[i]) - _face_normal([ - points[tri[0]], - points[tri[1]], - points[tri[2]]] - ) + _face_normal([for(j = [0:2]) points[tri[j]]]) ] ) sum(normals) / len(normals)