chiark / gitweb /
crossbar-computer-led-mount: wip tower
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 8 Jun 2013 19:38:37 +0000 (20:38 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sat, 8 Jun 2013 19:38:37 +0000 (20:38 +0100)
crossbar-computer-led-mount.scad

index 6b2117a..302d517 100644 (file)
@@ -1,7 +1,21 @@
 // -*- C -*-
 
 led_dia = 5 + 0.6;
-led_depth = 5;
+led_depth = 3.5;
+
+led_tip_z = 70;
+led_angle = -60;
+
+vert_space_inside = 8;
+backfront_space_inside = 12;
+
+backfront_mate_size = 20;
+
+// tuning
+
+tower_over_angle = 45;
+tower_wall_thick = 1.6;
+tower_base_height = 5;
 
 //--- tests ---
 
@@ -29,3 +43,28 @@ module Tests(){ ////toplevel
 
 //--- real thing ---
 
+tower_frontheight = 30; //fixme
+tower_overhang = led_dia * 4;
+
+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;
+
+module TowerWallCrossSection(){
+  // generates a 2D shape - a polygon
+  // x is what is going to be -y
+  // y is what is going to be z
+  polygon([[0,                  0],
+          [0,                  tower_frontheight],
+          [-tower_over_max_y,  tower_over_max_z],
+          [-tower_over_max_y,  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]]);
+}
+
+TowerWallCrossSection();