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 totalheight=65;
5
6 pillarthick=8;
7 sidethick=3;
8 archthick=6;
9 archoutwards=(pillarthick-archthick)/sqrt(8);
10
11 mw2=motorwidth/2;
12
13 include <Libs.scad> //  Libs.scad is @ http://www.thingiverse.com/thing:6021
14
15 module corner() {
16         $fn=30;
17         slopeheight= totalheight - motorheight;
18         slope = (mw2 + archoutwards)/slopeheight;
19         translate([-mw2,-mw2,0]) union(){
20                 difference(){ union(){
21                         cylinder(r=pillarthick/2, h=motorheight);
22                         translate([0,0,motorheight]) sphere(r=pillarthick/2);
23                 }
24                         translate([0,0,-1])
25                                 cube([mw2,mw2,motorheight+pillarthick+2]);
26                 }
27                 multmatrix([    [       1,      0,      slope,  -archoutwards ],
28                                 [       0,      1,      slope,  -archoutwards ],
29                                 [       0,      0,      1, motorheight  ],
30                                 [       0,      0,      0,      1       ]])
31                         cylinder(r=archthick/2, h=slopeheight);
32         }
33 }
34
35 module halfside() {
36         spacesz = (motorwidth - pillarthick/2*2) / 4;
37         panelheight = spacesz + sidethick;
38         panelbasez = motorheight+pillarthick/4-panelheight;
39         translate([0,-mw2,0]) {
40                 translate([-mw2,-sidethick,0])
41                         cube([motorwidth,sidethick,sidethick]);
42                 difference(){
43                         translate([-mw2,-sidethick, panelbasez])
44                                 cube([mw2,sidethick,panelheight]);
45                         translate([-mw2+pillarthick/3, -sidethick, panelbasez])
46                                 rotate([0,45,0])
47                                 translate([0,-1,0])
48                                 cube([spacesz * sqrt(2),
49                                       sidethick+2,
50                                       spacesz * sqrt(2)]);
51                 }
52                 intersection(){
53                         for (xz=[[-mw2+pillarthick/3, 0, panelbasez],
54                                  [0, 0, panelbasez + sidethick/sqrt(2)]]) {
55                                 translate(xz)
56                                 translate([0,-sidethick,0])
57                                         rotate([0,45,0])
58                                         translate([0,0,-sidethick])
59                                         cube([100, sidethick, sidethick]);
60                         }
61                         translate([-mw2,-sidethick,0])
62                                 cube([motorwidth,sidethick,
63                                         motorheight+pillarthick]);
64                 }
65         }
66 }
67
68 module towerbase() {
69         difference(){
70                 union(){
71                         for (angle=[0,90,180,270])
72                                 rotate([0,0,angle]) corner();
73                         for (angle=[0,90,180]) {
74                                 rotate([0,0,angle]) halfside();
75                                 rotate([0,0,angle]) mirror([1,0,0]) halfside();
76                         }
77                 }
78                 //translate([-mw2,-mw2,-1])
79                 //      cube([motorwidth,motorwidth,motorheight]);
80         }
81         translate([0,0,totalheight])
82                 rotate([0,-90,0])
83                 dovetail(height=10.1, male=true);
84 }
85
86 towerbase();