Adjusting locking tuner cutouts

This commit is contained in:
Luke Hubmayer-Werner 2025-02-04 14:55:05 +10:30
parent 01590f58c2
commit e98868aecc
2 changed files with 33 additions and 16 deletions

View File

@ -1,5 +1,5 @@
include <common.scad>
module LockingGuitarTuner(holes=false) {
module LockingGuitarTuner(holes=0) {
tolerance = 0.25;
d_post_cutout = 10.0 + tolerance;
h_post_cutout = 14.0;
@ -20,29 +20,27 @@ module LockingGuitarTuner(holes=false) {
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<Geometry> extrudePolygon(const LinearExtrudeNode&, const Polygon2d&): Assertion `poly.isSanitized()' failed.
module tuner_footprint_extrude(h=t_base, tab_h=0, tolerance=0) {
h2 = (tab_h == 0) ? h : tab_h;
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);
translate([0, -l_tag+d_tag/2 - tolerance, h/2]) cube([w_tag + tolerance, 0.00001, h], center=true);
cylinder(h=h, d=d_tag+tolerance);
}
rotate([0, 0, 45]) translate([0,0,h-h2]) hull() {
cylinder(h=h2, d=d_post_cutout + tolerance);
translate([0, 10.5]) cylinder(h=h2, d=screw_diameter+2 + tolerance);
}
}
module Holes() {
cylinder(d=d_post_cutout, h=h_post_cutout);
cylinder_beak(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);
color("grey") translate([0,0,-t_base]) tuner_footprint_extrude(t_base, 2);
// 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);
@ -63,9 +61,21 @@ module LockingGuitarTuner(holes=false) {
}
}
if (holes)
if (holes > 0) {
t = t_base + holes;
Holes();
else
translate([0, 0, -t]) tuner_footprint_extrude(h=t, tolerance=0.5);
translate([w_tag/2, -l_tag+8-tolerance/2, -t]) cube([24, 8+tolerance, t]);
} else {
TunerPreview();
}
}
// translate([-12, 8]) LockingGuitarTuner();
render() difference() {
t = 24;
cube([23, 48, t]);
translate([12, 10, t-14]) LockingGuitarTuner(holes=10);
translate([12, 34, t-14]) LockingGuitarTuner(holes=10);
}
// LockingGuitarTuner(holes=true);

View File

@ -63,6 +63,13 @@ module screw_hole_lobe(ID, OD, lobes=3, fn=90) {
}
}
module cylinder_beak(d, h, beak=0.5) {
// A cylinder with a beak to take seams. This helps improve tolerances as seams often expand a little bit and ruin the fit.
cylinder(d=d, h=h);
// beak notch for seams
translate([0, d/2-beak*0.25, h/2]) rotate([0,0,45]) cube([beak, beak, h], center=true);
}
// 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";