Last active
April 8, 2023 09:12
-
-
Save kazuho/9cc925d842604a839e7f6a1d54494309 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// constants that were measured | |
mb_width = 170.5; | |
mb_depth = 170; | |
mb_thick = 2; | |
mb_holder1_depth = 29; | |
iopanel_x = -2; | |
iopanel_z = -2; | |
iopanel_width = 159; | |
iopanel_height = 45; | |
pcie_back_width = 20; | |
pcie_back_depth = 9; // below the surface of MB | |
pcie_back_height = 80; | |
// common variables | |
case_thick = 2; | |
block_size = 5; | |
outer_space = 200; // very large value | |
// values specific to floor panel (and back) | |
floor_front = 50; | |
back_panel_top = 47; | |
back_panel_reinforce_front = 18; | |
bottom_space = pcie_back_depth - mb_thick - (case_thick * 2 - 1); // bottom of pcie penetrates the floor by 2mm | |
left_space = -iopanel_x + block_size; | |
right_space = pcie_back_width / 2 + case_thick * 2; | |
back_space = 5; | |
bottom_width = left_space + mb_width + right_space; | |
// values specific to the top panel (as well as front and side) | |
ceiling = 1 + pcie_back_height - case_thick * 2 - bottom_space - 0.5; | |
duct_right = mb_width - pcie_back_width; | |
module bottom_latch(male) { | |
translate([mb_width / 2 - block_size * 2 + male, male / 2, -bottom_space - case_thick * 2]) | |
cube([block_size * 4 - male * 2, block_size - male, case_thick]); | |
} | |
module rid_back_latch(male) { | |
translate([mb_width / 2 - block_size * 2 + male, male / 2, back_panel_top]) | |
cube([block_size * 4 - male * 2, block_size - male, case_thick]); | |
} | |
module rid_side_latch(male) { | |
translate([duct_right, mb_depth / 2 - block_size * 2 + male / 2, ceiling - block_size * 2]) | |
cube([case_thick, block_size * 4 - male, block_size]); | |
} | |
module pcie_holes() { | |
translate([mb_width - pcie_back_width / 2, -back_space - case_thick, -bottom_space]) | |
cube([pcie_back_width, back_space + case_thick, bottom_space + ceiling]); | |
translate([mb_width - pcie_back_width / 2, -outer_space, -outer_space]) | |
cube([pcie_back_width, outer_space, outer_space]); | |
translate([mb_width + pcie_back_width / 2, -outer_space, -case_thick * 2 + 1 - bottom_space + pcie_back_height - 2]) | |
cube([outer_space, outer_space, 2]); | |
} | |
difference () { union () { | |
difference() { | |
union () { | |
// floor | |
translate([-left_space, -back_space, -case_thick - bottom_space]) | |
cube([left_space + mb_width + right_space, back_space + floor_front, case_thick]); | |
// back panel | |
translate([-left_space, -case_thick - back_space, -case_thick - bottom_space]) | |
cube([left_space + mb_width + right_space, case_thick, case_thick + bottom_space + ceiling]); | |
} | |
// io panel | |
translate([iopanel_x, -outer_space, iopanel_z]) | |
cube([iopanel_width, outer_space, iopanel_height]); | |
// pcie back panel | |
pcie_holes(); | |
// duct | |
translate([-outer_space, -outer_space, back_panel_top]) | |
cube([outer_space + duct_right + case_thick, outer_space * 2, outer_space]); | |
} | |
// reinforce bottom | |
union () { | |
translate([-left_space, -back_space, -bottom_space]) | |
cube([block_size, back_space + floor_front, case_thick]); | |
translate([mb_width + right_space - block_size, 0, -bottom_space]) | |
cube([block_size, floor_front, case_thick]); | |
} | |
// reinforce back panel | |
difference () { | |
d = back_panel_reinforce_front + back_space; | |
union () { | |
translate([-left_space, -back_space, -bottom_space]) | |
cube([case_thick, d, bottom_space + back_panel_top]); | |
translate([-left_space, -back_space, back_panel_top - case_thick]) | |
cube([left_space + duct_right + case_thick, d, case_thick]); | |
translate([duct_right + case_thick, -back_space, back_panel_top - case_thick]) | |
cube([case_thick, back_space + back_panel_reinforce_front, ceiling - back_panel_top + case_thick]); | |
translate([-left_space, back_panel_reinforce_front - block_size, back_panel_top]) | |
rotate([0, 90, 0]) | |
linear_extrude(height = left_space + duct_right + case_thick * 2) | |
polygon(points = [[0, 0], [0, block_size], [block_size, block_size]]); | |
translate([mb_width + right_space - case_thick, -back_space, -bottom_space]) | |
cube([case_thick, d, bottom_space + ceiling]); | |
translate([mb_width + right_space - case_thick * 2, -case_thick - back_space, -bottom_space - case_thick]) | |
cube([case_thick *2, case_thick + back_space, bottom_space + case_thick + ceiling]); | |
translate([mb_width - pcie_back_width / 2 - 1, -back_space, -bottom_space]) | |
cube([1, back_space, bottom_space + ceiling]); | |
translate([duct_right + case_thick, -back_space, back_panel_top - case_thick]) | |
cube([mb_width - pcie_back_width / 2 - (duct_right + case_thick), back_space, ceiling - back_panel_top + case_thick]); | |
} | |
pcie_holes(); | |
translate([-left_space + .5, back_panel_reinforce_front, back_panel_top - case_thick - .5]) | |
linear_extrude(height = case_thick + .5) | |
polygon(points = [[0, 0], [block_size + .5, -block_size - .5], [block_size + .5, 0]]); | |
} | |
// mb holder 1 | |
difference () { | |
union () { | |
translate([-left_space, mb_holder1_depth, -bottom_space]) | |
cube([left_space, block_size + 2, bottom_space + mb_thick + block_size]); | |
translate([-left_space, mb_holder1_depth - block_size - bottom_space - mb_thick, -bottom_space]) { | |
rotate([0, 90, 0]) { | |
linear_extrude(height = left_space) { | |
s = bottom_space + mb_thick + block_size; | |
polygon(points = [[0, 0], [0, s], [-s, s]]); | |
} | |
} | |
} | |
translate([0, mb_holder1_depth + block_size, -bottom_space]) | |
cube([block_size, 2, bottom_space + mb_thick + block_size]); | |
translate([0, mb_holder1_depth, -bottom_space]) | |
linear_extrude(height = bottom_space + mb_thick + block_size) | |
polygon(points = [[0, 0], [0, block_size], [block_size, block_size]]); | |
} | |
translate([0, mb_holder1_depth, 0]) | |
cube([block_size, block_size* 2, mb_thick]); | |
} | |
// mb holder 2 | |
difference () { | |
translate([mb_width - block_size, -back_space - case_thick, -bottom_space]) | |
cube([right_space + block_size, back_space + case_thick + block_size, bottom_space + mb_thick + 3]); | |
translate([mb_width - block_size, 0, 0]) | |
cube([block_size, block_size, mb_thick]); | |
pcie_holes(); | |
} | |
translate([mb_width + right_space - block_size, 0, -bottom_space]) | |
cube([block_size, back_panel_reinforce_front + block_size, bottom_space]); | |
rid_back_latch(1); | |
} | |
translate([-outer_space, -outer_space, -case_thick - bottom_space]) | |
cube([outer_space * 2, outer_space * 2, 0.5]); | |
translate([-left_space, -outer_space, -outer_space]) | |
cube([0.5, outer_space * 2, outer_space * 2]); | |
} | |
translate([0, 0, 0.5]) | |
bottom_latch(1); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// constants that were measured | |
mb_width = 170.5; | |
mb_depth = 170; | |
mb_thick = 2; | |
mb_holder1_depth = 31; | |
iopanel_x = -2; | |
iopanel_z = -2; | |
iopanel_width = 159; | |
iopanel_height = 45; | |
pcie_back_width = 20; | |
pcie_back_depth = 9; // below the surface of MB | |
pcie_back_height = 80; | |
// common variables | |
case_thick = 2; | |
block_size = 5; | |
outer_space = 200; // very large value | |
// values specific to floor panel (and back) | |
floor_front = 100; | |
back_panel_top = 47; | |
back_panel_reinforce_front = 18; | |
bottom_space = pcie_back_depth - mb_thick - (case_thick * 2 - 1); // bottom of pcie penetrates the floor by 2mm | |
left_space = -iopanel_x + block_size; | |
right_space = pcie_back_width / 2 + case_thick * 2; | |
back_space = 5; | |
bottom_width = left_space + mb_width + right_space; | |
// values specific to the top panel (as well as front and side) | |
front_space = 15; | |
ceiling = 1 + pcie_back_height - case_thick * 2 - bottom_space; | |
duct_right = mb_width - pcie_back_width; | |
module bottom_latch(male) { | |
translate([mb_width / 2 - block_size * 2 + male, male / 2, -bottom_space - case_thick * 2]) | |
cube([block_size * 4 - male * 2, block_size - male, case_thick]); | |
} | |
module rid_front_latch(male) { | |
translate([mb_width / 2 - block_size * 2 + male, mb_depth + male / 2, back_panel_top]) | |
cube([block_size * 4 - male * 2, block_size - male, case_thick]); | |
} | |
module rid_back_latch(male) { | |
translate([mb_width / 2 - block_size * 2 + male, male / 2, back_panel_top]) | |
cube([block_size * 4 - male * 2, block_size - male, case_thick]); | |
} | |
module pcie_holes() { | |
translate([mb_width - pcie_back_width / 2, -back_space - case_thick, -bottom_space]) | |
cube([pcie_back_width, back_space + case_thick, bottom_space + ceiling]); | |
translate([mb_width - pcie_back_width / 2, -outer_space, -outer_space]) | |
cube([pcie_back_width, outer_space, outer_space]); | |
translate([mb_width + pcie_back_width / 2, -outer_space, -case_thick * 2 + 1 - bottom_space + pcie_back_height - 2]) | |
cube([outer_space, outer_space, 2]); | |
} | |
difference () { | |
translate([-case_thick - left_space, -case_thick - back_space, -case_thick * 2 - bottom_space]) { | |
h = case_thick * 3 + bottom_space + ceiling; | |
translate([0, 0, h]) | |
rotate([-90, 0, 0]) | |
linear_extrude(height = case_thick * 2 + back_space + mb_depth + front_space) | |
round_rect(bottom_width + case_thick * 2, h, case_thick); | |
} | |
translate([-left_space, -case_thick - back_space, -case_thick - bottom_space]) | |
cube([bottom_width, case_thick + back_space + mb_depth + front_space, case_thick + bottom_space + ceiling]); | |
// duct | |
translate([-outer_space, -outer_space, back_panel_top]) | |
cube([outer_space + duct_right, outer_space * 2, outer_space]); | |
// holes in side panel | |
translate([mb_width - 100, back_panel_reinforce_front + 8, 8]) | |
rotate([90, 0, 90]) | |
punch_honeycomb(4, 6, 200); | |
bottom_latch(0); | |
pcie_holes(); | |
} | |
rid_front_latch(1); | |
// duct front reinforce | |
translate([-left_space, mb_depth, back_panel_top - case_thick]) | |
cube([left_space + duct_right, front_space, case_thick]); | |
translate([duct_right, mb_depth, -bottom_space - case_thick]) | |
cube([case_thick, front_space, case_thick + bottom_space + ceiling]); | |
translate([mb_width / 2, mb_depth, -bottom_space - case_thick]) | |
cube([case_thick, front_space, case_thick + bottom_space + back_panel_top]); | |
// duct left reinforce | |
translate([-left_space, back_panel_reinforce_front, back_panel_top - case_thick]) | |
linear_extrude(height = case_thick) | |
polygon(points = [[0, 0], [block_size, -block_size], [block_size, mb_depth - back_panel_reinforce_front], [0, mb_depth - back_panel_reinforce_front]]); | |
// duct right reinforce | |
translate([duct_right, -case_thick - back_space, ceiling - block_size]) | |
cube([case_thick, case_thick + back_space + mb_depth + front_space, block_size]); | |
// mb guides (left) | |
translate([-left_space, mb_depth - block_size, -case_thick - bottom_space]) | |
guide_cube(left_space + block_size, case_thick + bottom_space, 0, block_size + front_space); | |
translate([-left_space, mb_depth - block_size, mb_thick]) | |
guide_cube(left_space + block_size, block_size, 2, block_size + front_space); | |
translate([-left_space, mb_depth - block_size, -case_thick - bottom_space]) | |
guide_cube(left_space, case_thick + bottom_space + mb_thick + block_size, 1, block_size + front_space); | |
// mb guides (right) | |
translate([mb_width - block_size, mb_depth - block_size, mb_thick]) | |
guide_cube(block_size + right_space, block_size, 2, block_size + front_space); | |
translate([mb_width - block_size, mb_depth - block_size, -case_thick - bottom_space]) | |
guide_cube(block_size + right_space, case_thick + bottom_space, 0, block_size + front_space); | |
translate([mb_width, mb_depth - block_size, -case_thick - bottom_space]) | |
guide_cube(right_space, case_thick + bottom_space + mb_thick + block_size, 3, block_size + front_space); | |
// mb holder 1 | |
translate([-left_space, mb_holder1_depth - block_size, mb_thick + block_size * 2]) | |
rotate([0, 90, 0]) | |
linear_extrude(height = block_size) | |
polygon(points = [[0, 0], [0, block_size], [block_size, block_size]]); | |
difference () { | |
translate([-left_space, mb_holder1_depth, mb_thick + block_size]) | |
linear_extrude(height = back_panel_top - (mb_thick + block_size)) | |
polygon(points = [[0, 0], [0, block_size * 2], [block_size, block_size], [block_size, 0]]); | |
translate([-left_space + block_size - case_thick, mb_holder1_depth, back_panel_top - case_thick * 2 - 1]) | |
cube([case_thick, block_size * 2, case_thick + 1]); | |
} | |
// mb holder 2 | |
difference () { | |
union () { | |
translate([mb_width + right_space - block_size, back_panel_reinforce_front + 1, 0]) | |
cube([block_size, block_size, block_size]); | |
translate([mb_width + right_space, back_panel_reinforce_front + 6, 0]) | |
linear_extrude(height = block_size) | |
polygon(points = [[-block_size, 0], [0, 0], [0, block_size]]); | |
} | |
translate([mb_width + right_space, back_panel_reinforce_front + 3, 0]) | |
rotate([0, -90, 0]) | |
linear_extrude(height = block_size) | |
polygon(points = [[0, 0], [2, -2], [0, -2]]); | |
} | |
module round_rect(w, d, r) { | |
union () { | |
translate([0, r]) | |
square([w, d - r * 2]); | |
translate([r, 0]) | |
square([w - r * 2, d]); | |
translate([r, r]) | |
circle(r, $fn = 32); | |
translate([w - r, r]) | |
circle(r, $fn = 32); | |
translate([r, d - r]) | |
circle(r, $fn = 32); | |
translate([w - r, d - r]) | |
circle(r, $fn = 32); | |
} | |
} | |
module guide_cube(w, h, side, depth) { | |
cube([w, depth, h]); | |
if (side == 0) { | |
translate([w, 0, 0]) | |
rotate([0, -90, 0]) | |
linear_extrude(height = w) | |
polygon(points = [[0, 0], [0, -h], [h, 0]]); | |
} else if (side == 1) { | |
linear_extrude(height = h) | |
polygon(points = [[0, 0], [0, -w], [w, 0]]); | |
} else if (side == 2) { | |
translate([0, 0, h]) | |
rotate([0, 90, 0]) | |
linear_extrude(height = w) | |
polygon(points = [[0, 0], [0, -h], [h, 0]]); | |
} else if (side == 3) { | |
linear_extrude(height = h) | |
polygon(points = [[0, 0], [w, -w], [w, 0]]); | |
} | |
} | |
module punch_honeycomb(w, d, h) { | |
hex_size = 10; | |
linear_extrude(height = h) { | |
union () { | |
for (x = [0 : w - 1]) { | |
for (y = [0 : d - 1]) { | |
translate([x * hex_size * 3, y * hex_size * .8]) { | |
polygon(points = [ | |
[0, hex_size * .3], | |
[hex_size * .3, 0], | |
[hex_size * 1.3, 0], | |
[hex_size * 1.6, hex_size * .3], | |
[hex_size * 1.3, hex_size * .6], | |
[hex_size * .3, hex_size * .6] | |
]); | |
translate([hex_size * 1.5, hex_size * 0.4]) | |
polygon(points = [ | |
[0, hex_size * .3], | |
[hex_size * .3, 0], | |
[hex_size * 1.3, 0], | |
[hex_size * 1.6, hex_size * .3], | |
[hex_size * 1.3, hex_size * .6], | |
[hex_size * .3, hex_size * .6] | |
]); | |
} | |
} | |
} | |
} | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// constants that were measured | |
mb_width = 170.5; | |
mb_depth = 170; | |
mb_thick = 2; | |
mb_holder1_depth = 31; | |
iopanel_x = -2; | |
iopanel_z = -2; | |
iopanel_width = 159; | |
iopanel_height = 45; | |
pcie_back_width = 20; | |
pcie_back_depth = 9; // below the surface of MB | |
pcie_back_height = 80; | |
// common variables | |
case_thick = 2; | |
block_size = 5; | |
outer_space = 200; // very large value | |
// values specific to floor panel (and back) | |
floor_front = 100; | |
back_panel_top = 47; | |
back_panel_reinforce_front = 18; | |
bottom_space = pcie_back_depth - mb_thick - (case_thick * 2 - 1); // bottom of pcie penetrates the floor by 2mm | |
left_space = -iopanel_x + block_size; | |
right_space = pcie_back_width / 2 + case_thick * 2; | |
back_space = 5; | |
bottom_width = left_space + mb_width + right_space; | |
// values specific to the top panel (as well as front and side) | |
front_space = 15; | |
ceiling = 1 + pcie_back_height - case_thick * 2 - bottom_space; | |
duct_right = mb_width - pcie_back_width; | |
fan_x = 24 - case_thick - left_space; | |
fan_y = 47 - case_thick - back_space; | |
fan_size = 92; | |
fan_space = 1.5; | |
fan_duct_height = 7; | |
power_module_size = 42; | |
power_button_diam = 14; | |
power_socket_diam = 13; | |
power_socket_screw_diam = 3; | |
power_socket_screw_dist_sqrt2 = 13.435; | |
module bottom_latch(male) { | |
translate([mb_width / 2 - block_size * 2 + male, male / 2, -bottom_space - case_thick * 2]) | |
cube([block_size * 4 - male * 2, block_size - male, case_thick]); | |
} | |
module rid_front_latch(male) { | |
translate([mb_width / 2 - block_size * 2 + male, mb_depth + male / 2, back_panel_top]) | |
cube([block_size * 4 - male * 2, block_size - male, case_thick]); | |
} | |
module rid_back_latch(male) { | |
translate([mb_width / 2 - block_size * 2 + male, male / 2, back_panel_top]) | |
cube([block_size * 4 - male * 2, block_size - male, case_thick]); | |
} | |
module pcie_holes() { | |
translate([mb_width - pcie_back_width / 2, -back_space - case_thick, -bottom_space]) | |
cube([pcie_back_width, back_space + case_thick, bottom_space + ceiling]); | |
translate([mb_width - pcie_back_width / 2, -outer_space, -outer_space]) | |
cube([pcie_back_width, outer_space, outer_space]); | |
translate([mb_width + pcie_back_width / 2, -outer_space, -case_thick * 2 + 1 - bottom_space + pcie_back_height - 2]) | |
cube([outer_space, outer_space, 2]); | |
} | |
difference () { | |
union () { | |
difference () { | |
translate([-case_thick - left_space, -case_thick - back_space, back_panel_top]) | |
cube([case_thick + left_space + duct_right, case_thick + back_space + mb_depth + front_space + case_thick, ceiling - back_panel_top + case_thick]); | |
// cut top | |
translate([-outer_space, -outer_space, back_panel_top + case_thick]) | |
cube([outer_space + duct_right - case_thick, outer_space * 2, outer_space]); | |
// fan hole | |
translate([fan_x + fan_size - block_size, fan_y, back_panel_top]) | |
rotate([0, 0, 90]) | |
punch_honeycomb(3, 10, case_thick); | |
} | |
// latch (right) | |
translate([duct_right, back_panel_reinforce_front + .3, ceiling - block_size * 2]) | |
cube([case_thick / 2, mb_depth - back_panel_reinforce_front - .6, block_size]); | |
// power module | |
translate([duct_right - power_module_size, -case_thick - back_space, back_panel_top]) | |
linear_extrude(height = ceiling + case_thick - back_panel_top) | |
polygon(points = [[0, 0], [power_module_size, 0], [power_module_size, power_module_size * 1.5], [0, power_module_size * .5]]); | |
} | |
rid_front_latch(0); | |
rid_back_latch(0); | |
// power module hollow | |
translate([duct_right - power_module_size + case_thick, -back_space, -outer_space]) | |
linear_extrude(height = outer_space + ceiling) | |
polygon(points = [[0, 0], [power_module_size, 0], [power_module_size, power_module_size * 1.5 - case_thick], [0, power_module_size * .5 - case_thick]]); | |
// power button and socket | |
power_ctl_z = back_panel_top + (ceiling + case_thick - back_panel_top) / 2; | |
translate([duct_right - power_socket_diam, -outer_space, power_ctl_z]) { | |
rotate([-90, 0, 0]) | |
cylinder(r = power_socket_diam / 2, h = outer_space, center = false, $fn = 32); | |
translate([power_socket_screw_dist_sqrt2 / 2, 0, -power_socket_screw_dist_sqrt2 / 2]) | |
rotate([-90, 0, 0]) | |
cylinder(r = power_socket_screw_diam / 2, h = outer_space, center = false, $fn = 32); | |
translate([-power_socket_screw_dist_sqrt2 / 2, 0, power_socket_screw_dist_sqrt2 / 2]) | |
rotate([-90, 0, 0]) | |
cylinder(r = power_socket_screw_diam / 2, h = outer_space, center = false, $fn = 32); | |
} | |
translate([duct_right - power_socket_diam * 1.8 - power_button_diam / 2, -outer_space, power_ctl_z]) | |
rotate([-90, 0, 0]) | |
cylinder(r = power_button_diam / 2, h = outer_space, center = false, $fn = 32); | |
} | |
// CPU fan duct | |
translate([fan_x - fan_space - case_thick, fan_y - fan_space, back_panel_top - fan_duct_height]) { | |
difference () { | |
cube([fan_size + (case_thick + fan_space) * 2, fan_size + fan_space * 2, fan_duct_height]); | |
translate([case_thick, 0, 0]) | |
cube([fan_size + fan_space * 2, fan_size + fan_space * 2, fan_duct_height]); | |
} | |
} | |
translate([fan_x - fan_space - case_thick, fan_y - fan_space - fan_duct_height, back_panel_top - fan_duct_height]) | |
rotate([0, 90, 0]) | |
linear_extrude(height = fan_size + (case_thick + fan_space) * 2) | |
polygon(points = [[0, fan_duct_height], [-fan_duct_height, 0], [-fan_duct_height, fan_duct_height]]); | |
// latch (left) | |
translate([-left_space + block_size, back_panel_reinforce_front + .3, back_panel_top - case_thick * 1.5]) | |
cube([case_thick, mb_depth - back_panel_reinforce_front - .6, case_thick * 1.5]); | |
// support for rid front latch (disabled, as PrusaSlicer fails to omit unnecessary support) | |
if (0) { | |
translate([mb_width / 2 - block_size * 2 - 2, mb_depth - block_size * 2 - 2, back_panel_top - 2]) | |
rotate([0, 90, 0]) | |
linear_extrude(height = block_size * 4 + 4) | |
polygon(points = [[0, 2], [-2, 0], [-2, 2]]); | |
} | |
// power module reinforce | |
translate([duct_right - case_thick, -back_space, back_panel_top]) | |
cube([case_thick * 2, back_space + power_module_size * 2, block_size]); | |
difference () { | |
translate([duct_right - case_thick, -case_thick - back_space, back_panel_top]) | |
cube([case_thick * 2, block_size, ceiling - back_panel_top]); | |
translate([duct_right, -case_thick - back_space, ceiling - block_size]) | |
cube([outer_space, outer_space * 2, outer_space]); | |
} | |
translate([duct_right - power_module_size, -case_thick - back_space, back_panel_top]) | |
cube([power_module_size, block_size, case_thick]); | |
module punch_honeycomb(w, d, h) { | |
hex_size = 10; | |
linear_extrude(height = h) { | |
union () { | |
for (x = [0 : w - 1]) { | |
for (y = [0 : d - 1]) { | |
translate([x * hex_size * 3, y * hex_size * .8]) { | |
polygon(points = [ | |
[0, hex_size * .3], | |
[hex_size * .3, 0], | |
[hex_size * 1.3, 0], | |
[hex_size * 1.6, hex_size * .3], | |
[hex_size * 1.3, hex_size * .6], | |
[hex_size * .3, hex_size * .6] | |
]); | |
translate([hex_size * 1.5, hex_size * 0.4]) | |
polygon(points = [ | |
[0, hex_size * .3], | |
[hex_size * .3, 0], | |
[hex_size * 1.3, 0], | |
[hex_size * 1.6, hex_size * .3], | |
[hex_size * 1.3, hex_size * .6], | |
[hex_size * .3, hex_size * .6] | |
]); | |
} | |
} | |
} | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment