diff options
Diffstat (limited to 'case/case.scad')
-rw-r--r-- | case/case.scad | 95 |
1 files changed, 48 insertions, 47 deletions
diff --git a/case/case.scad b/case/case.scad index 6794381..04241a9 100644 --- a/case/case.scad +++ b/case/case.scad @@ -79,96 +79,97 @@ module keyboard_base_plate(pcb_width, pcb_height, screw_holes=[]) { cylinder(h=h, r=d2/2.0); } } - - /* Lower left corner */ - round_corner([0 - pcb_clearance_edge, - 0 - pcb_clearance_edge, 0], [-90, 90, 90]); - - /* Upper left orner */ - round_corner([0 - pcb_clearance_edge, - pcb_clearance_edge + pcb_height, 0], [0, 90, 90]); /* Upper right corner */ - round_corner([pcb_clearance_edge + pcb_width, - pcb_clearance_edge + pcb_height, 0], [90, 90, 90]); + round_corner([2 * pcb_clearance_edge + pcb_width, + 2 * pcb_clearance_edge + pcb_height, 0], [90, 90, 90]); /* Lower right corner */ - round_corner([ pcb_clearance_edge + pcb_width, - 0 - pcb_clearance_edge, 0], [180, 90, 90]); + round_corner([ 2 * pcb_clearance_edge + pcb_width, + -2 * pcb_clearance_edge, 0], [180, 90, 90]); + + /* Lower left corner */ + round_corner([-2 * pcb_clearance_edge, + -2 * pcb_clearance_edge, 0], [-90, 90, 90]); + + /* Upper left corner */ + round_corner([-2 * pcb_clearance_edge, + 2 * pcb_clearance_edge + pcb_height, 0], [0, 90, 90]); /* Upper edge */ - round_edge([0 - pcb_clearance_edge, - pcb_clearance_edge + pcb_height, 0], [0, 90, 0], - 2 * pcb_clearance_edge + pcb_width); + round_edge([-2 * pcb_clearance_edge, + 2 * pcb_clearance_edge + pcb_height, 0], [0, 90, 0], + 2 * thickness + pcb_width); /* Right edge */ - round_edge([ pcb_clearance_edge + pcb_width, - 0 - pcb_clearance_edge, 0], [270, 0, 0], - 2 * pcb_clearance_edge + pcb_height); + round_edge([ 2 * pcb_clearance_edge + pcb_width, + -2 * pcb_clearance_edge, 0], [270, 0, 0], + 2 * thickness + pcb_height); /* Lower edge */ - round_edge([0 - pcb_clearance_edge, - 0 - pcb_clearance_edge, 0], [90, 180, 90], - 2 * pcb_clearance_edge + pcb_width); + round_edge([-2 * pcb_clearance_edge, + -2 * pcb_clearance_edge, 0], [90, 180, 90], + 2 * thickness + pcb_width); /* Left edge */ - round_edge([0 - pcb_clearance_edge, - 0 - pcb_clearance_edge, 0], [270, 90, 0], - 2 * pcb_clearance_edge + pcb_height); + round_edge([-2 * pcb_clearance_edge, + -2 * pcb_clearance_edge, 0], [270, 90, 0], + 2 * thickness + pcb_height); /* Upper right wall corner */ - wall_corner([pcb_clearance_edge + pcb_width, - pcb_clearance_edge + pcb_height, 0], + wall_corner([2 * pcb_clearance_edge + pcb_width, + 2 * 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], + wall_corner([ 2 * pcb_clearance_edge + pcb_width, + -2 * 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], + wall_corner([-2 * pcb_clearance_edge, + -2 * 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], + wall_corner([-2 * pcb_clearance_edge, + 2 * pcb_clearance_edge + pcb_height, 0], [0, 0, 90], corner_radius, wall_height); /* Upper wall */ - side([ 0 - pcb_clearance_edge, - pcb_height, 0], - [thickness + pcb_width, - thickness, - wall_height]); + side([-2 * pcb_clearance_edge, + pcb_clearance_edge + pcb_height, 0], + [2 * thickness + pcb_width, thickness, wall_height]); /* Right wall */ - side([pcb_width, 0 - pcb_clearance_edge, 0], - [thickness, thickness + pcb_height, wall_height]); + side([ pcb_clearance_edge + pcb_width, + -2 * pcb_clearance_edge, 0], + [thickness, 2 * thickness + pcb_height, wall_height]); /* Lower wall */ - side([0 - pcb_clearance_edge, 0 - thickness, 0], - [thickness + pcb_width, thickness, wall_height]); + side([-2 * pcb_clearance_edge, + 0 - pcb_clearance_edge - thickness, 0], + [ 2 * thickness + pcb_width, thickness, wall_height]); /* Left wall */ - side([0 - thickness, 0 - pcb_clearance_edge, 0], - [thickness, thickness + pcb_height, wall_height]); + side([ 0 - pcb_clearance_edge - thickness, + -2 * pcb_clearance_edge, 0], + [thickness, 2 * thickness + pcb_height, wall_height]); /* Bottom plate */ - side([ 0 - pcb_clearance_edge, - 0 - pcb_clearance_edge, + side([-2 * pcb_clearance_edge, + -2 * pcb_clearance_edge, -thickness / 2], - [2 * pcb_clearance_edge + pcb_width, - 2 * pcb_clearance_edge + pcb_height, + [2 * thickness + pcb_width, + 2 * thickness + pcb_height, thickness]); /* Screw holes */ |