chiark / gitweb /
xeno-drivebay-bracket: try again with no pad
[reprap-play.git] / xeno-drivebay-bracket.scad
index 0f18a3b5ba7a1558c72d5669c141f38099ffd31b..e00091f6204d133a79b7cd1e07d09c1ea0d4793d 100644 (file)
@@ -1,39 +1,43 @@
 // -*- C -*-
 
-basel = 23;
-basew = 27;
+basel = 16;
+basew = 24;
 baset = 4.0;
 
-wallt = 4.0;
+wallt = 2.5;
 
 wallh = 42;
 
-baseholesz = 4; // fixme check
-baseholeslot = 4;
-
-topl = 20;
+baseholesz = 3.7;
+baseholeslot = 6.5;
+baseholeslop = -0.5;
 
 holeslop = 0.5;
 
-webt = 3;
+webt = 2.5;
+
+pad = false;
+padw = 12;
 
-padt = 3;
-padw = 20;
+padt = webt;
 padl = padw;
-padholesz = 5.0;
+padholesz = 3.0;
 
-walll = basel;
 wallholeh = 6+14+2;
-wallholesz = 3.0; // fixme check
+wallholesz = 3.0;
 wallholeslot = 4.5;
 
-module slothole(sz, slot, thick) {
+walll = basel + webt + (pad ? padl : -0.1);
+
+webw = min(basew, padw);
+
+module slothole(sz, slot, thick, csunk=true, slop=holeslop) {
   hull(){
     for (y = [-slot/2,slot/2]) {
-      translate([0,y,-0.05])
-       cylinder(r1=sz/2 + holeslop,
-                r2=sz/2+thick + holeslop,
-                h=thick+0.10);
+      translate([0,y,-0.15])
+       cylinder(r1=sz/2 + slop,
+                r2=sz/2 + (csunk ? thick : 0) + slop,
+                h=thick+0.30);
     }
   }
 }
@@ -44,28 +48,66 @@ module Bracket(){
       cube([basel, basew, baset]);
 
     translate([basel/2, -(basew+wallt)/2, 0])
-      slothole(baseholesz, baseholeslot, baset);
+      slothole(baseholesz, baseholeslot, baset, slop=baseholeslop);
   }
 
   difference(){
-    translate([0, -wallt, 0])
-      cube([walll, wallt, wallh]);
+    translate([0.1, 0.3, 0.1])
+    rotate([90,0,0]) {
+      linear_extrude(height=wallt){
+       polygon([[0,0],
+                [0, wallh/2 + wallholesz/2 + wallt + wallt],
+                [basel, wallh],
+                [walll, wallh],
+                [walll, wallh - padt - padt],
+                [basel + webt, 0]]);
+      }
+    }
 
     translate([basel/2, 0, wallholeh])
       rotate([90,90,0])
-      slothole(wallholesz, wallholeslot, wallt);
+      slothole(wallholesz, wallholeslot, wallt, csunk=false);
+  }
+
+  translate([basel-0.01, 0, 0]) {
+    rotate([90,0,90]) {
+      linear_extrude(height=webt+0.02) {
+       polygon([[-basew, 0],
+                [-basew, baset],
+                [-webw, wallh],
+                [0, wallh],
+                [0, 0]]);
+      }
+    }
   }
 
-  translate([basel-0.01, -basew, 0])
-    cube([webt+0.02, basew, wallh]);
+  if (pad) {
+    translate([basel+webt, -padw, wallh-padt]) {
+      difference(){
+       cube([padl, padw, padt]);
+       translate([padl/2, padw/2, -1])
+         cylinder(r=padholesz/2 + holeslop, h=padt+2);
+      }
+    }
+  }
+}
+
+module BracketR(){ ////toplevel
+  rotate([-90,0,0]) Bracket();
+}
+
+module BracketL(){ ////toplevel
+  mirror([1,0,0]) BracketR();
+}
 
-  translate([basel+webt, -padw, wallh-padt]) {
-    difference(){
-      cube([padl, padw, padt]);
-      translate([padl/2, padw/2, -1])
-       cylinder(r=padholesz/2 + holeslop, h=padt+2);
+module Kit(){ ////toplevel
+  for (y=[0, -wallh-5]) {
+    translate([0,y,0]) {
+      translate([5,0,0]) BracketR();
+      BracketL();
     }
   }
 }
 
-Bracket();
+//Kit();
+//BracketR();