10 backfront_space_inside = 12;
12 backfront_mate_size = 25;
13 tower_frontheight = 20;
19 tower_over_angle = 45;
20 tower_wall_thick = 1.6;
21 tower_base_height = 10;
22 tower_forehead_angle = 30;
29 test_thicks = [9,14,21];
31 module Tests(){ ////toplevel
32 for (thicki=[0:len(test_thicks)-1]) {
33 translate([thicki*test_width-0.5, 0, 0]) {
36 test_thicks[thicki] + led_depth,
38 translate([test_width/2, -1, test_height/2])
40 cylinder(r=led_dia/2, h=led_depth+1, $fn=30);
50 tower_overhang = led_dia * 2.5;
52 tower_over_max_y = tower_overhang * sin(tower_over_angle);
53 tower_over_max_z = tower_frontheight + tower_overhang * cos(tower_over_angle);
54 tower_total_max_z = tower_over_max_z + vert_space_inside + led_depth;
55 tower_rearwall_y = -(backfront_space_inside + tower_wall_thick);
57 backfront_mate_extra = (backfront_mate_size - (-tower_rearwall_y));
59 module TowerWallCrossSection(){
60 // generates a 2D shape - a polygon
61 // x is what is going to be -y
62 // y is what is going to be z
64 [0, tower_frontheight],
65 [-tower_over_max_y, tower_over_max_z],
67 + tan(tower_forehead_angle) * (vert_space_inside + led_depth),
69 [-tower_rearwall_y, tower_total_max_z],
70 [-tower_rearwall_y, 0],
71 [-tower_rearwall_y, -tower_base_height],
72 [-backfront_mate_extra, -tower_base_height]]);
75 module TowerWallSomeEdge(front){
78 TowerWallCrossSection();
79 translate([front ? 0.10 : -0.10, 0])
80 TowerWallCrossSection();
82 circle(r=tower_wall_thick, $fn=8);
86 module TowerBulkCrossSection(){
88 TowerWallCrossSection();
90 translate([-tower_over_max_y/2,
91 tower_frontheight + tower_overhang*sin(tower_over_angle)/2])
92 circle(r = led_depth);
93 TowerWallSomeEdge(true);
100 module TowerRearWallCrossSection(){
102 TowerWallCrossSection();
105 translate([0,-10]) square([100, 10+tower_frontheight]);
106 TowerWallSomeEdge(false);
108 TowerBulkCrossSection();
114 module TowerCrossSectionDemo(){
115 %TowerWallCrossSection();
116 //TowerBulkCrossSection();
117 TowerRearWallCrossSection();
122 mirror([mir,0,0]) rotate([90,0,-90]) {
123 translate([0,0, tower_width/2-tower_wall_thick])
124 linear_extrude(height=tower_wall_thick)
125 TowerWallCrossSection();
127 linear_extrude(height=tower_width/2+0.9)
128 TowerBulkCrossSection();
129 translate([0,0, tower_slot_width/2])
130 linear_extrude(height=(tower_width - tower_slot_width)/2 - 0.2)
131 TowerRearWallCrossSection();
141 //TowerCrossSectionDemo();
142 //TowerWallSomeEdge(false);
143 //TowerWallFrontEdge();