// Enclosure for a standard 16x2 LCD (with or without I2C) and an Arduino Uno $fn = $preview ? 40 : 80; Case=1; Lid=1; Feet=1; if(Case) { difference() { Cube(90,65,35); translate([2,2,2])Cube(86,61,35); translate([-1,38.4,5.8])cube([20,12.8,11.8]); // USB translate([-1,9.5,5.8])cube([20,9.8,12]); // Power // Feet translate([10,10,-1]) cylinder(d=5.2,h=10); translate([80,10,-1]) cylinder(d=5.2,h=10); translate([80,55,-1]) cylinder(d=5.2,h=10); translate([10,55,-1]) cylinder(d=5.2,h=10); } translate([4,4,11])Pilaar(8,24); translate([86,4,0])Pilaar(8,35); translate([86,61,0])Pilaar(8,35); translate([4,61,11])Pilaar(8,24); } if(Feet) translate([5,5,-10]) { for(i=[0:3]) { translate([i*11,0,0])Cube(10,6,4,2); translate([5+i*11,3,0])cylinder(d=5,h=8); } } if(Lid) translate([0,0,40]){ difference() { union() { hull() { Cube(90,65,2); translate([0,3,3])rotate([90,0,90])cylinder(d=6,h=90); translate([0,62,3])rotate([90,0,90])cylinder(d=6,h=90); translate([0,65/2-40/2,8])cube([90,40,3]); } translate([5,14,10]) LCDFrame(); }//union translate([5,14,10]) translate([(80-72)/2,(36-25)/2,-5])cube([72,25,20]); translate([4,4,-1])cylinder(d=2.6,h=10); translate([86,4,-1])cylinder(d=2.6,h=10); translate([86,61,-1])cylinder(d=2.6,h=10); translate([4,61,-1])cylinder(d=2.6,h=10); translate([4,4,6])cylinder(d=4.2,h=10); translate([86,4,6])cylinder(d=4.2,h=10); translate([86,61,6])cylinder(d=4.2,h=10); translate([4,61,6])cylinder(d=4.2,h=10); translate([2,2,-1]) scale([0.9555,0.9384,1])hull() { Cube(90,65,2); translate([0,3,3])rotate([90,0,90])cylinder(d=6,h=90); translate([0,62,3])rotate([90,0,90])cylinder(d=6,h=90); translate([0,65/2-40/2,8])cube([90,40,3]); } } translate([5,14,10]) LCDFrame(); render() translate([4,4,0])difference() { union() {cylinder(d=4,h=5.8);cylinder(d=6,h=5); } cylinder(d=2.6,h=10); } render() translate([86,4,0])difference() { union() {cylinder(d=4,h=5.8);cylinder(d=6,h=5); } cylinder(d=2.6,h=10); } render() translate([86,61,0])difference() { union() {cylinder(d=4,h=5.8);cylinder(d=6,h=5); } cylinder(d=2.6,h=10); } render() translate([4,61,0])difference() { union() {cylinder(d=4,h=5.8);cylinder(d=6,h=5); } cylinder(d=2.6,h=10); } } module LCDFrame() { difference() { union() { Frame(3); translate([0,0,-3]) { difference() { translate([0,0,1])Frame(2); translate([(80-72)/2+2,(36-25)/2,-1])cube([52,40,4]); translate([80-(80-72)/2-5,(36-25)/2+3,-1])cube([20,19,4]); } } }//union // 4 gaten translate([2.5,2.5,-3]) { cylinder(d=3.4,h=5); translate([75,0,0])cylinder(d=3.4,h=5); translate([75,31,0])cylinder(d=3.4,h=5); translate([0,31,0])cylinder(d=3.4,h=5); } }// diff } module Frame(H=4) { difference() { //cube([80,36,H]); Balk(80,36,H,2); // LCD zelf translate([(80-72)/2,(36-25)/2,-5])cube([72,25,20]); } }//module Frame include module Balk(L,B,H,Radius=8) { P=[ [0,0,Radius], [L,0,Radius], [L,B,Radius], [0,B,Radius] ]; linear_extrude(height=H) polygon( polyRound(P,30) ); } module Cube(xdim ,ydim ,zdim,rdim=1) { hull(){ translate([rdim,rdim,0])cylinder(h=zdim,r=rdim); translate([xdim-rdim,rdim,0])cylinder(h=zdim,r=rdim); translate([rdim,ydim-rdim,0])cylinder(h=zdim,r=rdim); translate([xdim-rdim,ydim-rdim,0])cylinder(h=zdim,r=rdim); } } module Pilaar(W=10,H=40) { difference() { cylinder(d=W,h=H); translate([0,0,H-4]) cylinder(d=3.2,h=5); } }