chiark / gitweb /
fairphone-case: Struts: add x_start parameter (nfc)
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 20 Jan 2018 23:12:47 +0000 (23:12 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 20 Jan 2018 23:12:47 +0000 (23:12 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fairphone-case.scad

index 52a9b31f4dd5c6c029aa803148e98792f3942d53..34b4221e0eb6743e6b4fd3d57344baef1c63d725 100644 (file)
@@ -245,7 +245,7 @@ module AroundEdges(fill_zstart, fill_th, fill_downwards=0){
               [phone_width, -phone_height] + [-1,+1] * phone_cnr_rad);
 }
 
-module Struts(z_min, th){
+module Struts(x_start, 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]) {
@@ -258,8 +258,8 @@ module Struts(z_min, th){
               case_struts_solid_below])
       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 ]);
+      rectfromto([               x_start, -0.5 * case_struts_width ],
+                [ phone_width - x_start, +0.5 * case_struts_width ]);
   }
 }
 
@@ -308,7 +308,7 @@ module Case(){ ////toplevel
       rectfromto(camera_pos_tl, camera_pos_br);
 
     // struts (invisible, because they're buried in the case)
-    Struts(epp2i[1] - case_th_bottom, case_th_bottom);
+    Struts(epp2i[0], epp2i[1] - case_th_bottom, case_th_bottom);
   }
 }