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
34 top_z = max( phone[2] + wall[2],
35 phone_button_z + minwall )
38 plugkeeper_x_maxw = phone[0] - plug_totlen;
40 plugkeeper_p_max = [ 0, plug_maxw/2 ];
41 plugkeeper_p_min = [ -plug_sllen, plug_minw/2 ];;
42 plugkeeper_d_u = unitvector2d(
44 vecdiff2d( plugkeeper_p_max, plugkeeper_p_min )
48 module MainProfileInnerHalf(){
49 p = phone + phone_slop;
50 pb = phone_button_z + phone_slop[2];
54 [ button_dy_outer/2, p[2] ],
55 [ button_dy_outer/2, pb ],
56 [ button_dy_inner/2, pb ],
57 [ button_dy_inner/2, p[2] ],
58 [ button_dy_centre/2, p[2] ],
59 [ button_dy_centre/2, pb ],
64 p = phone + phone_slop;
65 for (m=[0,1]) mirror([m,0]) {
67 translate([-1, -wall[2] ])
68 square([ p[1]/2 + wall[1] + 1, top_z + wall[2] ]);
69 MainProfileInnerHalf();
75 rotate([0,0,90]) rotate([90,0,0]) {
76 linear_extrude(height = phone[0] + wall[0], convexity=20)
78 translate([0,0, phone[0]])
79 linear_extrude(height = wall[0], convexity=20)
84 module PlugKeeperProfileHalf(){
85 p_max = plugkeeper_p_max;
86 p_min = plugkeeper_p_min;
87 d = plugkeeper_d_u * keeper_prong;
89 translate([ plugkeeper_x_maxw, 0 ]) {
98 for (m=[0,1]) mirror([0,m,0]) {
99 translate([0,0, -wall[2]])
100 linear_extrude(height=plug_h + wall[2])
101 PlugKeeperProfileHalf();
103 translate([0, 0, plug_h - plug_tooth_h])
104 linear_extrude(height= plug_tooth_h)
105 translate(plugkeeper_d_u * -plug_tooth_dy)
106 PlugKeeperProfileHalf();
114 translate([ led[0], phone[1]/2 - led[1], 1 ])
115 cylinder(r = led_dia/2, h= phone[2]*2, $fn=20);
121 //MainProfileInner();