jiggle tolerances, add hole bevels (01alpha)

This commit is contained in:
Luke Hubmayer-Werner 2024-12-22 16:01:41 +10:30
parent 1290b84bbe
commit 5ae785f0d5
1 changed files with 63 additions and 23 deletions

View File

@ -14,7 +14,7 @@ fret_inlays = [[3, "真"], [5, "尊"], [7, "正"], [9, "清"], [12, "評判"], [
module neck(string_spacing=18, string_margin=5, num_strings=3, target_neck_thickness=15, scallop_depth=3, num_frets=24, fret_width=2.4) {
module neck(string_spacing=18, string_margin=4.5, num_strings=3, target_neck_thickness=15, scallop_depth=3, num_frets=24, fret_width=2.4) {
neck_length = fret_scale_length(0)+fret_width/2;
neck_width = (num_strings-1)*string_spacing + string_margin*2;
// Could do some trig to work out exactly how much to add for the scallop depth, but we're subtracting anyway
@ -79,32 +79,72 @@ module neck(string_spacing=18, string_margin=5, num_strings=3, target_neck_thick
}
}
module cf_tube(tolerance = 0.2) {
module cf_tube(x1, x2, tolerance = 0.3) {
echo(x1, x2);
translate([0, x2, 0])
rotate([-90,0,0])
cylinder(h=Guitar_Scale_Length_mm+10, d=CF_Tube_Dia+tolerance, $fn=360);
cylinder(h=x1-x2, d=CF_Tube_Dia+tolerance, $fn=360);
hull() {
translate([0, x2])
rotate([-90,0,0])
cylinder(h=0.2, d=CF_Tube_Dia*1.2+tolerance, $fn=360);
translate([0, x2+5])
rotate([-90,0,0])
cylinder(h=0.2, d=CF_Tube_Dia+tolerance, $fn=360);
}
hull() {
translate([0, x1])
rotate([-90,0,0])
cylinder(h=0.2, d=CF_Tube_Dia*1.2+tolerance, $fn=360);
translate([0, x1-5])
rotate([-90,0,0])
cylinder(h=0.2, d=CF_Tube_Dia+tolerance, $fn=360);
}
}
module cf_square(tolerance = 0.2) {
module cf_square(x1, x2, tolerance = 0.2) {
x = CF_Square_Width+tolerance;
translate([-x/2, 0, -x/2])
cube([x, Guitar_Scale_Length_mm+10, x]);
translate([-x/2, x2, -x/2])
cube([x, x1-x2, x]);
hull() {
translate([0, x2, 0])
cube([x*1.2, 0.2, x*1.2], center=true);
translate([0, x2+5, 0])
cube([x, 0.2, x], center=true);
}
hull() {
translate([0, x1, 0])
cube([x*1.2, 0.2, x*1.2], center=true);
translate([0, x1-5, 0])
cube([x, 0.2, x], center=true);
}
}
difference() {
neck();
module fret_tube(from_fret, to_fret, fret_width=2.4) {
fw2 = fret_width/2;
x0 = fret_scale_length(0)+fw2;
x1 = fret_scale_length(from_fret) + ((from_fret==0) ? fw2 : (-fw2));
x2 = fret_scale_length(to_fret)-fw2;
render() difference() {
neck(fret_width=fret_width);
for (i = [-1:2:1])
translate([i*15, 0, -4])
cf_tube();
cf_tube(x1, x2);
for (i = [-1:2:1])
translate([i*7.5, 0, -7])
cf_square();
cf_square(x1, x2);
translate([0, 0, -10])
cf_tube();
cf_tube(x1, x2);
echo(fret_scale_length(0) - fret_scale_length(8)); // 225.724
echo(fret_scale_length(8) - fret_scale_length(24)); // 240.335
segment_cut = fret_scale_length(24)-1.2;
translate([-50, 0, -50]) cube([100, segment_cut, 100]);
translate([-50, fret_scale_length(8)-1.2, -50]) cube([100, fret_scale_length(0), 100]);
rotate([90, 0, 0]) linear_extrude((segment_cut+0.3)*2, center=true) text(text = "01", font = JP_Serif_Font, halign = "center", valign = "center", size = 4);
translate([-50, 0, -50]) cube([100, x2, 100]);
translate([-50, x1, -50]) cube([100, x0-x1, 100]);
// αβγδεζ
rotate([90, 0, 0]) linear_extrude((x2+0.3)*2, center=true) text(text = "01α", font = "Deja Vu Sans", halign = "center", valign = "center", size = 4);
}
}
echo(fret_scale_length(0) - fret_scale_length(8)); // 225.724
echo(fret_scale_length(8) - fret_scale_length(24)); // 240.335
fret_tube(0, 8);
// translate([30, 0, 0]) fret_tube(8, 24);