Created
May 17, 2017 08:48
-
-
Save qoobaa/629d23d9d18e1dce368c7c0792c66eb3 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
length = 66.5; | |
width = 18.75; | |
height = 13; | |
thickness = 1; | |
module spring(radius, width, height, thickness, $fn = 12) { | |
for (sx = [1, -1]) { | |
scale([sx, 1, 1]) { | |
cube([(width / 2 - radius) / 2 + thickness, thickness, height + thickness]); | |
translate([width / 2 - radius + thickness, 0, 0]) { | |
difference() { | |
cylinder(height + thickness, radius, radius, $fn = $fn); | |
cylinder(height + thickness, radius - thickness, radius - thickness, $fn = $fn); | |
translate([-(width / 2), -radius, 0]) | |
cube([width + thickness, radius, height + thickness]); | |
} | |
} | |
} | |
} | |
} | |
module holder(width = 18.75, length = 66, height = 13, thickness = 1) { | |
// main body | |
difference() { | |
union() { | |
difference() { | |
// body | |
cube([width + 2 * thickness, length + 2 * thickness, height + thickness], center = true); | |
// cell cavity | |
translate([0, thickness / 2, thickness / 2]) | |
cube([width, length + thickness, height], center = true); | |
// spring spacer | |
translate([0, length / 2, -height / 2]) | |
cube([width + 2 * thickness, thickness * 2, thickness], center = true); | |
} | |
// spring | |
translate([0, length / 2 + width / 8 - thickness * 2, -(height + thickness) / 2]) | |
spring(radius = width / 5, width = width, height = height, thickness = thickness); | |
} | |
translate([0, 0, height / 2 - 5]) | |
cube([1, length + 4 * thickness, 1], center = true); | |
translate([0, 0, height / 2 - thickness]) | |
cube([1, length + 4 * thickness, 1], center = true); | |
} | |
// contacts | |
for (y = [-1, 1]) { | |
hull() { | |
translate([thickness * 2, y * length / 2, height / 2 - 3]) | |
sphere(1, $fn = 10); | |
translate([-thickness * 2, y * length / 2, height / 2 - 3]) | |
sphere(1, $fn = 10); | |
} | |
} | |
} | |
union() { | |
for (i = [0 : 11]) { | |
translate([i * (width + thickness), 0, 0]) | |
holder(width = width, length = length, height = height, thickness = thickness); | |
translate([i * (width + thickness), -length - thickness, 0]) | |
rotate(180) | |
holder(width = width, length = length, height = height, thickness = thickness); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment