Skip to content

Instantly share code, notes, and snippets.

@GilesBathgate
Created February 7, 2016 14:02
Show Gist options
  • Save GilesBathgate/cebe2f6f235258c445aa to your computer and use it in GitHub Desktop.
Save GilesBathgate/cebe2f6f235258c445aa to your computer and use it in GitHub Desktop.
module polyhole(h, d) {
n = max(round(2 * d),3);
rotate([0,0,180])
cylinder(h = h, r = (d / 2) / cos (180 / n), $fn = n);
}
module main() {
difference() {
linear_extrude(5) {
hull(){
rotate([0,0,-46.5])
translate([5,2])
square([0.001,168]);
rotate([0,0,-43.5])
translate([-5,2])
square([0.001,168]);
}
}
rotate([0,0,-45])
for(i=[1:0.5:10])
translate([0,i*(i+6),0])polyhole(5,i);
}
}
translate([10,10,0])main();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment