From c46afa3cbd3e5c53a5cbda98b73a015a530d5068 Mon Sep 17 00:00:00 2001 From: Luke Hubmayer-Werner Date: Tue, 24 Dec 2024 20:06:24 +1030 Subject: [PATCH] Convert successful test spacings model to a clearance model --- CFTubes.scad | 98 ++++++++++++++++++++++++++++++++++++++-------------- 1 file changed, 73 insertions(+), 25 deletions(-) diff --git a/CFTubes.scad b/CFTubes.scad index 4d5cfe0..a89aec7 100644 --- a/CFTubes.scad +++ b/CFTubes.scad @@ -202,14 +202,16 @@ module headpiece(string_spacing=18, string_margin=4.5, num_strings=3, target_nec } module ubass_tuner() { + t_base = 11; d_thread = 11.0 + 0.25; d_collar = 13.8 + 0.2; // Add some tolerance + l_collar = 8; // doesn't include hex + l_collarnut_to_top_of_peg = 22; + d_top_of_peg = 16; max_thread = 5.0; // thread to cover without the collar w_tag = 19; l_tag = 32.5; l_tag_rect = 20.1; - d_peg_collar = 7.2; - d_peg_collar_max = 9.4; back_of_peg_collar_to_end = 10.8; d_screw = 2.0; // As we will screw into this, probably don't need tolerance yet screw_tab_min_w = 1.6; @@ -218,6 +220,13 @@ module ubass_tuner() { // back_of_thread_to_tab_tip = 20.7 + 0.1; // 17.1 measuring far hole end to hole end, 6.9 measuring close ends gives average of 12.0 middle_of_thread_to_tab_screw = 12.1; //back_of_thread_to_tab_tip - d_thread/2 - screw_tab_min_w; == 13.7 echo(middle_of_thread_to_tab_screw); + l_wormshaft_ear = 36; + d_wormshaft_ear = 33.4+0.6; + l_wormshaft_collar = 12; + d_wormshaft_collar = 7.2; + d_wormshaft_collar_max = 9.4; + middle_of_tab_screw_to_wormshaft = (-l_tag+d_screw_tab/2+back_of_peg_collar_to_end-d_wormshaft_collar_max/2) /* -23.35 */ + 0.15; + echo(middle_of_tab_screw_to_wormshaft); module tuner_footprint() { hull() { @@ -225,36 +234,75 @@ module ubass_tuner() { circle(d=d_screw_tab, $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_screw_tab/2, 0]) cube([w_tag, l_tag_rect, h]); + cylinder(h=h, d=d_screw_tab, $fn=72); + } + } module holes() { circle(d=d_screw, $fn=72); translate([0, -middle_of_thread_to_tab_screw]) circle(d=d_thread, $fn=72); } - difference() { - linear_extrude(max_thread) difference() { - offset(4, 3) tuner_footprint(); - holes(); - } - translate([0,0,max_thread-0.2]) linear_extrude(1) { - translate([-3.5,-2]) text(str(d_screw), size=2.5); - translate([ -1, -5]) rotate(30) text(str(d_screw_tab), size=2.5); - translate([-4, -10]) rotate(90) text(str(middle_of_thread_to_tab_screw), size=2.5); - translate([-9.5,-19.5]) text(str(d_thread), size=2.5); - translate([-10,-27]) rotate(90) text(str(d_peg_collar_max), size=2.5); - } - } - translate([0,0,max_thread]) linear_extrude(10) difference() { - offset(4, 3) tuner_footprint(); - tuner_footprint(); - translate([0, -l_tag+d_screw_tab/2+back_of_peg_collar_to_end-d_peg_collar_max/2]) square([100, d_peg_collar_max+0.3], center=true); - } - - // This segfaults for no reason // difference() { - // linear_extrude(15) offset(4, 3) tuner_footprint(); - // translate([0,0,max_thread]) linear_extrude(15) tuner_footprint(); - // linear_extrude(100) holes(); + // linear_extrude(max_thread) difference() { + // offset(4, 3) tuner_footprint(); + // holes(); + // } + // translate([0,0,max_thread-0.2]) linear_extrude(1) { + // translate([-3.5,-2]) text(str(d_screw), size=2.5); + // translate([ -1, -5]) rotate(30) text(str(d_screw_tab), size=2.5); + // translate([-4, -10]) rotate(90) text(str(middle_of_thread_to_tab_screw), size=2.5); + // translate([-9.5,-19.5]) text(str(d_thread), size=2.5); + // translate([-10,-27]) rotate(90) text(str(d_wormshaft_collar_max), size=2.5); + // } // } + // translate([0,0,max_thread]) linear_extrude(10) difference() { + // offset(4, 3) tuner_footprint(); + // tuner_footprint(); + // translate([0, middle_of_tab_screw_to_wormshaft]) square([100, d_wormshaft_collar_max+0.3], center=true); + // } + + module tuner_clearance(clearance=11) { + clear_color = [1,0,0,0.6]; + // 21mm is roughly the height of the disassembled tuner from body to top of thread, 22mm should be safe + // translate([0,0,-clearance]) tuner_footprint_extrude(t_base+clearance); + color("grey") tuner_footprint_extrude(t_base); + color(clear_color) translate([0,0,-clearance]) tuner_footprint_extrude(clearance); + // screw + color(clear_color) + translate([0,0,t_base]) cylinder(h=6, d=d_screw, $fn=72); + // peg + translate([0, -middle_of_thread_to_tab_screw, t_base]) cylinder(h=max_thread, d=d_thread, $fn=72); + translate([0, -middle_of_thread_to_tab_screw, t_base+max_thread]) cylinder(h=l_collar, d=d_collar, $fn=72); + translate([0, -middle_of_thread_to_tab_screw, t_base+max_thread+l_collar]) cylinder(h=l_collarnut_to_top_of_peg, d=d_top_of_peg, $fn=72); + // wormshaft and ear + translate([w_tag/2, middle_of_tab_screw_to_wormshaft, t_base/2]) { + hull() { + rotate([0, 90, 0]) cylinder(h=0.1, d=d_wormshaft_collar_max, $fn=72); + translate([2.3, 0, 0]) rotate([0, 90, 0]) cylinder(h=0.1, d=d_wormshaft_collar, $fn=72); + } + rotate([0, 90, 0]) cylinder(h=l_wormshaft_collar, d=d_wormshaft_collar, $fn=72); + // shaft clearance + shaft_clear = t_base/2 + clearance; + color(clear_color) union() { + hull() { + translate([0, -d_wormshaft_collar_max/2, -shaft_clear]) cube([0.1, d_wormshaft_collar_max, shaft_clear]); + translate([2.3, -d_wormshaft_collar/2, -shaft_clear]) cube([0.1, d_wormshaft_collar, shaft_clear]); + } + translate([0, -d_wormshaft_collar/2, -shaft_clear]) cube([l_wormshaft_ear, d_wormshaft_collar, shaft_clear]); + } + // ear clearance + color(clear_color) hull() { + translate([l_wormshaft_collar, 0, 0]) rotate([0, 90, 0]) cylinder(h=0.1, d=d_wormshaft_collar, $fn=72); + translate([l_wormshaft_ear, 0, 0]) rotate([0, 90, 0]) cylinder(h=0.1, d=d_wormshaft_ear, $fn=72); + } + } + } + tuner_clearance(); } echo(fret_scale_length(0) - fret_scale_length(8)); // 225.724