2021-08-15 23:05:32 +00:00
|
|
|
// MKS Gen L v1.0
|
2021-08-16 18:51:23 +00:00
|
|
|
width = 110;
|
|
|
|
depth = 84;
|
2021-09-19 20:57:19 +00:00
|
|
|
height = 45;
|
2021-08-16 18:51:23 +00:00
|
|
|
thickness = 3;
|
|
|
|
mount_peg = 3;
|
2021-09-19 20:57:19 +00:00
|
|
|
spacing_y = 5;
|
|
|
|
spacing = spacing_y;
|
|
|
|
spacing_bottom = 30;
|
|
|
|
spacing_top = 10;
|
|
|
|
mount_screw = 4.5;
|
2021-08-15 23:05:32 +00:00
|
|
|
|
2021-08-16 18:51:23 +00:00
|
|
|
peg_up = 3;
|
|
|
|
peg_bottom = 8;
|
|
|
|
pcb_thickness = 1.5;
|
|
|
|
screw_size = height - thickness; // 10;
|
2021-08-15 23:05:32 +00:00
|
|
|
|
|
|
|
//
|
2021-08-16 18:51:23 +00:00
|
|
|
$fn = 100;
|
|
|
|
|
2021-09-19 20:57:19 +00:00
|
|
|
//top_part();
|
2021-08-16 19:28:57 +00:00
|
|
|
bottom_part();
|
2021-08-16 18:51:23 +00:00
|
|
|
|
|
|
|
module bottom_part() {
|
2021-09-19 21:08:53 +00:00
|
|
|
difference() {
|
|
|
|
union() {
|
|
|
|
base();
|
|
|
|
walls();
|
|
|
|
screw_mounts();
|
|
|
|
}
|
|
|
|
grill = 33;
|
|
|
|
for (i = [0 : 15]) {
|
|
|
|
translate([40 + (6 * i), spacing_y + 5, - thickness * 0.5])
|
|
|
|
grill(grill);
|
|
|
|
translate([40 + (6 * i), depth - grill - spacing_y + 5, - thickness * 0.5])
|
|
|
|
grill(grill);
|
|
|
|
}
|
2021-08-16 18:51:23 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module top_part() {
|
2021-09-19 20:57:19 +00:00
|
|
|
x = width + spacing_top + spacing_bottom;
|
|
|
|
y = depth + 2 * spacing_y;
|
2021-08-16 18:51:23 +00:00
|
|
|
|
|
|
|
d = (peg_up + 2) / 2 + 2;
|
|
|
|
h = height - thickness + 2;
|
2021-08-15 23:05:32 +00:00
|
|
|
|
2021-08-16 18:51:23 +00:00
|
|
|
difference() {
|
|
|
|
translate([0, 0, height - thickness])
|
|
|
|
cube([x, y, thickness]);
|
|
|
|
|
2021-08-16 19:28:57 +00:00
|
|
|
// screw cutoffs
|
2021-08-16 18:51:23 +00:00
|
|
|
screw_cutoff();
|
|
|
|
translate([x - 8, 0, 0])
|
|
|
|
screw_cutoff();
|
|
|
|
translate([0, y - 8, 0])
|
|
|
|
screw_cutoff();
|
|
|
|
translate([x - 8, y - 8, 0])
|
|
|
|
screw_cutoff();
|
2021-08-16 19:28:57 +00:00
|
|
|
|
|
|
|
// grill
|
2021-09-19 21:08:53 +00:00
|
|
|
grill = 33;
|
|
|
|
for (i = [0 : 15]) {
|
|
|
|
translate([40 + (6 * i), spacing_y + 5, height - thickness * 1.5])
|
|
|
|
grill(grill);
|
|
|
|
translate([40 + (6 * i), depth - grill - spacing_y + 5, height - thickness * 1.5])
|
|
|
|
grill(grill);
|
|
|
|
}
|
|
|
|
|
2021-08-16 18:51:23 +00:00
|
|
|
}
|
2021-08-15 23:05:32 +00:00
|
|
|
}
|
|
|
|
|
2021-08-16 18:51:23 +00:00
|
|
|
module screw_mounts() {
|
|
|
|
d = (peg_up) + 1;
|
2021-09-19 20:57:19 +00:00
|
|
|
x = width + spacing_top + spacing_bottom - 4;
|
|
|
|
y = depth + 2 * spacing_y - 4;
|
2021-08-16 18:51:23 +00:00
|
|
|
|
|
|
|
h = 0; //height - (screw_size + thickness);
|
|
|
|
|
|
|
|
translate([d, d, h])
|
|
|
|
rotate([0, 0, 180])
|
|
|
|
screw_mount();
|
|
|
|
|
|
|
|
translate([x, d, h])
|
|
|
|
rotate([0, 0, - 90])
|
|
|
|
screw_mount();
|
|
|
|
|
|
|
|
translate([d, y, h])
|
|
|
|
rotate([0, 0, 90])
|
|
|
|
screw_mount();
|
|
|
|
|
|
|
|
translate([x, y, h])
|
|
|
|
screw_mount();
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
module screw_mount() {
|
|
|
|
difference() {
|
|
|
|
union() {
|
|
|
|
cylinder(h = screw_size, d = peg_up + 3);
|
|
|
|
translate([0, - peg_up, 0])
|
|
|
|
cube([peg_up * 2, peg_up * 2, screw_size]);
|
|
|
|
translate([- peg_up, 0, 0])
|
|
|
|
cube([peg_up * 2, peg_up * 2, screw_size]);
|
|
|
|
}
|
|
|
|
translate([0, 0, - screw_size * 0.1])
|
|
|
|
cylinder(h = screw_size * 1.3, d = peg_up);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
module base() {
|
|
|
|
d1 = mount_peg;
|
2021-09-19 20:57:19 +00:00
|
|
|
x = width + spacing_top + spacing_bottom;
|
2021-08-16 18:51:23 +00:00
|
|
|
y = depth + 2 * spacing;
|
|
|
|
|
2021-08-15 23:05:32 +00:00
|
|
|
cube([x, y, thickness]);
|
2021-09-19 20:57:19 +00:00
|
|
|
translate([4 + spacing_bottom, 4 + spacing, thickness])
|
2021-08-17 18:36:13 +00:00
|
|
|
peg(h = thickness);
|
2021-09-19 20:57:19 +00:00
|
|
|
translate([x - (4 + spacing_top), 4 + spacing, thickness])
|
2021-08-16 18:51:23 +00:00
|
|
|
peg(h = thickness);
|
2021-09-19 20:57:19 +00:00
|
|
|
translate([x - (4 + spacing_top), y - (4 + spacing), thickness])
|
2021-08-16 18:51:23 +00:00
|
|
|
peg(h = thickness);
|
2021-09-19 20:57:19 +00:00
|
|
|
translate([(4 + spacing_bottom), y - (4 + spacing), thickness])
|
2021-08-16 18:51:23 +00:00
|
|
|
peg(h = thickness);
|
2021-08-15 23:05:32 +00:00
|
|
|
}
|
|
|
|
|
2021-08-16 18:51:23 +00:00
|
|
|
module walls() {
|
2021-08-15 23:05:32 +00:00
|
|
|
difference() {
|
|
|
|
walls_basic();
|
2021-08-16 18:51:23 +00:00
|
|
|
|
|
|
|
// usb
|
2021-08-16 23:28:00 +00:00
|
|
|
translate([spacing, 0, thickness + pcb_thickness]) {
|
2021-09-19 20:57:19 +00:00
|
|
|
translate([spacing_bottom + 17, - spacing * 1.5, 5])
|
2021-08-16 18:51:23 +00:00
|
|
|
cube([12, spacing * 2, 11]);
|
2021-08-15 23:05:32 +00:00
|
|
|
}
|
2021-09-19 21:08:53 +00:00
|
|
|
|
2021-09-19 20:57:19 +00:00
|
|
|
// cable holes
|
2021-09-19 21:08:53 +00:00
|
|
|
d = 25;
|
2021-09-19 20:57:19 +00:00
|
|
|
y = depth + 2 * spacing_y;
|
2021-09-19 21:08:53 +00:00
|
|
|
|
|
|
|
translate([- thickness * 1.5, y / 2, height / 2])
|
|
|
|
rotate([0, 90, 0])
|
|
|
|
translate([0, 0, 0])
|
|
|
|
cylinder(h = 20, d = d);
|
|
|
|
|
|
|
|
holes_spacing = spacing_top + spacing_bottom + 0.1;
|
|
|
|
|
2021-08-16 18:51:23 +00:00
|
|
|
// holes for mounts
|
2021-09-19 21:08:53 +00:00
|
|
|
translate([30, depth + thickness + spacing * 2.1, 15])
|
2021-08-16 18:51:23 +00:00
|
|
|
rotate([90, 0, 0])
|
2021-09-19 20:57:19 +00:00
|
|
|
cylinder(h = thickness * 2, d = mount_screw);
|
2021-09-19 21:08:53 +00:00
|
|
|
|
|
|
|
translate([width + holes_spacing - 30, depth + thickness + spacing * 2.1, 15])
|
2021-08-16 18:51:23 +00:00
|
|
|
rotate([90, 0, 0])
|
2021-09-19 20:57:19 +00:00
|
|
|
cylinder(h = thickness * 2, d = mount_screw);
|
2021-08-16 18:51:23 +00:00
|
|
|
}
|
2021-08-15 23:05:32 +00:00
|
|
|
}
|
|
|
|
|
2021-08-16 18:51:23 +00:00
|
|
|
module walls_basic() {
|
2021-09-19 20:57:19 +00:00
|
|
|
x = width + spacing_top + spacing_bottom;
|
2021-08-16 18:51:23 +00:00
|
|
|
y = depth + 2 * spacing;
|
|
|
|
|
|
|
|
translate([0, - thickness, 0])
|
2021-08-15 23:05:32 +00:00
|
|
|
cube([x, thickness, height]);
|
2021-08-16 18:51:23 +00:00
|
|
|
translate([0, y, 0])
|
2021-08-15 23:05:32 +00:00
|
|
|
cube([x, thickness, height]);
|
2021-08-16 18:51:23 +00:00
|
|
|
translate([x, - thickness, 0])
|
|
|
|
cube([thickness, y + 2 * thickness, height]);
|
|
|
|
translate([- thickness, - thickness, 0])
|
|
|
|
cube([thickness, y + 2 * thickness, height]);
|
2021-08-15 23:05:32 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
module peg(h) {
|
|
|
|
cylinder(h = h, d = peg_bottom);
|
2021-08-16 18:51:23 +00:00
|
|
|
cylinder(h = h * 3, d = peg_up);
|
|
|
|
}
|
|
|
|
|
|
|
|
module screw_cutoff() {
|
|
|
|
d = (peg_up + 5) / 2;
|
|
|
|
h = height - thickness + 2;
|
|
|
|
|
|
|
|
translate([d, d, h])
|
2021-08-17 10:07:07 +00:00
|
|
|
cylinder(h = 2, d1 = 3, d2 = 9);
|
2021-08-16 18:51:23 +00:00
|
|
|
translate([d, d, h - 2])
|
|
|
|
cylinder(h = 2, d = 3);
|
2021-08-16 19:28:57 +00:00
|
|
|
}
|
|
|
|
|
2021-09-19 21:08:53 +00:00
|
|
|
module grill(length = 30) {
|
2021-08-16 19:28:57 +00:00
|
|
|
d = 3;
|
|
|
|
hull() {
|
|
|
|
cylinder(h = thickness * 2, d = d);
|
2021-09-19 21:08:53 +00:00
|
|
|
translate([0, length, 0])
|
2021-08-16 19:28:57 +00:00
|
|
|
cylinder(h = thickness * 2, d = d);
|
|
|
|
}
|
2021-08-15 23:05:32 +00:00
|
|
|
}
|