chiark / gitweb /
0d8406c9dcf98a9efecc7e16ef1f284f7fa7d8c1
[dl-things.git] / th-10254 / tower-base.scad
1
2 motorwidth=35.2;
3 motorheight=36.5;
4
5 pillarthick=8;
6 sidethick=3;
7
8 mw2=motorwidth/2;
9
10 module corner() {
11         $fn=30;
12         translate([-mw2,-mw2,0]) union(){
13                 cylinder(r=pillarthick/2, h=motorheight);
14                 translate([0,0,motorheight]) sphere(r=pillarthick/2);
15         }
16 }
17
18 module halfside() {
19         spacesz = (motorwidth - pillarthick/2*2) / 4;
20         panelheight = spacesz + sidethick;
21         panelbasez = motorheight+pillarthick/4-panelheight;
22         translate([0,-mw2,0]) {
23                 translate([-mw2,-sidethick,0])
24                         cube([motorwidth,sidethick,sidethick]);
25                 difference(){
26                         translate([-mw2,-sidethick, panelbasez])
27                                 cube([mw2,sidethick,panelheight]);
28                         translate([-mw2+pillarthick/3, -sidethick, panelbasez])
29                                 rotate([0,45,0])
30                                 translate([0,-1,0])
31                                 cube([spacesz * sqrt(2),
32                                       sidethick+2,
33                                       spacesz * sqrt(2)]);
34                 }
35                 intersection(){
36                         for (xz=[[-mw2+pillarthick/3, 0, panelbasez],
37                                  [0, 0, panelbasez + sidethick/sqrt(2)]]) {
38                                 translate(xz)
39                                 translate([0,-sidethick,0])
40                                         rotate([0,45,0])
41                                         translate([0,0,-sidethick])
42                                         cube([100, sidethick, sidethick]);
43                         }
44                         translate([-mw2,-sidethick,0])
45                                 cube([motorwidth,sidethick,
46                                         motorheight+pillarthick]);
47                 }
48         }
49 }
50
51 module towerbase() {
52         difference(){
53                 union(){
54                         for (angle=[0,90,180,270])
55                                 rotate([0,0,angle]) corner();
56                         for (angle=[0,90,180]) {
57                                 rotate([0,0,angle]) halfside();
58                                 rotate([0,0,angle]) mirror([1,0,0]) halfside();
59                         }
60                 }
61                 translate([-mw2,-mw2,-1])
62                         cube([motorwidth,motorwidth,motorheight]);
63         }
64 }
65
66 towerbase();