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 = 15;
16 tower_base_height = 15;
19 cableclamp_ctie_width = 3 + 0.5;
20 cableclamp_ctie_thick = 2 + 0.5;
22 lidclamp_ctie_width = 4.0 + 0.5;
23 lidclamp_ctie_thick = 2.5 + 0.5;
25 base_ctie_width = 4.0 + 0.5;
26 base_ctie_thick = 2.5 + 0.5;
28 tube_ctie_width = 5 + 0.5;
29 tube_ctie_thick = 3 + 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.5;
45 cableclamp_ctie_z = tower_frontheight/2;
52 test_thicks = [9,14,21];
54 module Tests(){ ////toplevel
55 for (thicki=[0:len(test_thicks)-1]) {
56 translate([thicki*test_width-0.5, 0, 0]) {
59 test_thicks[thicki] + led_depth,
61 translate([test_width/2, -1, test_height/2])
63 cylinder(r=led_dia/2, h=led_depth+1, $fn=30);
75 tower_overhang = led_dia * 2.5;
76 tower_width = width_space_inside + tower_wall_thick*2;
78 tower_over_max_y = tower_overhang * sin(tower_over_angle);
79 tower_over_max_z = tower_frontheight + tower_overhang * cos(tower_over_angle);
80 tower_total_max_z = tower_over_max_z + vert_space_inside + led_depth;
81 tower_rearwall_y = -(backfront_space_inside + tower_wall_thick);
82 led_head_y = tower_over_max_y/2;
83 led_head_z = tower_frontheight + tower_overhang*sin(tower_over_angle)/2;
84 backfront_mate_extra = (backfront_mate_size - (-tower_rearwall_y));
86 tower_height_contribution = led_head_z + tower_base_height;
88 base_ctie_anchor_eff = base_ctie_anchor+base_ctie_thick/2;
89 tube_ctie_anchor_eff = tube_ctie_anchor+tube_ctie_thick/2;
91 base_width = 0.7 * crossbar_dia;
92 base_backfront = backfront_mate_extra - tower_rearwall_y;
93 base_height = led_tip_height_above_crossbar - tower_height_contribution;
95 protrusion_frontback = base_backfront - protrusion_none_frontback;
97 echo(tower_height_contribution, base_height);
99 module TowerWallCrossSection(){
100 // generates a 2D shape - a polygon
101 // x is what is going to be -y
102 // y is what is going to be z
104 [0, tower_frontheight],
105 [-tower_over_max_y, tower_over_max_z],
107 + tan(tower_forehead_angle) * (vert_space_inside + led_depth),
109 [-tower_rearwall_y, tower_total_max_z],
110 [-tower_rearwall_y, 0],
111 [-tower_rearwall_y, -tower_base_height],
112 [-backfront_mate_extra, -tower_base_height]],
116 module TowerWallSomeEdge(front){
119 TowerWallCrossSection();
120 translate([front ? 0.10 : -0.10, 0])
121 TowerWallCrossSection();
123 circle(r=tower_wall_thick, $fn=8);
127 module TowerBulkCrossSection(){
129 TowerWallCrossSection();
131 translate([-led_head_y, led_head_z])
132 circle(r = led_depth);
133 TowerWallSomeEdge(true);
134 translate([-50, -50])
140 module TowerRearWallCrossSection(){
142 TowerWallCrossSection();
145 translate([0,-10]) square([100, 10+led_head_z]);
146 TowerWallSomeEdge(false);
148 TowerBulkCrossSection();
154 module TowerCrossSectionDemo(){
155 %TowerWallCrossSection();
156 //TowerBulkCrossSection();
157 TowerRearWallCrossSection();
162 mirror([mir,0,0]) rotate([90,0,-90]) {
163 translate([0,0, tower_width/2-tower_wall_thick])
164 linear_extrude(height=tower_wall_thick) {
165 TowerWallCrossSection();
168 linear_extrude(height=tower_width/2+0.9)
170 TowerBulkCrossSection();
173 TowerWallCrossSection();
174 translate([-30, -30])
175 square([30 + 0.1, 30 + tower_frontheight]);
179 translate([0,0, tower_slot_width/2])
180 linear_extrude(height=(tower_width - tower_slot_width)/2 - 0.2)
181 TowerRearWallCrossSection();
186 translate([0, led_head_y, led_head_z])
187 rotate([90 + led_angle])
189 cylinder(r=led_dia/2, h=led_depth+0.1+10, $fn=30);
192 module Tower(){ ////toplevel
196 // passages for cable ties
200 + cableclamp_ctie_width/2 + lidclamp_ctie_thick/2
201 + lidclamp_cableclamp_ctie_between])
202 cube([50, lidclamp_ctie_width, lidclamp_ctie_thick], center=true);
204 (backfront_mate_extra+tower_rearwall_y)/2,
206 + max(protrusion_size + protrusion_slop + 0.1,
207 base_ctie_anchor_eff)])
208 cube([50, base_ctie_width, base_ctie_thick], center=true);
209 // for (extra_y=[0, -(cableclamp_ctie_thick + cableclamp_ctie_anchor)]) {
210 // translate([-tower_width/2,
211 // -cableclamp_ctie_thick/2 - tower_wall_thick + extra_y,
212 // cableclamp_ctie_z])
213 // cube([tower_wall_thick+2,
214 // cableclamp_ctie_thick,
215 // cableclamp_ctie_width], center=true);
219 translate([tower_width/4, 20, cableclamp_ctie_z])
220 cube([cableclamp_ctie_thick,
221 tower_wall_thick*2+1+40,
222 cableclamp_ctie_width],
225 translate([0, tower_rearwall_y, -tower_base_height])
226 BaseRegistrationProtrusion(protrusion_slop);
230 module TowerMainHull(){
231 hull(){ TowerMain(); }
239 sphere(r=lid_wall_thick+lid_slop, $fn=4);
243 sphere(r=lid_slop, $fn=4);
246 translate([-50,-50,led_head_z]) cube([100,100,100]);
250 module LidT(){ ////toplevel
251 rotate([180,0,0]) Lid();
254 module BaseRegistrationProtrusion(extra){
255 size = protrusion_size + extra;
256 translate([0, base_backfront/2, 0]){
258 translate([0,0, -0.5])
259 cube([protrusion_size*2, protrusion_frontback, 1.0], center=true);
260 translate([0, 0, protrusion_size-0.5])
261 cube([0.05, protrusion_frontback-protrusion_size*2, 1.0], center=true);
266 module Base(){ ////toplevel
270 translate([-tower_width/2, 0, 0])
271 cube([tower_width, base_backfront, 0.1]);
272 translate([-base_width/2, 0, base_height])
273 cube([base_width, base_backfront, crossbar_dia/2]);
276 translate([-50, base_backfront/2, -base_ctie_anchor_eff])
277 cube([100, base_ctie_width, base_ctie_thick], center=true);
278 translate([-50, base_backfront/2, -base_height + tube_ctie_anchor_eff])
279 cube([100, tube_ctie_width, tube_ctie_thick], center=true);
280 translate([0, -1, -(base_height + crossbar_dia/2)])
282 cylinder(r=crossbar_dia/2, h=101);
284 BaseRegistrationProtrusion(0.0);
287 module BaseT(){ ////toplevel
288 rotate([90,0,0]) Base();
294 translate([0,0, 25]) Lid();
295 translate([0, tower_rearwall_y, -(tower_base_height+5)]) Base();
298 //TowerCrossSectionDemo();
299 //TowerWallSomeEdge(false);
300 //TowerWallFrontEdge();
305 //BaseRegistrationProtrusion();