Inlay tweaking for narrow neck

This commit is contained in:
Luke Hubmayer-Werner 2025-02-06 21:24:51 +10:30
parent 158d15120a
commit 5c6fe42888
2 changed files with 23 additions and 14 deletions

View File

@ -22,7 +22,7 @@ shumbucker_w2 = 82.9; // 1.6mm in, a 2.0mm hole on each side
// ShinKaiYaku65 // ShinKaiYaku65
// I swapped and because 12th fret should be the biggest marker, and having only 15 as a 2char marker would be too disorienting // I swapped and because 12th fret should be the biggest marker, and having only 15 as a 2char marker would be too disorienting
// going with for 21 // going with for 21
fret_inlays = [[3, "真"], [5, "尊"], [7, "正"], [9, "清"], [12, "評判"], [15, "愛"], [17, "徳"], [19, "賛"], [21, "良"], [24, "主イエス"]]; fret_inlays = [[3, "真"], [5, "尊"], [7, "正"], [9, "清"], [12, "評判"], [15, "愛"], [17, "徳"], [19, "賛"], [21, "良"], [24, "主イエス"], [27, "-"], [29, "-"], [31, "-"], [33, "-"]];
// Galatians 5:22-23 // Galatians 5:22-23
// ShinKaiYaku65 22 23 // ShinKaiYaku65 22 23
// //
@ -1094,11 +1094,13 @@ colour_scheme = COLOURSCHEME_ABSGF_CLOWNFISH;
// TrussRodSingleAction(); // TrussRodSingleAction();
// translate([20, 0]) TrussRod(); // translate([20, 0]) TrussRod();
difference() { // difference() {
l = 70; // l = 70;
w = 20; // w = 20;
extra = 5; // extra = 5;
translate([-w/2, -extra, 1.6-w/2]) cube([w, l+extra, w]); // translate([-w/2, -extra, 1.6-w/2]) cube([w, l+extra, w]);
// TrussRod(taper_points=[-extra, l], extra=true, tolerance = 0.24); // // TrussRod(taper_points=[-extra, l], extra=true, tolerance = 0.24);
TrussRodSingleAction(taper_points=[-extra, l], extra=true, tolerance = 0.24); // TrussRodSingleAction(taper_points=[-extra, l], extra=true, tolerance = 0.24);
} // }
Guitar_Scale_Length_mm = PBass_Scale_mm;
TaperNeck(string_spacing_bridge=20, string_spacing_nut=20, num_strings=2, fret_widths=concat([3.6], [ for (i=[0:50]) 2.4 ]), num_frets=34, include_colours=[0,1]);

View File

@ -234,12 +234,19 @@ module TaperNeck(
for (num_text = fret_inlays) { for (num_text = fret_inlays) {
fret = num_text[0]; fret = num_text[0];
if (fret <= num_frets) { if (fret <= num_frets) {
x0 = fret_scale_length(fret-1); x0 = fret_scale_length(fret-1)-get_fret_width(fret-1)/2;
x1 = fret_scale_length(fret); x1 = fret_scale_length(fret)+get_fret_width(fret)/2;
diff = x0 - x1; x_mid = lerp(x0, x1, 0.5);
translate([0, lerp(x0, x1, 0.5), -0.5]) max_height = x0 - x1 - 4;
max_width = neck_width_mm(x_mid) * 0.8;
estimated_width_chars = len(num_text[1])*7/5;
fontsize_from_max_width = max_width/estimated_width_chars;
fontsize_from_max_height = max_height;
// echo(str(max_width, " ", estimated_width_chars, " ", fontsize_from_max_height, " ", fontsize_from_max_width));
desired_fontsize = min(fontsize_from_max_height, fontsize_from_max_width);
translate([0, x_mid, -0.5])
linear_extrude(30) linear_extrude(30)
text(text = num_text[1], font = JP_Sans_Font, halign = "center", valign = "center", size = clamp(2, diff-get_fret_width(fret)*2-2, 10)); text(text = num_text[1], font = JP_Sans_Font, halign = "center", valign = "center", size = clamp(2, desired_fontsize, 10));
} }
} }
} }