More concept
This commit is contained in:
parent
3cbd3990a1
commit
694105eae2
220
CFTubes.scad
220
CFTubes.scad
|
@ -1104,62 +1104,190 @@ COLOURSCHEME_PETGHF_BLUE = [BAMBU_PETGHF_LAKE_BLUE, BAMBU_PETGHF_LAKE_BLUE, "",
|
||||||
// }
|
// }
|
||||||
|
|
||||||
module TwoBangerMk2(include_colours=[0,1], preview=false) {
|
module TwoBangerMk2(include_colours=[0,1], preview=false) {
|
||||||
module MyNeck() {
|
id_line_0 = "ABS";
|
||||||
TaperNeck(
|
id_line_1 = "2";
|
||||||
string_spacing_bridge=20,
|
fsl_mm = fret_scale_length(0);
|
||||||
string_spacing_nut=20,
|
|
||||||
num_strings=2,
|
string_diameters_thous = [80, 105]; // Artist BST45130
|
||||||
string_margin=5,
|
string_diameters_mm = string_diameters_thous * 0.0254;
|
||||||
target_neck_thickness=15,
|
|
||||||
scallop_depth=2.5,
|
neck_width_nut = 30; //(num_strings-1)*string_spacing_nut + string_margin*2;
|
||||||
extra_height=6,
|
neck_width_bridge = 30; //(num_strings-1)*string_spacing_bridge + string_margin*2;
|
||||||
fret_widths=concat([3.6], [ for (i=[0:50]) 2.4 ]),
|
function neck_width_mm(y) = lerp(neck_width_bridge, neck_width_nut, y/fret_scale_length(0));
|
||||||
num_frets=34,
|
target_neck_thickness = 15;
|
||||||
fret_side_marker_x_angle=-23,
|
|
||||||
fret_side_marker_y_angle=5,
|
num_strings = 2;
|
||||||
include_colours=include_colours,
|
string_spacing_nut = 20;
|
||||||
) {
|
string_spacing_bridge = 20;
|
||||||
body_height = 30;
|
function string_spacing(y) = lerp(string_spacing_bridge, string_spacing_nut, y/fret_scale_length(0));
|
||||||
behind_bridge = 100;
|
string_margin = 5;
|
||||||
epsilon = 0.000001;
|
function string_x(i, y) = (num_strings-i-1)*string_spacing(y) - neck_width_mm(y)/2 + string_margin;
|
||||||
radius = 4;
|
|
||||||
w = 30 - radius*2;
|
num_frets = 34;
|
||||||
hull() {
|
_zero_fret_width = 3.6;
|
||||||
// translate([-w/2, 475-behind_bridge-epsilon, -epsilon]) cube([30, epsilon, epsilon]);
|
_fret_width = 2.4;
|
||||||
// translate([-w/2, -behind_bridge, -body_height]) cube([30, 460, body_height]);
|
fret_widths = flatten([[_zero_fret_width], [ for (i = [1:num_frets]) _fret_width ]]);
|
||||||
$fn = 64;
|
fret_angle = 60;
|
||||||
translate([-w/2, radius-behind_bridge, radius-body_height]) sphere(radius);
|
function get_fret_width(fret) = fret_widths[clamp(0, fret, num_frets)];
|
||||||
translate([+w/2, radius-behind_bridge, radius-body_height]) sphere(radius);
|
function get_fret_height(fret) = sin(fret_angle) * get_fret_width(fret)/2;
|
||||||
translate([+w/2, radius-behind_bridge, 0]) sphere(radius);
|
max_fret_width = max(fret_widths);
|
||||||
translate([-w/2, radius-behind_bridge, 0]) sphere(radius);
|
max_fret_height = sin(fret_angle) * max_fret_width/2;
|
||||||
translate([-w/2, 440-behind_bridge, radius-body_height]) sphere(radius);
|
scallop_depth = 2.5;
|
||||||
translate([+w/2, 440-behind_bridge, radius-body_height]) sphere(radius);
|
extra_height = 6;
|
||||||
translate([+w/2, 495-behind_bridge, 0]) sphere(radius);
|
|
||||||
translate([-w/2, 495-behind_bridge, 0]) sphere(radius);
|
function behind_fret(fret) = fret_scale_length(fret) + fret_widths[fret]/2;
|
||||||
|
function after_fret(fret) = fret_scale_length(fret) - fret_widths[fret]/2;
|
||||||
|
segment_cuts = [-100, after_fret(30), after_fret(13), after_fret(5), behind_fret(0)+35];
|
||||||
|
echo(segment_cuts);
|
||||||
|
echo([ for (i=[1:len(segment_cuts)-1]) segment_cuts[i]-segment_cuts[i-1]]);
|
||||||
|
|
||||||
|
module MyBodySegment() {
|
||||||
|
body_height = 24;
|
||||||
|
behind_bridge = 100;
|
||||||
|
epsilon = 0.000001;
|
||||||
|
radius = 4;
|
||||||
|
curve_dist = 40;
|
||||||
|
step = 0.08;
|
||||||
|
steps = curve_dist/step;
|
||||||
|
slope_start = 425;
|
||||||
|
translate([-w/2, -behind_bridge, -body_height]) round_cube([w, slope_start, body_height], radius);
|
||||||
|
w = 30 - radius*2;
|
||||||
|
hull() {
|
||||||
|
// translate([-w/2, 475-behind_bridge-epsilon, -epsilon]) cube([30, epsilon, epsilon]);
|
||||||
|
// translate([-w/2, -behind_bridge, -body_height]) cube([30, 460, body_height]);
|
||||||
|
$fn = 64;
|
||||||
|
for (i = [0,1]) mirror([i, 0, 0]) {
|
||||||
|
translate([w/2, radius-behind_bridge, radius-body_height]) sphere(radius);
|
||||||
|
translate([w/2, radius-behind_bridge, 0]) sphere(radius);
|
||||||
|
translate([w/2, slope_start-behind_bridge, radius-body_height]) sphere(radius);
|
||||||
|
}
|
||||||
|
// translate([+w/2, 495-behind_bridge, 0]) sphere(radius);
|
||||||
|
// translate([-w/2, 495-behind_bridge, 0]) sphere(radius);
|
||||||
|
difference() {
|
||||||
|
translate([0, 490-behind_bridge, 0]) sphere(15, $fn=360);
|
||||||
|
translate([0, 490-behind_bridge, 50]) cube([100, 100, 100], center=true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module TrussRods() {
|
module HeadPiece() {
|
||||||
translate([0, 630+270, -4]) rotate([0, 0, 180]) TrussRod();
|
x0 = behind_fret(0);
|
||||||
translate([0, -100, -14]) TrussRodSingleAction();
|
end_radius = 25;
|
||||||
|
x2 = x0 + 30;
|
||||||
|
x1 = x2 - end_radius;
|
||||||
|
z0 = scallop_depth + extra_height;
|
||||||
|
z1 = scallop_depth + max_fret_height + extra_height;
|
||||||
|
module StringHoles() {
|
||||||
|
for (i = [0:num_strings-1]) translate([string_x(i, x0),0,0]) {
|
||||||
|
ballend_v = [0,x1+10,-3];
|
||||||
|
hull() {
|
||||||
|
translate([0,fret_scale_length(0),z1+string_diameters_mm[i]/2]) sphere(d=min(2.6, string_diameters_mm[i]*1.2 + 1), $fn=360);
|
||||||
|
translate(ballend_v) sphere(d=2.6, $fn=360);
|
||||||
|
}
|
||||||
|
hull() {
|
||||||
|
// String ball ends are roughly 3mm by 4mm cylinder(d=4, h=3)
|
||||||
|
// Bass string ball ends are roughly 3mm by 4mm cylinder(d=6, h=4.5)
|
||||||
|
translate(ballend_v) rotate([0, 90, 0]) cylinder(d=4.5, h=3.5, center=true, $fn=360);
|
||||||
|
translate([0,x2,-30]) rotate([0, 90, 0]) cylinder(d=6.5, h=5.0, center=true, $fn=360);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (list_has(include_colours, 0)) render() difference(){
|
||||||
|
hull() {
|
||||||
|
translate([0,x0,0]) scale([neck_width_mm(x0)/2, 0.01, target_neck_thickness]) sphere(r=1, $fn=360);
|
||||||
|
translate([0,x1,0]) scale([neck_width_mm(x1)/2, end_radius, target_neck_thickness*1.0]) sphere(r=1, $fn=360);
|
||||||
|
}
|
||||||
|
translate([-500, x0, z0]) cube([1000, 1000, 1000]);
|
||||||
|
translate([-500, x0-1000, -500]) cube([1000, 1000, 1000]);
|
||||||
|
StringHoles();
|
||||||
|
// if (label) translate([-10,fw2+1,-10]) rotate([90,0,0]) linear_extrude(10) {
|
||||||
|
// text(str(id_line_0, id_line_1), size=2.9, halign="center", valign="center", $fn=100);
|
||||||
|
// }
|
||||||
|
}
|
||||||
|
// StringHoles();
|
||||||
}
|
}
|
||||||
|
|
||||||
// reinforcing_tube_positions = [
|
module MyNeck() {
|
||||||
// [-10, 125, 0],
|
HeadPiece();
|
||||||
// [ 10, 125, 0],
|
TaperNeck(
|
||||||
// [ 0, 125, -10],
|
string_spacing_bridge=20,
|
||||||
// ];
|
string_spacing_nut=20,
|
||||||
// module CFs(x0=-1000, x1=-1000) {
|
num_strings=num_strings,
|
||||||
// for (v = reinforcing_tube_positions) CFTubeCutout2(v, x0, x1);
|
string_margin=5,
|
||||||
// }
|
target_neck_thickness=15,
|
||||||
|
scallop_depth=scallop_depth,
|
||||||
|
extra_height=extra_height,
|
||||||
|
fret_widths=fret_widths,
|
||||||
|
num_frets=num_frets,
|
||||||
|
fret_side_marker_x_angle=-23,
|
||||||
|
fret_side_marker_y_angle=5,
|
||||||
|
include_colours=include_colours,
|
||||||
|
) MyBodySegment();
|
||||||
|
}
|
||||||
|
|
||||||
|
module TrussRods(taper_points=[], extra=0) {
|
||||||
|
translate([0, 630+270, -4]) rotate([0, 0, 180]) TrussRod(taper_points=taper_points, extra=extra);
|
||||||
|
translate([0, -100, -16]) TrussRodSingleAction(taper_points=taper_points, extra=extra);
|
||||||
|
}
|
||||||
|
module Dowel() {
|
||||||
|
h = 27;
|
||||||
|
rotate([-90, 0, 0]) {
|
||||||
|
$fn=72;
|
||||||
|
translate([0, 0, -h/2]) cylinder_beak(d=5.25, h=h);
|
||||||
|
hull() {
|
||||||
|
cylinder(d=6, h=0.00001, center=true);
|
||||||
|
cylinder(d=5.25, h=3, center=true);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
module Dowels() {
|
||||||
|
translate([-10, segment_cuts[3], 0]) Dowel();
|
||||||
|
translate([ 10, segment_cuts[3], 0]) Dowel();
|
||||||
|
translate([-10, segment_cuts[2], 0]) Dowel();
|
||||||
|
translate([ 10, segment_cuts[2], 0]) Dowel();
|
||||||
|
translate([-10, segment_cuts[1], 0]) Dowel();
|
||||||
|
translate([ 10, segment_cuts[1], 0]) Dowel();
|
||||||
|
}
|
||||||
|
|
||||||
|
module MyBody() {
|
||||||
|
render() difference() {
|
||||||
|
MyNeck();
|
||||||
|
|
||||||
|
TrussRods(extra=20);
|
||||||
|
Dowels();
|
||||||
|
|
||||||
|
// Add a belt hole
|
||||||
|
arc = arc_points([[16, -13], [-16, -13], [0, -3]], 1);
|
||||||
|
belthole_r = 3;
|
||||||
|
belthole_fn = 72;
|
||||||
|
belthole_x0 = 130;
|
||||||
|
belthole_x1 = 260;
|
||||||
|
render() for (i = [0:len(arc)-2]) {
|
||||||
|
hull() {
|
||||||
|
translate([arc[i][0], belthole_x0, arc[i][1]]) sphere(belthole_r, $fn=belthole_fn);
|
||||||
|
translate([arc[i+1][0], belthole_x0, arc[i+1][1]]) sphere(belthole_r, $fn=belthole_fn);
|
||||||
|
translate([arc[i][0], belthole_x1, arc[i][1]]) sphere(belthole_r, $fn=belthole_fn);
|
||||||
|
translate([arc[i+1][0], belthole_x1, arc[i+1][1]]) sphere(belthole_r, $fn=belthole_fn);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
reinforcing_tube_positions = [
|
||||||
|
// [-10, 125, 0],
|
||||||
|
// [ 10, 125, 0],
|
||||||
|
// [ 0, -95, -24],
|
||||||
|
];
|
||||||
|
module CFs(x0=-1000, x1=-1000) {
|
||||||
|
for (v = reinforcing_tube_positions) CFTubeCutout2(v, x0, x1);
|
||||||
|
}
|
||||||
|
|
||||||
if (preview) {
|
if (preview) {
|
||||||
TrussRods();
|
// TrussRods();
|
||||||
// CFs();
|
// CFs();
|
||||||
color("#FF000080") MyNeck();
|
color("#FF000080") MyBody();
|
||||||
} else {
|
} else {
|
||||||
MyNeck();
|
MyBody();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Guitar_Scale_Length_mm = PBass_Scale_mm;
|
Guitar_Scale_Length_mm = PBass_Scale_mm;
|
||||||
|
|
|
@ -52,6 +52,14 @@ function arc_points_angle(tri_points, fragments_per_mm=5) =
|
||||||
|
|
||||||
function list_has(list, value) = len(search(value, list)) > 0;
|
function list_has(list, value) = len(search(value, list)) > 0;
|
||||||
|
|
||||||
|
module sequential_hull() {
|
||||||
|
// given sequential_hull() {a b c d}, do hull {a b} hull {b c} hull {c d}, etc.
|
||||||
|
for (i = [0:$children-2]) hull() {
|
||||||
|
children(i);
|
||||||
|
children(i+1);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
module round_cube(size, r) {
|
module round_cube(size, r) {
|
||||||
translate([r, r, r]) minkowski() {
|
translate([r, r, r]) minkowski() {
|
||||||
cube(size-[r*2,r*2,r*2]);
|
cube(size-[r*2,r*2,r*2]);
|
||||||
|
|
Loading…
Reference in New Issue