Loads better!!!1

This commit is contained in:
XANTRONIX 2023-11-12 23:57:34 -05:00
parent 6aa3214273
commit de917273f3

View file

@ -6,11 +6,11 @@ pcb_length = 95.250;
module keyboard_base_plate(pcb_width, pcb_length) {
pcb_clearance_edge = 1.0;
pcb_clearance_bottom = 2.0;
pcb_screw_hole_diameter = 1.5;
thickness = 1.75;
corner_radius = thickness / 4;
corner_radius = 1.25;
case_color = [0.5, 0.5, 0.5, 1.0];
@ -57,14 +57,14 @@ module keyboard_base_plate(pcb_width, pcb_length) {
square(corner_radius*2);
}
}
module side(translation, dimensions) {
color(case_color)
translate(translation)
linear_extrude(dimensions[2])
square([dimensions[0], dimensions[1]], false);
}
module wall_corner(translation, rotation, radius, length) {
color(case_color)
translate(translation)
@ -75,7 +75,7 @@ module keyboard_base_plate(pcb_width, pcb_length) {
square([radius, radius], false);
}
}
module screw_post(translation, h, d1, d2) {
color(case_color)
translate(translation)
@ -84,23 +84,23 @@ module keyboard_base_plate(pcb_width, pcb_length) {
cylinder(h=h, r=d2/2.0);
}
}
module ridges(width, height) {
horizontal = [
(bottom_length / 3),
(bottom_length / 3) * 2
];
vertical = [
(bottom_width / 3),
(bottom_width / 3) * 2
];
for (y = horizontal) {
side([0 - pcb_clearance_edge, y, 0],
[bottom_width, width, height]);
}
for (x = vertical) {
side([x, 0 - pcb_clearance_edge, 0],
[width, bottom_length, height]);
@ -112,19 +112,19 @@ module keyboard_base_plate(pcb_width, pcb_length) {
pcb_clearance_edge + pcb_length,
-thickness + corner_radius],
[wall_width, thickness, wall_height + thickness - corner_radius]);
/* Right wall */
side([ pcb_clearance_edge + pcb_width,
-pcb_clearance_edge - thickness + corner_radius,
-thickness + corner_radius],
[thickness, wall_length, wall_height + thickness - corner_radius]);
/* Lower wall */
side([-pcb_clearance_edge - thickness + corner_radius,
-pcb_clearance_edge - thickness,
-thickness + corner_radius],
[wall_width, thickness, wall_height + thickness - corner_radius]);
/* Left wall */
side([-pcb_clearance_edge - thickness,
-pcb_clearance_edge - thickness + corner_radius,
@ -138,7 +138,7 @@ module keyboard_base_plate(pcb_width, pcb_length) {
[0, 0, 0],
corner_radius,
wall_height + thickness - corner_radius);
/* Lower right wall corner */
wall_corner([ thickness + pcb_clearance_edge + pcb_width - corner_radius,
0 - thickness - pcb_clearance_edge + corner_radius,
@ -154,7 +154,7 @@ module keyboard_base_plate(pcb_width, pcb_length) {
[0, 0, 180],
corner_radius,
wall_height + thickness - corner_radius);
/* Upper left wall corner */
wall_corner([-pcb_clearance_edge - thickness + corner_radius,
pcb_clearance_edge + pcb_length + thickness - corner_radius,
@ -162,7 +162,7 @@ module keyboard_base_plate(pcb_width, pcb_length) {
[0, 0, 90],
corner_radius,
wall_height + thickness - corner_radius);
/* Bottom plate */
side([-pcb_clearance_edge - thickness + corner_radius,
-pcb_clearance_edge - thickness + corner_radius,
@ -170,34 +170,34 @@ module keyboard_base_plate(pcb_width, pcb_length) {
[bottom_width + 2 * thickness - 2 * corner_radius,
bottom_length + 2 * thickness - 2 * corner_radius,
thickness]);
/* Upper edge */
round_edge([-pcb_clearance_edge - thickness + corner_radius,
pcb_clearance_edge + thickness + pcb_length - corner_radius,
-thickness + corner_radius],
[0, 90, 0],
bottom_width + thickness + 2 * corner_radius);
wall_width);
/* Right edge */
round_edge([ pcb_clearance_edge + thickness + pcb_width - corner_radius,
-pcb_clearance_edge - thickness + corner_radius,
-thickness + corner_radius],
[270, 0, 0],
bottom_length + thickness + 2 * corner_radius);
wall_length);
/* Lower edge */
round_edge([-pcb_clearance_edge - thickness + corner_radius,
-pcb_clearance_edge - thickness + corner_radius,
-thickness + corner_radius],
[90, 180, 90],
bottom_width + thickness + 2 * corner_radius);
wall_width);
/* Left edge */
round_edge([-pcb_clearance_edge - thickness + corner_radius,
-pcb_clearance_edge - thickness + corner_radius,
-thickness + corner_radius],
[270, 90, 0],
bottom_length + thickness + 2 * corner_radius);
wall_length);
/* Upper right corner */
round_corner([pcb_clearance_edge + thickness + pcb_width - corner_radius,
@ -230,7 +230,7 @@ module keyboard_base_plate(pcb_width, pcb_length) {
pcb_screw_hole_diameter * 2,
pcb_screw_hole_diameter);
}
/* Ridges (for rigidity!) */
ridges(thickness * 2, pcb_clearance_bottom / 2);
}