Files
Fabula/enclosure/cutouts.scad

67 lines
1.9 KiB
OpenSCAD

// The cutouts to allow external components (such as buttons and connectors) to be mounted on the box
// 4056-based li-ion charging module
module usb_cutout() {
hull() {
translate([0, -3, 0]) cylinder(h=11, d=8);
translate([0, 3, 0]) cylinder(h=11, d=8);
translate([0, 0, 12]) cube([3, 8.9, 2], true);
}
}
// 14x12mm rocker switch with 21x15mm flange
module switch_cutout() {
cube([14.2, 12.2, 30], true);
}
module speaker_grille() {
linear_extrude(height = 10, center = true) {
import("speaker_grille.svg");
}
}
module keycap() {
cylinder(h = 10, d = 20, $fn = 128);
}
module character_retainer_cutout() {
$fn = 128;
screw_hole_diameter = 3;
// Ring cutout
cylinder(d = 60, h = 5);
// Screw holes
translate([0, -25, 10]) cylinder(d = screw_hole_diameter, h = 15, center = true);
rotate([0, 0, 120]) translate([0, -25, 10]) cylinder(d = screw_hole_diameter, h = 15, center = true);
rotate([0, 0, 240]) translate([0, -25, 10]) cylinder(d = screw_hole_diameter, h = 15, center = true);
}
module status_led_diffuser_cutout() {
$fn = 32;
// Diffuser
hull() {
translate([0, -13.2, 0]) cylinder(d = 10.2, h = 13);
translate([15.2, 13.2, 0]) cylinder(d = 10.2, h = 13);
translate([-15.2, 13.2, 0]) cylinder(d = 10.2, h = 13);
}
}
module sdcard_access_port_cutout() {
$fn = 32;
union() {
translate([-13, -8.5, 0]) cube([26, 17, 8]);
// Flange
hull() {
translate([15, 0, 0]) cylinder(d = 21, h = 2);
translate([-15, 0, 0]) cylinder(d = 21, h = 2);
}
// Screw holes
translate([16, 0, -1]) cylinder(d = 2, h = 10);
translate([-16, 0, -1]) cylinder(d = 2, h = 10);
}
}
//usb_cutout();
//speaker_grille();
//character_retainer_cutout();
//status_led_diffuser_cutout();
sdcard_access_port_cutout();