6 led_tip_height_above_crossbar = 70;
8 crossbar_dia = 25; // fixme
10 vert_space_inside = 8;
11 backfront_space_inside = 12;
12 width_space_inside = 10;
14 backfront_mate_size = 25;
15 tower_frontheight = 10;
16 tower_base_height = 20;
19 cableclamp_ctie_width = 4.0 + 1.0;
20 cableclamp_ctie_thick = 2.5 + 0.5;
22 lidclamp_ctie_width = 4.0 + 1.0;
23 lidclamp_ctie_thick = 2.5 + 0.5;
25 base_ctie_width = 4.0 + 1.0;
26 base_ctie_thick = 2.5 + 0.5;
28 tube_ctie_width = 4.0 + 1.0;
29 tube_ctie_thick = 2.5 + 0.5;
33 tower_over_angle = 45;
34 tower_wall_thick = 1.6;
35 tower_forehead_angle = 30;
38 //cableclamp_ctie_anchor = 5;
39 lidclamp_cableclamp_ctie_between = 0;
43 protrusion_none_frontback = 10;
44 protrusion_slop = 0.25;
45 cableclamp_ctie_z = tower_frontheight/2;
47 towerleg_backfront = 5;
49 towerleg_foot_gap = 2;
50 towerleg_foot_backfront = 20;
51 towerleg_foot_width = 40;
52 towerleg_foot_height = 10;
53 towerleg_yslope = 0.7;
54 towerleg_xslope = 0.3;
55 echo(sqrt(towerleg_yslope*towerleg_yslope+towerleg_xslope*towerleg_xslope));
62 test_thicks = [9,14,21];
64 module Tests(){ ////toplevel
65 for (thicki=[0:len(test_thicks)-1]) {
66 translate([thicki*test_width-0.5, 0, 0]) {
69 test_thicks[thicki] + led_depth,
71 translate([test_width/2, -1, test_height/2])
73 cylinder(r=led_dia/2, h=led_depth+1, $fn=30);
85 tower_overhang = led_dia * 2.5;
86 tower_width = width_space_inside + tower_wall_thick*2;
88 tower_over_max_y = tower_overhang * sin(tower_over_angle);
89 tower_over_max_z = tower_frontheight + tower_overhang * cos(tower_over_angle);
90 tower_total_max_z = tower_over_max_z + vert_space_inside + led_depth;
91 tower_rearwall_y = -(backfront_space_inside + tower_wall_thick);
92 led_head_y = tower_over_max_y/2;
93 led_head_z = tower_frontheight + tower_overhang*sin(tower_over_angle)/2;
94 backfront_mate_extra = (backfront_mate_size - (-tower_rearwall_y));
96 tower_height_contribution = led_head_z + tower_base_height;
98 base_ctie_anchor_eff = base_ctie_anchor+base_ctie_thick/2;
99 tube_ctie_anchor_eff = tube_ctie_anchor+tube_ctie_thick/2;
101 base_width = 0.7 * crossbar_dia;
102 base_backfront = backfront_mate_extra - tower_rearwall_y;
103 base_height = led_tip_height_above_crossbar - tower_height_contribution;
105 protrusion_frontback = base_backfront - protrusion_none_frontback;
107 echo(tower_height_contribution, base_height);
109 module TowerWallCrossSection(){
110 // generates a 2D shape - a polygon
111 // x is what is going to be -y
112 // y is what is going to be z
114 [0, tower_frontheight],
115 [-tower_over_max_y, tower_over_max_z],
117 + tan(tower_forehead_angle) * (vert_space_inside + led_depth),
119 [-tower_rearwall_y, tower_total_max_z],
120 [-tower_rearwall_y, 0],
121 [-tower_rearwall_y, -tower_base_height],
122 [-backfront_mate_extra, -tower_base_height]],
126 module TowerWallSomeEdge(front){
129 TowerWallCrossSection();
130 translate([front ? 0.10 : -0.10, 0])
131 TowerWallCrossSection();
133 circle(r=tower_wall_thick, $fn=8);
137 module TowerBulkCrossSection(){
139 TowerWallCrossSection();
141 translate([-led_head_y, led_head_z])
142 circle(r = led_depth);
143 TowerWallSomeEdge(true);
144 translate([-50, -50])
150 module TowerRearWallCrossSection(){
152 TowerWallCrossSection();
155 translate([0,-10]) square([100, 10+led_head_z]);
156 TowerWallSomeEdge(false);
158 TowerBulkCrossSection();
164 module TowerCrossSectionDemo(){
165 %TowerWallCrossSection();
166 //TowerBulkCrossSection();
167 TowerRearWallCrossSection();
172 mirror([mir,0,0]) rotate([90,0,-90]) {
173 translate([0,0, tower_width/2-tower_wall_thick])
174 linear_extrude(height=tower_wall_thick) {
175 TowerWallCrossSection();
178 linear_extrude(height=tower_width/2+0.9)
180 TowerBulkCrossSection();
183 TowerWallCrossSection();
184 translate([-30, -30])
185 square([30 + 0.1, 30 + tower_frontheight]);
189 translate([0,0, tower_slot_width/2])
190 linear_extrude(height=(tower_width - tower_slot_width)/2 - 0.2)
191 TowerRearWallCrossSection();
196 translate([0, led_head_y, led_head_z])
197 rotate([90 + led_angle, 0, 0])
199 cylinder(r=led_dia/2, h=led_depth+1+10, $fn=26, $fa=10);
202 module TowerProper(){
206 // passages for cable ties
210 + cableclamp_ctie_width/2 + lidclamp_ctie_thick/2
211 + lidclamp_cableclamp_ctie_between])
212 cube([50, lidclamp_ctie_width, lidclamp_ctie_thick], center=true);
214 (backfront_mate_extra+tower_rearwall_y)/2,
216 + max(protrusion_size + protrusion_slop + 0.1,
217 base_ctie_anchor_eff)])
218 cube([50, base_ctie_width, base_ctie_thick], center=true);
219 // for (extra_y=[0, -(cableclamp_ctie_thick + cableclamp_ctie_anchor)]) {
220 // translate([-tower_width/2,
221 // -cableclamp_ctie_thick/2 - tower_wall_thick + extra_y,
222 // cableclamp_ctie_z])
223 // cube([tower_wall_thick+2,
224 // cableclamp_ctie_thick,
225 // cableclamp_ctie_width], center=true);
229 translate([tower_width/4, 20, cableclamp_ctie_z])
230 cube([cableclamp_ctie_thick,
231 tower_wall_thick*2+1+40,
232 cableclamp_ctie_width],
235 translate([0, tower_rearwall_y, -tower_base_height])
236 BaseRegistrationProtrusion(protrusion_slop);
240 module Tower(){ ////toplevel
245 tower_rearwall_y + 0.1,
248 multmatrix([[1,0, towerleg_xslope,0],
249 [0,1,-towerleg_yslope,0],
252 cube([towerleg_width, towerleg_backfront, tower_base_height-2]);
255 translate([-towerleg_foot_width/2,
256 tower_rearwall_y - towerleg_foot_gap,
259 cube([towerleg_foot_width, towerleg_foot_backfront, towerleg_foot_height]);
262 module TowerMainHull(){
263 hull(){ TowerMain(); }
271 sphere(r=lid_wall_thick+lid_slop, $fn=8);
275 sphere(r=lid_slop, $fn=6);
278 translate([-50,-50,led_head_z]) cube([100,100,100]);
282 module LidT(){ ////toplevel
283 rotate([180,0,0]) Lid();
286 module BaseRegistrationProtrusion(extra){
287 size = protrusion_size + extra;
288 translate([0, base_backfront/2, 0]){
290 translate([0,0, -0.5])
291 cube([protrusion_size*2, protrusion_frontback, 1.0], center=true);
292 translate([0, 0, protrusion_size-0.5])
293 cube([0.05, protrusion_frontback-protrusion_size*2, 1.0], center=true);
302 translate([-tower_width/2, 0, 0])
303 cube([tower_width, base_backfront, 0.1]);
304 translate([-base_width/2, 0, base_height])
305 cube([base_width, base_backfront, crossbar_dia/2]);
308 translate([0, base_backfront/2, -base_ctie_anchor_eff])
309 cube([100, base_ctie_width, base_ctie_thick], center=true);
310 translate([0, base_backfront/2, -base_height + tube_ctie_anchor_eff])
311 cube([100, tube_ctie_width, tube_ctie_thick], center=true);
312 translate([0, -1, -(base_height + crossbar_dia/2)])
314 cylinder(r=crossbar_dia/2, h=101);
316 BaseRegistrationProtrusion(0.0);
319 module BaseT(){ ////toplevel
320 rotate([90,0,0]) Base();
326 translate([0,0, 25]) Lid();
327 translate([0, tower_rearwall_y, -(tower_base_height+5)]) Base();
330 //TowerCrossSectionDemo();
331 //TowerWallSomeEdge(false);
332 //TowerWallFrontEdge();
337 //BaseRegistrationProtrusion();