piccolo

3d Printable Piccolo
git clone https://git.woozle.org/neale/piccolo.git

Neale Pickett  ·  2025-12-02

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, angle=45, flipped=false) {
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  mirror([flipped?1:0, 0, 0])
25  rotate([0, -45, 0])
26  rotate([0, 90, -90])
27  translate([-w/2, -l/2, 0]) {
28    union() {
29      translate([rounding_r, rounding_r, 0]) cylinder(r=rounding_r, h=h);
30      translate([rounding_r, 0, 0]) cube([w-rounding_r, l, h]);
31      translate([0, rounding_r, 0]) cube([w, l-rounding_r, h]);
32    }
33  }
34}