72 lines
2.3 KiB
OpenSCAD
72 lines
2.3 KiB
OpenSCAD
|
include <common.scad>
|
||
|
module LockingGuitarTuner(holes=false) {
|
||
|
tolerance = 0.25;
|
||
|
d_post_cutout = 10.0 + tolerance;
|
||
|
h_post_cutout = 14.0;
|
||
|
d_post = 5.8;
|
||
|
h_post = 26.0; // from bottom of cutout to top
|
||
|
t_base = 9; // Thickness of underside assembly
|
||
|
d_screw_hole = 3;
|
||
|
screw_diameter = 2.0;
|
||
|
screw_depth = 5.0;
|
||
|
d_tag = 15.4;
|
||
|
w_tag = d_tag;
|
||
|
l_tag = 19.0;
|
||
|
// Rest is placeholder from UBassTuner
|
||
|
l_wormshaft_ear = 36;
|
||
|
d_wormshaft_ear = 33.4+0.6;
|
||
|
l_wormshaft_collar = 12;
|
||
|
d_wormshaft_collar = 6.4;
|
||
|
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.
|
||
|
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);
|
||
|
}
|
||
|
}
|
||
|
module Holes() {
|
||
|
cylinder(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);
|
||
|
// 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);
|
||
|
|
||
|
// PLACEHOLDER
|
||
|
// wormshaft and ear
|
||
|
translate([w_tag/2, -6, -t_base/2]) {
|
||
|
hull() {
|
||
|
rotate([0, 90, 0]) cylinder(h=0.1, d=d_wormshaft_collar_max);
|
||
|
translate([8, 0, 0]) rotate([0, 90, 0]) cylinder(h=0.1, d=d_wormshaft_collar);
|
||
|
}
|
||
|
rotate([0, 90, 0]) cylinder(h=l_wormshaft_collar, d=d_wormshaft_collar);
|
||
|
// ear clearance
|
||
|
color(clear_color) hull() {
|
||
|
translate([l_wormshaft_collar, 0, 0]) rotate([0, 90, 0]) cylinder(h=0.1, d=d_wormshaft_collar);
|
||
|
translate([l_wormshaft_ear, 0, 0]) rotate([0, 90, 0]) cylinder(h=0.1, d=d_wormshaft_ear);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
|
||
|
if (holes)
|
||
|
Holes();
|
||
|
else
|
||
|
TunerPreview();
|
||
|
}
|
||
|
// LockingGuitarTuner(holes=true);
|