uilleann

3d printable Uilleann bagpipes
git clone https://git.woozle.org/neale/uilleann.git

uilleann / kenna-reck-b
Neale Pickett  ·  2025-11-28

chanter.scad

 1use <BOSL/math.scad>
 2
 3// A cylinder-like object defined by probe measurements.
 4// Each measurement is a 2-tuple: (d, h)
 5module rod(measurements) {
 6  end_d = measurements[len(measurements)-1][1];
 7  p = concat([[0, 0]], measurements, [[0, end_d]]);
 8  rotate_extrude(convexity=4) {
 9    polygon(p);
10  }
11}
12
13// Drill toneholes.
14// Each hole is a 4-tuple: (h, d, rotation_angle, undercut_angle)
15// The center of the tonehole will intersect [0, od, h] before rotation.
16//
17// Instrument makers think about
18// drilling from the outside of the pipe in.
19// So we need to know the outside diameter of the pipe.
20//
21// For now, we're pretending the pipe has a consistent outside diameter.
22// BOSL2 may have something that will let us calculate od given h and measurements.
23module toneholes(od, holes) {
24  for (hole = holes) {
25    h = holes[0];
26    d = holes[1];
27    rot = holes[2];
28    undercut = holes[3];
29
30    rotate([0, 0, rot]) {
31      translate([0, -od/2, h]) {
32        // Intersect with a cube to ensure an undercut tonehole doesn't drill past the center of the instrument
33        intersection() {
34          rotate([-90+undercut, 0, 0]) {
35            cylinder(d=d, h=od, center=true);
36          }
37          cube(od, center=true);
38        }
39      }
40    }
41  }
42}
43
44rod([
45     [6.2, 0], // Top
46     [5.7, 5],
47     [5.4, 7],
48     [5, 10.5],
49     [4.76, 11.5],
50     [4.4, 14],
51     [4.1, 15.5],
52     [3.9, 16],
53     [3.8, 16.5], // Height specified as "Through"
54     [3.8, 20], // Continuation of "Through", I guess
55     [3.9, 20.5],
56     [4, 25.5],
57     [4.2, 37.5],
58     [4.5, 48],
59     [4.7, 57.5],
60     [5, 71.5],
61     [5.2, 80],
62     [5.5, 91.5],
63     [5.8, 125.5],
64     [6, 135.5],
65     [6.3, 143],
66     [6.5, 148.8],
67     [6.7, 165.5],
68     [7, 191.5],
69     [7.2, 200.5],
70     [7.5, 215.5],
71     [7.8, 236.5],
72     [8, 239],
73     [8.2, 248.3],
74     [8.5, 266],
75     [8.8, 285.5],
76     [9, 306],
77     [9.2, 323],
78     [9.5, 365.5],
79     [9.8, 378],
80     [10, 395.5],
81     [10.6, 435.5], // End of timber
82     [11.1, 440.5], // Ivory extension
83     [11.5, 445.5], // Bell
84     ]);
85}