chiark / gitweb /
fairphone-battery-case: base indent
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 9 Feb 2020 00:43:41 +0000 (00:43 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 9 Feb 2020 00:43:41 +0000 (00:43 +0000)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
fairphone-battery-case.scad

index 757c4967b5cd14b7951cd2b4ffe4836a273bf075..7a267d5743b69b02ede9e6f8df4b12c8e3d08527 100644 (file)
@@ -14,9 +14,14 @@ battery_len = 66.55 + 0.75;
 battery_th = 6.55 + 0.75;
 battery_wdth = 44.38 + 0.75;
 
+battery_base_indent = 0.94 + 0.50;
+battery_base_indent_fromside_outside = 4;
+battery_base_indent_fromside_inside = 10;
+
 // for testing:
 battery_len = 3;
 battery_wdth = 15;
+battery_base_indent_fromside_inside = 6;
 
 // calculated
 
@@ -60,7 +65,7 @@ bpp6 = [ bpp5[0], bpp9[1] ];
 lppE = [ lppA[0], bpp9[1] ];
 lppD = [ lppC[0], bpp9[1] ];
 
-module BaseHalfPlan(){
+module BaseHalfPlan(indent=0){
   polygon([ bpp0,
            bpp1,
            bpp2,
@@ -68,8 +73,8 @@ module BaseHalfPlan(){
            bpp4,
            bpp5,
            bpp6,
-           bpp7,
-           bpp8
+           bpp7 + indent * [1,0],
+           bpp8 + indent * [1,0]
            ]);
 }
 
@@ -114,6 +119,9 @@ module PlanDemo(){ ////toplevel
 module Base(){ ////toplevel
   ExtrudePlan(0,s1) BaseHalfPlan();
   ExtrudePlan(s0,s1) SideHalfPlan();
+  ExtrudePlan(s0 - battery_base_indent_fromside_inside,
+             s0 - battery_base_indent_fromside_outside
+             ) SideHalfPlan(indent = battery_base_indent);
 }
 
 module Lid(){ ////toplevel