chiark / gitweb /
bike-phone-mount: wip
[reprap-play.git] / bike-phone-mount.scad
1 // -*- C -*-
2
3 // should rename this to actual name of the product
4
5 include <utils.scad>
6
7 lip_height = 2.0 - 0.15;
8 lip_depth = 2.5 /*?*/ - 0.20;
9 neck_width = 26.5 - 0.45;
10 neck_depth = 28.5 - 0.45;
11 neck_length = 1.5 + 0.50;
12
13 slope = 0.35;
14
15 nep0 = [0,0];
16 nep1 = nep0 + [0,1] * neck_length;
17 nep7 = nep0 + [1,0] * lip_depth;
18 nep2 = [ nep7[0], nep1[1] + slope * (nep7[0] - nep1[0]) ];
19 nep3 = nep2 + [0, 0.1];
20 nep4 = [ nep0[0]-1, nep3[1] ];
21 nep6 = nep7 + [0,-1] * lip_height;
22 nep5 = [ nep4[0], nep6[1] ];
23 nepm = [ nep0[0], nep3[1] ];
24
25 total_height = nep2[1] - nep6[1];
26 nep_z_offset = -nep2[1];
27 nep_side_offset = [ neck_width/2, nep_z_offset ];
28 nep_rear_offset = [ neck_depth/2, nep_z_offset ];
29 inner_pos = [-0.1, -total_height];
30
31 module NeckEdgePlan() {
32   polygon([ nep0,
33             nep1,
34             nep2,
35             nep3,
36             nep4,
37             nep5,
38             nep6,
39             nep7 ]);
40 }
41
42 module Neck() {
43   for (m=[0,1]) {
44     mirror([m,0]) {
45       translate(nep_side_offset) NeckEdgePlan();
46       rectfromto(inner_pos,
47                  nep_side_offset + nepm);
48     }
49   }
50 }
51
52 //NeckEdgePlan();
53 Neck();