summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXANTRONIX Development2023-11-11 15:37:03 -0500
committerXANTRONIX Development2023-11-11 15:37:03 -0500
commit2581a453fedec43717c1be04a6b72098a1e0958c (patch)
treece1a652ee97f3675c55a69fb025e74b1fb7537d4
parentec44dc2e6aae98daa68eff305a0a11fc71290dbb (diff)
downloadxantronix-z32-2581a453fedec43717c1be04a6b72098a1e0958c.tar.gz
xantronix-z32-2581a453fedec43717c1be04a6b72098a1e0958c.tar.bz2
xantronix-z32-2581a453fedec43717c1be04a6b72098a1e0958c.zip
Account for PCB edge clearances
-rw-r--r--case/case.scad55
1 files changed, 38 insertions, 17 deletions
diff --git a/case/case.scad b/case/case.scad
index db677a9..c47900e 100644
--- a/case/case.scad
+++ b/case/case.scad
@@ -30,32 +30,53 @@ module keyboard_base_plate(pcb_width, pcb_height) {
}
}
- /* Lower left rounded corner */
- corner([0, 0, 0], [-90, 90, 90]);
+ /* Lower left corner */
+ corner([0 - pcb_clearance_edge,
+ 0 - pcb_clearance_edge, 0], [-90, 90, 90]);
- /* Upper left rounded corner */
- corner([0, pcb_height, 0], [0, 90, 90]);
+ /* Upper left orner */
+ corner([0 - pcb_clearance_edge,
+ pcb_clearance_edge + pcb_height, 0], [0, 90, 90]);
- /* Upper right rounded corner */
- corner([pcb_width, pcb_height, 0], [90, 90, 90]);
+ /* Upper right corner */
+ corner([pcb_clearance_edge + pcb_width,
+ pcb_clearance_edge + pcb_height, 0], [90, 90, 90]);
- /* Lower right rounded corner */
- corner([pcb_width, 0, 0], [180, 90, 90]);
+ /* Lower right corner */
+ corner([ pcb_clearance_edge + pcb_width,
+ 0 - pcb_clearance_edge, 0], [180, 90, 90]);
/* Top edge */
- edge(pcb_width, [0, pcb_height, 0], [0, 90, 0]);
-
+ edge(2 * pcb_clearance_edge + pcb_width,
+ [0 - pcb_clearance_edge,
+ pcb_clearance_edge + pcb_height, 0],
+ [0, 90, 0]);
+
/* Right edge */
- edge(pcb_height, [pcb_width, 0, 0], [270, 0, 0]);
-
+ edge(2 * pcb_clearance_edge + pcb_height,
+ [ pcb_clearance_edge + pcb_width,
+ 0 - pcb_clearance_edge, 0],
+ [270, 0, 0]);
+
/* Bottom edge */
- edge(pcb_width, [0, 0, 0], [90, 180, 90]);
-
+ edge(2 * pcb_clearance_edge + pcb_width,
+ [0 - pcb_clearance_edge,
+ 0 - pcb_clearance_edge,
+ 0],
+ [90, 180, 90]);
+
/* Left edge */
- edge(pcb_height, [0, 0, 0], [270, 90, 0]);
+ edge(2 * pcb_clearance_edge + pcb_width,
+ [0 - pcb_clearance_edge,
+ 0 - pcb_clearance_edge, 0],
+ [270, 90, 0]);
- linear_extrude(corner_radius*2);
- square([pcb_width, pcb_height], false);
+ linear_extrude(corner_radius*2)
+ translate([0 - pcb_clearance_edge,
+ 0 - pcb_clearance_edge, 0])
+ square([2 * pcb_clearance_edge + pcb_width,
+ 2 * pcb_clearance_edge + pcb_height],
+ false);
}
keyboard_base_plate(pcb_width, pcb_height);