Skip to content

Instantly share code, notes, and snippets.

@buzztiaan
Created April 4, 2022 14:04
Show Gist options
  • Save buzztiaan/b738c49b73d0c5d6ce12fbb75482a244 to your computer and use it in GitHub Desktop.
Save buzztiaan/b738c49b73d0c5d6ce12fbb75482a244 to your computer and use it in GitHub Desktop.
webpotato design
module lcdpanel_22() {
// random ILI9340C 2.2" 240x320 SPI TFT from ebay 253199873513
color("red")
cube([40.6,67.5,2]);
color("grey")
translate([0,6,2])
cube([40.6,55.5,3]);
}
module nanopi_core2() {
color("darkgreen")
cube([40,40,5]);
color("lightgrey")
translate([0,0,-8])
cube([40,40,8]);
}
module charger() {
color ("lightgreen")
cube([29,17.5,4]);
}
module psu() {
color ("green")
cube([37.5,17.5,8]);
}
module amp() {
color ("pink")
cube([23,14.5,3]);
color ("silver")
translate([3.5,7.25,3])
cylinder(d=6.6,h=7);
}
module speaker() {
color("darkgrey")
cube ([37,19,10]);
}
module battery18650() {
color("lightblue")
cylinder(d=18.5,h=65);
}
module battery18650space() {
cylinder(d=19.5,h=68);
}
module batteryholder() {
color ("darkgrey")
cube ([21,76.5,20],center=true);
}
module combination1() {
lcdpanel_22();
translate([0,0,-7])
nanopi_core2();
translate([40,57.5,-2])
rotate([270,0,-180])
amp();
translate([1,50,-1])
rotate([270,0,0])
charger();
translate([0,41,-1])
rotate([270,0,0])
psu();
translate([1,58,-1])
rotate([270,0,0])
speaker();
// translate([10,0,-30])
// rotate([270,0,0])
// battery18650();
translate([30,0,-30])
rotate([270,0,0])
battery18650();
}
module combination1_alt() {
lcdpanel_22();
translate([0,0,-7])
nanopi_core2();
translate([40,57.5,-2])
rotate([270,0,-180])
amp();
translate([1,50,-1])
rotate([270,0,0])
charger();
translate([0,41,-1])
rotate([270,0,0])
psu();
translate([1,58,-1])
rotate([270,0,0])
speaker();
// translate([10,0,-30])
// rotate([270,0,0])
// battery18650();
}
module specialcube() {
difference() {
cube ([8,2,50]);
translate([-0.01,0.51,(50-21)/2]) cube ([2.5,1.5,21]);
translate([3,0.51,(50-23)/2]) cube ([3,1.5,23]);
}
}
module screenbevel () {
union(){
difference() {
hull(){
screenbevel_underside();
screenbevel_topside();
}
translate([0,-3,0]) screenbevel_opening();
rotate ([-7+90,0,0]) translate([6,4,7])
cube([55.5,40.6,7]);
translate ([-2.1+63.75,-10,0]) rotate ([-7,0,0]) translate([-0.01,0.51,(50-21)/2]) cube ([2.5,1.5,21]);
translate ([-2.1+63.75,-10,0]) rotate ([-7,0,0]) translate([3,0.51,(50-23)/2]) cube ([3,1.5,23]);
// screenbevel_underside();
}
//screenbevel_underside();
}
}
module screenbevel_opening() {
$fn=150;
hull(){
translate ([-2.1+10,-10,9]) rotate ([-7+90,0,0]) translate([0,0,3])
linear_extrude(height = 8, slices = 60) {
difference() {
offset(r = 7.5) {
square([71.75-20,51.2-18]);
}
offset(r = 5) {
square([71.75-20,51.2-18]);
}
}
}
rotate ([-7+90,0,0]) translate([6,4,7])
cube([55.5,40.6,3]);
}
}
module screenbevel_topside() {
$fn=50;
translate ([-2.1+10,-10,9]) rotate ([-7+90,0,0])
linear_extrude(height = 4, slices = 60) {
difference() {
offset(r = 7.5) {
square([71.75-20,51.2-18]);
}
offset(r = 6) {
square([71.75-20,51.2-18]);
}
}
}
}
module screenbevel_underside () {
translate ([-2.1,-10,0]) rotate ([-7,0,0]) cube ([8,2,50]);
translate ([-2.1+63.75,-10,0]) rotate ([-7,0,0]) specialcube();
translate ([-2.1,-10,0]) rotate ([-7,0,0]) cube ([70,2,5.2]);
translate ([-2.1,-4.4,45.65]) rotate ([-7,0,0]) cube ([71.75,2,5.2]);
}
module combination2() {
translate([0,0,45]) rotate([-7,0,0]) rotate([-90,90,180]) combination1();
}
module combination3() {
translate([0,0,45]) rotate([-7,0,0]) rotate([-90,90,180]) combination1_alt();
}
module female_usbA() {
cube([14.6,25,6.7]);
translate ([-(17.5-14.6)/2,6,-3.99-0.1])
cube([17.5,17.5,4.1]);
}
module female_usbmicro() {
cube([8.1,25,3.2]);
translate ([-(14.4-8.1)/2+.5,1,-1.99])
cube([14.4,25.5,2]);
}
module backcase() {
$fn=50;
difference(){
translate([-1,5,0])
hull(){
translate([0,-1,-3]) scale([0.5,1.1,0.2]) sphere(14);
translate([70,-1,-3]) scale([0.5,1.1,0.2]) sphere(14);
translate([0,11,42.3]) rotate ([-26,0,0]) scale([0.5,1.8,0.35]) sphere(12.5);
translate([70,11,42.3]) rotate ([-26,0,0]) scale([0.5,1.8,0.35]) sphere(12.5);
translate([0,17,-3]) scale([0.5,1.1,0.2]) sphere(14);
translate([70,17,-3]) scale([0.5,1.1,0.2]) sphere(14);
// translate([10,22,27]) sphere(12);
// translate([60,22,27]) sphere(12);
}
// gat voor bevel
translate ([-2.1,-10,0]) rotate ([-7,0,0]) translate([0,-2,0]) cube ([72,4,51.45]);
// space for internals (no mounts atm cause meh)
translate([0,0,45]) rotate([-7,0,0]) rotate([-90,90,180]) translate([-0.5,-0.5,-20]) cube([41.6,68.5,25]);
// two female usbA holes on the back (breakouts from ebay)
translate ([17,38,23]) rotate([0,0,180]) female_usbA();
translate ([37,38,23]) rotate([0,0,180]) female_usbA();
// usb micro breakout, ebay
translate ([53,36.6,24]) rotate([0,0,180]) female_usbmicro();
// battery
if (0) {
translate([0,0,45]) rotate([-7,0,0]) rotate([-90,90,180])
translate([30,-0,-30]) rotate([270,0,0]) battery18650space();
// wat kabelgoten oid
}
translate([34,28,6.41])
rotate([0,90,90])
batteryholder();
translate([33.75,20,9.91]) rotate([0,90,0]) cube([14,16,65], center=true);
//cylinder(h=65,d=16);
// ventilatie
for (i=[0:22])
translate([.5 + (i * 3),5,35]) rotate([-7,0,0]) cube([1.2,50,40]);
// for (i=[0:22])
// translate([.5 + (i * 3),22,-10]) rotate([-7,0,0]) cube([1,50,20]);
for (i=[-4:2])
rotate([-7-90,0,0]) translate([-20,-15, 7 + (i*3) ]) rotate([-90,0,0]) cube([30,1.2,10]);
for (i=[5:12])
rotate([-7,0,0]) translate([-10,-7, 6.25 + (i*3) ]) rotate([-90,0,0]) cube([20,1.2,20]);
for (i=[-4:2])
rotate([-7-90,0,0]) translate([60,-15 , 7+ ( i * 3)]) rotate([-90,0,0]) cube([20,1.2,10]);
for (i=[5:12])
rotate([-7,0,0]) translate([60,-7 , 6.25+ ( i * 3)]) rotate([-90,0,0]) cube([20,1.2,20]);
// platte onderkant?
translate([-100,-100,-14]) cube([200,200,10]);
}
}
//combination2();
//combination3();
//translate([0,-15,0])
//color("saddlebrown") screenbevel();
if (1) {
rotate([180,90,90])
translate([-70,50,-35])
difference () {
color("NavajoWhite") backcase();
translate ([-100,-100,16.9 ]) cube([200,200,50]);
// translate ([-47,-15,-15]) cube(80);
}
}
// color("NavajoWhite") backcase();
if (1) {
rotate([0,90,90])
translate([-70,0,0])
difference () {
color("NavajoWhite") backcase();
translate ([-100,-100,-10 ]) cube([200,200,16.91+10]);
}
}
if(0) {
//batteryholder();
translate ([-15,5,10])
rotate([-90,0,0]) batteryholder();
}
if (0) {
rotate([90,0,0])
difference(){
cube([18,5,10]);
translate([5,-0.1,4.3])
#female_usbmicro();
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment