Created
April 21, 2017 11:17
-
-
Save qoobaa/d6b72a6faedbf749dab54ffe6af4493d 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
rows = 10; | |
cols = 10; | |
height = 5; | |
frame_thickness = 2; | |
cell_radius = 9.5; | |
wire_radius = 1.5; | |
module frame() { | |
difference() { | |
hull() { | |
translate([0, 0, 0]) cylinder(height, frame_thickness, frame_thickness, $fn = 4); | |
translate([20 * rows, 0, 0]) cylinder(height, frame_thickness, frame_thickness, $fn = 4); | |
translate([0, 20 * cols, 0]) cylinder(height, frame_thickness, frame_thickness, $fn = 4); | |
translate([20 * rows, 20 * cols, 0]) cylinder(height, frame_thickness, frame_thickness, $fn = 4); | |
cube([20 * rows, 20 * cols, height]); | |
} | |
for (i = [0 : rows - 1]) { | |
for (j = [0 : cols - 1]) { | |
translate([10 + i * 20, 10 + j * 20, -5]) cylinder(15, cell_radius, cell_radius, $fn = 40); | |
} | |
} | |
} | |
} | |
module limiter() { | |
difference() { | |
intersection() { | |
translate([20, 20, -5]) sphere(14.3, $fn = 20); | |
translate([20, 20, 5]) cylinder(wire_radius * 2 + 1, 10, 10, $fn = 4); | |
} | |
translate([0, 20, (wire_radius * 2) / 2 + 5.3]) rotate([0, 90, 0]) cylinder(40, wire_radius, wire_radius, $fn = 20); | |
} | |
} | |
difference() { | |
frame(); | |
if (rows > 3 || cols > 3) { | |
translate([20, 40, -5]) cylinder(20, 2, 2); | |
translate([40, 40, -5]) cylinder(20, 2, 2); | |
translate([20, cols * 20 - 40, -5]) cylinder(20, 2, 2); | |
translate([40, cols * 20 - 40, -5]) cylinder(20, 2, 2); | |
translate([rows * 20 - 20, 40, -5]) cylinder(20, 2, 2); | |
translate([rows * 20 - 40, 40, -5]) cylinder(20, 2, 2); | |
translate([rows * 20 - 20, cols * 20 - 40, -5]) cylinder(20, 2, 2); | |
translate([rows * 20 - 40, cols * 20 - 40, -5]) cylinder(20, 2, 2); | |
} | |
} | |
for (i = [0 : (rows - 1) / 2]) { | |
for (j = [0 : (cols - 1) / 2]) { | |
translate([i * 40, j * 40, 0]) limiter(); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment