From a1686c4feafa85bdc2958540f69455010adf7ed1 Mon Sep 17 00:00:00 2001 From: Justin Lin Date: Sun, 20 Sep 2020 17:41:18 +0800 Subject: [PATCH] y offset --- examples/string_tetrahedron.scad | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/examples/string_tetrahedron.scad b/examples/string_tetrahedron.scad index 113bed9d..2d6dfbb9 100644 --- a/examples/string_tetrahedron.scad +++ b/examples/string_tetrahedron.scad @@ -29,10 +29,11 @@ function height(leng) = function vts(leng) = let( half_leng = leng / 2, - vt1 = [half_leng, 0, 0], - vt2 = [0, leng * sin(60), 0], - vt3 = [-half_leng, 0, 0], - vt4 = [0, half_leng * tan(30), height(leng)] + center_y = half_leng * tan(30), + vt1 = [half_leng, - center_y, 0], + vt2 = [0, leng * sin(60) - center_y, 0], + vt3 = [-half_leng, -center_y, 0], + vt4 = [0, 0, height(leng)] ) [vt1, vt2, vt3, vt4]; module string_tetrahedron(leng, thickness, segs_per_side, line_fn) {