8 phone = [ 76.40, 30.96, 6.00 ]; // includes socket
14 button_dy_outer = 28.42;
15 button_dy_inner = 19.05;
16 button_dy_centre = 5.65;
18 phone_slop = 0.5 * [1,1,0]
21 led = [25.9, 9.44]; // y is from edge
24 // next values include slop
25 plug_maxw = 10.95 + 0.35;
26 plug_minw= 6.53 + 0.35;
28 plug_totlen = 84.90 - 1.5; // to maxw, including phone
35 keeper_stalk_basewidth = 4;
36 keeper_stalk_len = 70;
41 top_z = max( phone[2] + wall[2],
42 phone_button_z + minwall )
45 plugkeeper_x_maxw = phone[0] - plug_totlen;
47 plugkeeper_p_max = [ 0, plug_maxw/2 ];
48 plugkeeper_p_min = [ -plug_sllen, plug_minw/2 ];;
49 plugkeeper_d_u = unitvector2d(
51 vecdiff2d( plugkeeper_p_max, plugkeeper_p_min )
55 module MainProfileInnerHalf(){
56 p = phone + phone_slop;
57 pb = p[2] + button_dz;
61 [ button_dy_outer/2, p[2] ],
62 [ button_dy_outer/2, pb ],
63 [ button_dy_inner/2, pb ],
64 [ button_dy_inner/2, p[2] ],
65 [ button_dy_centre/2, p[2] ],
66 [ button_dy_centre/2, pb ],
71 p = phone + phone_slop;
73 for (m=[0,1]) mirror([m,0]) {
75 translate([ -wall[1], -wall_bot ])
76 square([ wall[1]*2, wall_bot + wall[2] ]);
77 MainProfileInnerHalf();
80 for (m=[0,1]) mirror([m,0]) {
81 MainProfileInnerHalf();
87 rotate([0,0,90]) rotate([90,0,0]) {
88 linear_extrude(height = phone[0] + wall[0], convexity=20)
90 translate([0,0, phone[0]])
91 linear_extrude(height = wall[0], convexity=20)
96 module PlugKeeperProfileHalf(){
97 p_max = plugkeeper_p_max;
98 p_min = plugkeeper_p_min;
99 d = plugkeeper_d_u * keeper_prong;
101 translate([ plugkeeper_x_maxw, 0 ]) {
109 module PlugKeeperStalkProfile(){
111 for (m=[0,1]) mirror([0,m,0]) PlugKeeperProfileHalf();
112 translate([ plugkeeper_x_maxw + keeper_stalk_len, 0,0 ])
113 square([ 0.1, keeper_stalk_basewidth ], center=true);
118 for (m=[0,1]) mirror([0,m,0]) {
119 translate([0,0, -wall[2]])
120 linear_extrude(height=plug_h + wall[2])
121 PlugKeeperProfileHalf();
123 translate([0, 0, plug_h - plug_tooth_h])
124 linear_extrude(height= plug_tooth_h)
125 translate(plugkeeper_d_u * -plug_tooth_dy)
126 PlugKeeperProfileHalf();
130 translate([0,0, -wall[2]])
131 linear_extrude(height = wall[2])
132 PlugKeeperStalkProfile();
139 translate([ led[0], phone[1]/2 - led[1], 1 ])
140 cylinder(r = led_dia/2, h= phone[2]*2, $fn=20);
143 translate([ -0.1, ys * keeper_stalk_gap, -wall[2]*2])
144 linear_extrude(height = wall[2]*3)
145 PlugKeeperStalkProfile();
151 //MainProfileInnerHalf();