Add secondary strap. Add preview model simplification.
This commit is contained in:
@@ -23,16 +23,24 @@ function is_model(m) = is_not_export() || export == m;
|
||||
|
||||
function get_phone_size() = [160, 76.7, 10];
|
||||
|
||||
module cubi(s, fillet=0, edges=EDGES_ALL) {
|
||||
if ($preview) {
|
||||
cube(s, center=true);
|
||||
} else {
|
||||
cuboid(s, fillet=fillet, edges=edges);
|
||||
}
|
||||
}
|
||||
|
||||
module phone() {
|
||||
s=get_phone_size();
|
||||
color("gray")
|
||||
cuboid(s, fillet=5);
|
||||
cubi(s, fillet=5);
|
||||
}
|
||||
module arm() {
|
||||
$fn=6;
|
||||
s=[210, 55, 50];
|
||||
color("SaddleBrown")
|
||||
down(s.z/2 + get_phone_size().z/2) cuboid(s, fillet=20);
|
||||
down(s.z/2 + get_phone_size().z/2) cubi(s, fillet=20);
|
||||
}
|
||||
|
||||
module phone_harness() {
|
||||
@@ -59,8 +67,8 @@ module phone_harness() {
|
||||
module shell() {
|
||||
$fn = $preview ? 6 : 30;
|
||||
difference() {
|
||||
cuboid(hs, fillet=f);
|
||||
cuboid(ps, fillet=f);
|
||||
cubi(hs, fillet=f);
|
||||
cubi(ps, fillet=f);
|
||||
}
|
||||
shell_rim();
|
||||
shell_screwmounts();
|
||||
@@ -71,10 +79,10 @@ module phone_harness() {
|
||||
s=rim_size;
|
||||
intersection() {
|
||||
difference() {
|
||||
cuboid(s, fillet=rf, edges=EDGES_Z_ALL);
|
||||
cuboid(ps, fillet=f, edges=EDGES_Z_ALL);
|
||||
cubi(s, fillet=rf, edges=EDGES_Z_ALL);
|
||||
cubi(ps, fillet=f, edges=EDGES_Z_ALL);
|
||||
}
|
||||
cuboid(s, fillet=1);
|
||||
cubi(s, fillet=1);
|
||||
}
|
||||
rail_extension=10;
|
||||
fwd(hs.y/2) xrot(90) harness_rail(slider_len_front+rail_extension);
|
||||
@@ -88,10 +96,10 @@ module phone_harness() {
|
||||
resi=[hs.x+2*offset, hs.y+2*offset, res.z+1];
|
||||
up(0.0) difference() {
|
||||
intersection() {
|
||||
cuboid(res, fillet=rf, edges=EDGES_Z_ALL);
|
||||
cuboid(res, fillet=(groove?1:1.5), edges=EDGES_BOTTOM);
|
||||
cubi(res, fillet=rf, edges=EDGES_Z_ALL);
|
||||
cubi(res, fillet=(groove?1:1.5), edges=EDGES_BOTTOM);
|
||||
}
|
||||
cuboid(resi, fillet=rf, edges=EDGES_Z_ALL);
|
||||
cubi(resi, fillet=rf, edges=EDGES_Z_ALL);
|
||||
}
|
||||
}
|
||||
module foreach_screwmount() {
|
||||
@@ -115,7 +123,7 @@ module phone_harness() {
|
||||
}
|
||||
}
|
||||
module shell_backplane(groove) {
|
||||
down(hs.z/2 - shell_wall/6) up(backplane_rim_size.z/2) right(harness_divider.x) scale(groove ? 1.01 : 1) cuboid(backplane_rim_size, fillet=5, edges=EDGES_Z_LF);
|
||||
down(hs.z/2 - shell_wall/6) up(backplane_rim_size.z/2) right(harness_divider.x) scale(groove ? 1.01 : 1) cubi(backplane_rim_size, fillet=5, edges=EDGES_Z_LF);
|
||||
}
|
||||
|
||||
// ==== SHELL SLIDER AND RAIL ====
|
||||
@@ -148,22 +156,22 @@ module phone_harness() {
|
||||
// -- TOP --
|
||||
module screen_cutout() {
|
||||
s=[138, 69, 100];
|
||||
up(s.z/2) cuboid(s, fillet=3, edges=EDGES_Z_ALL);
|
||||
up(s.z/2) cubi(s, fillet=3, edges=EDGES_Z_ALL);
|
||||
}
|
||||
top_offset=6.5;
|
||||
module top_speaker_cutout() {
|
||||
s=[3, 12, 100];
|
||||
right(ps.x/2 - top_offset) up(s.z/2 - ps.z/3) cuboid(s, fillet=1);
|
||||
right(ps.x/2 - top_offset) up(s.z/2 - ps.z/3) cubi(s, fillet=1);
|
||||
}
|
||||
module front_camera_cutout() {
|
||||
$fn = $preview ? 6 : 30;
|
||||
d=5;
|
||||
s=[d, d, 100];
|
||||
right(ps.x/2 - top_offset) fwd(11) cylinder(d=s.x, h=s.z);
|
||||
right(ps.x/2 - top_offset) fwd(11.5) cylinder(d=s.x, h=s.z);
|
||||
}
|
||||
module leds_cutout() {
|
||||
s=[4, 14, 100];
|
||||
right(ps.x/2 - top_offset) up(s.z/2 - ps.z/3) back(23) cuboid(s, fillet=1);
|
||||
right(ps.x/2 - top_offset) up(s.z/2 - ps.z/3) back(23) cubi(s, fillet=1);
|
||||
}
|
||||
module top_cutout() {
|
||||
screen_cutout();
|
||||
@@ -175,13 +183,13 @@ module phone_harness() {
|
||||
// -- BOTTOM --
|
||||
module back_camera_cutout() {
|
||||
s=[13, 25, expose_back_camera ? 100 : 11];
|
||||
right(ps.x/2 - 7.5) fwd(ps.y/2 - 23) down(s.z/2 - ps.z/3) cuboid(s, fillet=6, edges=EDGES_Z_ALL);
|
||||
right(ps.x/2 - 7.5) fwd(ps.y/2 - 23) down(s.z/2 - ps.z/3) cubi(s, fillet=6, edges=EDGES_Z_ALL);
|
||||
}
|
||||
module bottom_speaker_cutout() {
|
||||
s=[8, 49, 100];
|
||||
left(ps.x/2 - 13)
|
||||
difference() {
|
||||
down(s.z/2 - ps.z/3) cuboid(s, fillet=1);
|
||||
down(s.z/2 - ps.z/3) cubi(s, fillet=1);
|
||||
bars=8;
|
||||
down(ps.z/2)
|
||||
for (i = [0:bars-1]) {
|
||||
@@ -211,7 +219,7 @@ module phone_harness() {
|
||||
// -- LEFT --
|
||||
module usbc_cutout() {
|
||||
s=[100, 20, 6];
|
||||
left(ps.x/2) down(2) cuboid(s, fillet=1);
|
||||
left(ps.x/2) down(2) cubi(s, fillet=1);
|
||||
}
|
||||
module left_cutout() {
|
||||
usbc_cutout();
|
||||
@@ -220,7 +228,7 @@ module phone_harness() {
|
||||
// -- FRONT --
|
||||
module buttons_cutout() {
|
||||
s=[42, 100, 5];
|
||||
fwd(ps.y/2) right(ps.x/2 - 44.5) cuboid(s, fillet=1);
|
||||
fwd(ps.y/2) right(ps.x/2 - 44.5) cubi(s, fillet=1);
|
||||
}
|
||||
module front_cutout() {
|
||||
buttons_cutout();
|
||||
|
||||
Reference in New Issue
Block a user