From d2f282c4778118412048605398f3a6bbfe722bc7 Mon Sep 17 00:00:00 2001 From: Chris Date: Sat, 13 Sep 2025 07:57:48 +0200 Subject: [PATCH] - Added Overlap between Top and Bottom Wall --- Housing/RP2350_MIDI_Lighter_Definition.scad | 10 +++- Housing/RP2350_MIDI_Lighter_Housing.scad | 54 ++++++++++++++------- Housing/RP2350_MIDI_Lighter_PCB.scad | 11 +++-- 3 files changed, 52 insertions(+), 23 deletions(-) diff --git a/Housing/RP2350_MIDI_Lighter_Definition.scad b/Housing/RP2350_MIDI_Lighter_Definition.scad index e419d74..aeb0645 100644 --- a/Housing/RP2350_MIDI_Lighter_Definition.scad +++ b/Housing/RP2350_MIDI_Lighter_Definition.scad @@ -8,7 +8,7 @@ Cover_O = 2.5; // O = Overhang Cover_T_T = 2.0; // T_T = Top Thickness Cover_B_T = 2.0; // B_T = Bottom Thickness Wall_PCB_GAP = 0.25; - +Wall_TB_Overlap = 1; // Overkap between Top an Bottom Wall Drill_M3 = 3.5; Ring_M3_H = 2; @@ -31,6 +31,14 @@ Mounting_Holes = [ [48.0, 23.5, 0] ]; +Spacer_Top_Heights = [ + Spacer_Top_Height - 2, + Spacer_Top_Height - 2, + Spacer_Top_Height, + Spacer_Top_Height - 2, + Spacer_Top_Height - 2 +]; + MIDI_Plugs = [ [11.5, 13.335, 0], [46.5, 13.335, 0] diff --git a/Housing/RP2350_MIDI_Lighter_Housing.scad b/Housing/RP2350_MIDI_Lighter_Housing.scad index 9e84a66..688c397 100644 --- a/Housing/RP2350_MIDI_Lighter_Housing.scad +++ b/Housing/RP2350_MIDI_Lighter_Housing.scad @@ -7,10 +7,11 @@ include include -Show_FAD_Logo = false; -Show_PCB = false; -Debug_Present = true; -$preview = false; +Show_FAD_Logo = false; +Show_PCB = false; +Audio_Jack_Present = true; +Debug_Present = true; +$preview = true; @@ -25,10 +26,10 @@ if(Show_PCB) // translate([0, 0, eps]) // Top(); -// Top_Wall(); +Top_Wall(); // Bottom(); -Bottom_Wall(); +// Bottom_Wall(); // rotate([0, 180, 0]) // translate([0, 0, eps]) Display_GC9A01A_Cover(); @@ -114,8 +115,14 @@ module Top_Wall() { translate([PCB_W/2, PCB_H/2, +Wall_T_H/2]) difference() { - roundedBox( [PCB_W + 2*Cover_O , PCB_H + 2*Cover_O , 1*Wall_T_H], 2, true, $fn = $preview ? 32 : 100); - cube( [PCB_W + 0*Cover_O + 0.5, PCB_H + 0*Cover_O + 0.5 , 2*Wall_T_H], center=true); + union() { + roundedBox( [PCB_W + 2*Cover_O , PCB_H + 2*Cover_O , 1*Wall_T_H], 2, true, $fn = $preview ? 32 : 100); + + Overlao_H = Wall_TB_Overlap - Wall_PCB_GAP; // Remove a bit for printing margin + translate([0, 0, -Wall_T_H/2 - Overlao_H/2 - eps]) cube([PCB_W + 1*Cover_O, PCB_H + 1*Cover_O, Overlao_H], center=true); + + } + cube( [PCB_W + 0*Cover_O + 0.5, PCB_H + 0*Cover_O + 0.5 , 2*Wall_T_H], center=true); translate([0, 0, +Wall_T_H/2 - Cover_T_T/2]) cube([PCB_W + 1*Cover_O, PCB_H + 1*Cover_O, Cover_T_T + eps], center=true); } @@ -138,9 +145,13 @@ module Top_Wall() translate([PCB_W/2, PCB_H/2, +Wall_T_H/2]) { - Top_Wall_Remove_Part("top", Wall_T_H-Cover_T_T/2, 5, MOLEX[0]); + // For the MOLEX Connector + Top_Wall_Remove_Part("top", Wall_T_H-Cover_T_T/2, 5, MOLEX[0]); Top_Wall_Remove_Part("top", 8+PCB_T/2, 10.5, MOLEX[0]); - Top_Wall_Remove_Part("bottom", 3.5, 10, Audio_Jack[0]); + + if(Audio_Jack_Present) { + Top_Wall_Remove_Part("bottom", 3.5, 10, Audio_Jack[0]); + } Top_Wall_Remove_Part("right", 6.5, 3.5, Button[1]); translate([-Cover_O, 0, 0]) Top_Wall_Remove_Part("right", PCB_T/2 + 8.0, 8.0, Button[1]); Top_Wall_Remove_Part("right", PCB_T/2+2.5, 16, USB_C[1]); @@ -151,7 +162,7 @@ module Top_Wall() } } translate([7, -6, Wall_T_H-3+eps]) translate(Mounting_Holes[0]) rotate([0, 0, 0]) cube([8, 8, 2], center=true); - PCB_Cutouts_Top_Wall(); + PCB_Cutouts_Top_Wall(Audio_Jack_Present); } difference() @@ -175,13 +186,13 @@ module Top_Wall_Remove_Part(wall_section, height, length, position) if(wall_section == "right" || wall_section == "left") { - translate([Wall_XY, position-PCB_H/2, -Wall_T_H/2+height/2 - eps]) - cube([3*Wall_T, length, height], center=true); + translate([Wall_XY, position-PCB_H/2, -Wall_T_H/2+height/2 - Wall_TB_Overlap/2 - eps]) + cube([3*Wall_T, length, height + Wall_TB_Overlap], center=true); } else if(wall_section == "top" || wall_section == "bottom") { - translate([position-PCB_W/2, Wall_XY, -Wall_T_H/2+height/2 - eps]) - cube([length, 3*Wall_T, height], center=true); + translate([position-PCB_W/2, Wall_XY, -Wall_T_H/2+height/2 - Wall_TB_Overlap/2 - eps]) + cube([length, 3*Wall_T, height + Wall_TB_Overlap], center=true); } } @@ -208,7 +219,7 @@ module Top_Wall_Screw_Plates(height, height_offset, cutout=false) { Screw_Plate_Size = [ [10, 10, height], - [10, 9 , height], + [10, 9, height], [ 0, 0, 0], [10, 7, height], [16, 7, height] @@ -284,15 +295,22 @@ module Bottom_Wall() { roundedBox( [PCB_W + 2*Cover_O , PCB_H + 2*Cover_O , 1*Wall_B_H], 2, true, $fn = $preview ? 32 : 100); cube( [PCB_W + 0*Cover_O + 0.5, PCB_H + 0*Cover_O + 0.5 , 2*Wall_T_H], center=true); - translate([0, 0, +Cover_B_T/2 - Wall_B_H/2 - eps]) + + translate([0, 0, +Cover_B_T/2 - Wall_B_H/2 - eps]) cube( [PCB_W + 1*Cover_O + 0.5, PCB_H + 1*Cover_O + 0.5 , Cover_B_T], center=true); + + Overlao_H = Wall_TB_Overlap + Wall_PCB_GAP; // Add a bit for printing margin + translate([0, 0, -Overlao_H/2 + Wall_B_H/2 + eps]) + cube( [PCB_W + 1*Cover_O + 0.5, PCB_H + 1*Cover_O + 0.5 , Overlao_H], center=true); } Bottom_Wall_Add_Part("right" , PCB_T/2 , 9 , Power_Plug[1]-2.4); Bottom_Wall_Add_Part("right" , PCB_T/2+2.5 , 3 , Button[1]); Bottom_Wall_Add_Part("right" , PCB_T/2+2.0 , 16 , USB_C[1]); Bottom_Wall_Add_Part("top" , PCB_T/2 , 10 , MOLEX[0]); - Bottom_Wall_Add_Part("bottom" , 3.2 , 9.5 , Audio_Jack[0]); + if(Audio_Jack_Present == true) { + Bottom_Wall_Add_Part("bottom" , 3.2 , 9.5 , Audio_Jack[0]); + } } PCB_Cutouts_From_Bottom(); } diff --git a/Housing/RP2350_MIDI_Lighter_PCB.scad b/Housing/RP2350_MIDI_Lighter_PCB.scad index 75445cb..c7be8a1 100644 --- a/Housing/RP2350_MIDI_Lighter_PCB.scad +++ b/Housing/RP2350_MIDI_Lighter_PCB.scad @@ -45,11 +45,13 @@ module PCB_Cutouts_Top_Plate() } } -module PCB_Cutouts_Top_Wall() +module PCB_Cutouts_Top_Wall(Add_Audio_Jack = true) { translate([0, 0, PCB_T/2]) translate(USB_C) usb_C(true); translate([0, 0, PCB_T/2-0.3]) translate(Power_Plug) Power_Plug_Cutout(); - translate([0, 0, PCB_T/2]) translate(Audio_Jack) Audio_Jack(true); + if(Add_Audio_Jack) { + translate([0, 0, PCB_T/2]) translate(Audio_Jack) Audio_Jack(true); + } translate(MOLEX) translate([0, 10, PCB_T/2+Spacer_Top_Height+Cover_T_T/4-eps]) cube([5, 18, Cover_T_T/2], center=true); @@ -102,8 +104,9 @@ module Spacer(height) module Spacer_Top() { color([0.3, 0.6, 0.0]) - for (i = Mounting_Holes) { - translate(i) Spacer(Spacer_Top_Height); + // for (i = Mounting_Holes) { + for (i = [0:len(Mounting_Holes)-1]) { + translate(Mounting_Holes[i]) Spacer(Spacer_Top_Heights[i]); } }