Compare commits

..

No commits in common. "bf2050ef0889d08873332d6f0bbd399dadd6035a" and "0295678c71d04d6619b2275f660fc7efb3aea0e3" have entirely different histories.

4 changed files with 21766 additions and 77260 deletions

View File

@ -15,20 +15,18 @@ XRAY_BOTTOM=3;
// EXPORT:
MODEL_HARNESS_LEFT=1;
MODEL_HARNESS_RIGHT=2;
MODEL_HARNESS_BOTTOM=3;
MODEL_HARNESS_BOTTOM_PIP=4;
MODEL_HARNESS_TOP=5;
MODEL_HARNESS_SLIDER_FRONT=6;
MODEL_HARNESS_SLIDER_BACK=7;
MODEL_HARNESS_BUTTONS=8;
export=0; // [0:8]
MODEL_HARNESS_BOTTOM_PIP=3;
MODEL_HARNESS_TOP=4;
MODEL_HARNESS_SLIDER_FRONT=5;
MODEL_HARNESS_SLIDER_BACK=6;
MODEL_HARNESS_BUTTONS=7;
export=0; // [0:7]
function is_not_export() = is_undef(export) || export == 0;
function is_export() = !is_not_export();
function is_model_strict(m) = is_export() && export == m;
function is_model(m) = is_not_export() || export == m;
function get_phone_size() = [160, 76.7, 10];
function use_slideout_backplane() = is_model_strict(MODEL_HARNESS_BOTTOM_PIP) || is_model_strict(MODEL_HARNESS_LEFT) || is_model_strict(MODEL_HARNESS_RIGHT);
backplane_pip_slideout=10;
@ -40,20 +38,6 @@ module cubi(s, fillet=0, edges=EDGES_ALL) {
}
}
module dotted_grill_cutout(vents_area, vents_x=10, vents_y=10, mesh=1.5, cut_corners=false) {
function is_corner(x, y, xm, ym) = (x == 0 || x == xm) && (y == 0 || y == ym);
vent_size=[vents_area.x/vents_x-mesh, vents_area.y/vents_y-mesh, vents_area.z];
translate([-vents_area.x/2 - vent_size.x/2, vents_area.y/2 - vent_size.y/2, 0])
for (x=[0:vents_x-1]) {
for (y=[0:vents_y-1]) {
if (!cut_corners || !is_corner(x, y, vents_x-1, vents_y-1)) {
right(x*(vent_size.x+mesh))
fwd(y*(vent_size.y+mesh))
cubi(vent_size, fillet=min(vent_size.x/2, vent_size.y/2));
}
}
}
}
module phone() {
s=get_phone_size();
color("gray")
@ -148,8 +132,6 @@ module phone_harness() {
}
module shell_backplane(groove) {
module groove_scale() { scale([groove?1.05:1, groove?1.05:1, groove?1.2:1]) children(); }
if (use_slideout_backplane()) {
down(hs.z/2 - shell_wall/3) up(backplane_rim_size.z/2) right(harness_divider.x) {
back(backplane_rim_size.y/2) {
teeth=backplane_teeth;
@ -167,7 +149,7 @@ module phone_harness() {
}
}
}
}
}
// ==== SHELL SLIDER AND RAIL ====
@ -245,22 +227,20 @@ module phone_harness() {
module bottom_speaker_cutout() {
s=[8, 49, 100];
left(ps.x/2 - 13)
down(s.z/2 - ps.z/3)
dotted_grill_cutout(s, vents_x=4, vents_y=8, cut_corners=true, mesh=1);
difference() {
down(s.z/2 - ps.z/3) cubi(s, fillet=1);
bars=8;
down(ps.z/2)
for (i = [0:bars-1]) {
bs=[s.x+2, 1, 2];
step=s.y/bars;
fwd(i*step - s.y/2 + step/2) down(w) cube(bs, center=true);
}
}
module bottom_vents_cutout() {
vents_x=10;
vents_y=6;
vents_area=[35, 50, 10];
vents_pos=[45, 0, -ps.z/2];
mesh=1.5;
translate(vents_pos)
dotted_grill_cutout(vents_area, vents_x=vents_x, vents_y=vents_y, mesh=mesh, cut_corners=true);
}
module bottom_cutout() {
back_camera_cutout();
bottom_speaker_cutout();
bottom_vents_cutout();
}
// -- RIGHT --
@ -311,7 +291,7 @@ module phone_harness() {
left(bs.x/2) {
difference() {
cubi(bs);
back(1) cubi(cs);
back(2) cubi(cs);
}
}
fwd(1) left(bs.x*0.8) cubi(touch_power_size, fillet=1);
@ -321,7 +301,7 @@ module phone_harness() {
cubi(pin_size);
difference() {
cubi(bs);
back(1) {
back(2) {
left(bs.x/4) cubi(cs);
right(bs.x/4) cubi(cs);
}
@ -396,10 +376,6 @@ module phone_harness() {
if (is_model(MODEL_HARNESS_LEFT)) model_harness_left();
if (is_model(MODEL_HARNESS_RIGHT)) model_harness_right();
if (is_model_strict(MODEL_HARNESS_BOTTOM)) {
model_harness_left();
model_harness_right();
}
if (is_model_strict(MODEL_HARNESS_BOTTOM_PIP)) {
model_harness_left();
right(backplane_pip_slideout) model_harness_right();

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff