10 backfront_space_inside = 12;
12 backfront_mate_size = 25;
13 tower_frontheight = 20;
17 cableclamp_ctie_width = 3 + 0.5;
18 cableclamp_ctie_thick = 2 + 0.5;
20 lidclamp_ctie_width = 3 + 0.5;
21 lidclamp_ctie_thick = 2 + 0.5;
23 base_ctie_width = 4 + 0.5;
24 base_ctie_thick = 2 + 0.5;
28 tower_over_angle = 45;
29 tower_wall_thick = 1.6;
30 tower_base_height = 10;
31 tower_forehead_angle = 30;
40 test_thicks = [9,14,21];
42 module Tests(){ ////toplevel
43 for (thicki=[0:len(test_thicks)-1]) {
44 translate([thicki*test_width-0.5, 0, 0]) {
47 test_thicks[thicki] + led_depth,
49 translate([test_width/2, -1, test_height/2])
51 cylinder(r=led_dia/2, h=led_depth+1, $fn=30);
61 tower_overhang = led_dia * 2.5;
63 tower_over_max_y = tower_overhang * sin(tower_over_angle);
64 tower_over_max_z = tower_frontheight + tower_overhang * cos(tower_over_angle);
65 tower_total_max_z = tower_over_max_z + vert_space_inside + led_depth;
66 tower_rearwall_y = -(backfront_space_inside + tower_wall_thick);
67 led_head_y = tower_over_max_y/2;
68 led_head_z = tower_frontheight + tower_overhang*sin(tower_over_angle)/2;
69 backfront_mate_extra = (backfront_mate_size - (-tower_rearwall_y));
71 module TowerWallCrossSection(){
72 // generates a 2D shape - a polygon
73 // x is what is going to be -y
74 // y is what is going to be z
76 [0, tower_frontheight],
77 [-tower_over_max_y, tower_over_max_z],
79 + tan(tower_forehead_angle) * (vert_space_inside + led_depth),
81 [-tower_rearwall_y, tower_total_max_z],
82 [-tower_rearwall_y, 0],
83 [-tower_rearwall_y, -tower_base_height],
84 [-backfront_mate_extra, -tower_base_height]],
88 module TowerWallSomeEdge(front){
91 TowerWallCrossSection();
92 translate([front ? 0.10 : -0.10, 0])
93 TowerWallCrossSection();
95 circle(r=tower_wall_thick, $fn=8);
99 module TowerBulkCrossSection(){
101 TowerWallCrossSection();
103 translate([-led_head_y, led_head_z])
104 circle(r = led_depth);
105 TowerWallSomeEdge(true);
106 translate([-50, -50])
112 module TowerRearWallCrossSection(){
114 TowerWallCrossSection();
117 translate([0,-10]) square([100, 10+led_head_z]);
118 TowerWallSomeEdge(false);
120 TowerBulkCrossSection();
126 module TowerCrossSectionDemo(){
127 %TowerWallCrossSection();
128 //TowerBulkCrossSection();
129 TowerRearWallCrossSection();
134 mirror([mir,0,0]) rotate([90,0,-90]) {
135 translate([0,0, tower_width/2-tower_wall_thick])
136 linear_extrude(height=tower_wall_thick) {
137 TowerWallCrossSection();
140 linear_extrude(height=tower_width/2+0.9)
142 TowerBulkCrossSection();
145 TowerWallCrossSection();
146 translate([-30, -30])
147 square([30 + 0.1, 30 + tower_frontheight]);
151 translate([0,0, tower_slot_width/2])
152 linear_extrude(height=(tower_width - tower_slot_width)/2 - 0.2)
153 TowerRearWallCrossSection();
158 translate([0, led_head_y, led_head_z])
159 rotate([90 + led_angle])
161 cylinder(r=led_dia/2, h=led_depth+0.1+10, $fn=30);
164 module Tower(){ ////toplevel
168 // passages for cable ties
172 + cableclamp_ctie_width/2 + lidclamp_ctie_thick/2])
173 cube([50, lidclamp_ctie_width, lidclamp_ctie_thick], center=true);
175 (backfront_mate_extra+tower_rearwall_y)/2,
176 -tower_base_height/2])
177 cube([50, base_ctie_width, base_ctie_thick], center=true);
180 translate([tower_width/4, 20, tower_frontheight/2])
181 cube([cableclamp_ctie_thick,
182 tower_wall_thick*2+1+40,
183 cableclamp_ctie_width],
189 module TowerMainHull(){
190 hull(){ TowerMain(); }
198 sphere(r=lid_wall_thick+lid_slop, $fn=4);
202 sphere(r=lid_slop, $fn=4);
205 translate([-50,-50,led_head_z]) cube([100,100,100]);
209 module LidT(){ ////toplevel
210 rotate([180,0,0]) Lid();
215 translate([0,0, 25]) Lid();
218 //TowerCrossSectionDemo();
219 //TowerWallSomeEdge(false);
220 //TowerWallFrontEdge();