chiark / gitweb /
brompton-computer-guard: wip, before rename coords
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 11 May 2014 21:48:25 +0000 (22:48 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Sun, 11 May 2014 21:48:25 +0000 (22:48 +0100)
brompton-computer-guard.scad [new file with mode: 0644]

diff --git a/brompton-computer-guard.scad b/brompton-computer-guard.scad
new file mode 100644 (file)
index 0000000..37d10e6
--- /dev/null
@@ -0,0 +1,56 @@
+// -*- C -*-
+
+cover_zsz = 45;
+cover_len = 70;
+
+attach_tube_dia = 18;
+
+attach_cx = -15;
+attach_cdz = -10;
+attach_w = 25;
+
+attach_inrad = 25; ///
+attach_hole_dist = 5; ///
+attach_hole_dia = 4 + 0.5; ///
+attach_ang = 45;
+
+// calculated
+
+cover_lcircle_r = cover_zsz / (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;
+
+module RearSideTemplate(){
+  polygon([[0.1,0],
+          [-base_len,0],
+          [-base_len,-cover_zsz],
+          [0.1,      -cover_zsz]]);
+  translate([-base_len, -cover_zsz + cover_lcircle_r])
+    circle(r=cover_lcircle_r);
+}
+
+module AttachTemplate(){
+  hull(){
+//    polygon([[0,   0],
+//          [-0.1, 0],
+//          [-0.1, -cover_zsz],
+//          [0,    -cover_zsz]]);
+    translate([attach_cx, -attach_cdz]) 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])
+       circle(r=attach_w/2);
+    }
+  }
+}
+
+//module Tube(){
+//  translate(
+
+color("blue") RearSideTemplate();
+AttachTemplate();