summaryrefslogtreecommitdiffstats
path: root/case
diff options
context:
space:
mode:
authorXANTRONIX Development2023-11-11 18:53:21 -0500
committerXANTRONIX Development2023-11-11 18:53:21 -0500
commitda79fb1c7a03497277e11c1b31c54227bcfaebd3 (patch)
tree8a813e11f66edbde5b5678995aaf08778300b181 /case
parentf7ed749597987be68eb59eaad2b273ceea893fb7 (diff)
downloadxantronix-z32-da79fb1c7a03497277e11c1b31c54227bcfaebd3.tar.gz
xantronix-z32-da79fb1c7a03497277e11c1b31c54227bcfaebd3.tar.bz2
xantronix-z32-da79fb1c7a03497277e11c1b31c54227bcfaebd3.zip
Now we're cookin' with fire!
Diffstat (limited to 'case')
-rw-r--r--case/case.scad66
1 files changed, 52 insertions, 14 deletions
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],