Suppress side markers beyond a chosen point

This commit is contained in:
Luke Hubmayer-Werner 2025-02-18 22:00:43 +10:30
parent 4a5fc2e9f1
commit f4ac0b373d
2 changed files with 29 additions and 17 deletions

View File

@ -17,6 +17,8 @@ shumbucker_l = 23.1;
shumbucker_lu = 17.1; // Upper shumbucker_lu = 17.1; // Upper
shumbucker_w1 = 66.4; shumbucker_w1 = 66.4;
shumbucker_w2 = 82.9; // 1.6mm in, a 2.0mm hole on each side shumbucker_w2 = 82.9; // 1.6mm in, a 2.0mm hole on each side
shumbucker_cable_l = 300;
shumbucker_cable_d = 3.4;
module Shumbucker(y_align="center", z_align="positive") { module Shumbucker(y_align="center", z_align="positive") {
y_offset = (y_align == "center") ? -shumbucker_l/2 : y_offset = (y_align == "center") ? -shumbucker_l/2 :
@ -713,7 +715,7 @@ module Nylon6String(render_colour_0=true, render_colour_1=true, render_colour_2=
module Steel6String(include_colours=[0,1], segment=-1, reference=false) { module Steel6String(include_colours=[0,1,4], segment=-1, reference=false) {
// Artist Strat clone has a neck thickness of about 20mm at the 12th fret, where we want to overlap the truss rods // Artist Strat clone has a neck thickness of about 20mm at the 12th fret, where we want to overlap the truss rods
// We will probably have to overlap them horizontally, far from ideal, to achieve the desired thinness. // We will probably have to overlap them horizontally, far from ideal, to achieve the desired thinness.
$include_colours = include_colours; $include_colours = include_colours;
@ -732,8 +734,9 @@ module Steel6String(include_colours=[0,1], segment=-1, reference=false) {
$string_margin = 3; // +6 $string_margin = 3; // +6
$neck_width_nut = default_neck_width_nut(); $neck_width_nut = default_neck_width_nut();
$neck_width_bridge = default_neck_width_bridge(); $neck_width_bridge = default_neck_width_bridge();
body_width = 90; body_width = 92;
body_width_tapered = 70; body_width_tapered = 72;
body_thickness = 40;
$scallop_depth = 2.0; $scallop_depth = 2.0;
$fret_widths = default_fret_widths(3.6, 2.4); $fret_widths = default_fret_widths(3.6, 2.4);
$fret_angle = 50; $fret_angle = 50;
@ -747,6 +750,8 @@ module Steel6String(include_colours=[0,1], segment=-1, reference=false) {
fc0, fc1, fc1, fc0, fc1, fc0, fc1, fc0, fc1, fc0, fc1, fc1, // 0-11 fc0, fc1, fc1, fc0, fc1, fc0, fc1, fc0, fc1, fc0, fc1, fc1, // 0-11
fc0, fc1, fc1, fc0, fc1, fc0, fc1, fc0, fc1, fc0, fc1, fc1, // 12-23 fc0, fc1, fc1, fc0, fc1, fc0, fc1, fc0, fc1, fc0, fc1, fc1, // 12-23
]; ];
// Neck joining the body makes for annoying fret markers, so we'll add a variable to suppress side markers beyond a certain point
$last_fret_side_marker = 15;
// Artist Strat has about 18cm of headstock and 10cm past bridge on body // Artist Strat has about 18cm of headstock and 10cm past bridge on body
@ -771,8 +776,8 @@ module Steel6String(include_colours=[0,1], segment=-1, reference=false) {
[ 9, $segment_cuts[4], -10], [ 9, $segment_cuts[4], -10],
[ -8, $segment_cuts[3], -11], [ -8, $segment_cuts[3], -11],
[ 8, $segment_cuts[3], -11], [ 8, $segment_cuts[3], -11],
[-39, $segment_cuts[2], -6], [-38, $segment_cuts[2], -12],
[ 39, $segment_cuts[2], -6], [ 38, $segment_cuts[2], -12],
[-37, $segment_cuts[2], -25], [-37, $segment_cuts[2], -25],
[ 37, $segment_cuts[2], -25], [ 37, $segment_cuts[2], -25],
[-10, $segment_cuts[1], -4], [-10, $segment_cuts[1], -4],
@ -795,16 +800,23 @@ module Steel6String(include_colours=[0,1], segment=-1, reference=false) {
]; ];
module MyBody() { module MyBody() {
body_y_end = after_fret(20);
pts = arc_points([
[body_width_tapered/2, 0],
[body_width_tapered/2, body_thickness],
[body_width/2, body_thickness/2]]
);
hull() { hull() {
r = 5; r = 3;
$fn=72; $fn=72;
for (m=[0:1]) mirror([m,0,0]) { for (m=[0:1]) mirror([m,0,0]) {
translate([r-30, after_fret(15)-r, -r]) sphere(r); translate([r-30, after_fret(15)-r, -r]) sphere(r);
translate([r-32, after_fret(16)-r, r-40]) sphere(r); translate([r-32, after_fret(16)-r, r-body_thickness]) sphere(r);
translate([r-body_width/2, after_fret(20)-r, r-40]) sphere(r); // translate([r-body_width_tapered/2, after_fret(20)-r, r-body_thickness]) sphere(r);
translate([r-body_width/2, after_fret(20)-r, -r]) sphere(r); // translate([r-body_width_tapered/2, after_fret(20)-r, -r]) sphere(r);
translate([r-body_width/2, y0+r, r-40]) sphere(r); // translate([r-body_width_tapered/2, y0+r, r-body_thickness]) sphere(r);
translate([r-body_width/2, y0+r, -r]) sphere(r); // translate([r-body_width_tapered/2, y0+r, -r]) sphere(r);
translate([0, y0, 0]) rotate([-90,0,0]) linear_extrude(body_y_end-y0) polygon(pts);
} }
} }
} }
@ -1075,14 +1087,14 @@ COLOURSCHEME_PETGHF_BLUE = [BAMBU_PETGHF_LAKE_BLUE, BAMBU_PETGHF_LAKE_BLUE, "",
colour_scheme = COLOURSCHEME_ABS_CLOWNFISH; colour_scheme = COLOURSCHEME_ABS_CLOWNFISH;
// colour_scheme = COLOURSCHEME_ABS_BLUE; // colour_scheme = COLOURSCHEME_ABS_BLUE;
segment = 4; segment = -1;
color(colour_scheme[0]) Steel6String(segment=segment, include_colours=[0]); // color(colour_scheme[0]) Steel6String(segment=segment, include_colours=[0]);
color(colour_scheme[1]) Steel6String(segment=segment, include_colours=[1]); // color(colour_scheme[1]) Steel6String(segment=segment, include_colours=[1]);
// color(colour_scheme[2]) Steel6String(segment=segment, include_colours=[2]); // color(colour_scheme[2]) Steel6String(segment=segment, include_colours=[2]);
// color(colour_scheme[3]) Steel6String(segment=segment, include_colours=[3]); // color(colour_scheme[3]) Steel6String(segment=segment, include_colours=[3]);
color(colour_scheme[2]) Steel6String(segment=segment, include_colours=[4]); // color(colour_scheme[2]) Steel6String(segment=segment, include_colours=[4]);
// rotate([90,0,0]) // rotate([90,0,0])
// Steel6String(reference=true); Steel6String(reference=true);
module TwoBangerMk2(include_colours=[0,1], segment=-1, preview=false) { module TwoBangerMk2(include_colours=[0,1], segment=-1, preview=false) {

View File

@ -296,7 +296,7 @@ module TaperNeck(
module fret_side_markers() { module fret_side_markers() {
for (num_text = fret_inlays) { for (num_text = fret_inlays) {
fret = num_text[0]; fret = num_text[0];
if (fret <= $num_frets) { if (fret <= (is_undef($last_fret_side_marker) ? $num_frets : $last_fret_side_marker)) {
x0 = fret_scale_length(fret-1)-get_fret_width(fret-1)/2; x0 = fret_scale_length(fret-1)-get_fret_width(fret-1)/2;
x1 = fret_scale_length(fret)+get_fret_width(fret)/2; x1 = fret_scale_length(fret)+get_fret_width(fret)/2;
diff = x0 - x1; diff = x0 - x1;