- commit
- 9ca7ed1
- parent
- 1e651c9
- author
- Neale Pickett
- date
- 2026-03-01 19:40:07 -0700 MST
Working on the nut
M
Makefile
+1,
-1
1@@ -1,4 +1,4 @@
2-all: nut.tenor-guitar.3mf tuner-plate.3mf
3+all: nut.tenor-guitar.3mf nut.irish-bouzouki.3mf tuner-plate.3mf
4
5 %.3mf: %.scad
6 openscad -o $@ $<
M
nut.scad
+42,
-16
1@@ -1,27 +1,53 @@
2-// Size of the nut
3-size = [30, 9, 5];
4+include <BOSL2/std.scad>
5
6-// Strings you're putting on it, in mils (aka thous)
7-string_gauges = [11, 16, 30, 40];
8+size = [34, 4.2, 7.4]; // Size of the nut.
9+depth = 1; // How deep the notches should be. You can always file down further!
10+stringsPerCourse = 2; // How many strings in a course? Western guitar has 1, mandolin has 2.
11+strings = [12, 12, 18, 18, 35, 35, 45, 45]; // String gauges (diameter in mils)
12+gap = 0.5; // Space between outer edge of strings in a course, percentage of spacing between strings
13+
14+numStrings = len(strings);
15+numCourses = numStrings / stringsPerCourse;
16+stringDiameters = strings * 25.4 / 1000;
17+
18+totalStringSize = sum(stringDiameters);
19+totalSpaceSize = size.x - totalStringSize;
20+
21+// Each course has padding space on each side, and gap space between strings.
22+// Each course gets totalSpaceSize/numCourses space:
23+
24+// 2*padding + (gap*padding*stringsPerCourse) = totalSpaceSize / numCourses
25+// padding * (2 + gap*stringsPerCourse) = totalSpaceSize / numCourses
26+padding = totalSpaceSize / numCourses / (2 + (gap*stringsPerCourse));
27+gapPadding = padding * gap;
28
29 difference() {
30 $fn = 180; // 180 faces per complete circle is good enough for printing
31- inch = 25.4; // mm per inch
32- mil = inch / 1000; // mm per mil
33
34+ // this is the part you'd buy from the supply store
35 intersection() {
36- cube(size);
37- rotate([0, 90, 0]) cylinder(h=size.x, r=size.y);
38+ cube(size, anchor=BACK+BOTTOM+LEFT);
39+ rotate([0, 90, 0]) cylinder(h=size.x, r=size.z);
40 }
41
42- strings = string_gauges * mil;
43- spacing = size.x / len(strings);
44- for (n = [0:len(strings)-1]) {
45- d = strings[n];
46- pos = [spacing * (n + 1/2), size.y, 0];
47- translate(pos) rotate([5, 0, 0]) hull() {
48- translate([0, 0, 0]) cylinder(h=size.z*2, d=d, center=true);
49- translate([0, 10, 0]) cylinder(h=size.z*2, d=d, center=true);
50+ // this is the initial groove filing you'd pay extra for
51+ space = size.y / numStrings / 2;
52+ for (i = [0 : numStrings-1]) {
53+ d = stringDiameters[i];
54+ courseNo = floor(i / stringsPerCourse);
55+ courseItem = (stringsPerCourse > 0) ? (i % stringsPerCourse) : 0;
56+
57+ stringsOffset = sum([for (s = [0:i]) stringDiameters[i]]);
58+ xOffset = courseNo * (padding*2 + gap*stringsPerCourse) + stringsOffset;
59+ x = xOffset + padding + (courseItem * padding * gap);
60+
61+ translate([x, 0, size.z-depth+d/2]) {
62+ rotate([90-5, 0, 0]) {
63+ hull() {
64+ translate([0, 0, 0]) cylinder(h=size.z*2, d1=d*1.5, d2=d, center=true);
65+ translate([0, 2, 0]) cylinder(h=size.z*2, d=d*2, center=true);
66+ }
67+ }
68 }
69 }
70 }
+7,
-4
1@@ -2,13 +2,16 @@
2 "parameterSets": {
3 "tenor-guitar": {
4 "size": "[30, 9, 5]",
5- "string_gauges": "[11, 16, 30, 40]"
6+ "strings": "[11, 16, 30, 40]"
7 },
8 "tenor-guitar-heavy": {
9 "size": "[30, 9, 5]",
10- "string_gauges": "[14, 18, 29, 44]"
11+ "strings": "[14, 18, 29, 44]"
12+ },
13+ "irish-bouzouki": {
14+ "size": "[32.4, 4.2, 7.4]",
15+ "stringsPerCourse": "2",
16+ "strings": "[12, 12, 18, 18, 35, 35, 45, 45]"
17 }
18 }
19 }
20-
21-