Compare commits
No commits in common. "bf2050ef0889d08873332d6f0bbd399dadd6035a" and "0295678c71d04d6619b2275f660fc7efb3aea0e3" have entirely different histories.
bf2050ef08
...
0295678c71
60
main.scad
60
main.scad
@ -15,20 +15,18 @@ XRAY_BOTTOM=3;
|
|||||||
// EXPORT:
|
// EXPORT:
|
||||||
MODEL_HARNESS_LEFT=1;
|
MODEL_HARNESS_LEFT=1;
|
||||||
MODEL_HARNESS_RIGHT=2;
|
MODEL_HARNESS_RIGHT=2;
|
||||||
MODEL_HARNESS_BOTTOM=3;
|
MODEL_HARNESS_BOTTOM_PIP=3;
|
||||||
MODEL_HARNESS_BOTTOM_PIP=4;
|
MODEL_HARNESS_TOP=4;
|
||||||
MODEL_HARNESS_TOP=5;
|
MODEL_HARNESS_SLIDER_FRONT=5;
|
||||||
MODEL_HARNESS_SLIDER_FRONT=6;
|
MODEL_HARNESS_SLIDER_BACK=6;
|
||||||
MODEL_HARNESS_SLIDER_BACK=7;
|
MODEL_HARNESS_BUTTONS=7;
|
||||||
MODEL_HARNESS_BUTTONS=8;
|
export=0; // [0:7]
|
||||||
export=0; // [0:8]
|
|
||||||
function is_not_export() = is_undef(export) || export == 0;
|
function is_not_export() = is_undef(export) || export == 0;
|
||||||
function is_export() = !is_not_export();
|
function is_export() = !is_not_export();
|
||||||
function is_model_strict(m) = is_export() && export == m;
|
function is_model_strict(m) = is_export() && export == m;
|
||||||
function is_model(m) = is_not_export() || export == m;
|
function is_model(m) = is_not_export() || export == m;
|
||||||
|
|
||||||
function get_phone_size() = [160, 76.7, 10];
|
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;
|
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() {
|
module phone() {
|
||||||
s=get_phone_size();
|
s=get_phone_size();
|
||||||
color("gray")
|
color("gray")
|
||||||
@ -148,8 +132,6 @@ module phone_harness() {
|
|||||||
}
|
}
|
||||||
module shell_backplane(groove) {
|
module shell_backplane(groove) {
|
||||||
module groove_scale() { scale([groove?1.05:1, groove?1.05:1, groove?1.2:1]) children(); }
|
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) {
|
down(hs.z/2 - shell_wall/3) up(backplane_rim_size.z/2) right(harness_divider.x) {
|
||||||
back(backplane_rim_size.y/2) {
|
back(backplane_rim_size.y/2) {
|
||||||
teeth=backplane_teeth;
|
teeth=backplane_teeth;
|
||||||
@ -167,7 +149,7 @@ module phone_harness() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// ==== SHELL SLIDER AND RAIL ====
|
// ==== SHELL SLIDER AND RAIL ====
|
||||||
@ -245,22 +227,20 @@ module phone_harness() {
|
|||||||
module bottom_speaker_cutout() {
|
module bottom_speaker_cutout() {
|
||||||
s=[8, 49, 100];
|
s=[8, 49, 100];
|
||||||
left(ps.x/2 - 13)
|
left(ps.x/2 - 13)
|
||||||
down(s.z/2 - ps.z/3)
|
difference() {
|
||||||
dotted_grill_cutout(s, vents_x=4, vents_y=8, cut_corners=true, mesh=1);
|
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() {
|
module bottom_cutout() {
|
||||||
back_camera_cutout();
|
back_camera_cutout();
|
||||||
bottom_speaker_cutout();
|
bottom_speaker_cutout();
|
||||||
bottom_vents_cutout();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// -- RIGHT --
|
// -- RIGHT --
|
||||||
@ -311,7 +291,7 @@ module phone_harness() {
|
|||||||
left(bs.x/2) {
|
left(bs.x/2) {
|
||||||
difference() {
|
difference() {
|
||||||
cubi(bs);
|
cubi(bs);
|
||||||
back(1) cubi(cs);
|
back(2) cubi(cs);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
fwd(1) left(bs.x*0.8) cubi(touch_power_size, fillet=1);
|
fwd(1) left(bs.x*0.8) cubi(touch_power_size, fillet=1);
|
||||||
@ -321,7 +301,7 @@ module phone_harness() {
|
|||||||
cubi(pin_size);
|
cubi(pin_size);
|
||||||
difference() {
|
difference() {
|
||||||
cubi(bs);
|
cubi(bs);
|
||||||
back(1) {
|
back(2) {
|
||||||
left(bs.x/4) cubi(cs);
|
left(bs.x/4) cubi(cs);
|
||||||
right(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_LEFT)) model_harness_left();
|
||||||
if (is_model(MODEL_HARNESS_RIGHT)) model_harness_right();
|
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)) {
|
if (is_model_strict(MODEL_HARNESS_BOTTOM_PIP)) {
|
||||||
model_harness_left();
|
model_harness_left();
|
||||||
right(backplane_pip_slideout) model_harness_right();
|
right(backplane_pip_slideout) model_harness_right();
|
||||||
|
55302
model_bottom.stl
55302
model_bottom.stl
File diff suppressed because it is too large
Load Diff
4630
model_buttons.stl
4630
model_buttons.stl
File diff suppressed because it is too large
Load Diff
39008
model_top.stl
39008
model_top.stl
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user