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;
38 lidclamp_cableclamp_ctie_between = 0;
42 protrusion_none_frontback = 10;
43 protrusion_slop = 0.5;
44 cableclamp_ctie_z = tower_frontheight/2;
51 test_thicks = [9,14,21];
53 module Tests(){ ////toplevel
54 for (thicki=[0:len(test_thicks)-1]) {
55 translate([thicki*test_width-0.5, 0, 0]) {
58 test_thicks[thicki] + led_depth,
60 translate([test_width/2, -1, test_height/2])
62 cylinder(r=led_dia/2, h=led_depth+1, $fn=30);
74 tower_overhang = led_dia * 2.5;
75 tower_width = width_space_inside + tower_wall_thick*2;
77 tower_over_max_y = tower_overhang * sin(tower_over_angle);
78 tower_over_max_z = tower_frontheight + tower_overhang * cos(tower_over_angle);
79 tower_total_max_z = tower_over_max_z + vert_space_inside + led_depth;
80 tower_rearwall_y = -(backfront_space_inside + tower_wall_thick);
81 led_head_y = tower_over_max_y/2;
82 led_head_z = tower_frontheight + tower_overhang*sin(tower_over_angle)/2;
83 backfront_mate_extra = (backfront_mate_size - (-tower_rearwall_y));
85 tower_height_contribution = led_head_z + tower_base_height;
87 base_ctie_anchor_eff = base_ctie_anchor+base_ctie_thick/2;
88 tube_ctie_anchor_eff = tube_ctie_anchor+tube_ctie_thick/2;
90 base_width = 0.7 * crossbar_dia;
91 base_backfront = backfront_mate_extra - tower_rearwall_y;
92 base_height = led_tip_height_above_crossbar - tower_height_contribution;
94 protrusion_frontback = base_backfront - protrusion_none_frontback;
96 echo(tower_height_contribution, base_height);
98 module TowerWallCrossSection(){
99 // generates a 2D shape - a polygon
100 // x is what is going to be -y
101 // y is what is going to be z
103 [0, tower_frontheight],
104 [-tower_over_max_y, tower_over_max_z],
106 + tan(tower_forehead_angle) * (vert_space_inside + led_depth),
108 [-tower_rearwall_y, tower_total_max_z],
109 [-tower_rearwall_y, 0],
110 [-tower_rearwall_y, -tower_base_height],
111 [-backfront_mate_extra, -tower_base_height]],
115 module TowerWallSomeEdge(front){
118 TowerWallCrossSection();
119 translate([front ? 0.10 : -0.10, 0])
120 TowerWallCrossSection();
122 circle(r=tower_wall_thick, $fn=8);
126 module TowerBulkCrossSection(){
128 TowerWallCrossSection();
130 translate([-led_head_y, led_head_z])
131 circle(r = led_depth);
132 TowerWallSomeEdge(true);
133 translate([-50, -50])
139 module TowerRearWallCrossSection(){
141 TowerWallCrossSection();
144 translate([0,-10]) square([100, 10+led_head_z]);
145 TowerWallSomeEdge(false);
147 TowerBulkCrossSection();
153 module TowerCrossSectionDemo(){
154 %TowerWallCrossSection();
155 //TowerBulkCrossSection();
156 TowerRearWallCrossSection();
161 mirror([mir,0,0]) rotate([90,0,-90]) {
162 translate([0,0, tower_width/2-tower_wall_thick])
163 linear_extrude(height=tower_wall_thick) {
164 TowerWallCrossSection();
167 linear_extrude(height=tower_width/2+0.9)
169 TowerBulkCrossSection();
172 TowerWallCrossSection();
173 translate([-30, -30])
174 square([30 + 0.1, 30 + tower_frontheight]);
178 translate([0,0, tower_slot_width/2])
179 linear_extrude(height=(tower_width - tower_slot_width)/2 - 0.2)
180 TowerRearWallCrossSection();
185 translate([0, led_head_y, led_head_z])
186 rotate([90 + led_angle])
188 cylinder(r=led_dia/2, h=led_depth+0.1+10, $fn=30);
191 module Tower(){ ////toplevel
195 // passages for cable ties
199 + cableclamp_ctie_width/2 + lidclamp_ctie_thick/2
200 + lidclamp_cableclamp_ctie_between])
201 cube([50, lidclamp_ctie_width, lidclamp_ctie_thick], center=true);
203 (backfront_mate_extra+tower_rearwall_y)/2,
205 + max(protrusion_size + protrusion_slop + 0.1,
206 base_ctie_anchor_eff)])
207 cube([50, base_ctie_width, base_ctie_thick], center=true);
210 translate([tower_width/4, 20, cableclamp_ctie_z])
211 cube([cableclamp_ctie_thick,
212 tower_wall_thick*2+1+40,
213 cableclamp_ctie_width],
216 translate([0, tower_rearwall_y, -tower_base_height])
217 BaseRegistrationProtrusion(protrusion_slop);
221 module TowerMainHull(){
222 hull(){ TowerMain(); }
230 sphere(r=lid_wall_thick+lid_slop, $fn=4);
234 sphere(r=lid_slop, $fn=4);
237 translate([-50,-50,led_head_z]) cube([100,100,100]);
241 module LidT(){ ////toplevel
242 rotate([180,0,0]) Lid();
245 module BaseRegistrationProtrusion(extra){
246 size = protrusion_size + extra;
247 translate([0, base_backfront/2, 0]){
249 translate([0,0, -0.5])
250 cube([protrusion_size*2, protrusion_frontback, 1.0], center=true);
251 translate([0, 0, protrusion_size-0.5])
252 cube([0.05, protrusion_frontback-protrusion_size*2, 1.0], center=true);
257 module Base(){ ////toplevel
261 translate([-tower_width/2, 0, 0])
262 cube([tower_width, base_backfront, 0.1]);
263 translate([-base_width/2, 0, base_height])
264 cube([base_width, base_backfront, crossbar_dia/2]);
267 translate([-50, base_backfront/2, -base_ctie_anchor_eff])
268 cube([100, base_ctie_width, base_ctie_thick], center=true);
269 translate([-50, base_backfront/2, -base_height + tube_ctie_anchor_eff])
270 cube([100, tube_ctie_width, tube_ctie_thick], center=true);
271 translate([0, -1, -(base_height + crossbar_dia/2)])
273 cylinder(r=crossbar_dia/2, h=101);
275 BaseRegistrationProtrusion(0.0);
278 module BaseT(){ ////toplevel
279 rotate([90,0,0]) Base();
284 translate([0,0, 25]) Lid();
285 translate([0, tower_rearwall_y, -(tower_base_height+5)]) Base();
288 //TowerCrossSectionDemo();
289 //TowerWallSomeEdge(false);
290 //TowerWallFrontEdge();
295 //BaseRegistrationProtrusion();