2-manifold my ass
This commit is contained in:
parent
803a3c432f
commit
6b03e550ba
1 changed files with 61 additions and 32 deletions
|
@ -37,14 +37,18 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
|
||||||
screw_post_corner_height = 12.00;
|
screw_post_corner_height = 12.00;
|
||||||
screw_post_middle_height = 29.30;
|
screw_post_middle_height = 29.30;
|
||||||
screw_post_upper_y_offset = case_length_bottom - wall_width - 15.00;
|
screw_post_upper_y_offset = case_length_bottom - wall_width - 15.00;
|
||||||
screw_post_x_offset = wall_width + 6.50;
|
screw_post_middle_y_offset = 72.50;
|
||||||
|
screw_post_lower_y_offset = 6.50;
|
||||||
|
screw_post_x_offset = (keyboard_x_offset - 2 * wall_width) / 2 + wall_width;
|
||||||
|
|
||||||
|
eps = 0.01;
|
||||||
|
|
||||||
module fascia() {
|
module fascia() {
|
||||||
linear_extrude(wall_width)
|
|
||||||
difference() {
|
difference() {
|
||||||
square([case_width_bottom, case_length_bottom], false);
|
cube([case_width_bottom, case_length_bottom, wall_width], false);
|
||||||
translate([keyboard_x_offset, keyboard_y_offset, 0])
|
|
||||||
square([keyboard_width, keyboard_length], false);
|
translate([keyboard_x_offset, keyboard_y_offset, -eps])
|
||||||
|
cube([keyboard_width, keyboard_length, wall_width + 2*eps], false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -52,24 +56,24 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
|
||||||
for (i = [0:vent_count]) {
|
for (i = [0:vent_count]) {
|
||||||
x = vent_x_first + (i * (vent_width + vent_width));
|
x = vent_x_first + (i * (vent_width + vent_width));
|
||||||
|
|
||||||
translate([x, vent_y_offset, wall_height - vent_height])
|
translate([x, vent_y_offset-eps, wall_height - vent_height])
|
||||||
cube([vent_width, vent_length, vent_height], false);
|
cube([vent_width, vent_length+2*eps, vent_height+eps], false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module accents() {
|
module accents() {
|
||||||
for (y = [accent_y_bottom: accent_y_stride: case_length_bottom]) {
|
for (y = [accent_y_bottom: accent_y_stride: case_length_bottom]) {
|
||||||
/* Top */
|
/* Top */
|
||||||
translate([0, y, wall_height - accent_depth])
|
translate([-eps, y, wall_height - accent_depth])
|
||||||
cube([case_width_bottom, accent_width, accent_depth], false);
|
cube([case_width_bottom+2*eps, accent_width, accent_depth+eps], false);
|
||||||
|
|
||||||
/* Right */
|
/* Right */
|
||||||
translate([case_width_bottom - accent_depth, y, 0])
|
translate([case_width_bottom - accent_depth, y, -eps])
|
||||||
cube([accent_depth, accent_width, wall_height], false);
|
cube([accent_depth+eps, accent_width+eps, wall_height+2*eps], false);
|
||||||
|
|
||||||
/* Left */
|
/* Left */
|
||||||
translate([0, y, 0])
|
translate([-eps, y, -eps])
|
||||||
cube([accent_depth, accent_width, wall_height], false);
|
cube([accent_depth+eps, accent_width, wall_height+2*eps], false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -78,8 +82,33 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
|
||||||
diameter_outer = 6.25;
|
diameter_outer = 6.25;
|
||||||
|
|
||||||
difference() {
|
difference() {
|
||||||
cylinder(h, d=diameter_inner);
|
|
||||||
cylinder(h, d=diameter_outer);
|
cylinder(h, d=diameter_outer);
|
||||||
|
|
||||||
|
translate([0, 0, -eps])
|
||||||
|
cylinder(h + 2*eps, d=diameter_inner);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module screw_posts() {
|
||||||
|
posts = [
|
||||||
|
/* Upper row */
|
||||||
|
[screw_post_x_offset, screw_post_upper_y_offset, screw_post_corner_height],
|
||||||
|
[case_width_bottom / 2, screw_post_upper_y_offset, screw_post_middle_height],
|
||||||
|
[case_width_bottom - screw_post_x_offset, screw_post_upper_y_offset, screw_post_corner_height],
|
||||||
|
|
||||||
|
/* Middle row */
|
||||||
|
[screw_post_x_offset, screw_post_middle_y_offset, screw_post_corner_height],
|
||||||
|
[case_width_bottom - screw_post_x_offset, screw_post_middle_y_offset, screw_post_corner_height],
|
||||||
|
|
||||||
|
/* Bottom row */
|
||||||
|
[screw_post_x_offset, screw_post_lower_y_offset, screw_post_corner_height],
|
||||||
|
[case_width_bottom / 2, screw_post_lower_y_offset, screw_post_corner_height],
|
||||||
|
[case_width_bottom - screw_post_x_offset, screw_post_lower_y_offset, screw_post_corner_height]
|
||||||
|
];
|
||||||
|
|
||||||
|
for (post = posts) {
|
||||||
|
translate([post[0], post[1], wall_height - wall_width - post[2]])
|
||||||
|
screw_post(post[2]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -90,12 +119,12 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
|
||||||
module right_triangle(base) {
|
module right_triangle(base) {
|
||||||
hypot = sqrt(2*(base^2));
|
hypot = sqrt(2*(base^2));
|
||||||
|
|
||||||
difference() {
|
intersection() {
|
||||||
square([base, base], false);
|
square([base, base]);
|
||||||
|
|
||||||
translate([base, 0, 0])
|
translate([-base, 0, 0])
|
||||||
rotate([0, 0, 45])
|
rotate([0, 0, -45])
|
||||||
square([hypot, hypot], false);
|
square([hypot, hypot]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -188,7 +217,7 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
|
||||||
support_y_offset + y - wall_width + support_width,
|
support_y_offset + y - wall_width + support_width,
|
||||||
wall_height - wall_width])
|
wall_height - wall_width])
|
||||||
rotate([0, 0, -90])
|
rotate([0, 0, -90])
|
||||||
support([left_support_length + 0.0001, keyboard_switch_height], support_width);
|
support([left_support_length, keyboard_switch_height], support_width);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -215,8 +244,8 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
|
||||||
pcb_screw_diameter = 2.5;
|
pcb_screw_diameter = 2.5;
|
||||||
|
|
||||||
for (screw_hole = pcb_screw_holes) {
|
for (screw_hole = pcb_screw_holes) {
|
||||||
translate([screw_hole[0], screw_hole[1], 0])
|
translate([screw_hole[0], screw_hole[1], -eps])
|
||||||
cylinder(h=wall_width, d=pcb_screw_diameter);
|
cylinder(h=wall_width+2*eps, d=pcb_screw_diameter);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -242,12 +271,11 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
|
||||||
hole_x = plate_width / 2 - hole_width / 2;
|
hole_x = plate_width / 2 - hole_width / 2;
|
||||||
hole_y = plate_length / 2 - hole_length / 2;
|
hole_y = plate_length / 2 - hole_length / 2;
|
||||||
|
|
||||||
linear_extrude(wall_width)
|
|
||||||
difference() {
|
difference() {
|
||||||
square([plate_width, plate_length], false);
|
cube([plate_width, plate_length, wall_width], false);
|
||||||
|
|
||||||
translate([hole_x, hole_y, 0])
|
translate([hole_x, hole_y, -eps])
|
||||||
square([hole_width, hole_length], false);
|
cube([hole_width, hole_length, wall_width + 2*eps], false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -307,6 +335,7 @@ module top_case(key_switch_sizes, pcb_screw_holes) {
|
||||||
}
|
}
|
||||||
|
|
||||||
supports();
|
supports();
|
||||||
|
screw_posts();
|
||||||
|
|
||||||
translate([keyboard_x_offset, keyboard_y_offset, keyboard_deck_z_offset])
|
translate([keyboard_x_offset, keyboard_y_offset, keyboard_deck_z_offset])
|
||||||
keyboard_deck();
|
keyboard_deck();
|
||||||
|
|
Loading…
Add table
Reference in a new issue