|
|
@ -0,0 +1,51 @@ |
|
|
|
module enclosure(x, y, z, woofer, tweeter, port, thick) { |
|
|
|
|
|
|
|
m = (x + 2 * thick) / 2; /* horizontal center */ |
|
|
|
v = (z + 2 * thick) / 2; /* vertical center */ |
|
|
|
|
|
|
|
module speaker(d, h) { |
|
|
|
translate([m,thick + 0.1,h]) { |
|
|
|
rotate([90,0,0]) { |
|
|
|
color("wheat") { |
|
|
|
cylinder(h = thick + 0.2, r1 = d / 2, r2 = d / 2, $fn=360); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
module port(width, height) { |
|
|
|
translate([thick,-0.1, thick]) { |
|
|
|
color("wheat") { |
|
|
|
cube([width, thick + 0.2, height]); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
difference() { |
|
|
|
/* box */ |
|
|
|
color("wheat") { |
|
|
|
cube([x + 2 * thick,y + 2 * thick,z + 2 * thick]); |
|
|
|
} |
|
|
|
|
|
|
|
/* dig */ |
|
|
|
translate([thick,thick,thick]) { |
|
|
|
color("wheat") { |
|
|
|
cube([x,y,z]); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/* tweeter */ |
|
|
|
//speaker(tweeter, thick + z - tweeter / 2); |
|
|
|
/* woofer */ |
|
|
|
//speaker(woofer, 0 + 2 * thick + port + woofer / 2); |
|
|
|
/* port */ |
|
|
|
//port(x, port); |
|
|
|
|
|
|
|
speaker(woofer, v); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
/* 46x58x58mm, hp 40mm, bois de 6mm. Dim ext. 58x70x70mm */ |
|
|
|
enclosure(4.6,5.8,5.8,4,0,0,0.6); |
|
|
|
|
|
|
|
|