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 = 20;
18 cableclamp_ctie_width = 3 + 0.5;
19 cableclamp_ctie_thick = 2 + 0.5;
21 lidclamp_ctie_width = 4.0 + 0.5;
22 lidclamp_ctie_thick = 2.5 + 0.5;
24 base_ctie_width = 4.0 + 0.5;
25 base_ctie_thick = 2.5 + 0.5;
27 tube_ctie_width = 5 + 0.5;
28 tube_ctie_thick = 3 + 0.5;
32 tower_over_angle = 45;
33 tower_wall_thick = 1.6;
34 tower_base_height = 10;
35 tower_forehead_angle = 30;
46 test_thicks = [9,14,21];
48 module Tests(){ ////toplevel
49 for (thicki=[0:len(test_thicks)-1]) {
50 translate([thicki*test_width-0.5, 0, 0]) {
53 test_thicks[thicki] + led_depth,
55 translate([test_width/2, -1, test_height/2])
57 cylinder(r=led_dia/2, h=led_depth+1, $fn=30);
69 tower_overhang = led_dia * 2.5;
70 tower_width = width_space_inside + tower_wall_thick*2;
72 tower_over_max_y = tower_overhang * sin(tower_over_angle);
73 tower_over_max_z = tower_frontheight + tower_overhang * cos(tower_over_angle);
74 tower_total_max_z = tower_over_max_z + vert_space_inside + led_depth;
75 tower_rearwall_y = -(backfront_space_inside + tower_wall_thick);
76 led_head_y = tower_over_max_y/2;
77 led_head_z = tower_frontheight + tower_overhang*sin(tower_over_angle)/2;
78 backfront_mate_extra = (backfront_mate_size - (-tower_rearwall_y));
80 tower_height_contribution = led_head_z + tower_base_height;
82 base_ctie_anchor_eff = base_ctie_anchor+base_ctie_thick/2;
83 tube_ctie_anchor_eff = tube_ctie_anchor+tube_ctie_thick/2;
85 base_width = 0.7 * crossbar_dia;
86 base_backfront = backfront_mate_extra - tower_rearwall_y;
87 base_height = led_tip_height_above_crossbar - tower_height_contribution;
89 echo(tower_height_contribution, base_height);
91 module TowerWallCrossSection(){
92 // generates a 2D shape - a polygon
93 // x is what is going to be -y
94 // y is what is going to be z
96 [0, tower_frontheight],
97 [-tower_over_max_y, tower_over_max_z],
99 + tan(tower_forehead_angle) * (vert_space_inside + led_depth),
101 [-tower_rearwall_y, tower_total_max_z],
102 [-tower_rearwall_y, 0],
103 [-tower_rearwall_y, -tower_base_height],
104 [-backfront_mate_extra, -tower_base_height]],
108 module TowerWallSomeEdge(front){
111 TowerWallCrossSection();
112 translate([front ? 0.10 : -0.10, 0])
113 TowerWallCrossSection();
115 circle(r=tower_wall_thick, $fn=8);
119 module TowerBulkCrossSection(){
121 TowerWallCrossSection();
123 translate([-led_head_y, led_head_z])
124 circle(r = led_depth);
125 TowerWallSomeEdge(true);
126 translate([-50, -50])
132 module TowerRearWallCrossSection(){
134 TowerWallCrossSection();
137 translate([0,-10]) square([100, 10+led_head_z]);
138 TowerWallSomeEdge(false);
140 TowerBulkCrossSection();
146 module TowerCrossSectionDemo(){
147 %TowerWallCrossSection();
148 //TowerBulkCrossSection();
149 TowerRearWallCrossSection();
154 mirror([mir,0,0]) rotate([90,0,-90]) {
155 translate([0,0, tower_width/2-tower_wall_thick])
156 linear_extrude(height=tower_wall_thick) {
157 TowerWallCrossSection();
160 linear_extrude(height=tower_width/2+0.9)
162 TowerBulkCrossSection();
165 TowerWallCrossSection();
166 translate([-30, -30])
167 square([30 + 0.1, 30 + tower_frontheight]);
171 translate([0,0, tower_slot_width/2])
172 linear_extrude(height=(tower_width - tower_slot_width)/2 - 0.2)
173 TowerRearWallCrossSection();
178 translate([0, led_head_y, led_head_z])
179 rotate([90 + led_angle])
181 cylinder(r=led_dia/2, h=led_depth+0.1+10, $fn=30);
184 module Tower(){ ////toplevel
188 // passages for cable ties
192 + cableclamp_ctie_width/2 + lidclamp_ctie_thick/2])
193 cube([50, lidclamp_ctie_width, lidclamp_ctie_thick], center=true);
195 (backfront_mate_extra+tower_rearwall_y)/2,
196 -tower_base_height/2])
197 cube([50, base_ctie_width, base_ctie_thick], center=true);
200 translate([tower_width/4, 20, tower_frontheight/2])
201 cube([cableclamp_ctie_thick,
202 tower_wall_thick*2+1+40,
203 cableclamp_ctie_width],
209 module TowerMainHull(){
210 hull(){ TowerMain(); }
218 sphere(r=lid_wall_thick+lid_slop, $fn=4);
222 sphere(r=lid_slop, $fn=4);
225 translate([-50,-50,led_head_z]) cube([100,100,100]);
229 module LidT(){ ////toplevel
230 rotate([180,0,0]) Lid();
233 module Base(){ ////toplevel
237 translate([-tower_width/2, 0, 0])
238 cube([tower_width, base_backfront, 0.1]);
239 translate([-base_width/2, 0, base_height])
240 cube([base_width, base_backfront, crossbar_dia/2]);
243 translate([-50, base_backfront/2, -base_ctie_anchor_eff])
244 cube([100, base_ctie_width, base_ctie_thick], center=true);
245 translate([-50, base_backfront/2, -base_height + tube_ctie_anchor_eff])
246 cube([100, tube_ctie_width, tube_ctie_thick], center=true);
247 translate([0, -1, -(base_height + crossbar_dia/2)])
249 cylinder(r=crossbar_dia/2, h=101);
253 module BaseT(){ ////toplevel
254 rotate([90,0,0]) Base();
259 translate([0,0, 25]) Lid();
260 translate([0, tower_rearwall_y, -(tower_base_height+5)]) Base();
263 //TowerCrossSectionDemo();
264 //TowerWallSomeEdge(false);
265 //TowerWallFrontEdge();