chiark / gitweb /
brompton-computer-guard: commute difference() linear_extrude(), making MainCutout...
[reprap-play.git] / brompton-computer-guard.scad
index 2673b6dae7634583831ee1b9163750aacec4a9e6..88f1994f0a249a631ab7ae90d598cbcbe5fb5f99 100644 (file)
@@ -1,16 +1,16 @@
 // -*- C -*-
 
-arch_height = 24;
+arch_height = 18;
 arch_width = 75;
 end_width = 25;
 
-arch_thick = 5;
+arch_thick = 4;
 
 arch_breadth = 25;
 
-hole_dia = 3 + 0.5;
+hole_dia = 4 + 0.5;
 
-pbase_tab = 15;
+pbase_tab = 12;
 pbase_thick = 2;
 
 // computed
@@ -24,7 +24,7 @@ arch_to_chord = arch_in_rad * cos(arch_beta);
 end_thick = arch_thick;
 
 holes = [[[  5  , 5  ], [16  , 21]], // left
-        [[ 18.5, 4.5], [ 4.5, 22]]]; // right
+        [[ 18.5, 4.5], [ 4.5, 21]]]; // right
 
 module ArchCircle(rad){
   translate([0,-arch_to_chord])
@@ -63,23 +63,33 @@ module Holes(){
   }
 }
 
+module MainCutout(){
+  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);
+           }
+           MainCutout();
          }
        }
-       translate([0,0,-1]) linear_extrude(height=100)
-         ArchCircle(arch_in_rad);
       }
     }
     Holes();
   }
 }
 
-Arch();
+rotate([0,0,45]) Arch();