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