include depth=2; width=3; length=4.8; xr=(length/width)*.05; yr=(width/length)*.05; $fs=.05; scale([length,width,depth]){ box(); //lid(); } module box(){ difference(){ linear_extrude(height=1){ hull(){ hull(){ translate([1,1,0])circle(.2); translate([-1,1,0])circle(.2); } hull(){ translate([1,-1,0])circle(.2); translate([-1,-1,0])circle(.2); } } } translate([0,0,.2]){ scale([0.9,0.9,1]){ linear_extrude(height=1){ hull(){ hull(){ translate([1+xr,1+yr,0])circle(.2); translate([-(1+xr),1+yr,0])circle(.2); } hull(){ translate([1+xr,-(1+yr),0])circle(.2); translate([-(1+xr),-(1+yr),0])circle(.2); } } } } } } scale([1.5,1,1])translate([-.5,-1.3,1])rotate([90,0,90])hinge(0); } module lid(){ difference(){ union(){ translate([1,1,0])rotate([90,0,0])cylinder(r=.2,h=2); translate([-1,1,0])rotate([90,0,0])cylinder(r=.2,h=2); translate([-1,1,0])rotate([0,90,0])cylinder(r=.2,h=2); translate([-1,-1,0])rotate([0,90,0])cylinder(r=.2,h=2); translate([1,1,0])sphere(r=.2,$fn=30); translate([-1,1,0])sphere(r=.2,$fn=30); translate([1,-1,0])sphere(r=.2,$fn=30); translate([-1,-1,0])sphere(r=.2,$fn=30); } translate([0,0,-.1])cube([3,3,.2],center=true); } translate([0,0,.1])cube([2,2,.2],center=true); scale([1.5,1,1])translate([-.5,-1.3,0])rotate([90,0,90])hinge(1); } //Had to get rid of the minkowski //This isn't as elegant, but at least it renders. //module rounded_lid(){ //minkowski(){ //lid(); //difference(){ //union(){ //translate([1,1,0])rotate([90,0,0])cylinder(r=.2,h=2); //translate([-1,1,0])rotate([90,0,0])cylinder(r=.2,h=2); //translate([-1,1,0])rotate([0,90,0])cylinder(r=.2,h=2); //translate([-1,-1,0])rotate([0,90,0])cylinder(r=.2,h=2); //translate([1,1,0])sphere(r=.2,$fn=30); //translate([-1,1,0])sphere(r=.2,$fn=30); //translate([1,-1,0])sphere(r=.2,$fn=30); //translate([-1,-1,0])sphere(r=.2,$fn=30); //} //translate([0,0,-.1])cube([3,3,.2],center=true); //} //} //}