- 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

@@ -7,10 +7,11 @@ include <RP2350_MIDI_Lighter_PCB.scad>
include <RP2350_MIDI_Lighter_Definition.scad>
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();
}