chiark / gitweb /
bike-lipo-box: wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 12 Feb 2016 00:49:47 +0000 (00:49 +0000)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 12 Feb 2016 00:49:47 +0000 (00:49 +0000)
bike-lipo-box.scad.m4

index 1879221f3cc1f80ee911cb3aabd13a311138c824..ba4e387ec3ad19c86789746498b48b2c96d5ec99 100644 (file)
@@ -56,16 +56,17 @@ module TestWall(){
   }    
 }
 
-floorth = 1.5;
-ceilth = 1.5;
+floorth = 2.5;
+ceilth = 2.5;
+innertube = 1.0 + 0.2;
+lidoverlap = 1.5;
+lidoverhang = 4;
 
 ts_xbox = 30;
 ts_ybox = 25;
 ts_cnrrad = 10;
 ts_zbox = 15;
 
-ts_innertube = 0.1;
-
 m4_dnl Box_Part($1=transl_x,$2=transl_y, $3=rot_z,$4=mirror_xy)
 m4_dnl          $5=kind, $6=kindargs, $7=profile(profileargsargs))
 m4_define(`Box_Part',`
@@ -125,7 +126,7 @@ m4_define(`TestSealDoBoxShape',`
 m4_dnl '
 
 module WallProfile(){
-  z = ts_zbox - ts_innertube - wallthick/2;
+  z = ts_zbox - innertube - wallthick/2;
   translate([0, -0.1]) square([wallthick, z]);
   translate([wallthick/2, z]) circle(r = wallthick/2, $fn=20);
 }
@@ -134,6 +135,27 @@ module FloorProfile(){
   mirror([0,1]) square([wallthick, floorth]);
 }
 
+module LidProfile(){
+  rad = wallthick/2 + innertube;
+  morex = wallthick;
+  difference(){
+    translate([-lidoverlap - innertube,
+              ts_zbox - lidoverhang - innertube])
+      square([lidoverlap + innertube + wallthick + morex,
+             lidoverhang + innertube + ceilth]);
+    hull(){
+      translate([wallthick/2, ts_zbox - innertube - wallthick/2])
+       for (t=[ [0,0],
+                [morex*2, 0],
+                [0, -ts_zbox]
+                ]) {
+         translate(t)
+           circle(r= wallthick/2 + innertube, $fn=20);
+       }
+    }
+  }
+}
+
 module TestSealBox(){
   TestSealDoBoxShape(WallProfile(););
   hull(){ TestSealDoBoxShape(FloorProfile();); }
@@ -143,6 +165,7 @@ module ProfileDemos(){
   WallProfile();
   color("blue")
     FloorProfile();
+  LidProfile();
 }
                          
 //TestWall();