center beelink EQi12 tray automatically

* Add bottomScrewTrayCentered()
* Calculate tray dimensions dynamically from PC dimensions
This commit is contained in:
2025-06-13 00:13:02 +00:00
parent b23f5434be
commit 774474e0f0
2 changed files with 168 additions and 142 deletions

View File

@ -1,142 +1,150 @@
use <../tray/tray.scad> use <../tray/tray.scad>
include <../../rack/sharedVariables.scad>
/*
Simple tray for a beelink mini-s series mini pc. /*
Simple tray for a beelink mini-s series mini pc.
Please make sure to configure the correct rack frame dimensions in rackFrame.scad.
*/ Please make sure to configure the correct rack frame dimensions in rackFrame.scad.
*/
difference () {
bottomScrewTray ( pcWidth = 126;
u = 5, pcDepth = 126;
trayWidth = 140, pcHeight = 49;
trayDepth = 140, frontLipHeight = 3;
trayThickness = 3, airflowGap = 5;
frontLipHeight = 3, trayWidth = pcWidth + (airflowGap * 2);
backLipHeight = 5, trayDepth = 140;
frontThickness = 3, unitHeight = ceil(pcHeight / screwDiff);
sideThickness = 3, difference () {
mountPointElevation = 1, bottomScrewTrayCentered(
mountPointType = "m4", u = unitHeight,
sideSupport = true, trayWidth = trayWidth,
trayLeftPadding = 15 trayDepth = trayDepth,
); trayThickness = 3,
frontLipHeight = frontLipHeight,
backLipHeight = 5,
// Side perforations for airflow frontThickness = 3,
translate(v=[-4, 5, 18]) { sideThickness = 3,
rotate(a=[0,90,0]) mountPointElevation = 1,
rotate(a=[0,0,45]) mountPointType = "m4",
cube(size=[18, 18, 155]); sideSupport = true
);
translate(v=[0, 28, -04])
rotate(a=[0,90,0])
rotate(a=[0,0,45]) // Side perforations for airflow
cube(size=[12,12,150]); translate(v=[-4, 5, 18]) {
rotate(a=[0,90,0])
translate(v=[0, 48, -06.5]) rotate(a=[0,0,45])
rotate(a=[0,90,0]) cube(size=[18, 18, 155]);
rotate(a=[0,0,45])
cube(size=[8,8,150]); translate(v=[0, 28, -04])
rotate(a=[0,90,0])
rotate(a=[0,0,45])
// Bottom perforations for airflow cube(size=[12,12,150]);
// Front Right Cube
translate(v=[60, 40, -50]) translate(v=[0, 48, -06.5])
rotate(a=[90,0,0]) rotate(a=[0,90,0])
rotate(a=[0,90,90]) rotate(a=[0,0,45])
cube(size=[12,12,135]); cube(size=[8,8,150]);
// Front Center Cube
translate(v=[80, 35, -50]) // Bottom perforations for airflow
rotate(a=[90,0,45]) // Front Right Cube
rotate(a=[0,90,90]) translate(v=[60, 40, -50])
cube(size=[12,12,135]); rotate(a=[90,0,0])
rotate(a=[0,90,90])
// Front Left Cube cube(size=[12,12,135]);
translate(v=[95, 40, -50])
rotate(a=[90,0,0]) // Front Center Cube
rotate(a=[0,90,90]) translate(v=[80, 35, -50])
cube(size=[12,12,135]); rotate(a=[90,0,45])
rotate(a=[0,90,90])
// Center Right Cube cube(size=[12,12,135]);
translate(v=[50.5, 65, -50])
rotate(a=[90,0,45]) // Front Left Cube
rotate(a=[0,90,90]) translate(v=[95, 40, -50])
cube(size=[12,12,135]); rotate(a=[90,0,0])
rotate(a=[0,90,90])
// Center Left Cube cube(size=[12,12,135]);
translate(v=[110, 65, -50])
rotate(a=[90,0,45]) // Center Right Cube
rotate(a=[0,90,90]) translate(v=[50.5, 65, -50])
cube(size=[12,12,135]); rotate(a=[90,0,45])
rotate(a=[0,90,90])
// Rear Left Cube cube(size=[12,12,135]);
translate(v=[60, 75, -50])
rotate(a=[90,0,0]) // Center Left Cube
rotate(a=[0,90,90]) translate(v=[110, 65, -50])
cube(size=[12,12,135]); rotate(a=[90,0,45])
rotate(a=[0,90,90])
// Rear Center Cube cube(size=[12,12,135]);
translate(v=[80, 92, -50])
rotate(a=[90,0,45]) // Rear Left Cube
rotate(a=[0,90,90]) translate(v=[60, 75, -50])
cube(size=[12,12,135]); rotate(a=[90,0,0])
rotate(a=[0,90,90])
// Rear Right Cube cube(size=[12,12,135]);
translate(v=[96, 75, -50])
rotate(a=[90,0,0]) // Rear Center Cube
rotate(a=[0,90,90]) translate(v=[80, 92, -50])
cube(size=[12,12,135]); rotate(a=[90,0,45])
rotate(a=[0,90,90])
// Far Rear Right Cube cube(size=[12,12,135]);
translate(v=[100, 110, -50])
rotate(a=[90,0,0]) // Rear Right Cube
rotate(a=[0,90,90]) translate(v=[96, 75, -50])
cube(size=[12,25,135]); rotate(a=[90,0,0])
rotate(a=[0,90,90])
// Far Rear Left Cube cube(size=[12,12,135]);
translate(v=[67.5, 110, -50])
rotate(a=[90,0,0]) // Far Rear Right Cube
rotate(a=[0,90,90]) translate(v=[100, 110, -50])
cube(size=[12,25,135]); rotate(a=[90,0,0])
rotate(a=[0,90,90])
// Far Front Right Cube cube(size=[12,25,135]);
translate(v=[100, 3, -50])
rotate(a=[90,0,0]) // Far Rear Left Cube
rotate(a=[0,90,90]) translate(v=[67.5, 110, -50])
cube(size=[12,25,135]); rotate(a=[90,0,0])
rotate(a=[0,90,90])
// Far Front Left Cube cube(size=[12,25,135]);
translate(v=[67.5, 3, -50])
rotate(a=[90,0,0]) // Far Front Right Cube
rotate(a=[0,90,90]) translate(v=[100, 3, -50])
cube(size=[12,25,135]); rotate(a=[90,0,0])
rotate(a=[0,90,90])
// Side Front Right Cube cube(size=[12,25,135]);
translate(v=[125, 25, -50])
rotate(a=[90,0,0]) // Far Front Left Cube
rotate(a=[0,90,90]) translate(v=[67.5, 3, -50])
cube(size=[25,12,135]); rotate(a=[90,0,0])
rotate(a=[0,90,90])
// Side Front Left Cube cube(size=[12,25,135]);
translate(v=[30, 25, -50])
rotate(a=[90,0,0]) // Side Front Right Cube
rotate(a=[0,90,90]) translate(v=[125, 25, -50])
cube(size=[25,12,135]); rotate(a=[90,0,0])
rotate(a=[0,90,90])
// Side Rear Right Cube cube(size=[25,12,135]);
translate(v=[125, 80, -50])
rotate(a=[90,0,0]) // Side Front Left Cube
rotate(a=[0,90,90]) translate(v=[30, 25, -50])
cube(size=[25,12,135]); rotate(a=[90,0,0])
rotate(a=[0,90,90])
// Side Rear Left Cube cube(size=[25,12,135]);
translate(v=[30, 80, -50])
rotate(a=[90,0,0]) // Side Rear Right Cube
rotate(a=[0,90,90]) translate(v=[125, 80, -50])
cube(size=[25,12,135]); rotate(a=[90,0,0])
rotate(a=[0,90,90])
} cube(size=[25,12,135]);
} // Side Rear Left Cube
translate(v=[30, 80, -50])
rotate(a=[90,0,0])
rotate(a=[0,90,90])
cube(size=[25,12,135]);
}
}

View File

@ -91,3 +91,21 @@ module bottomScrewTray(u, trayWidth, trayDepth, trayThickness, mountPoints = [],
} }
module bottomScrewTrayCentered(u, trayWidth, trayDepth, trayThickness, mountPoints = [], mountPointElevation, mountPointType, frontThickness, sideThickness, frontLipHeight, backLipHeight, sideSupport=true) {
trayLeftPadding = (maxUnitWidth - trayWidth) / 2;
bottomScrewTray(
u=u,
trayWidth=trayWidth,
trayDepth=trayDepth,
trayThickness=trayThickness,
mountPoints=mountPoints,
mountPointElevation=mountPointElevation,
mountPointType=mountPointType,
frontThickness=frontThickness,
sideThickness=sideThickness,
frontLipHeight=frontLipHeight,
backLipHeight=backLipHeight,
trayLeftPadding=trayLeftPadding,
sideSupport=sideSupport);
}