Hell yeah we're cookin'
This commit is contained in:
parent
7b6f448843
commit
c02dedceed
1 changed files with 48 additions and 47 deletions
|
@ -80,95 +80,96 @@ module keyboard_base_plate(pcb_width, pcb_height, screw_holes=[]) {
|
|||
}
|
||||
}
|
||||
|
||||
/* 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 */
|
||||
|
|
Loading…
Add table
Reference in a new issue