GuitarModels/BassTunerHolder.scad

200 lines
6.1 KiB
OpenSCAD
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

Tuner_Spacing_4 = 64;
Post_Hole_Dia = 14.75; // 14 + tolerance
Post_Hole_Depth = 14;
Post_Top_Dia = 9;
Post_Top_Height = 17;
Tuner_Body_Dia = 17; // 16.5 + tolerance
Tuner_Body_R = Tuner_Body_Dia/2; // 16.5 + tolerance
Tuner_Body_Width = 21;
Tuner_Body_Thickness = 10; // 9.5 + tolerance
Tuner_Body_Rect_Len = Tuner_Body_Width-Tuner_Body_R;
Tuner_Tab_Angle = 60;
Tuner_Tab_Hole_Dia = 2.5;
Tuner_Tab_Thickness = 2;
Tuner_Tab_Total = 27.5;
Tuner_Tab_Hole_Inset = 2;
Tuner_Tab_Hole_Outset = (Tuner_Tab_Total-Tuner_Body_Rect_Len)-Tuner_Tab_Hole_Inset;
Engrave_String = "01γ";
// Font = "Ani";
Font = "GFS Didot";
// Font = "GFS Neohellenic";
// Font = "Liberation Mono";
// Font = "Noto Sans";
module cyl(d=10, z0=-100, z1=100, $fn=64)
translate([0,0,z0])
cylinder(h=z1-z0, r=d/2, $fn=$fn);
module c(d=10, z=0, $fn=64) // 3d circle
translate([0,0,z])
cylinder(h=0.00001, r=d/2, $fn=$fn);
module tuner_tab_hole(shrink=0) {
translate([0, -Tuner_Tab_Hole_Outset+Tuner_Tab_Hole_Dia/2])
circle((Tuner_Tab_Hole_Dia-shrink)/2, $fn=32);
}
module tuner_outline(shrink=0) {
union() {
hull() {
translate([0, -Tuner_Tab_Hole_Outset])
circle((Tuner_Tab_Hole_Dia+Tuner_Tab_Hole_Inset-shrink)/2, $fn=32);
circle(Tuner_Body_R-shrink/2, $fn=64);
}
translate([-Tuner_Body_R+shrink/2, 0])
square([Tuner_Body_Dia-shrink, Tuner_Body_Rect_Len-shrink/2]);
}
}
// color("blue") tuner_outline(-1.5);
// translate([0,0,0.001])
// color("red") tuner_outline(0);
module tuner_body() {
linear_extrude(Tuner_Body_Thickness) union() {
translate([-Tuner_Body_R, 0])
square([Tuner_Body_Dia, Tuner_Body_Rect_Len]);
circle(Tuner_Body_R, $fn=32);
}
translate([0, 0, Tuner_Body_Thickness-Tuner_Tab_Thickness])
linear_extrude(Tuner_Tab_Thickness) difference() {
hull() {
translate([0, -Tuner_Tab_Hole_Outset])
circle((Tuner_Tab_Hole_Dia+Tuner_Tab_Hole_Inset)/2, $fn=32);
circle(Tuner_Body_R, $fn=64);
}
tuner_tab_hole();
}
// handle
color(c = "red")
translate([0, Tuner_Body_Rect_Len-Tuner_Body_Thickness/2, Tuner_Body_Thickness/2])
rotate([0,-90,0])
cylinder(h = 40, r = Tuner_Body_Thickness/2);
}
module tuner_post() {
cylinder(h = Post_Hole_Depth, r = Post_Hole_Dia/2, $fn=64);
color("cyan")
translate([0, 0, Post_Hole_Depth])
difference() {
cylinder(h = Post_Top_Height, r = Post_Top_Dia/2);
translate([-1,-5, Post_Top_Height-6]) cube([2,10,7]);
}
}
module tuner() {
tuner_body();
translate([0, 0, Tuner_Body_Thickness])
tuner_post();
}
module tuner_arrange()
for (a = [90:30:180])
rotate([0,0,a])
translate([-31, 31, 0])
children();
module handle_cutouts() {
tuner_arrange()
translate([0, Tuner_Body_Rect_Len-Tuner_Body_Thickness/2, Tuner_Body_Thickness/2])
rotate([-90, 0, 90]) linear_extrude(40) hull() {
circle(Tuner_Body_Thickness/2, $fn=32);
translate([-Tuner_Body_Thickness/2, 0]) square([Tuner_Body_Thickness, 20]);
}
}
module retainer_outline()
// polygon([[-50, -10], [-45, -35], [-20, -55], [20, -55], [45, -35], [50, -10]]);
polygon(concat([for (i = [-52:1:45]) [60*sin(i), -60*cos(i)]], [[40,-5], [-40, -5], [-47, -18]]));
module part() {
module layer_bolt_holes_outer(dia=3.05, z0=-100, z1=100)
for (a = [-120:30:-60])
rotate([0,0,a])
translate([55,0,z0])
cylinder(h=z1-z0, r=dia/2, $fn=64);
module layer_bolt_holes_inner(dia=3.05, z0=-100, z1=100)
for (x = [-20,0,20])
translate([x,-10,z0])
cylinder(h=z1-z0, r=dia/2, $fn=64);
module bottom_engraving()
// translate([0,-26,1]) rotate([0,180,0]) linear_extrude(30)
translate([0,-28,1]) rotate([15,180,0]) linear_extrude(30)
text(text = Engrave_String, size = 5, halign="center", valign="center", font=Font);
// Top half
difference() {
color("blue")
translate([0, 0, Tuner_Body_Thickness])
linear_extrude(Post_Hole_Depth-0.001)
retainer_outline();
tuner_arrange() tuner();
// tuner screw holes
tuner_arrange()
linear_extrude(Tuner_Body_Thickness+Post_Hole_Depth-1)
tuner_tab_hole(shrink=0.5);
// layer bolt holes
layer_bolt_holes_outer();
layer_bolt_holes_outer(dia=7.05, z0=Tuner_Body_Thickness+Post_Hole_Depth-4); // 5.4 OD for bolt head, 7 for M3 washer
layer_bolt_holes_inner();
layer_bolt_holes_inner(dia=7.05, z0=Tuner_Body_Thickness+Post_Hole_Depth-4);
// engraving
translate([0,-20,Tuner_Body_Thickness+Post_Hole_Depth-1])
linear_extrude(5) text(text = Engrave_String, size = 12, halign="center", valign="center", font=Font);
}
// Bottom half
color("grey")
difference() {
linear_extrude(Tuner_Body_Thickness) difference() {
retainer_outline();
// tuner body holes
translate([0, 0, -20])
tuner_arrange()
tuner_outline(-1.5);
}
// layer bolt holes
layer_bolt_holes_outer();
layer_bolt_holes_outer(dia=5.1, z1=5+1.5); // Heat insert is 5mm tall, we will use 20mm bolt for these holes
layer_bolt_holes_inner();
// tuning handle finger bit
handle_cutouts();
// engraving
bottom_engraving();
}
// Mounting
color("aqua")
difference() {
translate([0,0,-12]) linear_extrude(12) difference() {
retainer_outline();
tuner_arrange() tuner_outline(-1.5);
}
// reinforcing layer bolt holes
layer_bolt_holes_inner();
layer_bolt_holes_inner(dia=7.05, z1=(Tuner_Body_Thickness+Post_Hole_Depth-4)-29+5); // Heat insert is 5mm tall, we will use 30mm bolt for these holes
// mounting holes
for (x = [-30, -10, 10, 30])
translate([x,0,-5])
rotate([90,0,0]) {
cylinder(h=100, r=2.5, $fn=32);
// translate([0,0,10]) cylinder(h=20, r=3.8, $fn=32); // Bolt head
// translate([0,0,11]) cylinder(h=20, r=4.7, $fn=32); // Washer
translate([0,0,11]) cylinder(h=20, r=2.55, $fn=32); // Heat Insert
}
// mounting hollow
cyl_offset = [0,-36,-13];
translate(cyl_offset) rotate([0,90,0]) cyl(d=28, $fn=128);
translate([-100,-100+cyl_offset[1],-50]) cube([200,100,100]);
for (i = [-1,1]) hull() {
translate([0,-18,-15]) rotate([0,90,0]) c(d=32, z=50*i, $fn=128);
translate(cyl_offset) rotate([0,90,0]) c(d=28, z=14*i, $fn=128);
translate(cyl_offset) rotate([0,90,0]) c(d=28, z=50*i, $fn=128);
}
bottom_engraving();
}
}
part();
// tuner_arrange() tuner();
// handle_cutouts();