phone_total_thick = 12.0;
phone_backside_slope = 1.0; // larger means shallower
+camera_pos_tl = [ 7.5, 13.5 ]; // measured from tl corner
+camera_pos_br = [ 24.0, 39.5 ]; // tl/br as seen from back
+
case_th_bottom = 2;
case_th_lid = 2;
case_th_side = 2;
}
}
-module CaseBase_rhsflip() {
- for (rhs=[0,1]) {
+module CaseBase_rhsflip(yn=[0,1]) {
+ for (rhs=yn) {
translate([phone_width/2, 0, 0])
mirror([rhs,0,0])
translate([-phone_width/2, 0, 0])
}
module CaseBase(){
+ // sides
CaseBase_rhsflip(){
translate([0, -phone_cnr_rad, 0])
rotate([90,0,0])
linear_extrude(height = phone_height - phone_cnr_rad*2)
EdgeProfile();
}
+ // corners
CaseBase_rhsflip() CaseBase_botflip() {
translate([+1,-1] * phone_cnr_rad)
intersection(){
cube([10,10,40]);
}
}
+ // top and bottom
CaseBase_botflip(){
translate([ phone_width - phone_cnr_rad, 0,0 ])
rotate([90,0,-90])
linear_extrude(height = phone_width - phone_cnr_rad*2)
EdgeProfile();
}
+ // fill
+ translate([0,0, epp3[1]])
+ mirror([0,0, 1])
+ linear_extrude(height = case_th_bottom)
+ rectfromto([+1,-1] * phone_cnr_rad,
+ [phone_width, -phone_height] + [-1,+1] * phone_cnr_rad);
}
-module Case(){
+module Case(){ ////toplevel
difference(){
CaseBase();
+
+ // slots for keeper
CaseBase_rhsflip()
translate([0, -phone_cnr_rad, 0])
rotate([90, 0, 0])
rectfromto([ -keeper_gap_x, -keeper_gap_z_bot ],
[ keeper_gap_x_holes, +keeper_gap_z_top ]);
}
+
+ // front camera
+ CaseBase_rhsflip([1])
+ mirror([0, 0, 1])
+ linear_extrude(height = 20)
+ mirror([0, 1, 0])
+ rectfromto(camera_pos_tl, camera_pos_br);
}
}
-module Keeper(){
- CaseBase_rhsflip()
- translate([0, -phone_cnr_rad, 0])
+module TestLength(){ ////toplevel
+ intersection(){
+ Case();
+ translate([-30, -200, -20])
+ cube([30 + 15, 250, 40]);
+ }
+}
+
+module TestWidth(){ ////toplevel
+ intersection(){
+ Case();
+ translate([-30, -(phone_height - 25), -20])
+ mirror([0, 1, 0])
+ cube([200, 50, 40]);
+ }
+}
+
+module OneKeeper(){ ////toplevel
+ translate([0, -phone_cnr_rad, 0])
rotate([90, 0, 0])
linear_extrude(height = phone_height - phone_cnr_rad * 2)
KeeperProfile();
}
+module OneKeeperPrint(){ ////toplevel
+ rotate([0,180,0])
+ OneKeeper();
+}
+
+module Keeper(){ ////toplevel
+ CaseBase_rhsflip()
+ OneKeeper();
+}
+
//EdgeProfile();
//KeeperProfile();
//CaseBase();
-%Case();
-Keeper();
+//%Case();
+//Keeper();