chiark / gitweb /
brompton-computer-guard: wip
[reprap-play.git] / brompton-computer-guard.scad
index 1471a795c0997a38d09095592d3c4a48397fac9e..9620bddf500c2e470dd9592ab58d43bd3e67b27a 100644 (file)
@@ -6,7 +6,7 @@ cover_len = 70;
 attach_tube_dia = 18;
 
 attach_cx = -15;
-attach_cdy = -10;
+attach_cdy = -5;
 attach_w = 25;
 
 attach_inrad = 25; ///
@@ -20,8 +20,9 @@ cover_lcircle_r = cover_ysz / (1 + 1/sqrt(2));
 
 base_len = cover_len - cover_lcircle_r;
 
-attach_total_len =
-  attach_inrad + attach_tube_dia + attach_hole_dist + attach_hole_dia/2;
+attach_straight_len =
+  attach_inrad + attach_tube_dia + attach_hole_dist + attach_hole_dia/2
+  - attach_w / 2 + attach_hole_dist;
 
 module RearSideTemplate(){
   polygon([[0.1,0],
@@ -34,23 +35,43 @@ module RearSideTemplate(){
 
 module AttachTemplate(){
   hull(){
-//    polygon([[0,   0],
-//          [-0.1, 0],
-//          [-0.1, -cover_ysz],
-//          [0,    -cover_ysz]]);
+    polygon([[0,   0],
+            [-0.1, 0],
+            [-0.1, -cover_ysz],
+            [0,    -cover_ysz]]);
     translate([attach_cx, -attach_cdy]) rotate([0,0,-attach_ang]) {
-      polygon([[-attach_cx,       attach_w/2],
-              [0,                -attach_w/2],
-              [attach_total_len, -attach_w/2],
-              [attach_total_len, attach_w/2]]);
-      translate([attach_total_len, 0])
+      polygon([[-attach_cx,          attach_w/2],
+              [0,                   -attach_w/2],
+              [attach_straight_len, -attach_w/2],
+              [attach_straight_len, attach_w/2]]);
+      translate([attach_straight_len, 0])
        circle(r=attach_w/2);
     }
   }
 }
 
-//module Tube(){
-//  translate(
+module Tube(){
+  %translate([attach_cx, -attach_cdy, -20]) {
+    rotate_extrude(convexity=10) {
+      translate([attach_inrad + attach_tube_dia/2, 0])
+       circle(r=attach_tube_dia/2);
+    }
+  }
+}
+
+module Bolts(){
+  %translate([0,0,-50]) linear_extrude(height=80) {
+    translate([attach_cx, -attach_cdy]) rotate([0,0,-attach_ang]) {
+      translate([attach_inrad - attach_hole_dist - attach_hole_dia/2, 0])
+       circle(r=attach_hole_dia/2, $fn=20);
+      translate([attach_inrad + attach_tube_dia
+                +attach_hole_dist + attach_hole_dia/2, 0])
+       circle(r=attach_hole_dia/2, $fn=20);
+    }
+  }
+}
 
 color("blue") RearSideTemplate();
 AttachTemplate();
+Tube();
+Bolts();