8 phone = [ 76.40, 30.96, 6.00 ]; // includes socket
18 button_dz_centre = 1.35 + 0.75;
19 button_dz_outer = 1.35;
21 button_dy_outer = 28.42;
22 button_dy_inner = 19.05;
23 button_dy_centre = 5.65;
25 nrbutton_brace_x = 37.5;
27 phone_slop = 0.5 * [1,1,0]
30 led = [25.9, 9.44]; // y is from edge
33 // next values include slop
34 plug_maxw = 10.95 + 0.35;
35 plug_minw= 6.53 + 0.35;
37 plug_totlen = 84.90 + 1.5 - 2.0; // to maxw, including phone
44 keeper_stalk_basewidth = 12;
45 keeper_stalk_len = 70;
47 keeper_stalk_thick = wall_bot;
49 keeper_stalk_base_reinforce_len = 5;
50 keeper_stalk_base_reinforce_thick = 2.0;
54 top_z = max( phone[2] + wall[2],
55 phone_button_z + minwall )
58 plugkeeper_x_maxw = phone[0] - plug_totlen;
60 plugkeeper_p_max = [ 0, plug_maxw/2 ];
61 plugkeeper_p_min = [ -plug_sllen, plug_minw/2 ];;
62 plugkeeper_d_u = unitvector2d(
64 vecdiff2d( plugkeeper_p_max, plugkeeper_p_min )
68 module MainProfileInnerHalf(){
69 p = phone + phone_slop;
70 pbc = p[2] + button_dz_centre;
71 pbo = p[2] + button_dz_outer;
75 [ button_dy_outer/2, p[2] ],
76 [ button_dy_outer/2, pbo ],
77 [ button_dy_inner/2, pbo ],
78 [ button_dy_inner/2, p[2] ],
79 [ button_dy_centre/2, p[2] ],
80 [ button_dy_centre/2, pbc ],
85 p = phone + phone_slop;
87 for (m=[0,1]) mirror([m,0]) {
89 translate([ -wall[1], -wall_bot ])
90 square([ wall[1]*2, wall_bot + wall[2] ]);
91 MainProfileInnerHalf();
94 for (m=[0,1]) mirror([m,0]) {
95 MainProfileInnerHalf();
100 module BraceProfileInitial(){
101 p = phone + phone_slop;
102 pbo = p[2] + button_dz_outer;
103 pbc = p[2] + button_dz_centre;
104 polygon([[ button_dy_outer/2 + 0.2, p[2] ],
105 [ button_dy_outer/2 + 0.2, pbo + wall[2] ],
106 [ button_dy_outer/2 , pbo + wall[2] ],
107 [ button_dy_outer/2 , p[2] ],
111 module BraceProfileFinal(){
112 p = phone + phone_slop;
113 pbo = p[2] + button_dz_outer;
114 pbc = p[2] + button_dz_centre;
115 polygon([[ -1, p[2] ],
116 [ -1, pbc + wall[2] ],
117 [ 0, pbc + wall[2] ],
123 for (m=[0,1]) mirror([0,m,0]) {
126 translate([ nrbutton_brace_x + e * phone[1]/2,
129 linear_extrude(height= (e==0 ? wall[0] : 0.1)){
131 BraceProfileInitial();
132 if (e==0) BraceProfileFinal();
143 rotate([0,0,90]) rotate([90,0,0]) {
144 translate([0,0, expose])
145 linear_extrude(height = phone[0] + wall[0] - expose, convexity=20)
147 translate([0,0, phone[0]])
148 linear_extrude(height = wall[0], convexity=20)
149 hull() MainProfile();
153 module PlugKeeperProfileHalf(){
154 p_max = plugkeeper_p_max;
155 p_min = plugkeeper_p_min;
156 d = plugkeeper_d_u * keeper_prong;
158 translate([ plugkeeper_x_maxw, 0 ]) {
166 module PlugKeeperStalkProfile(){
168 for (m=[0,1]) mirror([0,m,0]) PlugKeeperProfileHalf();
169 translate([ plugkeeper_x_maxw + keeper_stalk_len, 0,0 ])
170 square([ 0.1, keeper_stalk_basewidth ], center=true);
175 for (m=[0,1]) mirror([0,m,0]) {
176 translate([0,0, -keeper_stalk_thick])
177 linear_extrude(height=plug_h + keeper_stalk_thick)
178 PlugKeeperProfileHalf();
180 translate([0, 0, plug_h - plug_tooth_h])
181 linear_extrude(height= plug_tooth_h)
182 translate(plugkeeper_d_u * -plug_tooth_dy)
183 PlugKeeperProfileHalf();
189 sidewall_cutout_z = phone[2] + phone_slop[2] + button_dz_outer;
197 translate([ led[0], phone[1]/2 - led[1], 1 ])
198 rotate([0,0, 360/8/2])
199 cylinder(r = led_dia/2 / cos(360/8/2), h= phone[2]*2, $fn=8);
202 translate([ -0.1, ys * keeper_stalk_gap, -wall[2]*2])
203 linear_extrude(height = wall[2]*3)
204 PlugKeeperStalkProfile();
206 translate([ phone[0] + wall[0],
207 ys * (cutout_between/2 + cutout_dia/2),
209 cylinder( r= cutout_dia/2, h = 50, $fn = 20 );
211 translate([expose, ys*phone[1]/2, sidewall_cutout_z/2])
214 cylinder( r= sidewall_cutout_z/2 - 0.1, h=6 , $fn=20 );
220 translate([0,0, -keeper_stalk_thick])
221 linear_extrude(height = keeper_stalk_thick)
222 PlugKeeperStalkProfile();
224 translate([ plugkeeper_x_maxw + keeper_stalk_len +
225 -keeper_stalk_base_reinforce_len/2,
226 -keeper_stalk_basewidth/2,
229 cube([ keeper_stalk_base_reinforce_len,
230 keeper_stalk_basewidth,
231 keeper_stalk_base_reinforce_thick ]);
235 // This makes' Cura's support more optimal: specifically,
236 // it then doesn't seem to touch the back (bottom) wall
237 translate([0,0,phone[0]])
242 //MainProfileInnerHalf();
244 //translate([0,0,1]) color("black") BraceProfileInitial();
245 //translate([0,0,1]) color("black") BraceProfileFinal();