chiark / gitweb /
air-hockey-puck: wip
[reprap-play.git] / chimney-cable-retainer.scad
index d8b373101f2401999ae766be658eef975cab8812..2f783d032fcfb1de0e4805b2c69601ceeb47ddba 100644 (file)
@@ -2,12 +2,13 @@
 
 include <utils.scad>
 
+inrear_d_real = 20;
 inrear_d = 15;
-general_d = 8;
+bar_th = 5;
 general_th = 5;
 between_cables = 150;
 around_cables = 20;
-cable_dia = 10;
+cable_dia = 15;
 
 total_d = 40;
 above_h = 40;
@@ -17,11 +18,30 @@ above_h = 40;
 cable_x = around_cables + cable_dia/2;
 total_x = cable_x * 2 + between_cables;
 
+below_h = above_h;
+
+sit_angle = atan2(inrear_d_real - inrear_d, below_h);
+
 module CoreElevation(){
-  rectfromto([ 0, 0 ],
-            [ total_d, general_th ]);
+  rotate(-sit_angle)
+    rectfromto([ 0, 0 ],
+              [ total_d, general_th ]);
   rectfromto([ 0, 0 ],
             [ general_th, above_h ]);
+  translate([ inrear_d, -above_h ])
+    rectfromto([ 0,0 ],
+              [ -bar_th, bar_th ]);
+}
+
+module BarMountElevation(){
+  hull(){
+    rotate(-sit_angle)
+      rectfromto([ 0, 0 ],
+                [ inrear_d, general_th ]);
+    translate([ 0, -below_h ])
+      rectfromto([ 0,0 ],
+                [ inrear_d, bar_th ]);
+  }
 }
 
 module Retainer(){ ////toplevel
@@ -30,11 +50,17 @@ module Retainer(){ ////toplevel
       linextr_x_yz(0, total_x)
        mirror([1,0])
        CoreElevation();
+
+      for (x = [0, 0.5, 1] * (total_x - general_th))
+       translate([ x, 0,0 ])
+       linextr_x_yz(0, general_th)
+       mirror([1,0])
+       BarMountElevation();
     }
 
     for (x = [cable_x, total_x - cable_x])
       translate([x, 0, 0])
-      linextr(-100, 100)
+      linextr(-below_h/2, 100)
       hull(){
         translate([ 0, -(general_th + cable_dia/2) ])
          circle(r = cable_dia/2);