chiark / gitweb /
3bbff794485c232007ef931b02bf7df643c92e28
[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 wallholeh = 6+14+2;
26 wallholesz = 3.0; // fixme check
27 wallholeslot = 4.5;
28
29 walll = basel + webt + padl;;
30
31 webw = min(basew, padw);
32
33 module slothole(sz, slot, thick) {
34   hull(){
35     for (y = [-slot/2,slot/2]) {
36       translate([0,y,-0.05])
37         cylinder(r1=sz/2 + holeslop,
38                  r2=sz/2+thick + holeslop,
39                  h=thick+0.10);
40     }
41   }
42 }
43
44 module Bracket(){
45   difference(){
46     translate([0, -basew, 0])
47       cube([basel, basew, baset]);
48
49     translate([basel/2, -(basew+wallt)/2, 0])
50       slothole(baseholesz, baseholeslot, baset);
51   }
52
53   difference(){
54     rotate([90,0,0]) {
55       linear_extrude(height=wallt){
56         polygon([[0,0],
57                  [0, wallh/2 + wallholesz/2 + wallt + wallt],
58                  [basel, wallh],
59                  [walll, wallh],
60                  [walll, wallh - padt - padt],
61                  [basel + webt, 0]]);
62       }
63     }
64
65     translate([basel/2, 0, wallholeh])
66       rotate([90,90,0])
67       slothole(wallholesz, wallholeslot, wallt);
68   }
69
70   translate([basel-0.01, -webw, 0])
71     cube([webt+0.02, webw, wallh]);
72
73   translate([basel+webt, -padw, wallh-padt]) {
74     difference(){
75       cube([padl, padw, padt]);
76       translate([padl/2, padw/2, -1])
77         cylinder(r=padholesz/2 + holeslop, h=padt+2);
78     }
79   }
80 }
81
82 Bracket();