chiark / gitweb /
bike-phone-mount: wip
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 5 Jun 2020 22:27:26 +0000 (23:27 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Fri, 5 Jun 2020 22:27:26 +0000 (23:27 +0100)
Signed-off-by: Ian Jackson <ijackson@chiark.greenend.org.uk>
bike-phone-mount.scad [new file with mode: 0644]

diff --git a/bike-phone-mount.scad b/bike-phone-mount.scad
new file mode 100644 (file)
index 0000000..0ffd347
--- /dev/null
@@ -0,0 +1,53 @@
+// -*- C -*-
+
+// should rename this to actual name of the product
+
+include <utils.scad>
+
+lip_height = 2.0 - 0.15;
+lip_depth = 2.5 /*?*/ - 0.20;
+neck_width = 26.5 - 0.45;
+neck_depth = 28.5 - 0.45;
+neck_length = 1.5 + 0.50;
+
+slope = 0.35;
+
+nep0 = [0,0];
+nep1 = nep0 + [0,1] * neck_length;
+nep7 = nep0 + [1,0] * lip_depth;
+nep2 = [ nep7[0], nep1[1] + slope * (nep7[0] - nep1[0]) ];
+nep3 = nep2 + [0, 0.1];
+nep4 = [ nep0[0]-1, nep3[1] ];
+nep6 = nep7 + [0,-1] * lip_height;
+nep5 = [ nep4[0], nep6[1] ];
+nepm = [ nep0[0], nep3[1] ];
+
+total_height = nep2[1] - nep6[0];
+nep_z_offset = -nep2[1];
+nep_side_offset = [ neck_width/2, nep_z_offset ];
+nep_rear_offset = [ neck_depth/2, nep_z_offset ];
+inner_pos = [-0.1, -total_height];
+
+module NeckEdgePlan() {
+  polygon([ nep0,
+           nep1,
+           nep2,
+           nep3,
+           nep4,
+           nep5,
+           nep6,
+           nep7 ]);
+}
+
+module Neck() {
+  for (m=[0,1]) {
+    mirror([m,0]) {
+      translate(nep_side_offset) NeckEdgePlan();
+      rectfromto(inner_pos,
+                nep_side_offset + nepm);
+    }
+  }
+}
+
+//NeckEdgePlan();
+Neck();