Neale Pickett
·
2025-10-24
common.scad
1// Make circles circular in final renders.
2$fn = $preview ? 30 : 180;
3
4id_bot = 10.5;
5id_top = 12.6;
6
7// Round tone hole
8module tonehole(d=10, h=50) {
9 rotate([90, 0, 0]) cylinder(d=d, h=h);
10}
11
12// Axianov tonehole with the same surface area as an equivalent cylinder
13module axianov_hole(d=10, h=50) {
14 r = d/2;
15 area = PI*r*r;
16
17 rounding_r = 2;
18 rounding_area = (1 - PI/4) * (rounding_r^2); // area lost to rounding
19 goal_area = area + rounding_area;
20
21 w = max(6.25, d-4); // Marat uses 6.25mm on every hole, so we will too
22 l = goal_area / w;
23
24 translate([-w/2, -l/2, 0]) {
25 union() {
26 translate([rounding_r, rounding_r, 0]) cylinder(r=rounding_r, h=h);
27 translate([rounding_r, 0, 0]) cube([w-rounding_r, l, h]);
28 translate([0, rounding_r, 0]) cube([w, l-rounding_r, h]);
29 }
30 }
31}