chiark / gitweb /
xeno-drivebay-bracket before wall polygon
[reprap-play.git] / xeno-drivebay-bracket.scad
1 // -*- C -*-
2
3 basel = 23;
4 basew = 27;
5 baset = 4.0;
6
7 wallt = 4.0;
8
9 wallh = 42;
10
11 baseholesz = 4; // fixme check
12 baseholeslot = 4;
13
14 topl = 20;
15
16 holeslop = 0.5;
17
18 webt = 3;
19
20 padt = 3;
21 padw = 20;
22 padl = padw;
23 padholesz = 5.0;
24
25 walll = basel;
26 wallholeh = 6+14+2;
27 wallholesz = 3.0; // fixme check
28 wallholeslot = 4.5;
29
30 module slothole(sz, slot, thick) {
31   hull(){
32     for (y = [-slot/2,slot/2]) {
33       translate([0,y,-0.05])
34         cylinder(r1=sz/2 + holeslop,
35                  r2=sz/2+thick + holeslop,
36                  h=thick+0.10);
37     }
38   }
39 }
40
41 module Bracket(){
42   difference(){
43     translate([0, -basew, 0])
44       cube([basel, basew, baset]);
45
46     translate([basel/2, -(basew+wallt)/2, 0])
47       slothole(baseholesz, baseholeslot, baset);
48   }
49
50   difference(){
51     translate([0, -wallt, 0])
52       cube([walll, wallt, wallh]);
53
54     translate([basel/2, 0, wallholeh])
55       rotate([90,90,0])
56       slothole(wallholesz, wallholeslot, wallt);
57   }
58
59   translate([basel-0.01, -basew, 0])
60     cube([webt+0.02, basew, wallh]);
61
62   translate([basel+webt, -padw, wallh-padt]) {
63     difference(){
64       cube([padl, padw, padt]);
65       translate([padl/2, padw/2, -1])
66         cylinder(r=padholesz/2 + holeslop, h=padt+2);
67     }
68   }
69 }
70
71 Bracket();