these clearances aren't working on bambu PLAs with VLH

This commit is contained in:
Luke Hubmayer-Werner 2024-12-26 13:14:01 +10:30
parent c23715d3c5
commit 5ff4eca9f1
2 changed files with 61 additions and 9 deletions

View File

@ -1,4 +1,5 @@
include <common.scad>
include <UBassTuner.scad>
// Guitar_Scale_Length_mm = 610; // millimetres, slightly over 24inch (609.6mm) Jaguar scale, should be fine for guitar and u-bass
// assert(fret_scale_length(0) == 610); // Make sure the function correctly uses our changed global
@ -93,6 +94,60 @@ module neck(string_spacing=18, string_margin=4.5, num_strings=3, target_neck_thi
}
}
module bridge(string_spacing=18, string_margin=4.5, num_strings=3, target_neck_thickness=15, scallop_depth=3, fret_width=2.4*6) {
fw2 = fret_width/2;
neck_length = 120;
neck_width = (num_strings-1)*string_spacing + string_margin*2;
module neck_stock() {
angle_excess = asin((scallop_depth+fw2)/target_neck_thickness);
a0 = 90-angle_excess;
a1 = 270+angle_excess;
rotate([-90, 0, 0])
linear_extrude(neck_length)
polygon([for (i = [0:300]) let(a=lerp(a0, a1, i/300.0)) [neck_width*0.5*sin(a), -target_neck_thickness*cos(a)]]);
}
module scallop(fret) {
x0 = fret_scale_length(fret-1) - fw2;
x1 = fret_scale_length(fret) + fw2;
xmid = lerp(x0, x1, 0.5);
// Radius it?
arc = arc_points([[x0, scallop_depth], [x1, scallop_depth], [xmid, 0]]);
// echo(arc);
rotate([90, 0, 90]) linear_extrude(neck_width, center=true) polygon(arc);
}
module fret_bumps() {
translate([0, neck_length-fw2, scallop_depth]) rotate([0, 90]) cylinder(d=fret_width, h=neck_width, center = true, $fn=200);
}
// render() difference() {
// neck_stock();
// translate([-neck_width, 0, scallop_depth]) cube([neck_width*2, Guitar_Scale_Length_mm*3, target_neck_thickness*3]);
// translate([0, 40, 0]) rotate([90, 90, 90]) UBassTuner();
// }
// intersection() {
// fret_bumps();
// neck_stock();
// }
module differences() {
t_offset = 2.7;
t_z = -23;
mirror([1,0,0]) translate([t_offset, 80, t_z]) rotate([90, -90, 90]) UBassTuner();
translate([t_offset, 45, t_z]) rotate([90, -90, 90]) UBassTuner();
mirror([1,0,0]) translate([t_offset, 10, t_z]) rotate([90, -90, 90]) UBassTuner();
for (i = [-1:2:1])
translate([i*15, 0, -4])
cf_tube(neck_length, 0, tolerance=0.4);
translate([0, 0, -10])
cf_tube(neck_length, 0, tolerance=0.4);
}
difference() {
color([1,1,1,0.3]) translate([-neck_width/2, 0, -25+scallop_depth]) cube([neck_width, neck_length, 25]);
differences();
}
// color([1,1,1,0.3]) neck_stock();
}
module cf_tube(x1, x2, tolerance = 0.3) {
translate([0, x2, 0])
rotate([-90,0,0])
@ -161,7 +216,7 @@ module fret_tube(from_fret, to_fret, fret_width=2.4) {
}
}
module fret_tube_filler(from_fret, to_fret, fret_width=2.4, belthole_length=60) {
module fret_tube_filler(from_fret, to_fret, fret_width=2.4, belthole_length=80) {
fw2 = fret_width/2;
x0 = fret_scale_length(0)+fw2;
x1 = fret_scale_length(from_fret) + ((from_fret==0) ? fw2 : (-fw2));
@ -170,12 +225,9 @@ module fret_tube_filler(from_fret, to_fret, fret_width=2.4, belthole_length=60)
neck(fret_width=fret_width, filler=true);
for (i = [-1:2:1])
translate([i*15, 0, -4])
cf_tube(x1, x2);
// for (i = [-1:2:1])
// translate([i*7.5, 0, -7])
// cf_square(x1, x2);
cf_tube(x1, x2, tolerance=0.4);
translate([0, 0, -10])
cf_tube(x1, x2);
cf_tube(x1, x2, tolerance=0.4);
translate([-50, 0, -50]) cube([100, x2, 100]);
translate([-50, x1, -50]) cube([100, x0-x1, 100]);
@ -196,7 +248,7 @@ module fret_tube_filler(from_fret, to_fret, fret_width=2.4, belthole_length=60)
}
// αβγδεζ
t = "01β";
t = "01β.α";
translate([0,0,-3.5]) rotate([90, 0, 0]) linear_extrude((x2+0.3)*2, center=true) text(text = t, font = "Deja Vu Sans", halign = "center", valign = "center", size = 4);
translate([0,x1-0.3,-3]) rotate([90, 0, 180]) linear_extrude((0.3)*2, center=true) text(text = t, font = "Deja Vu Sans", halign = "center", valign = "center", size = 4);
}
@ -261,7 +313,7 @@ echo(fret_scale_length(8) - fret_scale_length(24)); // 240.335
// fret_tube(8, 24);
// headpiece();
// include <UBassTuner.scad>
// UBassTuner();
fret_tube_filler(24, 100);
// bridge();

View File

@ -69,7 +69,7 @@ module UBassTuner() {
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([-0.1, -d_wormshaft_collar_max/2, -shaft_clear]) cube([0.2, 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]);