Start of a final go at this
This commit is contained in:
parent
533cdf1817
commit
e92a326077
1 changed files with 56 additions and 56 deletions
110
case/case.scad
110
case/case.scad
|
@ -10,12 +10,12 @@ module keyboard_base_plate(pcb_width, pcb_length) {
|
|||
pcb_screw_hole_diameter = 1.5;
|
||||
|
||||
thickness = 1.75;
|
||||
corner_radius = thickness / 2.0;
|
||||
corner_radius = thickness / 4;
|
||||
|
||||
case_color = [0.5, 0.5, 0.5, 1.0];
|
||||
|
||||
wall_width = pcb_width + 2 * pcb_clearance_edge;
|
||||
wall_length = pcb_length + 2 * pcb_clearance_edge;
|
||||
wall_width = pcb_width + 2 * (pcb_clearance_edge + thickness) - 2 * corner_radius;
|
||||
wall_length = pcb_length + 2 * (pcb_clearance_edge + thickness) - 2 * corner_radius;
|
||||
wall_height = 14.0;
|
||||
|
||||
bottom_width = 2 * (pcb_clearance_edge) + pcb_width;
|
||||
|
@ -107,128 +107,128 @@ module keyboard_base_plate(pcb_width, pcb_length) {
|
|||
}
|
||||
}
|
||||
|
||||
/* Upper wall */
|
||||
side([-pcb_clearance_edge - thickness + corner_radius,
|
||||
pcb_clearance_edge + pcb_length,
|
||||
0],
|
||||
[wall_width, thickness, wall_height]);
|
||||
|
||||
/* Right wall */
|
||||
side([ pcb_clearance_edge + pcb_width,
|
||||
-pcb_clearance_edge - thickness + corner_radius,
|
||||
0],
|
||||
[thickness, wall_length, wall_height]);
|
||||
|
||||
/* Lower wall */
|
||||
side([-pcb_clearance_edge - thickness + corner_radius,
|
||||
-pcb_clearance_edge - thickness,
|
||||
0],
|
||||
[wall_width, thickness, wall_height]);
|
||||
|
||||
/* Left wall */
|
||||
side([-pcb_clearance_edge - thickness,
|
||||
-pcb_clearance_edge - thickness + corner_radius,
|
||||
0],
|
||||
[thickness, wall_length, wall_height]);
|
||||
|
||||
/* Upper right corner */
|
||||
round_corner([pcb_clearance_edge + thickness + pcb_width - corner_radius,
|
||||
/*round_corner([pcb_clearance_edge + thickness + pcb_width - corner_radius,
|
||||
pcb_clearance_edge + thickness + pcb_length - corner_radius,
|
||||
-thickness/2],
|
||||
[90, 90, 90]);
|
||||
[90, 90, 90]);*/
|
||||
|
||||
/* Lower right corner */
|
||||
round_corner([ pcb_clearance_edge + thickness + pcb_width - corner_radius,
|
||||
/*round_corner([ pcb_clearance_edge + thickness + pcb_width - corner_radius,
|
||||
-pcb_clearance_edge - thickness + corner_radius,
|
||||
-thickness/2],
|
||||
[180, 90, 90]);
|
||||
[180, 90, 90]);*/
|
||||
|
||||
/* Lower left corner */
|
||||
round_corner([-pcb_clearance_edge - thickness + corner_radius,
|
||||
/*round_corner([-pcb_clearance_edge - thickness + corner_radius,
|
||||
-pcb_clearance_edge - thickness + corner_radius,
|
||||
-thickness/2],
|
||||
[-90, 90, 90]);
|
||||
[-90, 90, 90]);*/
|
||||
|
||||
/* Upper left corner */
|
||||
round_corner([-pcb_clearance_edge - thickness + corner_radius,
|
||||
/*round_corner([-pcb_clearance_edge - thickness + corner_radius,
|
||||
pcb_clearance_edge + thickness + pcb_length - corner_radius,
|
||||
-thickness/2],
|
||||
[0, 90, 90]);
|
||||
[0, 90, 90]);*/
|
||||
|
||||
/* Upper edge */
|
||||
round_edge([0 - thickness - pcb_clearance_edge + corner_radius,
|
||||
/*round_edge([0 - thickness - pcb_clearance_edge + corner_radius,
|
||||
thickness + pcb_clearance_edge + pcb_length - corner_radius,
|
||||
-thickness/2],
|
||||
[0, 90, 0],
|
||||
bottom_width + 2 * corner_radius);
|
||||
bottom_width + 2 * corner_radius);*/
|
||||
|
||||
/* Right edge */
|
||||
round_edge([ thickness + pcb_clearance_edge + pcb_width - corner_radius,
|
||||
/*round_edge([ thickness + pcb_clearance_edge + pcb_width - corner_radius,
|
||||
0 - thickness - pcb_clearance_edge + corner_radius,
|
||||
-thickness/2],
|
||||
[270, 0, 0],
|
||||
bottom_length + 2 * corner_radius);
|
||||
bottom_length + 2 * corner_radius);*/
|
||||
|
||||
/* Lower edge */
|
||||
round_edge([-pcb_clearance_edge - thickness + corner_radius,
|
||||
/*round_edge([-pcb_clearance_edge - thickness + corner_radius,
|
||||
-pcb_clearance_edge - thickness + corner_radius,
|
||||
-thickness/2],
|
||||
[90, 180, 90],
|
||||
bottom_width + 2 * corner_radius);
|
||||
bottom_width + 2 * corner_radius);*/
|
||||
|
||||
/* Left edge */
|
||||
round_edge([-pcb_clearance_edge - thickness + corner_radius,
|
||||
/*round_edge([-pcb_clearance_edge - thickness + corner_radius,
|
||||
-pcb_clearance_edge - thickness + corner_radius,
|
||||
-thickness/2],
|
||||
[270, 90, 0],
|
||||
bottom_length + 2 * corner_radius);
|
||||
bottom_length + 2 * corner_radius);*/
|
||||
|
||||
/* Upper right wall corner */
|
||||
wall_corner([thickness + pcb_clearance_edge + pcb_width - corner_radius,
|
||||
/*wall_corner([thickness + pcb_clearance_edge + pcb_width - corner_radius,
|
||||
thickness + pcb_clearance_edge + pcb_length - corner_radius,
|
||||
-thickness/2],
|
||||
[0, 0, 0],
|
||||
corner_radius,
|
||||
wall_height);
|
||||
wall_height);*/
|
||||
|
||||
/* Lower right wall corner */
|
||||
wall_corner([ thickness + pcb_clearance_edge + pcb_width - corner_radius,
|
||||
/*wall_corner([ thickness + pcb_clearance_edge + pcb_width - corner_radius,
|
||||
0 - thickness - pcb_clearance_edge + corner_radius,
|
||||
-thickness/2],
|
||||
[0, 0, 270],
|
||||
corner_radius,
|
||||
wall_height);
|
||||
wall_height);*/
|
||||
|
||||
/* Lower left wall corner */
|
||||
wall_corner([0 - thickness - pcb_clearance_edge + corner_radius,
|
||||
/*wall_corner([0 - thickness - pcb_clearance_edge + corner_radius,
|
||||
0 - thickness - pcb_clearance_edge + corner_radius,
|
||||
-thickness/2],
|
||||
[0, 0, 180],
|
||||
corner_radius,
|
||||
wall_height);
|
||||
wall_height);*/
|
||||
|
||||
/* Upper left wall corner */
|
||||
wall_corner([-pcb_clearance_edge - corner_radius,
|
||||
/*wall_corner([-pcb_clearance_edge - corner_radius,
|
||||
pcb_clearance_edge + corner_radius + pcb_length,
|
||||
-thickness/2],
|
||||
[0, 0, 90],
|
||||
corner_radius,
|
||||
wall_height);
|
||||
|
||||
/* Upper wall */
|
||||
side([-pcb_clearance_edge - corner_radius,
|
||||
pcb_clearance_edge + pcb_length,
|
||||
-thickness/2],
|
||||
[wall_width + 2 * corner_radius, thickness, wall_height]);
|
||||
|
||||
/* Right wall */
|
||||
side([ pcb_clearance_edge + pcb_width,
|
||||
-pcb_clearance_edge - corner_radius,
|
||||
-thickness/2],
|
||||
[thickness, wall_length + 2 * corner_radius, wall_height]);
|
||||
|
||||
/* Lower wall */
|
||||
side([-pcb_clearance_edge - corner_radius,
|
||||
-pcb_clearance_edge - thickness,
|
||||
-thickness/2],
|
||||
[wall_width + 2 * corner_radius, thickness, wall_height]);
|
||||
|
||||
/* Left wall */
|
||||
side([-pcb_clearance_edge - thickness,
|
||||
-pcb_clearance_edge - corner_radius,
|
||||
-thickness/2],
|
||||
[thickness, wall_length + 2 * corner_radius, wall_height]);
|
||||
wall_height);*/
|
||||
|
||||
/* Bottom plate */
|
||||
side([-pcb_clearance_edge - corner_radius,
|
||||
/*side([-pcb_clearance_edge - corner_radius,
|
||||
-pcb_clearance_edge - corner_radius,
|
||||
-thickness],
|
||||
[bottom_width + 2 * corner_radius,
|
||||
bottom_length + 2 * corner_radius, thickness]);
|
||||
bottom_length + 2 * corner_radius, thickness]);*/
|
||||
|
||||
/* Screw holes */
|
||||
for (screw_hole = screw_holes) {
|
||||
/*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);
|
||||
}
|
||||
}*/
|
||||
|
||||
/* Ridges (for rigidity!) */
|
||||
ridges(thickness * 2, pcb_clearance_bottom / 2);
|
||||
|
|
Loading…
Add table
Reference in a new issue