From 01590f58c29a64d03d36ba04af4d106f9140d166 Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Tue, 4 Feb 2025 03:37:01 +1030 Subject: [PATCH] Rough model for locking guitar tuners (holes should be accurate) --- LockingGuitarTuner.scad | 71 +++++++++++++++++++++++++++++++++++++++++ common.scad | 9 ++++++ 2 files changed, 80 insertions(+) create mode 100644 LockingGuitarTuner.scad diff --git a/LockingGuitarTuner.scad b/LockingGuitarTuner.scad new file mode 100644 index 0000000..f23f585 --- /dev/null +++ b/LockingGuitarTuner.scad @@ -0,0 +1,71 @@ +include +module LockingGuitarTuner(holes=false) { + tolerance = 0.25; + d_post_cutout = 10.0 + tolerance; + h_post_cutout = 14.0; + d_post = 5.8; + h_post = 26.0; // from bottom of cutout to top + t_base = 9; // Thickness of underside assembly + d_screw_hole = 3; + screw_diameter = 2.0; + screw_depth = 5.0; + d_tag = 15.4; + w_tag = d_tag; + l_tag = 19.0; + // Rest is placeholder from UBassTuner + l_wormshaft_ear = 36; + d_wormshaft_ear = 33.4+0.6; + l_wormshaft_collar = 12; + d_wormshaft_collar = 6.4; + d_wormshaft_collar_max = 7.6; + $fn=72; + + module tuner_footprint_extrude(h) { + // linear_extrude on tuner_footprint() segfaults for no reason + // src/openscad/src/geometry/linear_extrude.cc:409: std::unique_ptr extrudePolygon(const LinearExtrudeNode&, const Polygon2d&): Assertion `poly.isSanitized()' failed. + hull() { + translate([-w_tag/2, -l_tag+d_tag/2, 0]) cube([w_tag, l_tag-w_tag, h]); + cylinder(h=h, d=d_tag); + } + } + module Holes() { + cylinder(d=d_post_cutout, h=h_post_cutout); + rotate([0, 0, 45]) translate([0, 10.5]) linear_extrude(screw_depth) screw_hole_lobe(screw_diameter, screw_diameter+1, 5); + } + + module TunerPreview() { + clear_color = [1,0,0,0.6]; + color("grey") translate([0,0,-t_base]) tuner_footprint_extrude(t_base); + // screw + color(clear_color) rotate([0, 0, 45]) translate([0, 10.5]) cylinder(h=screw_depth, d=screw_diameter); + // screw tab + color("grey") rotate([0, 0, 45]) translate([0,0,-2]) hull() { + cylinder(h=2, d=d_post_cutout); + translate([0, 10.5]) cylinder(h=2, d=screw_diameter+2); + } + // peg + cylinder(h=h_post_cutout, d=d_post_cutout); + cylinder(h=h_post, d=d_post); + + // PLACEHOLDER + // wormshaft and ear + translate([w_tag/2, -6, -t_base/2]) { + hull() { + rotate([0, 90, 0]) cylinder(h=0.1, d=d_wormshaft_collar_max); + translate([8, 0, 0]) rotate([0, 90, 0]) cylinder(h=0.1, d=d_wormshaft_collar); + } + rotate([0, 90, 0]) cylinder(h=l_wormshaft_collar, d=d_wormshaft_collar); + // ear clearance + color(clear_color) hull() { + translate([l_wormshaft_collar, 0, 0]) rotate([0, 90, 0]) cylinder(h=0.1, d=d_wormshaft_collar); + translate([l_wormshaft_ear, 0, 0]) rotate([0, 90, 0]) cylinder(h=0.1, d=d_wormshaft_ear); + } + } + } + + if (holes) + Holes(); + else + TunerPreview(); +} +// LockingGuitarTuner(holes=true); diff --git a/common.scad b/common.scad index 4ee925c..61c67a2 100644 --- a/common.scad +++ b/common.scad @@ -54,6 +54,15 @@ module rotate_around(angles, pt) { children(); } +module screw_hole_lobe(ID, OD, lobes=3, fn=90) { + difference() { + circle(d=OD, $fn=fn); + for (a=[0:360/lobes:360]) + translate((OD/2)*[cos(a), sin(a)]) + circle(d=OD-ID, $fn=fn); + } +} + // We can't use Droid Sans Japanese because the rendering library is really dumb and will pick the wrong Droid Sans. CJK fonts must be singular files. JP_Serif_Font = "New Tegomin"; JP_Sans_Font = "Yuji Boku";