chiark / gitweb /
10254 our tower-base wip
[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                         union(){
37                                 translate([-mw2+pillarthick/3,
38                                            -sidethick, panelbasez])
39                                         rotate([0,45,0])
40                                         translate([0,0,-sidethick])
41                                         cube([100, sidethick, sidethick]);
42                                 translate([0,
43                                            -sidethick,
44                                            panelbasez + sidethick/sqrt(2)])
45                                         rotate([0,45,0])
46                                         translate([0,0,-sidethick])
47                                         cube([100, sidethick, sidethick]);
48                         }
49                         translate([-mw2,-sidethick,0])
50                                 cube([motorwidth,sidethick,
51                                         motorheight+pillarthick]);
52                 }
53         }
54 }
55
56 module towerbase() {
57         difference(){
58                 union(){
59                         for (angle=[0,90,180,270])
60                                 rotate([0,0,angle]) corner();
61                         for (angle=[0,90,180]) {
62                                 rotate([0,0,angle]) halfside();
63                                 rotate([0,0,angle]) mirror([1,0,0]) halfside();
64                         }
65                 }
66                 translate([-mw2,-mw2,-1])
67                         cube([motorwidth,motorwidth,motorheight]);
68         }
69 }
70
71 towerbase();