From: Ian Jackson Date: Sat, 20 Jan 2018 23:10:15 +0000 (+0000) Subject: fairphone-case: Struts: support negative thickness for inverted objects (nfc) X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=014cfe33a525fcc820b5f91015bb9d569a61380b;p=reprap-play.git fairphone-case: Struts: support negative thickness for inverted objects (nfc) Signed-off-by: Ian Jackson --- diff --git a/fairphone-case.scad b/fairphone-case.scad index 5cd591e..52a9b31 100644 --- a/fairphone-case.scad +++ b/fairphone-case.scad @@ -246,14 +246,17 @@ module AroundEdges(fill_zstart, fill_th, fill_downwards=0){ } module Struts(z_min, th){ + // if th is negative, starts at z_min and works towards -ve z + // and object should then be printed other way up for (i= [1 : 1 : case_struts_count]) { translate([0, 0, z_min]) + mirror([0,0, th<0 ? 1 : 0]) translate([0, -phone_height * i / (case_struts_count+1), case_struts_solid_below]) - linear_extrude(height= th + linear_extrude(height= abs(th) -(case_struts_solid_below+case_struts_solid_above)) rectfromto([ epp2i[0], -0.5 * case_struts_width ], [ phone_width - epp2i[0], +0.5 * case_struts_width ]);