From da79fb1c7a03497277e11c1b31c54227bcfaebd3 Mon Sep 17 00:00:00 2001 From: XANTRONIX Development Date: Sat, 11 Nov 2023 18:53:21 -0500 Subject: Now we're cookin' with fire! --- case/case.scad | 66 +++++++++++++++++++++++++++++++++++++++++++++------------- 1 file changed, 52 insertions(+), 14 deletions(-) (limited to 'case') diff --git a/case/case.scad b/case/case.scad index 6641c35..421b8a5 100644 --- a/case/case.scad +++ b/case/case.scad @@ -22,7 +22,7 @@ module keyboard_base_plate(pcb_width, pcb_height) { } } - module round_edge(length, translation, rotation) { + module round_edge(translation, rotation, length) { translate(translation) rotate(rotation) linear_extrude(length) @@ -37,7 +37,17 @@ module keyboard_base_plate(pcb_width, pcb_height) { linear_extrude(dimensions[2]) square([dimensions[0], dimensions[1]], false); } - + + module wall_corner(translation, rotation, radius, length) { + translate(translation) + rotate(rotation) + linear_extrude(length) + intersection() { + circle(r=radius); + square([radius, radius], false); + } + } + /* Lower left corner */ round_corner([0 - pcb_clearance_edge, 0 - pcb_clearance_edge, 0], [-90, 90, 90]); @@ -55,25 +65,53 @@ module keyboard_base_plate(pcb_width, pcb_height) { 0 - pcb_clearance_edge, 0], [180, 90, 90]); /* Upper edge */ - round_edge( 2 * pcb_clearance_edge + pcb_width, - [0 - pcb_clearance_edge, - pcb_clearance_edge + pcb_height, 0], [0, 90, 0]); + round_edge([0 - pcb_clearance_edge, + pcb_clearance_edge + pcb_height, 0], [0, 90, 0], + 2 * pcb_clearance_edge + pcb_width); /* Right edge */ - round_edge( 2 * pcb_clearance_edge + pcb_height, - [ pcb_clearance_edge + pcb_width, - 0 - pcb_clearance_edge, 0], [270, 0, 0]); + round_edge([ pcb_clearance_edge + pcb_width, + 0 - pcb_clearance_edge, 0], [270, 0, 0], + 2 * pcb_clearance_edge + pcb_height); /* Lower edge */ - round_edge(2 * pcb_clearance_edge + pcb_width, - [0 - pcb_clearance_edge, - 0 - pcb_clearance_edge, 0], [90, 180, 90]); + round_edge([0 - pcb_clearance_edge, + 0 - pcb_clearance_edge, 0], [90, 180, 90], + 2 * pcb_clearance_edge + pcb_width); /* Left edge */ - round_edge( 2 * pcb_clearance_edge + pcb_height, - [0 - pcb_clearance_edge, - 0 - pcb_clearance_edge, 0], [270, 90, 0]); + round_edge([0 - pcb_clearance_edge, + 0 - pcb_clearance_edge, 0], [270, 90, 0], + 2 * pcb_clearance_edge + pcb_height); + /* Upper right wall corner */ + wall_corner([pcb_clearance_edge + pcb_width, + pcb_clearance_edge + pcb_height, 0], + [0, 0, 0], + corner_radius, + wall_height); + + /* Lower right wall corner */ + wall_corner([ pcb_clearance_edge + pcb_width, + 0 - pcb_clearance_edge, 0], + [0, 0, 270], + corner_radius, + wall_height); + + /* Lower left wall corner */ + wall_corner([0 - pcb_clearance_edge, + 0 - pcb_clearance_edge, 0], + [0, 0, 180], + corner_radius, + wall_height); + + /* Upper left wall corner */ + wall_corner([0 - pcb_clearance_edge, + pcb_clearance_edge + pcb_height, 0], + [0, 0, 90], + corner_radius, + wall_height); + /* Upper wall */ side([ 0 - pcb_clearance_edge, pcb_height, 0], -- cgit v1.2.3