2024-12-24 20:44:43 +10:30
|
|
|
|
2024-12-26 19:05:49 +10:30
|
|
|
module UBassTuner(from_below=false, from_side=true) {
|
2024-12-24 20:44:43 +10:30
|
|
|
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
|
2024-12-27 19:10:13 +10:30
|
|
|
l_collarnut_to_top_of_peg = 19; //22;
|
2024-12-28 13:43:39 +10:30
|
|
|
d_top_of_peg = 16+2;
|
2024-12-24 20:44:43 +10:30
|
|
|
max_thread = 5.0; // thread to cover without the collar
|
|
|
|
w_tag = 19;
|
|
|
|
l_tag = 32.5;
|
|
|
|
l_tag_rect = 20.1;
|
|
|
|
back_of_peg_collar_to_end = 10.8;
|
2024-12-27 19:10:13 +10:30
|
|
|
d_screw = 1.85; //2.0; // As we will screw into this, probably don't need tolerance yet
|
2024-12-24 20:44:43 +10:30
|
|
|
screw_tab_min_w = 1.6;
|
|
|
|
screw_tab_min_thick = 2.0;
|
|
|
|
d_screw_tab = 5.2+0.9; // Tolerance this though!
|
|
|
|
// 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() {
|
|
|
|
translate([-w_tag/2, -l_tag+d_screw_tab/2]) square([w_tag, l_tag_rect]);
|
|
|
|
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<Geometry> 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);
|
|
|
|
}
|
|
|
|
|
2024-12-26 19:05:49 +10:30
|
|
|
module tuner_clearance(clearance=11, side_clearance=30) {
|
2024-12-24 20:44:43 +10:30
|
|
|
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);
|
2024-12-26 19:05:49 +10:30
|
|
|
if (from_below) {
|
|
|
|
color(clear_color) translate([0,0,-clearance]) tuner_footprint_extrude(clearance);
|
|
|
|
}
|
|
|
|
if (from_side) {
|
|
|
|
color(clear_color) translate([-side_clearance,-l_tag+d_screw_tab/2,0]) cube([side_clearance, l_tag, t_base]);
|
|
|
|
}
|
2024-12-24 20:44:43 +10:30
|
|
|
// 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);
|
2024-12-27 19:10:13 +10:30
|
|
|
// string clearance
|
|
|
|
string_z0 = 5;
|
|
|
|
string_z = 6;
|
2024-12-28 13:43:39 +10:30
|
|
|
string_extra_d = 7;
|
2024-12-27 19:10:13 +10:30
|
|
|
color(clear_color) hull() {
|
|
|
|
translate([0, -middle_of_thread_to_tab_screw, t_base+max_thread+l_collar+string_z0]) cylinder(h=l_collarnut_to_top_of_peg-string_z0, d=d_top_of_peg, $fn=72);
|
|
|
|
translate([0, -middle_of_thread_to_tab_screw, t_base+max_thread+l_collar+string_z0+string_z/2]) cylinder(h=l_collarnut_to_top_of_peg-string_z-string_z0, d=d_top_of_peg+string_extra_d, $fn=72);
|
|
|
|
}
|
2024-12-26 19:05:49 +10:30
|
|
|
if (from_side) {
|
|
|
|
translate([-side_clearance, -middle_of_thread_to_tab_screw-d_thread/2, t_base]) cube([side_clearance, d_thread, max_thread]);
|
|
|
|
translate([-side_clearance, -middle_of_thread_to_tab_screw-d_collar/2, t_base+max_thread]) cube([side_clearance, d_collar, l_collar]);
|
|
|
|
translate([-side_clearance, -middle_of_thread_to_tab_screw-d_top_of_peg/2, t_base+max_thread+l_collar]) cube([side_clearance, d_top_of_peg, l_collarnut_to_top_of_peg]);
|
|
|
|
}
|
2024-12-24 20:44:43 +10:30
|
|
|
// 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
|
2024-12-26 19:05:49 +10:30
|
|
|
if (from_below){
|
|
|
|
shaft_clear = t_base/2 + clearance;
|
|
|
|
color(clear_color) union() {
|
|
|
|
hull() {
|
|
|
|
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]);
|
2024-12-24 20:44:43 +10:30
|
|
|
}
|
|
|
|
}
|
|
|
|
// 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();
|
|
|
|
}
|