chiark / gitweb /
xeno-drivebay-bracket: remove obsolete setting
[reprap-play.git] / xeno-drivebay-bracket.scad
1 // -*- C -*-
2
3 basel = 16;
4 basew = 24;
5 baset = 4.0;
6
7 wallt = 2.5;
8
9 wallh = 42;
10
11 baseholesz = 3.7;
12 baseholeslot = 6.5;
13 baseholeslop = -0.5;
14
15 holeslop = 0.5;
16
17 webt = 2.5;
18
19 padt = webt;
20 padw = 12;
21 padl = padw;
22 padholesz = 3.0;
23
24 wallholeh = 6+14+2;
25 wallholesz = 3.0;
26 wallholeslot = 4.5;
27
28 walll = basel + webt + padl;;
29
30 webw = min(basew, padw);
31
32 module slothole(sz, slot, thick, csunk=true, slop=holeslop) {
33   hull(){
34     for (y = [-slot/2,slot/2]) {
35       translate([0,y,-0.05])
36         cylinder(r1=sz/2 + slop,
37                  r2=sz/2 + (csunk ? thick : 0) + slop,
38                  h=thick+0.10);
39     }
40   }
41 }
42
43 module Bracket(){
44   difference(){
45     translate([0, -basew, 0])
46       cube([basel, basew, baset]);
47
48     translate([basel/2, -(basew+wallt)/2, 0])
49       slothole(baseholesz, baseholeslot, baset, slop=baseholeslop);
50   }
51
52   difference(){
53     rotate([90,0,0]) {
54       linear_extrude(height=wallt){
55         polygon([[0,0],
56                  [0, wallh/2 + wallholesz/2 + wallt + wallt],
57                  [basel, wallh],
58                  [walll, wallh],
59                  [walll, wallh - padt - padt],
60                  [basel + webt, 0]]);
61       }
62     }
63
64     translate([basel/2, 0, wallholeh])
65       rotate([90,90,0])
66       slothole(wallholesz, wallholeslot, wallt, csunk=false);
67   }
68
69   translate([basel-0.01, 0, 0]) {
70     rotate([90,0,90]) {
71       linear_extrude(height=webt+0.02) {
72         polygon([[-basew, 0],
73                  [-basew, baset],
74                  [-webw, wallh],
75                  [0, wallh],
76                  [0, 0]]);
77       }
78     }
79   }
80
81   translate([basel+webt, -padw, wallh-padt]) {
82     difference(){
83       cube([padl, padw, padt]);
84       translate([padl/2, padw/2, -1])
85         cylinder(r=padholesz/2 + holeslop, h=padt+2);
86     }
87   }
88 }
89
90 module BracketR(){ ////toplevel
91   rotate([-90,0,0]) Bracket();
92 }
93
94 module BracketL(){ ////toplevel
95   mirror([1,0,0]) BracketR();
96 }
97
98 module Kit(){ ////toplevel
99   for (y=[0, -wallh-5]) {
100     translate([0,y,0]) {
101       translate([5,0,0]) BracketR();
102       BracketL();
103     }
104   }
105 }
106
107 //Kit();
108 //BracketR();