/usr/share/openscad/libraries/MCAD/polyholes.scad is in openscad-mcad 2014.03-1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | // Copyright 2011 Nophead (of RepRap fame)
// This file is licensed under the terms of Creative Commons Attribution 3.0 Unported.
// Using this holes should come out approximately right when printed
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 test_polyhole(){
difference() {
cube(size = [100,27,3]);
union() {
for(i = [1:10]) {
translate([(i * i + i)/2 + 3 * i , 8,-1])
polyhole(h = 5, d = i);
assign(d = i + 0.5)
translate([(d * d + d)/2 + 3 * d, 19,-1])
polyhole(h = 5, d = d);
}
}
}
}
|