chiark / gitweb /
bike-lipo-box: rotate again so glands are at front for viewing while printing
[reprap-play.git] / brompton-computer-guard.scad
index ea334d5..efb3a8a 100644 (file)
@@ -21,6 +21,11 @@ echo(arch_alpha,arch_beta);
 arch_in_rad = arch_width/2 / sin(arch_beta);
 arch_to_chord = arch_in_rad * cos(arch_beta);
 
+inner_pbase_thick = 6;
+echo(inner_pbase_thick);
+
+inner_pbase_rad = arch_in_rad * 2;
+
 end_thick = arch_thick;
 
 holes = [[[  5  , 5  ], [16  , 21]], // left
@@ -64,22 +69,33 @@ module Holes(){
 }
 
 module MainCutout(){
-  translate([0,0,-1]) linear_extrude(height=100)
-    ArchCircle(arch_in_rad);
+  ArchCircle(arch_in_rad);
 }
 
 module Arch(){
   difference(){
     rotate([0,0,180]){
+      linear_extrude(height=arch_breadth) {
+       difference(){
+         ArchProfile(false);
+         MainCutout();
+       }
+      }
       difference(){
-       union(){
-         linear_extrude(height=arch_breadth) ArchProfile(false);
-         linear_extrude(height=pbase_thick) hull(){
-           ArchProfile(true);
-           ArchProfile(false);
+       linear_extrude(height=pbase_thick){
+         difference(){
+           hull(){
+             ArchProfile(true);
+             ArchProfile(false);
+           }
+           intersection(){
+             MainCutout();
+             translate([0, -inner_pbase_thick
+                        - (inner_pbase_rad - arch_in_rad)])
+               ArchCircle(inner_pbase_rad);
+           }
          }
        }
-       MainCutout();
       }
     }
     Holes();