6 phone = [ 76.40, 30.96, 6.26 ]; // includes socket
10 button_dy_outer = 28.42;
11 button_dy_inner = 19.05;
12 button_dy_centre = 5.65;
14 phone_slop = 0.5 * [1,1,0]
17 led = [25.9, 9.44]; // y is from edge
20 // next values include slop
21 plug_maxw = 10.95 + 0.35;
22 plug_minw= 6.53 + 0.35;
24 plug_totlen = 84.90; // to maxw, including phone
31 keeper_stalk_basewidth = 4;
32 keeper_stalk_len = 70;
37 top_z = max( phone[2] + wall[2],
38 phone_button_z + minwall )
41 plugkeeper_x_maxw = phone[0] - plug_totlen;
43 plugkeeper_p_max = [ 0, plug_maxw/2 ];
44 plugkeeper_p_min = [ -plug_sllen, plug_minw/2 ];;
45 plugkeeper_d_u = unitvector2d(
47 vecdiff2d( plugkeeper_p_max, plugkeeper_p_min )
51 module MainProfileInnerHalf(){
52 p = phone + phone_slop;
53 pb = phone_button_z + phone_slop[2];
57 [ button_dy_outer/2, p[2] ],
58 [ button_dy_outer/2, pb ],
59 [ button_dy_inner/2, pb ],
60 [ button_dy_inner/2, p[2] ],
61 [ button_dy_centre/2, p[2] ],
62 [ button_dy_centre/2, pb ],
67 p = phone + phone_slop;
68 for (m=[0,1]) mirror([m,0]) {
70 translate([-1, -wall[2] ])
71 square([ p[1]/2 + wall[1] + 1, top_z + wall[2] ]);
72 MainProfileInnerHalf();
78 rotate([0,0,90]) rotate([90,0,0]) {
79 linear_extrude(height = phone[0] + wall[0], convexity=20)
81 translate([0,0, phone[0]])
82 linear_extrude(height = wall[0], convexity=20)
87 module PlugKeeperProfileHalf(){
88 p_max = plugkeeper_p_max;
89 p_min = plugkeeper_p_min;
90 d = plugkeeper_d_u * keeper_prong;
92 translate([ plugkeeper_x_maxw, 0 ]) {
100 module PlugKeeperStalkProfile(){
102 for (m=[0,1]) mirror([0,m,0]) PlugKeeperProfileHalf();
103 translate([ plugkeeper_x_maxw + keeper_stalk_len, 0,0 ])
104 square([ 0.1, keeper_stalk_basewidth/2 ], center=true);
109 for (m=[0,1]) mirror([0,m,0]) {
110 translate([0,0, -wall[2]])
111 linear_extrude(height=plug_h + wall[2])
112 PlugKeeperProfileHalf();
114 translate([0, 0, plug_h - plug_tooth_h])
115 linear_extrude(height= plug_tooth_h)
116 translate(plugkeeper_d_u * -plug_tooth_dy)
117 PlugKeeperProfileHalf();
121 translate([0,0, -wall[2]])
122 linear_extrude(height = wall[2])
123 PlugKeeperStalkProfile();
130 translate([ led[0], phone[1]/2 - led[1], 1 ])
131 cylinder(r = led_dia/2, h= phone[2]*2, $fn=20);
134 translate([ -0.1, ys * keeper_stalk_gap, -wall[2]*2])
135 linear_extrude(height = wall[2]*3)
136 PlugKeeperStalkProfile();
142 //MainProfileInner();