guitar

3D printable guitar parts
git clone https://git.woozle.org/neale/guitar.git

commit
5b5c897
parent
9ca7ed1
author
Neale Pickett
date
2026-03-01 21:11:10 -0700 MST
possible candidate
2 files changed,  +21, -18
M nut.scad
+19, -16
 1@@ -4,21 +4,23 @@ size = [34, 4.2, 7.4]; // Size of the nut.
 2 depth = 1; // How deep the notches should be. You can always file down further!
 3 stringsPerCourse = 2; // How many strings in a course? Western guitar has 1, mandolin has 2.
 4 strings = [12, 12, 18, 18, 35, 35, 45, 45]; // String gauges (diameter in mils)
 5+//strings = [12, 18, 35, 85]; // String gauges (diameter in mils)
 6 gap = 0.5; // Space between outer edge of strings in a course, percentage of spacing between strings
 7 
 8 numStrings = len(strings);
 9 numCourses = numStrings / stringsPerCourse;
10 stringDiameters = strings * 25.4 / 1000;
11 
12-totalStringSize = sum(stringDiameters);
13-totalSpaceSize = size.x - totalStringSize;
14+totalSpace = size.x - sum(stringDiameters);
15 
16-// Each course has padding space on each side, and gap space between strings.
17-// Each course gets totalSpaceSize/numCourses space:
18-
19-// 2*padding + (gap*padding*stringsPerCourse) = totalSpaceSize / numCourses
20-// padding * (2 + gap*stringsPerCourse) = totalSpaceSize / numCourses
21-padding = totalSpaceSize / numCourses / (2 + (gap*stringsPerCourse));
22+// Each course has padding on each side, and gapPadding between strings.
23+// Each course gets totalSpace/numCourses space.
24+// gapPadding is padding * gap;
25+//
26+// 2*padding + (gapPadding*(stringsPerCourse-1)) = totalSpace / numCourses
27+// 2*padding + (gap*padding*(stringsPerCourse-1)) = totalSpace / numCourses
28+// padding * (2 + gap*(stringsPerCourse-1)) = totalSpace / numCourses
29+padding = totalSpace / numCourses / (2 + (gap*(stringsPerCourse-1)));
30 gapPadding = padding * gap;
31 
32 difference() {
33@@ -31,21 +33,22 @@ difference() {
34   }
35 
36   // this is the initial groove filing you'd pay extra for
37-  space = size.y / numStrings / 2;
38   for (i = [0 : numStrings-1]) {
39     d = stringDiameters[i];
40     courseNo = floor(i / stringsPerCourse);
41-    courseItem = (stringsPerCourse > 0) ? (i % stringsPerCourse) : 0;
42+    courseItem = i % stringsPerCourse;
43 
44-    stringsOffset = sum([for (s = [0:i]) stringDiameters[i]]);
45-    xOffset = courseNo * (padding*2 + gap*stringsPerCourse) + stringsOffset;
46-    x = xOffset + padding + (courseItem * padding * gap);
47+    stringsOffset = (i>0) ? sum([for (s = [0:i-1]) stringDiameters[s]]) : 0;
48+    paddingOffset = courseNo * padding*2;
49+    gapPaddingOffset = courseNo * (gapPadding*(stringsPerCourse-1));
50+    x = padding + paddingOffset + gapPaddingOffset + stringsOffset + (courseItem * gapPadding);
51 
52     translate([x, 0, size.z-depth+d/2]) {
53-      rotate([90-5, 0, 0]) {
54+      rotate([90+5, 0, 0]) {
55         hull() {
56-          translate([0, 0, 0]) cylinder(h=size.z*2, d1=d*1.5, d2=d, center=true);
57-          translate([0, 2, 0]) cylinder(h=size.z*2, d=d*2, center=true);
58+          translate([d/2, 0, -0.1]) cylinder(h=size.y+2, d=d);
59+          translate([d/2, 0, -0.1]) cylinder(h=size.y+2, d1=d, d2=d*1.5);
60+          translate([d/2, 3, -0.1]) cylinder(h=size.y+2, d=d*2);
61         }
62       }
63     }
M nuts.json
+2, -2
 1@@ -1,11 +1,11 @@
 2 {
 3     "parameterSets": {
 4         "tenor-guitar": {
 5-            "size": "[30, 9, 5]",
 6+            "size": "[30, 5, 9]",
 7             "strings": "[11, 16, 30, 40]"
 8         },
 9         "tenor-guitar-heavy": {
10-            "size": "[30, 9, 5]",
11+            "size": "[30, 5, 9]",
12             "strings": "[14, 18, 29, 44]"
13         },
14         "irish-bouzouki": {