From ef2f30bca952c68fb9cec33e58dfe94ae60f1657 Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Mon, 1 Apr 2024 20:22:15 +1030 Subject: [PATCH] Old uncommitted 2-Banger additions --- 2Banger_bridge.scad | 112 +++++++++++++++++++++++++++++++++++++++ 2Banger_fret_tube.scad | 16 +++--- 2Banger_headpiece.scad | 116 +++++++++++++++++++++++++++++++++++++++++ 3 files changed, 236 insertions(+), 8 deletions(-) create mode 100644 2Banger_bridge.scad create mode 100644 2Banger_headpiece.scad diff --git a/2Banger_bridge.scad b/2Banger_bridge.scad new file mode 100644 index 0000000..2de0603 --- /dev/null +++ b/2Banger_bridge.scad @@ -0,0 +1,112 @@ +include +include <2BangerCommon.scad> + +// Nice big jumbo fret for the bridge +fret_width = 2.4*1.5; //2.4; //2.8; // Jumbo = 0.11", 0.055" tall + +module headpiece(from_fret, to_fret, tang_depth = 3) { + z_min = (fret_scale_length(to_fret) + fret_scale_length(to_fret+1))/2; + z_max = (fret_scale_length(from_fret) + fret_scale_length(from_fret-1))/2; + z_offset = z_min; + Tube_Length = z_max - z_min; + echo(str("Cap length from fret ", from_fret, " to ", to_fret, " is ", Tube_Length, "mm")); + + module solid_tube(cap_taper = 1.5, fingerboard_min_thick = 2.5, fingerboard_max_thick = 5+8, fret_angle = 60) { // Fret angle of 45° is normal, anything over 60 will not work correctly + module fret_bumps(w=50) { + translate([0,0,-z_offset]) for (fret = [from_fret:to_fret]) + translate([fingerboard_max_thick - fret_width/2, w/2, fret_scale_length(fret)]) + rotate([90,0,0]) cylinder(h = w, r = fret_width/2); + } + + module scallops(w=50) { + for (fret = [from_fret:to_fret+1]) + let( + f_prev = fret_scale_length(fret-1) - z_offset, + f_next = fret_scale_length(fret) - z_offset, + o = fret_width/2 * sin(fret_angle), + x0 = f_prev - o, + x1 = f_next + o, + y0 = fingerboard_min_thick, + y1 = fingerboard_max_thick - (fret_width/2 * cos(fret_angle)), + pts = [[x0, y1], [x1, y1], [(x0+x1)/2, y0]], + cc = tri_circumcenter(pts), + r = norm([x0, y1] - cc) + ) { + translate([0,-w/2,0]) + rotate([-90,-90,0]) + translate(cc) cylinder(h = w, r = r); + } + } + + module basic_fretboard() { + intersection() { + hull() { + minkowski($fn = mink_fn) { + sphere(cap_taper, $fn = mink_fn); + translate([0,0,cap_taper]) linear_extrude(0.01) offset(-cap_taper) + cap_outline_bridge(fingerboard_min_thick = fingerboard_min_thick, fingerboard_max_thick = fingerboard_max_thick); + } + minkowski($fn = mink_fn) { + sphere(cap_taper, $fn = mink_fn); + translate([0,0,Tube_Length-cap_taper]) linear_extrude(0.01) offset(-cap_taper) + cap_outline_bridge(fingerboard_min_thick = fingerboard_min_thick, fingerboard_max_thick = fingerboard_max_thick); + } + linear_extrude(Tube_Length) offset(-1) cap_outline_bridge(); + translate([0,0,cap_taper]) linear_extrude(Tube_Length-cap_taper*2) + cap_outline_bridge(fingerboard_min_thick = fingerboard_min_thick, fingerboard_max_thick = fingerboard_max_thick); + } + union() { + fret_bumps(); + translate([-50,-50,0]) cube([50 + fingerboard_max_thick - (fret_width/2 * cos(fret_angle)), 100, Tube_Length]); + } + } + } + + // Make a solid tube and then subtract the notches + difference() { + union() { + basic_fretboard(); + // translate([0,0,Tube_Length]) linear_extrude(tang_depth) tang_outline(-0.1); + } + difference() { + scallops(); + fret_bumps(); + } + // Shear off the top at an angle + // translate([-1,-50,Tube_Length]) + // rotate([0,83.8]) + // cube([45,100,100]); + // Tang for connecting to next tube + // tapered_tang_groove(depth = tang_depth + 0.5, taper = 0); + // tapered_tang_groove(depth = 0.5, taper = 0, offset = 0.5); + } + // color("red") scallops(); + } + + module string_hole() { + translate([12, 0, Tube_Length - 5]) + rotate([0,-5]) + cylinder(h = 50, r = 1.5, center = true); + } + + difference() { + solid_tube(1.5); + linear_extrude(Tube_Length + 10) T_hole(); + tapered_T_hole(z0 = 0, z1 = 3); + tapered_T_hole(z0 = Tube_Length-3, z1 = Tube_Length+0.0001, o0 = 0, o1 = 1); + // String holes + translate([0, -10, 0]) + string_hole(); + translate([0, 10, 0]) + string_hole(); + // Version number + translate([-10,10,Tube_Length-0.5]) linear_extrude(1) text("05²", size=5, halign="center", valign="center", font="Noto Sans"); + // Fret number markers + for (fret = [from_fret:to_fret]) + translate([-3,-16,fret_scale_length(fret)-z_offset]) rotate([90,25,16]) linear_extrude(100) text("B", size=4, halign="center", valign="center", font="Noto Sans"); + } +} + + +headpiece(from_fret = 7, to_fret = 7); +//translate([50, 0]) headpiece(from_fret = 0, to_fret = 0); diff --git a/2Banger_fret_tube.scad b/2Banger_fret_tube.scad index 9581381..b961030 100644 --- a/2Banger_fret_tube.scad +++ b/2Banger_fret_tube.scad @@ -91,11 +91,11 @@ module tube(from_fret, to_fret, tang_depth = 3) { } -tube(from_fret = 0, to_fret = 0); -translate([50, 0]) tube(from_fret = -4, to_fret = -3); -translate([100, 0]) tube(from_fret = -2, to_fret = 0); -translate([150, 0]) tube(from_fret = 1, to_fret = 3); -translate([200, 0]) tube(from_fret = 4, to_fret = 7); -translate([250, 0]) tube(from_fret = 8, to_fret = 12); -translate([300, 0]) tube(from_fret = 13, to_fret = 19); -translate([350, 0]) tube(from_fret = 20, to_fret = 30); +tube(from_fret = -5, to_fret = -5); +//translate([50, 0]) tube(from_fret = -4, to_fret = -3); +//translate([100, 0]) tube(from_fret = -2, to_fret = 0); +//translate([150, 0]) tube(from_fret = 1, to_fret = 3); +//translate([200, 0]) tube(from_fret = 4, to_fret = 7); +//translate([250, 0]) tube(from_fret = 8, to_fret = 12); +//translate([300, 0]) tube(from_fret = 13, to_fret = 19); +//translate([350, 0]) tube(from_fret = 20, to_fret = 30); diff --git a/2Banger_headpiece.scad b/2Banger_headpiece.scad new file mode 100644 index 0000000..238877c --- /dev/null +++ b/2Banger_headpiece.scad @@ -0,0 +1,116 @@ +include +include <2BangerCommon.scad> + +// Nice big jumbo fret for the 0th fret +fret_width = 2.4*1.5; //2.4; //2.8; // Jumbo = 0.11", 0.055" tall + +module headpiece(from_fret, to_fret, tang_depth = 3, Cap_Length = 30) { + z_min = (fret_scale_length(to_fret) + fret_scale_length(to_fret+1))/2; + z_max = (fret_scale_length(from_fret) + fret_scale_length(from_fret-1))/2 + Cap_Length; + z_offset = z_min; + Tube_Length = z_max - z_min; + echo(str("Cap length from fret ", from_fret, " to ", to_fret, " is ", Tube_Length, "mm")); + + module solid_tube(cap_taper = 1.5, fingerboard_min_thick = 2.5, fingerboard_max_thick = 5+2, fret_angle = 60) { // Fret angle of 45° is normal, anything over 60 will not work correctly + module fret_bumps(w=50) { + translate([0,0,-z_offset]) for (fret = [from_fret:to_fret]) + translate([fingerboard_max_thick - fret_width/2, w/2, fret_scale_length(fret)]) + rotate([90,0,0]) cylinder(h = w, r = fret_width/2); + } + + module scallops(w=50) { + for (fret = [from_fret:to_fret+1]) + let( + f_prev = fret_scale_length(fret-1) - z_offset, + f_next = fret_scale_length(fret) - z_offset, + o = fret_width/2 * sin(fret_angle), + x0 = f_prev - o, + x1 = f_next + o, + y0 = fingerboard_min_thick, + y1 = fingerboard_max_thick - (fret_width/2 * cos(fret_angle)), + pts = [[x0, y1], [x1, y1], [(x0+x1)/2, y0]], + cc = tri_circumcenter(pts), + r = norm([x0, y1] - cc) + ) { + translate([0,-w/2,0]) + rotate([-90,-90,0]) + translate(cc) cylinder(h = w, r = r); + } + } + + module basic_fretboard() { + intersection() { + hull() { + minkowski($fn = mink_fn) { + sphere(cap_taper, $fn = mink_fn); + translate([0,0,cap_taper]) linear_extrude(0.01) offset(-cap_taper) + cap_outline(fingerboard_min_thick = fingerboard_min_thick, fingerboard_max_thick = fingerboard_max_thick); + } + minkowski($fn = mink_fn) { + sphere(cap_taper, $fn = mink_fn); + translate([0,0,Tube_Length-cap_taper]) linear_extrude(0.01) offset(-cap_taper) + cap_outline(fingerboard_min_thick = fingerboard_min_thick, fingerboard_max_thick = fingerboard_max_thick); + } + linear_extrude(Tube_Length) offset(-1) cap_outline(); + translate([0,0,cap_taper]) linear_extrude(Tube_Length-cap_taper*2) + cap_outline(fingerboard_min_thick = fingerboard_min_thick, fingerboard_max_thick = fingerboard_max_thick); + } + union() { + fret_bumps(); + translate([-50,-50,0]) cube([50 + fingerboard_max_thick - (fret_width/2 * cos(fret_angle)), 100, Tube_Length]); + } + } + } + + // Make a solid tube and then subtract the notches + difference() { + union() { + basic_fretboard(); + // translate([0,0,Tube_Length]) linear_extrude(tang_depth) tang_outline(-0.1); + } + difference() { + scallops(); + fret_bumps(); + } + // Shear off the top at an angle + translate([-1,-50,Tube_Length]) + rotate([0,83.8]) + cube([45,100,100]); + // Tang for connecting to next tube + tapered_tang_groove(depth = tang_depth + 0.5, taper = 0); + tapered_tang_groove(depth = 0.5, taper = 0, offset = 0.5); + } + // color("red") scallops(); + } + + module string_hole() { + translate([0, 0, Tube_Length - Cap_Length - 5]) + rotate([0,-40]) + union() { + translate([0, 0, 105]) + cube([7.5, 5, 200], center = true); + cylinder(h = 200, r = 2.5, center = true); + } + } + + difference() { + solid_tube(1.5); + linear_extrude(Tube_Length - Cap_Length + 10) T_hole(); + tapered_T_hole(z0 = 0, z1 = 3); + // tapered_T_hole(z0 = Tube_Length-3, z1 = Tube_Length+0.0001, o0 = 0, o1 = 1); + // String holes + translate([0, -10, 0]) + string_hole(); + translate([0, 10, 0]) + string_hole(); + // Version number + translate([-10,10,Tube_Length-0.5]) linear_extrude(1) text("05²", size=5, halign="center", valign="center", font="Noto Sans"); + // Fret number markers + for (fret = [from_fret:to_fret]) + translate([-3,-16,fret_scale_length(fret)-z_offset]) rotate([90,25,16]) linear_extrude(100) text(str(fret), size=4, halign="center", valign="center", font="Noto Sans"); + } +} + + +headpiece(from_fret = -5, to_fret = -5); +//translate([50, 0]) headpiece(from_fret = 0, to_fret = 0);