summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXANTRONIX Development2023-11-11 18:12:21 -0500
committerXANTRONIX Development2023-11-11 18:12:21 -0500
commitf7ed749597987be68eb59eaad2b273ceea893fb7 (patch)
treea586152d365addb9e657bf7fd641808d2ac29f75
parent16ab969f7a15c08b447eb5483b47fdcc526319cf (diff)
downloadxantronix-z32-f7ed749597987be68eb59eaad2b273ceea893fb7.tar.gz
xantronix-z32-f7ed749597987be68eb59eaad2b273ceea893fb7.tar.bz2
xantronix-z32-f7ed749597987be68eb59eaad2b273ceea893fb7.zip
Add case walls
-rw-r--r--case/case.scad44
1 files changed, 35 insertions, 9 deletions
diff --git a/case/case.scad b/case/case.scad
index 2a6c6f5..6641c35 100644
--- a/case/case.scad
+++ b/case/case.scad
@@ -8,7 +8,7 @@ module keyboard_base_plate(pcb_width, pcb_height) {
pcb_clearance_bottom = 2.0;
thickness = 2.0;
- height = 14.0;
+ wall_height = 14.0;
corner_radius = thickness / 2.0;
module round_corner(translation, rotation) {
@@ -31,6 +31,12 @@ module keyboard_base_plate(pcb_width, pcb_height) {
square(corner_radius*2);
}
}
+
+ module side(translation, dimensions) {
+ translate(translation)
+ linear_extrude(dimensions[2])
+ square([dimensions[0], dimensions[1]], false);
+ }
/* Lower left corner */
round_corner([0 - pcb_clearance_edge,
@@ -48,7 +54,7 @@ module keyboard_base_plate(pcb_width, pcb_height) {
round_corner([ pcb_clearance_edge + pcb_width,
0 - pcb_clearance_edge, 0], [180, 90, 90]);
- /* Top edge */
+ /* Upper edge */
round_edge( 2 * pcb_clearance_edge + pcb_width,
[0 - pcb_clearance_edge,
pcb_clearance_edge + pcb_height, 0], [0, 90, 0]);
@@ -58,7 +64,7 @@ module keyboard_base_plate(pcb_width, pcb_height) {
[ pcb_clearance_edge + pcb_width,
0 - pcb_clearance_edge, 0], [270, 0, 0]);
- /* Bottom edge */
+ /* Lower edge */
round_edge(2 * pcb_clearance_edge + pcb_width,
[0 - pcb_clearance_edge,
0 - pcb_clearance_edge, 0], [90, 180, 90]);
@@ -68,12 +74,32 @@ module keyboard_base_plate(pcb_width, pcb_height) {
[0 - pcb_clearance_edge,
0 - pcb_clearance_edge, 0], [270, 90, 0]);
- linear_extrude(thickness)
- translate([0 - pcb_clearance_edge,
- 0 - pcb_clearance_edge, 0])
- square([2 * pcb_clearance_edge + pcb_width,
- 2 * pcb_clearance_edge + pcb_height],
- false);
+ /* Upper wall */
+ side([ 0 - pcb_clearance_edge,
+ pcb_height, 0],
+ [thickness + pcb_width,
+ thickness,
+ wall_height]);
+
+ /* Right wall */
+ side([pcb_width, 0 - pcb_clearance_edge, 0],
+ [thickness, thickness + pcb_height, wall_height]);
+
+ /* Lower wall */
+ side([0 - pcb_clearance_edge, 0 - thickness, 0],
+ [thickness + pcb_width, thickness, wall_height]);
+
+ /* Left wall */
+ side([0 - thickness, 0 - pcb_clearance_edge, 0],
+ [thickness, thickness + pcb_height, wall_height]);
+
+ /* Bottom plate */
+ side([ 0 - pcb_clearance_edge,
+ 0 - pcb_clearance_edge,
+ -thickness / 2],
+ [2 * pcb_clearance_edge + pcb_width,
+ 2 * pcb_clearance_edge + pcb_height,
+ thickness]);
}
keyboard_base_plate(pcb_width, pcb_height);