Skip to content

Instantly share code, notes, and snippets.

@hugs
Created December 1, 2011 01:41
Show Gist options
  • Save hugs/1412643 to your computer and use it in GitHub Desktop.
Save hugs/1412643 to your computer and use it in GitHub Desktop.
Bitbeam - 3D Projection
// Each bitbeam is 5/16 inches wide. It's length is determined by the number of holes.
// Each hole is 8mm apart from each other
// The center of holes are 4mm way from each side of the beam
// The holes are 4.8 mm in diameter.
beam_width = 7.9375; // 5/16 inches
module beam(number_of_holes) {
beam_length = number_of_holes * 8;
difference(){
// Draw the beam...
cube([beam_length,beam_width,beam_width]);
// Cut the holes...
// For small radius circles, I'm using my make-it-big-then-scale-it-down trick
// to improve the visible rotundity of the circles.
for (x=[40 : 80 : beam_length*10]) {
scale(.10)
translate([x,40,-10])
cylinder(r=24, h=100);
}
for (x=[40 : 80 : beam_length*10]) {
rotate([90,0,0])
scale(.10)
translate([x,40,-90])
cylinder(r=24, h=100);
}
}
}
beam(13);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment