6 phone = [ 76.40, 30.96, 6.00 ]; // includes socket
12 button_dy_outer = 28.42;
13 button_dy_inner = 19.05;
14 button_dy_centre = 5.65;
16 phone_slop = 0.5 * [1,1,0]
19 led = [25.9, 9.44]; // y is from edge
22 // next values include slop
23 plug_maxw = 10.95 + 0.35;
24 plug_minw= 6.53 + 0.35;
26 plug_totlen = 84.90; // to maxw, including phone
33 keeper_stalk_basewidth = 4;
34 keeper_stalk_len = 70;
39 top_z = max( phone[2] + wall[2],
40 phone_button_z + minwall )
43 plugkeeper_x_maxw = phone[0] - plug_totlen;
45 plugkeeper_p_max = [ 0, plug_maxw/2 ];
46 plugkeeper_p_min = [ -plug_sllen, plug_minw/2 ];;
47 plugkeeper_d_u = unitvector2d(
49 vecdiff2d( plugkeeper_p_max, plugkeeper_p_min )
53 module MainProfileInnerHalf(){
54 p = phone + phone_slop;
55 pb = phone_button_z + phone_slop[2];
59 [ button_dy_outer/2, p[2] ],
60 [ button_dy_outer/2, pb ],
61 [ button_dy_inner/2, pb ],
62 [ button_dy_inner/2, p[2] ],
63 [ button_dy_centre/2, p[2] ],
64 [ button_dy_centre/2, pb ],
69 p = phone + phone_slop;
71 for (m=[0,1]) mirror([m,0]) {
72 translate([-1, -wall[2] ])
73 square([ p[1]/2 + wall[1] + 1, top_z + wall[2] ]);
75 for (m=[0,1]) mirror([m,0]) {
76 MainProfileInnerHalf();
82 rotate([0,0,90]) rotate([90,0,0]) {
83 linear_extrude(height = phone[0] + wall[0], convexity=20)
85 translate([0,0, phone[0]])
86 linear_extrude(height = wall[0], convexity=20)
91 module PlugKeeperProfileHalf(){
92 p_max = plugkeeper_p_max;
93 p_min = plugkeeper_p_min;
94 d = plugkeeper_d_u * keeper_prong;
96 translate([ plugkeeper_x_maxw, 0 ]) {
104 module PlugKeeperStalkProfile(){
106 for (m=[0,1]) mirror([0,m,0]) PlugKeeperProfileHalf();
107 translate([ plugkeeper_x_maxw + keeper_stalk_len, 0,0 ])
108 square([ 0.1, keeper_stalk_basewidth/2 ], center=true);
113 for (m=[0,1]) mirror([0,m,0]) {
114 translate([0,0, -wall[2]])
115 linear_extrude(height=plug_h + wall[2])
116 PlugKeeperProfileHalf();
118 translate([0, 0, plug_h - plug_tooth_h])
119 linear_extrude(height= plug_tooth_h)
120 translate(plugkeeper_d_u * -plug_tooth_dy)
121 PlugKeeperProfileHalf();
125 translate([0,0, -wall[2]])
126 linear_extrude(height = wall[2])
127 PlugKeeperStalkProfile();
134 translate([ led[0], phone[1]/2 - led[1], 1 ])
135 cylinder(r = led_dia/2, h= phone[2]*2, $fn=20);
138 translate([ -0.1, ys * keeper_stalk_gap, -wall[2]*2])
139 linear_extrude(height = wall[2]*3)
140 PlugKeeperStalkProfile();
146 //MainProfileInner();