uilleann

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

commit
45e38bc
parent
e7f162f
author
Neale Pickett
date
2025-12-30 10:23:58 -0700 MST
Brought in fancy flare work, mostly

This brings in a couple days' work getting the ivory ferrule flare thingy juuuuust right.

https://woozle.org/blog/2025/12-28-flare/
5 files changed,  +66, -31
A flare.scad
+47, -0
 1@@ -0,0 +1,47 @@
 2+// A fillet is a sort of trumpet bell shape
 3+module fillet(h, d1, d2) {
 4+  if (d2 > d1) {
 5+    translate([0, 0, h]) mirror([0, 0, 1]) fillet(h, d2, d1);
 6+  } else {
 7+    dd = d1 - d2;
 8+    for (i = [0:1/$fa:1]) {
 9+      cylinder(h=(h+h*i)/2, d1=d1-dd*i, d2=d2);
10+    }
11+  }
12+}
13+
14+// A patty is a cylinder with rounded sides, like a hamburger patty
15+module patty(h, d) {
16+  d_cyl = max(0, d-h);
17+  cylinder(h=h, d=d_cyl, center=true);
18+  rotate_extrude() {
19+    translate([d_cyl/2, 0]) circle(h);
20+  }
21+}
22+
23+// A flare is a fillet with a patty on each end
24+module flare(h, d1, d2) {
25+  if (d2 > d1) {
26+    translate([0, 0, h]) mirror([0, 0, 1]) flare(h, d2, d1);
27+  } else {
28+    f2 = log(h*20);
29+    f1 = f2 * d1/d2;
30+
31+    translate([0, 0, 0]) patty(f1, d1);
32+    translate([0, 0, f1/2]) fillet(h=h-(f1+f2)/2, d1=d1-f1, d2=d2-f2);
33+    translate([0, 0, h]) patty(f2, d2);
34+  }
35+}
36+
37+// Set up the camera
38+$vpt = [-0.86, 1.98, 10.24];
39+$vpr = [78.10, 0.00, 23.60];
40+$vpd = 140.00;
41+
42+flare(
43+      20 + 10 * sin($t*360*7 + 0),
44+      30 + 10 * sin($t*360*5 + 90),
45+      30 + 10 * sin($t*360*3 + 0)
46+      );
47+
48+
M pickett-d/Makefile
+15, -2
 1@@ -1,9 +1,22 @@
 2 commit_date=$(shell git log -1 --pretty='format:%cd' --date='format:%Y-%m-%d')
 3 commit_number=$(shell git rev-list --count HEAD)
 4 
 5-all: chanter.3mf split.3mf
 6+all: chanter.3mf chanter-split.3mf
 7 clean:
 8-	rm -f *.3mf
 9+	rm -f *.3mf *frame?????.png
10 
11 %.3mf: %.scad chanter.scad
12 	openscad -D rev=\"$(commit_number)\" -D date=\"$(commit_date)\" -o $@ $<
13+
14+%.frame00000.png: %.scad
15+	openscad \
16+	    -q \
17+	    -D \$$fn=90 \
18+	    --animate 600 \
19+	    --camera -0.86,1.98,10.24,78.10,0.00,23.60,140.00 \
20+	    $<
21+	for fn in frame?????.png; do mv $$fn $*.$$fn; done
22+
23+%.m4v: %.frame00000.png
24+	ffmpeg -y -framerate 20 -i $*.frame%05d.png -profile:v main -pix_fmt yuv420p $@
25+
R pickett-d/split.scad => pickett-d/chanter-split.scad
+0, -0
M pickett-d/chanter.scad
+2, -27
 1@@ -2,6 +2,7 @@
 2 // http://pipers.ie/source/media/?mediaId=31307&galleryId=1353
 3 
 4 include <BOSL/shapes.scad>
 5+use <../flare.scad>
 6 use <./sigil.scad>
 7 
 8 ver = "D";
 9@@ -34,32 +35,6 @@ module ringyding(h, d) {
10   ivory() resize([d, d, h]) sphere();
11 }
12 
13-// A fillet is a sort of trumpet bell shape
14-module fillet(h, d1, d2) {
15-  dd = d1 - d2;
16-  for (i = [0:1/$fn:1]) {
17-    cylinder(h=(h+h*i)/2, d1=d1-dd*i, d2=d2);
18-  }
19-}
20-
21-module patty(h, d) {
22-  cyl(l=h, d=d, fillet=h/2);
23-}
24-
25-// A flare with a patty on each end
26-module flare(h, d1, d2) {
27-  f1 = 4;
28-  f2 = 2;
29-
30-  if (d2 > d1) {
31-    rotate([180, 0, 0]) flare(h, d2, d1);
32-  } else {
33-    translate([0, 0, 0]) cyl(h=f1, d=d1, fillet=f1/2, align=V_CENTER);
34-    translate([0, 0, f1/2]) fillet(h=h-(f1+f2)/2, d1=d1-4, d2=d2-2);
35-    translate([0, 0, h]) patty(f2, d2);
36-  }
37-}
38-
39 // A tonehole with :
40 // * height=h
41 // * transverse diameter = td
42@@ -95,7 +70,7 @@ module chanter() {
43 
44       // Top wood transition : from O'Flynn Rowsome measurements
45       // https://pipers.ie/archive/media/?mediaId=31307&galleryId=1353
46-      translate([0, 0, height-28]) ivory() flare(h=12, d1=21.0, d2=25.0);
47+      translate([0, 0, height-28-12]) ivory() flare(h=12, d1=21.0, d2=25.0);
48 
49       if (false) {
50         translate([0, 0, 290.4]) ringyding(h=5.5, d=20);
M pickett-d/sigil.scad
+2, -2
 1@@ -19,8 +19,8 @@ module sigil(d, top_str="", bot_str="") {
 2       }
 3       rotate([90, 0, -90]) {
 4         linear_extrude(height=d, convexity=10) {
 5-          translate([0, 13]) text(top_str, size=2, halign="center", valign="bot");
 6-          translate([0, 1]) text(bot_str, size=2, halign="center", valign="bot");
 7+          translate([0, 13]) text(top_str, size=2, halign="center", valign="bottom");
 8+          translate([0, 1]) text(bot_str, size=2, halign="center", valign="bottom");
 9         }
10       }
11     }