diff options
author | XANTRONIX Development | 2023-11-11 15:59:01 -0500 |
---|---|---|
committer | XANTRONIX Development | 2023-11-11 15:59:01 -0500 |
commit | d8426e7f90986329907fe6a4e13dbef0b5f45fdb (patch) | |
tree | 852ca1c01f279a616390b07b563047dba66f68af /case | |
parent | 2581a453fedec43717c1be04a6b72098a1e0958c (diff) | |
download | xantronix-z32-d8426e7f90986329907fe6a4e13dbef0b5f45fdb.tar.gz xantronix-z32-d8426e7f90986329907fe6a4e13dbef0b5f45fdb.tar.bz2 xantronix-z32-d8426e7f90986329907fe6a4e13dbef0b5f45fdb.zip |
idk man
Diffstat (limited to 'case')
-rw-r--r-- | case/case.scad | 66 |
1 files changed, 31 insertions, 35 deletions
diff --git a/case/case.scad b/case/case.scad index c47900e..009ceb4 100644 --- a/case/case.scad +++ b/case/case.scad @@ -6,10 +6,11 @@ pcb_height = 95.250; module keyboard_base_plate(pcb_width, pcb_height) { pcb_clearance_edge = 1.0; pcb_clearance_bottom = 2.0; + + thickness = 1.0; + corner_radius = thickness / 2.0; - corner_radius = 0.5; - - module corner(translation, rotation) { + module round_corner(translation, rotation) { translate(translation) rotate(rotation) rotate_extrude(angle=90) { @@ -20,7 +21,7 @@ module keyboard_base_plate(pcb_width, pcb_height) { } } - module edge(length, translation, rotation) { + module round_edge(length, translation, rotation) { translate(translation) rotate(rotation) linear_extrude(length) @@ -31,52 +32,47 @@ module keyboard_base_plate(pcb_width, pcb_height) { } /* Lower left corner */ - corner([0 - pcb_clearance_edge, - 0 - pcb_clearance_edge, 0], [-90, 90, 90]); + round_corner([0 - pcb_clearance_edge, + 0 - pcb_clearance_edge, 0], [-90, 90, 90]); /* Upper left orner */ - corner([0 - pcb_clearance_edge, - pcb_clearance_edge + pcb_height, 0], [0, 90, 90]); + round_corner([0 - pcb_clearance_edge, + pcb_clearance_edge + pcb_height, 0], [0, 90, 90]); /* Upper right corner */ - corner([pcb_clearance_edge + pcb_width, - pcb_clearance_edge + pcb_height, 0], [90, 90, 90]); + round_corner([pcb_clearance_edge + pcb_width, + pcb_clearance_edge + pcb_height, 0], [90, 90, 90]); /* Lower right corner */ - corner([ pcb_clearance_edge + pcb_width, - 0 - pcb_clearance_edge, 0], [180, 90, 90]); + round_corner([ pcb_clearance_edge + pcb_width, + 0 - pcb_clearance_edge, 0], [180, 90, 90]); /* Top edge */ - edge(2 * pcb_clearance_edge + pcb_width, - [0 - pcb_clearance_edge, - pcb_clearance_edge + pcb_height, 0], - [0, 90, 0]); + round_edge( 2 * pcb_clearance_edge + pcb_width, + [0 - pcb_clearance_edge, + pcb_clearance_edge + pcb_height, 0], [0, 90, 0]); /* Right edge */ - edge(2 * pcb_clearance_edge + pcb_height, - [ pcb_clearance_edge + pcb_width, - 0 - pcb_clearance_edge, 0], - [270, 0, 0]); + round_edge( 2 * pcb_clearance_edge + pcb_height, + [ pcb_clearance_edge + pcb_width, + 0 - pcb_clearance_edge, 0], [270, 0, 0]); /* Bottom edge */ - edge(2 * pcb_clearance_edge + pcb_width, - [0 - pcb_clearance_edge, - 0 - pcb_clearance_edge, - 0], - [90, 180, 90]); + round_edge(2 * pcb_clearance_edge + pcb_width, + [0 - pcb_clearance_edge, + 0 - pcb_clearance_edge, 0], [90, 180, 90]); /* Left edge */ - edge(2 * pcb_clearance_edge + pcb_width, - [0 - pcb_clearance_edge, - 0 - pcb_clearance_edge, 0], - [270, 90, 0]); + round_edge( 2 * pcb_clearance_edge + pcb_height, + [0 - pcb_clearance_edge, + 0 - pcb_clearance_edge, 0], [270, 90, 0]); - 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); + 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); } keyboard_base_plate(pcb_width, pcb_height); |