summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXANTRONIX Development2023-11-12 02:47:45 -0500
committerXANTRONIX Development2023-11-12 02:47:45 -0500
commit6ebd07e4e1ba22bc18d573f5a132fcf8e1f1d320 (patch)
tree099b5b3cb65869ae0d6e9303e885099e8793e12f
parentdace90c21b45974c367a56014462e858e33c8616 (diff)
downloadxantronix-z32-6ebd07e4e1ba22bc18d573f5a132fcf8e1f1d320.tar.gz
xantronix-z32-6ebd07e4e1ba22bc18d573f5a132fcf8e1f1d320.tar.bz2
xantronix-z32-6ebd07e4e1ba22bc18d573f5a132fcf8e1f1d320.zip
Sorta scrapping things and starting over
-rw-r--r--case/case.scad128
1 files changed, 72 insertions, 56 deletions
diff --git a/case/case.scad b/case/case.scad
index 320b876..28b7e35 100644
--- a/case/case.scad
+++ b/case/case.scad
@@ -9,11 +9,14 @@ module keyboard_base_plate(pcb_width, pcb_height) {
pcb_screw_hole_diameter = 1.5;
- thickness = 2.0;
+ thickness = 1.75;
wall_height = 14.0;
corner_radius = thickness / 2.0;
- case_color = [0, 0, 0, 1.0];
+ case_color = [0.5, 0.5, 0.5, 1.0];
+
+ bottom_width = 2 * (pcb_clearance_edge + thickness) + pcb_width;
+ bottom_height = 2 * (pcb_clearance_edge + thickness) + pcb_height;
screw_holes = [
[ 4.8150, 85.7250],
@@ -86,106 +89,119 @@ module keyboard_base_plate(pcb_width, pcb_height) {
cylinder(h=h, r=d2/2.0);
}
}
-
+
/* Upper right corner */
- round_corner([2 * pcb_clearance_edge + pcb_width,
- 2 * pcb_clearance_edge + pcb_height, 0], [90, 90, 90]);
+ /*round_corner([thickness + pcb_clearance_edge + pcb_width,
+ thickness + pcb_clearance_edge + pcb_height, 0],
+ [90, 90, 90]);*/
/* Lower right corner */
- round_corner([ 2 * pcb_clearance_edge + pcb_width,
- -2 * pcb_clearance_edge, 0], [180, 90, 90]);
+ round_corner([ thickness + pcb_clearance_edge + pcb_width,
+ 0 - thickness - pcb_clearance_edge,
+ -thickness/2],
+ [180, 90, 90]);
/* Lower left corner */
- round_corner([-2 * pcb_clearance_edge,
- -2 * pcb_clearance_edge, 0], [-90, 90, 90]);
+ round_corner([0 - thickness - pcb_clearance_edge,
+ 0 - thickness - pcb_clearance_edge,
+ -thickness/2],
+ [-90, 90, 90]);
/* Upper left corner */
- round_corner([-2 * pcb_clearance_edge,
- 2 * pcb_clearance_edge + pcb_height, 0], [0, 90, 90]);
+ round_corner([0 - thickness - pcb_clearance_edge,
+ thickness + pcb_clearance_edge + pcb_height,
+ -thickness/2],
+ [0, 90, 90]);
/* Upper edge */
- round_edge([-2 * pcb_clearance_edge,
- 2 * pcb_clearance_edge + pcb_height, 0], [0, 90, 0],
- 2 * thickness + pcb_width);
+ round_edge([0 - thickness - pcb_clearance_edge,
+ thickness + pcb_clearance_edge + pcb_height,
+ -thickness/2],
+ [0, 90, 0],
+ bottom_width);
/* Right edge */
- round_edge([ 2 * pcb_clearance_edge + pcb_width,
- -2 * pcb_clearance_edge, 0], [270, 0, 0],
- 2 * thickness + pcb_height);
+ round_edge([ thickness + pcb_clearance_edge + pcb_width,
+ 0 - thickness - pcb_clearance_edge,
+ -thickness/2],
+ [270, 0, 0],
+ bottom_height);
/* Lower edge */
- round_edge([-2 * pcb_clearance_edge,
- -2 * pcb_clearance_edge, 0], [90, 180, 90],
- 2 * thickness + pcb_width);
+ round_edge([0 - thickness - pcb_clearance_edge,
+ 0 - thickness - pcb_clearance_edge,
+ -thickness/2],
+ [90, 180, 90],
+ bottom_width);
/* Left edge */
- round_edge([-2 * pcb_clearance_edge,
- -2 * pcb_clearance_edge, 0], [270, 90, 0],
- 2 * thickness + pcb_height);
+ round_edge([0 - thickness - pcb_clearance_edge,
+ 0 - thickness - pcb_clearance_edge,
+ -thickness/2],
+ [270, 90, 0],
+ bottom_height);
/* Upper right wall corner */
- wall_corner([2 * pcb_clearance_edge + pcb_width,
- 2 * pcb_clearance_edge + pcb_height, 0],
+ /*wall_corner([thickness + pcb_clearance_edge + pcb_width,
+ thickness + pcb_clearance_edge + pcb_height, 0],
[0, 0, 0],
corner_radius,
- wall_height);
+ wall_height);*/
/* Lower right wall corner */
- wall_corner([ 2 * pcb_clearance_edge + pcb_width,
- -2 * pcb_clearance_edge, 0],
+ /*wall_corner([ thickness + pcb_clearance_edge + pcb_width,
+ 0 - thickness - pcb_clearance_edge, 0],
[0, 0, 270],
corner_radius,
- wall_height);
+ wall_height);*/
/* Lower left wall corner */
- wall_corner([-2 * pcb_clearance_edge,
- -2 * pcb_clearance_edge, 0],
+ /*wall_corner([0 - thickness - pcb_clearance_edge,
+ 0 - thickness - pcb_clearance_edge, 0],
[0, 0, 180],
corner_radius,
- wall_height);
+ wall_height);*/
/* Upper left wall corner */
- wall_corner([-2 * pcb_clearance_edge,
- 2 * pcb_clearance_edge + pcb_height, 0],
+ /*wall_corner([0 - thickness - pcb_clearance_edge,
+ thickness + pcb_clearance_edge + pcb_height, 0],
[0, 0, 90],
corner_radius,
- wall_height);
+ wall_height);*/
/* Upper wall */
- side([-2 * pcb_clearance_edge,
- pcb_clearance_edge + pcb_height, 0],
- [2 * thickness + pcb_width, thickness, wall_height]);
+ /*side([0 - thickness - pcb_clearance_edge,
+ pcb_clearance_edge + pcb_height, 0],
+ [2 * thickness + pcb_width, thickness, wall_height]);*/
/* Right wall */
- side([ pcb_clearance_edge + pcb_width,
- -2 * pcb_clearance_edge, 0],
- [thickness, 2 * thickness + pcb_height, wall_height]);
+ /*side([ pcb_clearance_edge + pcb_width,
+ 0 - thickness - pcb_clearance_edge, 0],
+ [thickness, 2 * thickness + pcb_height, wall_height]);*/
/* Lower wall */
- side([-2 * pcb_clearance_edge,
- 0 - pcb_clearance_edge - thickness, 0],
- [ 2 * thickness + pcb_width, thickness, wall_height]);
+ /*side([0 - thickness - pcb_clearance_edge,
+ 0 - thickness - pcb_clearance_edge, 0],
+ [2 * thickness + pcb_width, thickness, wall_height]);*/
/* Left wall */
- side([ 0 - pcb_clearance_edge - thickness,
- -2 * pcb_clearance_edge, 0],
- [thickness, 2 * thickness + pcb_height, wall_height]);
+ /*side([0 - thickness - pcb_clearance_edge,
+ 0 - thickness - pcb_clearance_edge, 0],
+ [thickness, 2 * thickness + pcb_height, wall_height]);*/
/* Bottom plate */
- side([-2 * pcb_clearance_edge,
- -2 * pcb_clearance_edge,
- -thickness / 2],
- [2 * thickness + pcb_width,
- 2 * thickness + pcb_height,
- thickness]);
+ side([0 - thickness - pcb_clearance_edge,
+ 0 - thickness - pcb_clearance_edge,
+ 0 - thickness],
+ [bottom_width, bottom_height, thickness]);
/* Screw holes */
- for (screw_hole = screw_holes) {
- screw_post([screw_hole[0], screw_hole[1], thickness],
+ /*for (screw_hole = screw_holes) {
+ screw_post([screw_hole[0], screw_hole[1], 0],
pcb_clearance_bottom * 2,
pcb_screw_hole_diameter * 2,
pcb_screw_hole_diameter);
- }
+ }*/
}
keyboard_base_plate(pcb_width, pcb_height);