// -*- C -*-
+include <funcs.scad>
+
wall = 0.75 * [1,1,1];
phone = [ 76.40, 30.96, 6.26 ];
phone_button_z = 6.58;
button_dy_inner = 19.05;
button_dy_centre = 5.65;
-phone_slop = [1,1,1] * 0.5;
+phone_slop = 0.5 * [1,1,0]
+ + 0.5 * [0,0,1];
led = [25.9, 9.44]; // y is from edge
led_dia = 4.4;
+// next values include slop
+plug_maxw = 10.95 + 0.35;
+plug_minw= 6.53 + 0.35;
+plug_sllen= 6.50;
+plug_totlen = 84.90; // to maxw, including phone
+
+keeper_prong = 2;
+
// calculated
top_z = max( phone[2] + wall[2],
phone_button_z + minwall )
+ phone_slop[2];
+plugkeeper_x_maxw = phone[0] - plug_totlen;
+
module MainProfileInnerHalf(){
p = phone + phone_slop;
pb = phone_button_z + phone_slop[2];
}
}
+module PlugKeeperProfile(){
+ p_max = [ 0, plug_maxw/2 ];
+ p_min = [ -plug_sllen, plug_minw/2 ];
+ d = unitvector2d(clockwise2d(vecdiff2d(p_min, p_max))) * keeper_prong;
+
+ translate([ plugkeeper_x_maxw, 0 ]) {
+ polygon([ p_min,
+ p_max,
+ p_max + d,
+ p_min + d ]);
+ }
+}
+
module Box(){
difference(){
BoxMain();
//MainProfileInner();
Box();
+linear_extrude(h=1) PlugKeeperProfile();