chiark / gitweb /
crossbar-computer-led-mount: adjust tower wall cross section
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 8 Jun 2013 23:01:51 +0000 (00:01 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 8 Jun 2013 23:01:51 +0000 (00:01 +0100)
crossbar-computer-led-mount.scad

index 9aac317..45f1f2d 100644 (file)
@@ -9,13 +9,15 @@ led_angle = -60;
 vert_space_inside = 8;
 backfront_space_inside = 12;
 
-backfront_mate_size = 20;
+backfront_mate_size = 25;
+tower_frontheight = 20;
 
 // tuning
 
 tower_over_angle = 45;
 tower_wall_thick = 1.6;
-tower_base_height = 5;
+tower_base_height = 10;
+tower_forehead_angle = 30;
 
 //--- tests ---
 
@@ -43,15 +45,14 @@ module Tests(){ ////toplevel
 
 //--- real thing ---
 
-tower_frontheight = 30; //fixme
-tower_overhang = led_dia * 4;
+tower_overhang = led_dia * 2.5;
 
 tower_over_max_y = tower_overhang * sin(tower_over_angle);
 tower_over_max_z = tower_frontheight + tower_overhang * cos(tower_over_angle);
 tower_total_max_z = tower_over_max_z + vert_space_inside + led_depth;
 tower_rearwall_y = -(backfront_space_inside + tower_wall_thick);
 
-backfront_mate_extra = (backfront_mate_size - (-tower_rearwall_y))/2;
+backfront_mate_extra = (backfront_mate_size - (-tower_rearwall_y));
 
 module TowerWallCrossSection(){
   // generates a 2D shape - a polygon
@@ -60,11 +61,13 @@ module TowerWallCrossSection(){
   polygon([[0,                  0],
           [0,                  tower_frontheight],
           [-tower_over_max_y,  tower_over_max_z],
-          [-tower_over_max_y,  tower_total_max_z],
+          [-tower_over_max_y
+           + tan(tower_forehead_angle) * (vert_space_inside + led_depth),
+           tower_total_max_z],
           [-tower_rearwall_y,  tower_total_max_z],
           [-tower_rearwall_y,  0],
-          [-tower_rearwall_y+backfront_mate_extra, -tower_base_height],
-          [                 -backfront_mate_extra, -tower_base_height]]);
+          [-tower_rearwall_y, -tower_base_height],
+          [-backfront_mate_extra, -tower_base_height]]);
 }
 
 module TowerBulkCrossSection(){