From c7e8ce760b4d67be988176934bb4c3c2297e57db Mon Sep 17 00:00:00 2001 From: mmcwilliams Date: Sat, 7 Jun 2025 12:18:15 -0400 Subject: [PATCH] Ensure all parts are being rendered --- scad/split_reel.scad | 45 ++++++++++++++++++++++++++++++++++---------- 1 file changed, 35 insertions(+), 10 deletions(-) diff --git a/scad/split_reel.scad b/scad/split_reel.scad index c049ada..fd13d02 100644 --- a/scad/split_reel.scad +++ b/scad/split_reel.scad @@ -22,6 +22,7 @@ Title = ""; module rotary_text (Text = "Test", D = 40, CharacterAngle = 15) { TextArr = split(Text, ""); Radius = R(D); + echo(Radius, "RAD"); Chars = len(TextArr); for (i = [0:1:Chars]) { rotate([0, 0, -i * CharacterAngle]) translate([0, Radius, 0]) { @@ -35,7 +36,12 @@ module rotary_text (Text = "Test", D = 40, CharacterAngle = 15) { module length_text (Gauge = "16mm", Length = 120, Footage = 400, PlatterD = 178) { Text = join(concat(Gauge, " ", str(Length), "m/", str(Footage), "ft")); CharacterAngle = Length == 120 ? 3.75 : Length == 60 ? 4.5 : Length == 30 ? 6.25 : 3.75; - rotary_text( Text, D = PlatterD - 15, CharacterAngle); + rotary_text( Text, D = PlatterD - 15, CharacterAngle = CharacterAngle); +} + +module custom_text (Text = "", PlatterD = 178) { + CharacterAngle = Length == 120 ? 3.75 : Length == 60 ? 4.5 : Length == 30 ? 6.25 : 3.75; + rotary_text(Text, D = PlatterD - 15, CharacterAngle = CharacterAngle); } module thread_16mm ( pos = [0, 0, 0], Length = 11, chamfer = false, pad = 0) { @@ -104,12 +110,18 @@ module platter (pos = [0, 0, 0], PlatterD = 178) { } } -module split_reel_16mm_A (Length = 120, Footage = 400, PlatterD = 178) { +module split_reel_16mm_A (Length = 120, Footage = 400, PlatterD = 178, CustomText = "", NoText = false) { difference () { union () { difference () { platter(pos = [0, 0, 0], PlatterD = PlatterD); - translate([0, 0, -0.5]) rotate([180, 0, 0]) rotate([0, 0, (5 * 3.75) / 2]) length_text("16mm", Length, Footage, PlatterD); + if (!NoText) { + if (CustomText == "") { + //translate([0, 0, -0.5]) rotate([180, 0, 0]) rotate([0, 0, (5 * 3.75) / 2]) length_text("16mm", Length, Footage, PlatterD); + } else { + translate([0, 0, -0.5]) rotate([180, 0, 0]) rotate([0, 0, (5 * 3.75) / 2]) custom_text(CustomText, PlatterD); + } + } } threaded_core([0, 0, (PlatterThickness / 2) + (6 / 2)], Gauge = "16mm"); rotate([0, 0, 135]) translate([18.5, 0, (PlatterThickness / 2) + (4.75 / 2)]) cylinder(r = R(6.25), h = 4.75, center = true, $fn = 60); @@ -133,7 +145,7 @@ module split_reel_16mm_B ( Length = 120, Footage = 400, PlatterD = 178) { } } -module split_reel_8mm_A ( Length = 120, Footage = 400, PlatterD = 178) { +module split_reel_8mm_A ( Length = 120, Footage = 400, PlatterD = 178, CustomText = "", NoText = false) { BaseH = 4; NotchH = 2; NotchW = 21; @@ -142,7 +154,13 @@ module split_reel_8mm_A ( Length = 120, Footage = 400, PlatterD = 178) { union () { difference () { platter([0, 0, 0], PlatterD = PlatterD); - translate([0, 0, -0.5]) rotate([180, 0, 0]) rotate([0, 0, (5 * 3.75) / 2]) length_text("8mm", Length, Footage, PlatterD); + if (!NoText) { + if (CustomText == "") { + translate([0, 0, -0.5]) rotate([180, 0, 0]) rotate([0, 0, (5 * 3.75) / 2]) length_text("8mm", Length, Footage, PlatterD); + } else { + translate([0, 0, -0.5]) rotate([180, 0, 0]) rotate([0, 0, (5 * 3.75) / 2]) custom_text(CustomText, PlatterD); + } + } } threaded_core([0, 0, (PlatterThickness / 2) + (BaseH / 2)], Gauge = "8mm"); rotate([0, 0, 135]) translate([18.5, 0, (PlatterThickness / 2) + (NotchH / 2)]) cylinder(r = R(6.25), h = NotchH, center = true, $fn = 60); @@ -169,20 +187,20 @@ module split_reel_8mm_B ( Length = 120, Footage = 400, PlatterD = 178) { } //Length in meters -module split_reel (Gauge = "16mm", Length = 120, Side = "A") { +module split_reel (Gauge = "16mm", Length = 120, Side = "A", CustomText = "", NoText = false) { PlatterD = ceil((2 * sqrt(((Length * 1000) * FilmThicknessMM) / PI)) + (CoreD)); echo("PlatterD", PlatterD); Footage = Length == 120 ? 400 : Length == 60 ? 200 : Length == 30 ? 100 : round((Length * 1000) / (12 * 25.4)); if (Gauge == "16mm") { if (Side == "A") { - split_reel_16mm_A(Length = Length, Footage = Footage, PlatterD = PlatterD); + split_reel_16mm_A(Length = Length, Footage = Footage, PlatterD = PlatterD, CustomText, NoText); } else if (Side == "B") { split_reel_16mm_B(Length = Length, Footage = Footage, PlatterD = PlatterD); } } else if (Gauge == "8mm") { if (Side == "A") { - split_reel_8mm_A(Length = Length, Footage = Footage, PlatterD = PlatterD); + split_reel_8mm_A(Length = Length, Footage = Footage, PlatterD = PlatterD, CustomText, NoText); } else if (Side == "B") { split_reel_8mm_B(Length = Length, Footage = Footage, PlatterD = PlatterD); } @@ -214,30 +232,37 @@ module logo_test () { } } -PART = "16mm_120m_A"; +PART = "16mm_120m_Ax"; if (PART == "16mm_120m_A") { split_reel("16mm", 120, "A"); } else if (PART == "16mm_120m_B") { split_reel("16mm", 120, "B"); + } else if (PART == "8mm_120m_A") { split_reel("8mm", 120, "A"); } else if (PART == "8mm_120m_B") { split_reel("8mm", 120, "B"); + } else if (PART == "16mm_60m_A") { split_reel("16mm", 60, "A"); } else if (PART == "16mm_60m_B") { split_reel("16mm", 60, "B"); + } else if (PART == "8mm_60m_A") { split_reel("8mm", 60, "A"); -} else if (PART == "8mm_120m_B") { +} else if (PART == "8mm_60m_B") { split_reel("8mm", 60, "B"); + } else if (PART == "16mm_30m_A") { split_reel("16mm", 30, "A"); } else if (PART == "16mm_30m_B") { split_reel("16mm", 30, "B"); + } else if (PART == "8mm_30m_A") { split_reel("8mm", 30, "A"); } else if (PART == "8mm_30m_B") { split_reel("8mm", 30, "B"); } + +//split_reel(Gauge = "16mm", Length = 36, Side = "B", CustomText = "", NoText = true); \ No newline at end of file