I designed this a few years ago just having fun with OpenSCAD. I had a small speaker that I needed a small enclosure for, and I wanted to test my new 3d printer at the time as well. So I came up with this design.
//weird ass speaker cabinet for ~1.5 inch speaker. sgn June 2017
$fn = 6;
translate([0,0,102]){
rotate([195.57939, 29.244305, 54.377626]){ //puts it so base is flat, used repetier "lay flat" to find these numbers.
difference(){
snakey();
snakey2();
//SPEAKER hole
translate([5,22.5,75.75]) //translate([-1,26,75])
rotate([0,100,150])
cylinder(d = 36, h = 19, $fn = 32);
//flat face
translate([-5,28,75])
rotate([0,100,150])
cylinder(d = 57, h = 17, $fn = 32);
//"bottom" hole (for sphere at 0,0,0)
translate([0,0,-12])
cylinder(d = 6, h = 6);
//TEST CUBE
//translate([0,0,40])
//cube([100,100,20], center = true);
}
//BAD SIMPLE SPEAKER MODEL
//translate([-1,26,75])
//rotate([0,100,150])
//cylinder(d = 36, h = 10, $fn = 32);
difference(){
//FILL THE FACE
translate([-2.555,26.8,74]) //translate([-1,26,75])
rotate([0,100,150])
cylinder(d = 48, h = 2.5);
//SPEAKER hole
translate([5,22.5,75.75]) //translate([-1,26,75])
rotate([0,100,150])
cylinder(d = 36, h = 19, $fn = 32);
}
//fill small hole near speaker
//FILL THE FACE
translate([-2.5,20.5,53]) //translate([-1,26,75])
rotate([0,100,150])
cylinder(d = 5, h = 2.0);
}
}
module snakey(){
for( i = [0:11]){
translate([0,0,i
7]) rotate([0,i
40,i
30]) translate([0,i
2,0])
sphere((i+5)*2.2);
}
}
module snakey2(){
for( i = [0:11]){
translate([0,0,i
7]) rotate([0,i
40,i
30]) translate([0,i
2,0])
sphere((i+4.2)*2.2);
}
}