Skip to content

Instantly share code, notes, and snippets.

@buhii
Created October 4, 2012 22:51
Show Gist options
  • Save buhii/3836961 to your computer and use it in GitHub Desktop.
Save buhii/3836961 to your computer and use it in GitHub Desktop.
magnet_holder2.scad
rod_radius = 1.3; //1.2 / 2; // + 0.63;
magnet_height = 4.0;
magnet_radius = 4.0;
holder_length = 8.0;
holder_width = 11.0;
holder_edge = 6.0;
module magnet_holder()
{
difference() {
rotate([90, 22.5, 0]) {
difference() {
translate([0, 4.5, -holder_width]) {
#cylinder(r=4, h=holder_width, $fn=50);
}
translate([-10, 6, -holder_width - 1]) {
cube([20, 20, holder_width + 2]);
}
}
}
translate([0, 1.5, 0])
union() {
rotate([0, 90, 0]) {
translate([-magnet_radius, 4, -magnet_radius])
#cylinder(r=magnet_radius, h=magnet_height, $fn=50);
}
rotate([0, -45, 0]) {
translate([magnet_radius, 4, -magnet_radius])
#cylinder(r=magnet_radius, h=magnet_height, $fn=50);
}
}
}
}
module rod() {
rotate([90, 0, 0])
# cylinder(r=rod_radius, h=22, $fn=50, center=true);
}
module holder() {
rotate([0, -22.5 + 180, 0]) {
difference() {
magnet_holder();
translate([1.24, 3.000, 3.000])
rod();
}
}
}
// raft
translate([-30, -44, 0]) {
for (j = [1, 2, 3]) {
translate([7, j * 15, 0])
cube([30, 4.1, 0.5]);
}
for (i = [1, 2]) {
translate([-2.1 + i * 15, 13, 0])
cube([4.1, 37, 0.5]);
}
}
// holder's body
translate([-30, -40, 6.01]) {
for (i = [1, 2]) {
for (j = [1, 2]) {
translate([i * 15, j * 15, 0])
holder();
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment