- Added Overlap between Top and Bottom Wall

This commit is contained in:
2025-09-13 07:57:48 +02:00
parent 30da52f4b0
commit d2f282c477
3 changed files with 52 additions and 23 deletions

View File

@@ -8,7 +8,7 @@ Cover_O = 2.5; // O = Overhang
Cover_T_T = 2.0; // T_T = Top Thickness Cover_T_T = 2.0; // T_T = Top Thickness
Cover_B_T = 2.0; // B_T = Bottom Thickness Cover_B_T = 2.0; // B_T = Bottom Thickness
Wall_PCB_GAP = 0.25; Wall_PCB_GAP = 0.25;
Wall_TB_Overlap = 1; // Overkap between Top an Bottom Wall
Drill_M3 = 3.5; Drill_M3 = 3.5;
Ring_M3_H = 2; Ring_M3_H = 2;
@@ -31,6 +31,14 @@ Mounting_Holes = [
[48.0, 23.5, 0] [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 = [ MIDI_Plugs = [
[11.5, 13.335, 0], [11.5, 13.335, 0],
[46.5, 13.335, 0] [46.5, 13.335, 0]

View File

@@ -7,10 +7,11 @@ include <RP2350_MIDI_Lighter_PCB.scad>
include <RP2350_MIDI_Lighter_Definition.scad> include <RP2350_MIDI_Lighter_Definition.scad>
Show_FAD_Logo = false; Show_FAD_Logo = false;
Show_PCB = false; Show_PCB = false;
Debug_Present = true; Audio_Jack_Present = true;
$preview = false; Debug_Present = true;
$preview = true;
@@ -25,10 +26,10 @@ if(Show_PCB)
// translate([0, 0, eps]) // translate([0, 0, eps])
// Top(); // Top();
// Top_Wall(); Top_Wall();
// Bottom(); // Bottom();
Bottom_Wall(); // Bottom_Wall();
// rotate([0, 180, 0]) // rotate([0, 180, 0])
// translate([0, 0, eps]) Display_GC9A01A_Cover(); // 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]) translate([PCB_W/2, PCB_H/2, +Wall_T_H/2])
difference() { difference() {
roundedBox( [PCB_W + 2*Cover_O , PCB_H + 2*Cover_O , 1*Wall_T_H], 2, true, $fn = $preview ? 32 : 100); union() {
cube( [PCB_W + 0*Cover_O + 0.5, PCB_H + 0*Cover_O + 0.5 , 2*Wall_T_H], center=true); 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); 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]) 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("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]); 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]); 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]); 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); 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() difference()
@@ -175,13 +186,13 @@ module Top_Wall_Remove_Part(wall_section, height, length, position)
if(wall_section == "right" || wall_section == "left") if(wall_section == "right" || wall_section == "left")
{ {
translate([Wall_XY, position-PCB_H/2, -Wall_T_H/2+height/2 - eps]) translate([Wall_XY, position-PCB_H/2, -Wall_T_H/2+height/2 - Wall_TB_Overlap/2 - eps])
cube([3*Wall_T, length, height], center=true); cube([3*Wall_T, length, height + Wall_TB_Overlap], center=true);
} }
else if(wall_section == "top" || wall_section == "bottom") else if(wall_section == "top" || wall_section == "bottom")
{ {
translate([position-PCB_W/2, Wall_XY, -Wall_T_H/2+height/2 - eps]) translate([position-PCB_W/2, Wall_XY, -Wall_T_H/2+height/2 - Wall_TB_Overlap/2 - eps])
cube([length, 3*Wall_T, height], center=true); 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 = [ Screw_Plate_Size = [
[10, 10, height], [10, 10, height],
[10, 9 , height], [10, 9, height],
[ 0, 0, 0], [ 0, 0, 0],
[10, 7, height], [10, 7, height],
[16, 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); 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); 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); 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 , 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.5 , 3 , Button[1]);
Bottom_Wall_Add_Part("right" , PCB_T/2+2.0 , 16 , USB_C[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("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(); PCB_Cutouts_From_Bottom();
} }

View File

@@ -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]) 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-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(MOLEX)
translate([0, 10, PCB_T/2+Spacer_Top_Height+Cover_T_T/4-eps]) cube([5, 18, Cover_T_T/2], center=true); 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() module Spacer_Top()
{ {
color([0.3, 0.6, 0.0]) color([0.3, 0.6, 0.0])
for (i = Mounting_Holes) { // for (i = Mounting_Holes) {
translate(i) Spacer(Spacer_Top_Height); for (i = [0:len(Mounting_Holes)-1]) {
translate(Mounting_Holes[i]) Spacer(Spacer_Top_Heights[i]);
} }
} }