Now we're cookin' with fire!
This commit is contained in:
parent
f7ed749597
commit
da79fb1c7a
1 changed files with 52 additions and 14 deletions
|
@ -22,7 +22,7 @@ module keyboard_base_plate(pcb_width, pcb_height) {
|
|||
}
|
||||
}
|
||||
|
||||
module round_edge(length, translation, rotation) {
|
||||
module round_edge(translation, rotation, length) {
|
||||
translate(translation)
|
||||
rotate(rotation)
|
||||
linear_extrude(length)
|
||||
|
@ -38,6 +38,16 @@ module keyboard_base_plate(pcb_width, pcb_height) {
|
|||
square([dimensions[0], dimensions[1]], false);
|
||||
}
|
||||
|
||||
module wall_corner(translation, rotation, radius, length) {
|
||||
translate(translation)
|
||||
rotate(rotation)
|
||||
linear_extrude(length)
|
||||
intersection() {
|
||||
circle(r=radius);
|
||||
square([radius, radius], false);
|
||||
}
|
||||
}
|
||||
|
||||
/* Lower left corner */
|
||||
round_corner([0 - pcb_clearance_edge,
|
||||
0 - pcb_clearance_edge, 0], [-90, 90, 90]);
|
||||
|
@ -55,24 +65,52 @@ module keyboard_base_plate(pcb_width, pcb_height) {
|
|||
0 - pcb_clearance_edge, 0], [180, 90, 90]);
|
||||
|
||||
/* Upper edge */
|
||||
round_edge( 2 * pcb_clearance_edge + pcb_width,
|
||||
[0 - pcb_clearance_edge,
|
||||
pcb_clearance_edge + pcb_height, 0], [0, 90, 0]);
|
||||
round_edge([0 - pcb_clearance_edge,
|
||||
pcb_clearance_edge + pcb_height, 0], [0, 90, 0],
|
||||
2 * pcb_clearance_edge + pcb_width);
|
||||
|
||||
/* Right edge */
|
||||
round_edge( 2 * pcb_clearance_edge + pcb_height,
|
||||
[ pcb_clearance_edge + pcb_width,
|
||||
0 - pcb_clearance_edge, 0], [270, 0, 0]);
|
||||
round_edge([ pcb_clearance_edge + pcb_width,
|
||||
0 - pcb_clearance_edge, 0], [270, 0, 0],
|
||||
2 * pcb_clearance_edge + pcb_height);
|
||||
|
||||
/* Lower edge */
|
||||
round_edge(2 * pcb_clearance_edge + pcb_width,
|
||||
[0 - pcb_clearance_edge,
|
||||
0 - pcb_clearance_edge, 0], [90, 180, 90]);
|
||||
round_edge([0 - pcb_clearance_edge,
|
||||
0 - pcb_clearance_edge, 0], [90, 180, 90],
|
||||
2 * pcb_clearance_edge + pcb_width);
|
||||
|
||||
/* Left edge */
|
||||
round_edge( 2 * pcb_clearance_edge + pcb_height,
|
||||
[0 - pcb_clearance_edge,
|
||||
0 - pcb_clearance_edge, 0], [270, 90, 0]);
|
||||
round_edge([0 - pcb_clearance_edge,
|
||||
0 - pcb_clearance_edge, 0], [270, 90, 0],
|
||||
2 * pcb_clearance_edge + pcb_height);
|
||||
|
||||
/* Upper right wall corner */
|
||||
wall_corner([pcb_clearance_edge + pcb_width,
|
||||
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],
|
||||
[0, 0, 270],
|
||||
corner_radius,
|
||||
wall_height);
|
||||
|
||||
/* Lower left wall corner */
|
||||
wall_corner([0 - pcb_clearance_edge,
|
||||
0 - 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],
|
||||
[0, 0, 90],
|
||||
corner_radius,
|
||||
wall_height);
|
||||
|
||||
/* Upper wall */
|
||||
side([ 0 - pcb_clearance_edge,
|
||||
|
|
Loading…
Add table
Reference in a new issue