Getting there with smaller corner radius

This commit is contained in:
XANTRONIX 2023-11-12 23:33:01 -05:00
parent 36df84272f
commit cc5f2520d1

View file

@ -110,83 +110,67 @@ module keyboard_base_plate(pcb_width, pcb_length) {
/* Upper wall */ /* Upper wall */
side([-pcb_clearance_edge - thickness + corner_radius, side([-pcb_clearance_edge - thickness + corner_radius,
pcb_clearance_edge + pcb_length, pcb_clearance_edge + pcb_length,
0], -thickness + corner_radius],
[wall_width, thickness, wall_height]); [wall_width, thickness, wall_height + thickness - corner_radius]);
/* Right wall */ /* Right wall */
side([ pcb_clearance_edge + pcb_width, side([ pcb_clearance_edge + pcb_width,
-pcb_clearance_edge - thickness + corner_radius, -pcb_clearance_edge - thickness + corner_radius,
0], -thickness + corner_radius],
[thickness, wall_length, wall_height]); [thickness, wall_length, wall_height + thickness - corner_radius]);
/* Lower wall */ /* Lower wall */
side([-pcb_clearance_edge - thickness + corner_radius, side([-pcb_clearance_edge - thickness + corner_radius,
-pcb_clearance_edge - thickness, -pcb_clearance_edge - thickness,
0], -thickness + corner_radius],
[wall_width, thickness, wall_height]); [wall_width, thickness, wall_height + thickness - corner_radius]);
/* Left wall */ /* Left wall */
side([-pcb_clearance_edge - thickness, side([-pcb_clearance_edge - thickness,
-pcb_clearance_edge - thickness + corner_radius, -pcb_clearance_edge - thickness + corner_radius,
0], -thickness + corner_radius],
[thickness, wall_length, wall_height]); [thickness, wall_length, wall_height + thickness - corner_radius]);
/* Upper right wall corner */ /* 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 + pcb_clearance_edge + pcb_length - corner_radius,
0], -thickness + corner_radius],
[0, 0, 0], [0, 0, 0],
corner_radius, corner_radius,
wall_height); wall_height + thickness - corner_radius);
/* Lower right wall corner */ /* 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, 0 - thickness - pcb_clearance_edge + corner_radius,
0], -thickness + corner_radius],
[0, 0, 270], [0, 0, 270],
corner_radius, corner_radius,
wall_height); wall_height + thickness - corner_radius);
/* Lower left wall corner */ /* Lower left wall corner */
wall_corner([-pcb_clearance_edge - thickness + corner_radius, wall_corner([-pcb_clearance_edge - thickness + corner_radius,
-pcb_clearance_edge - thickness + corner_radius, -pcb_clearance_edge - thickness + corner_radius,
0], -thickness + corner_radius],
[0, 0, 180], [0, 0, 180],
corner_radius, corner_radius,
wall_height); wall_height + thickness - corner_radius);
/* Upper left wall corner */ /* Upper left wall corner */
wall_corner([-pcb_clearance_edge - thickness + corner_radius, wall_corner([-pcb_clearance_edge - thickness + corner_radius,
pcb_clearance_edge + pcb_length + thickness - corner_radius, pcb_clearance_edge + pcb_length + thickness - corner_radius,
0], -thickness + corner_radius],
[0, 0, 90], [0, 0, 90],
corner_radius, corner_radius,
wall_height); wall_height + thickness - corner_radius);
/* Upper right corner */ /* Bottom plate */
/*round_corner([pcb_clearance_edge + thickness + pcb_width - corner_radius, side([-pcb_clearance_edge - thickness + corner_radius,
pcb_clearance_edge + thickness + pcb_length - corner_radius, -pcb_clearance_edge - thickness + corner_radius,
-thickness/2], -thickness],
[90, 90, 90]);*/ [bottom_width + 2 * thickness - 2 * corner_radius,
bottom_length + 2 * thickness - 2 * corner_radius,
/* Lower right corner */ thickness]);
/*round_corner([ pcb_clearance_edge + thickness + pcb_width - corner_radius,
-pcb_clearance_edge - thickness + corner_radius,
-thickness/2],
[180, 90, 90]);*/
/* Lower left corner */
/*round_corner([-pcb_clearance_edge - thickness + corner_radius,
-pcb_clearance_edge - thickness + corner_radius,
-thickness/2],
[-90, 90, 90]);*/
/* Upper left corner */
/*round_corner([-pcb_clearance_edge - thickness + corner_radius,
pcb_clearance_edge + thickness + pcb_length - corner_radius,
-thickness/2],
[0, 90, 90]);*/
/* Upper edge */ /* 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 + pcb_clearance_edge + pcb_length - corner_radius,
@ -215,13 +199,30 @@ module keyboard_base_plate(pcb_width, pcb_length) {
[270, 90, 0], [270, 90, 0],
bottom_length + 2 * corner_radius);*/ bottom_length + 2 * corner_radius);*/
/* Bottom plate */ /* Upper right corner */
/*side([-pcb_clearance_edge - corner_radius, /*round_corner([pcb_clearance_edge + thickness + pcb_width - corner_radius,
-pcb_clearance_edge - corner_radius, pcb_clearance_edge + thickness + pcb_length - corner_radius,
-thickness], -thickness/2],
[bottom_width + 2 * corner_radius, [90, 90, 90]);*/
bottom_length + 2 * corner_radius, thickness]);*/
/* Lower right corner */
/*round_corner([ pcb_clearance_edge + thickness + pcb_width - corner_radius,
-pcb_clearance_edge - thickness + corner_radius,
-thickness/2],
[180, 90, 90]);*/
/* Lower left corner */
/*round_corner([-pcb_clearance_edge - thickness + corner_radius,
-pcb_clearance_edge - thickness + corner_radius,
-thickness/2],
[-90, 90, 90]);*/
/* Upper left corner */
/*round_corner([-pcb_clearance_edge - thickness + corner_radius,
pcb_clearance_edge + thickness + pcb_length - corner_radius,
-thickness/2],
[0, 90, 90]);*/
/* Screw holes */ /* Screw holes */
/*for (screw_hole = screw_holes) { /*for (screw_hole = screw_holes) {
screw_post([screw_hole[0], screw_hole[1], 0], screw_post([screw_hole[0], screw_hole[1], 0],