$fs = 0.5; // epsilon e = 0.1; // tolerance tol = 0.5; // wall thickness wall = 3; // A cube with rounded edges module rcube(s, r=4) { hull() { for (x = [r, s[0]-r]) { for (y = [r, s[1]-r]) { translate([x, y, 0]) cylinder(h=s[2], r=r); } } } } // Outer dimensions of the phone motoe2lte_s = [130, 67+tol, 12.5+tol]; module motoe2lte(s=motoe2lte_s) { module body() { hull() { // Front // 12 mm radius on the corners. r = 12; // Sides // ~7mm on the edge, going to `t` over ~8mm ts = 7; // Bottom end // 12 mm radius on the corners. // Pulls in to 8 mm thick over the last 15 mm to the USB connector. tb = 8; translate([r, r, 0]) cylinder(h=ts, r=r); translate([r, s[1]-r, 0]) cylinder(h=ts, r=r); // Top end // ~9 mm thick on the edge, going to `t` over ~8mm tt = 9; translate([s[0] - r, r, 0]) cylinder(h=ts, r=r); translate([s[0] - r, s[1]-r, 0]) cylinder(h=ts, r=r); // Back plate bs = [s[0] - 15-8, s[1]-8-8, 1]; translate([15, (s[1]-bs[1])/2, s[2]-bs[2]]) rcube(bs); } } color("silver") body(); // Volume button color("skyblue") translate([65, s[1]-e, 12.5-9-tol]) cube([17, 1+e, 1.5]); // Headphone jack hole jd = 9+2; translate([s[0]-10, s[1]/2, 1+jd/2]) rotate(90, [0, 1, 0]) cylinder(h=30, d=jd); // USB socket hole us = [11+2, 9+2, 30]; translate([-us[2]/2+10, s[1]/2, us[1]/2]) rotate(90, [1, 0, 0]) rotate(90, [0, 1, 0]) translate(-us/2) rcube(us, r=2); // Display ds = [100, 56, e]; color("DarkSlateGray") translate([12, (s[1]-ds[1])/2, -e/2]) rcube(ds, r=1); }; module motoe2lte_up() { rotate(90-10, [1, 0, 0]) rotate(180, [1, 0, 0]) rotate(-90, [0, 0, 1]) translate([0, -motoe2lte_s[1]/2, 0]) motoe2lte(); }; module motoe2lte_right() { rotate(-90-10, [1, 0, 0]) rotate(180, [0, 0, 1]) translate([-motoe2lte_s[0]/2, 0, 0]) motoe2lte(); }; module stand(s, ph) { module base() { // Base translate([-s[0]/2, 0, 0]) { r = 4; hull() { for (x = [r, s[0]-r]) { translate([x, r, 0]) cylinder(h=s[2], r=r); translate([x, s[1]-r, 0]) cylinder(h=wall*1.5, r=r); } } } // Back stand w = ph[1]+wall*2; h = 65; difference() { rotate(-10, [1, 0, 0]) difference() { translate([-w/2, 4, 0]) cube([w, 40, h]); rotate(20, [1, 0, 0]) translate([-(s[0]+e)/2, 40, -20]) cube([s[0]+e, 40, 1000]); } // Cut of anything below the base translate([-(s[0]+e)/2, 0, -s[2]]) cube([s[0]+e, s[1]+e, s[2]]); } } difference() { base(s, ph); translate([0, wall, wall]) motoe2lte_up(); } } module motoe2lte_stand() { s = [motoe2lte_s[1]+20, 50, 15]; stand(s, motoe2lte_s); } motoe2lte_stand(); //motoe2lte();