clearance tweaks

This commit is contained in:
ewin 2025-10-18 15:50:39 -04:00
parent 7e5b95abf5
commit 8e365bfdf1
Signed by: erin
SSH key fingerprint: SHA256:swjoHhREbZPbWe+gyJNi24d4NAxJSyUIm3fpZj4z3wc

View file

@ -1,8 +1,8 @@
$fn = 20;
baseplate_thickness = 2;
inner_clearance = 7.5;
pcb_thickness = 1.6;
inner_clearance = 7.5; // space inside the case for the battery/mcu to occupy
pcb_thickness = 1.6; // thickness of the pcb
module roundsquare (size, r) {
translate([r, r]) minkowski() {
@ -13,12 +13,15 @@ module roundsquare (size, r) {
module shell () {
difference() {
// block
linear_extrude(baseplate_thickness + inner_clearance + pcb_thickness) {
translate([-1, -1]) roundsquare([214+1*2, 67+1*2], r=2+1);
}
// cut for shelf
translate([0, 0, baseplate_thickness + inner_clearance]) linear_extrude(pcb_thickness + 2) {
roundsquare([214, 67], r=2);
roundsquare([214, 67], r=2-0.25); // pcb r=2 but it's not exact
}
// cut for inner clearance
translate([0, 0, baseplate_thickness]) linear_extrude(inner_clearance + 10) {
translate([1, 1]) roundsquare([214 - 1 * 2, 67 - 1 * 2], r=1);
}
@ -44,20 +47,22 @@ module standoffs () {
difference() {
shell();
translate([4.5, 65-.01, baseplate_thickness + inner_clearance - 7.5])
translate([2, 65-.01, baseplate_thickness + inner_clearance - 7.5])
// cube([34, 2, 30]);
// cube([34, 5, 6]);
cube([18+17-4.5, 2, 30]);
cube([18+17-2, 2, 30]);
// usb-c cutout
translate([17 + 18/2 - 9/2, 71, baseplate_thickness + inner_clearance - 6.75]) {
rotate([90, 0, 0]) linear_extrude(8) {
roundsquare([9, 3.5], r = 1.5);
roundsquare([9, 4], r = 1.5);
}
}
translate([4.5, 71, baseplate_thickness + inner_clearance - 3]) {
// power switch cutout
translate([4, 71, baseplate_thickness + inner_clearance - 2]) {
rotate([90, 0, 0]) linear_extrude(8) {
roundsquare([9, 3], r = 0.5);
roundsquare([6.5, 2], r = 0.5);
}
}
}
standoffs();
standoffs();