chiark / gitweb /
crossbar-computer-led-mount: move tower_base_height into main params section, nfc
[reprap-play.git] / crossbar-computer-led-mount.scad
index 4bc474a38aaed7b2bd82fe25b3866e30c7217432..0a8bff3de50b77aeafd464f1705fbbe4a01c918e 100644 (file)
@@ -13,6 +13,7 @@ width_space_inside = 10;
 
 backfront_mate_size = 25;
 tower_frontheight = 20;
+tower_base_height = 10;
 tower_slot_width = 3;
 
 cableclamp_ctie_width = 3 + 0.5;
@@ -31,12 +32,17 @@ tube_ctie_thick = 3 + 0.5;
 
 tower_over_angle = 45;
 tower_wall_thick = 1.6;
-tower_base_height = 10;
 tower_forehead_angle = 30;
 lid_wall_thick = 1.6;
 lid_slop = 0.75;
+//cableclamp_ctie_anchor = 5;
+lidclamp_cableclamp_ctie_between = 0;
 base_ctie_anchor = 5;
 tube_ctie_anchor = 5;
+protrusion_size = 2;
+protrusion_none_frontback = 10;
+protrusion_slop = 0.5;
+cableclamp_ctie_z = tower_frontheight/2;
 
 //--- tests ---
 
@@ -86,6 +92,8 @@ base_width = 0.7 * crossbar_dia;
 base_backfront = backfront_mate_extra - tower_rearwall_y;
 base_height = led_tip_height_above_crossbar - tower_height_contribution;
 
+protrusion_frontback = base_backfront - protrusion_none_frontback;
+
 echo(tower_height_contribution, base_height);
 
 module TowerWallCrossSection(){
@@ -188,21 +196,34 @@ module Tower(){ ////toplevel
     // passages for cable ties
     translate([0,
               tower_rearwall_y/2,
-              tower_frontheight/2
-              + cableclamp_ctie_width/2 + lidclamp_ctie_thick/2])
+              cableclamp_ctie_z
+              + cableclamp_ctie_width/2 + lidclamp_ctie_thick/2
+              + lidclamp_cableclamp_ctie_between])
       cube([50, lidclamp_ctie_width, lidclamp_ctie_thick], center=true);
     translate([0,
                (backfront_mate_extra+tower_rearwall_y)/2,
-               -tower_base_height/2])
+               -tower_base_height
+              + max(protrusion_size + protrusion_slop + 0.1,
+                    base_ctie_anchor_eff)])
       cube([50, base_ctie_width, base_ctie_thick], center=true);
+//    for (extra_y=[0, -(cableclamp_ctie_thick + cableclamp_ctie_anchor)]) {
+//      translate([-tower_width/2,
+//              -cableclamp_ctie_thick/2 - tower_wall_thick + extra_y,
+//              cableclamp_ctie_z])
+//     cube([tower_wall_thick+2,
+//           cableclamp_ctie_thick,
+//           cableclamp_ctie_width], center=true);
+//    }
     for (mir=[0,1])
-      mirror([mir,0,0]) {
-       translate([tower_width/4, 20, tower_frontheight/2])
+     mirror([mir,0,0]) {
+       translate([tower_width/4, 20, cableclamp_ctie_z])
          cube([cableclamp_ctie_thick,
                tower_wall_thick*2+1+40,
                cableclamp_ctie_width],
               center=true);
       }
+    translate([0, tower_rearwall_y, -tower_base_height])
+      BaseRegistrationProtrusion(protrusion_slop);
   }
 }
 
@@ -230,6 +251,18 @@ module LidT(){ ////toplevel
   rotate([180,0,0]) Lid();
 }
 
+module BaseRegistrationProtrusion(extra){
+  size = protrusion_size + extra;
+  translate([0, base_backfront/2, 0]){
+    hull(){
+      translate([0,0, -0.5])
+       cube([protrusion_size*2, protrusion_frontback, 1.0], center=true);
+      translate([0, 0, protrusion_size-0.5])
+       cube([0.05, protrusion_frontback-protrusion_size*2, 1.0], center=true);
+    }
+  }
+}
+
 module Base(){ ////toplevel
   difference(){
     mirror([0,0,1]){
@@ -248,6 +281,7 @@ module Base(){ ////toplevel
       rotate([-90,0,0])
       cylinder(r=crossbar_dia/2, h=101);
   }
+  BaseRegistrationProtrusion(0.0);
 }
 
 module BaseT(){ ////toplevel
@@ -256,6 +290,7 @@ module BaseT(){ ////toplevel
 
 module Demo(){
   Tower();
+  %Lid();
   translate([0,0, 25]) Lid();
   translate([0, tower_rearwall_y, -(tower_base_height+5)]) Base();
 }
@@ -267,6 +302,7 @@ module Demo(){
 //LidT();
 //Tower();
 //Lid();
+//BaseRegistrationProtrusion();
 //Base();
 //BaseT();
-Demo();
+//Demo();