further work on rack-mount refactor
This commit is contained in:
20
rack-mount/tray/animate.scad
Normal file
20
rack-mount/tray/animate.scad
Normal file
@ -0,0 +1,20 @@
|
||||
include <../common.scad>
|
||||
use <./entry.scad>
|
||||
|
||||
$vpt = [100,-42,36];
|
||||
$vpr = [70,0,27];
|
||||
$vpd = 445;
|
||||
$vpf = 22.50;
|
||||
|
||||
animateTraySystem(at=$t);
|
||||
|
||||
module animateTraySystem(at=$t) {
|
||||
|
||||
trayU = max(1, ceil(at*3));
|
||||
x=100;
|
||||
y=100;
|
||||
dx = abs(lerp(a=-40, b=40, t=at));
|
||||
dy = abs(lerp(a=-30, b=30, t=at));
|
||||
|
||||
traySystem(trayU=trayU, baseWidth=x+dx, baseDepth=y+dy, mountPoints=[]);
|
||||
}
|
||||
@ -8,25 +8,27 @@ use <./tray.scad>
|
||||
!!! Please also make sure that the correct rack frame preset is set in rackFrame.scad !!!
|
||||
*/
|
||||
|
||||
module traySystem (
|
||||
|
||||
// begin config ////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
trayU = 2;
|
||||
trayU = 2,
|
||||
|
||||
baseWidth = 145;
|
||||
baseDepth = 100;
|
||||
baseWidth = 145,
|
||||
baseDepth = 100,
|
||||
|
||||
baseThickness = 3; // tray bottom thickness
|
||||
frontThickness = 3; // front plate thickness
|
||||
sideThickness = 3;
|
||||
baseThickness = 3, // tray bottom thickness
|
||||
frontThickness = 3, // front plate thickness
|
||||
sideThickness = 3,
|
||||
|
||||
backLipHeight = 2;
|
||||
frontLipHeight = 2;
|
||||
backLipHeight = 2,
|
||||
frontLipHeight = 2,
|
||||
|
||||
sideSupport = true;
|
||||
trayLeftPadding = 10; // extra space between the left rail and tray. configure this to move the tray left/right.
|
||||
sideSupport = true,
|
||||
trayLeftPadding = 10, // extra space between the left rail and tray. configure this to move the tray left/right.
|
||||
|
||||
mountPointType = "m3";
|
||||
mountPointElevation = 1; // basically standoff height
|
||||
mountPointType = "m3",
|
||||
mountPointElevation = 1, // basically standoff height
|
||||
|
||||
// add/config standoff coordinates here. Format is [[x,y]]
|
||||
mountPoints = [
|
||||
@ -34,22 +36,27 @@ mountPoints = [
|
||||
[30+75,10],
|
||||
[30,10+75],
|
||||
[30+75,10+75],
|
||||
];
|
||||
]
|
||||
|
||||
// end config //////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
) {
|
||||
|
||||
bottomScrewTray(
|
||||
u=trayU,
|
||||
trayWidth=baseWidth,
|
||||
trayDepth=baseDepth,
|
||||
trayThickness=baseThickness,
|
||||
frontLipHeight=frontLipHeight,
|
||||
backLipHeight=backLipHeight,
|
||||
mountPoints=mountPoints,
|
||||
frontThickness=frontThickness,
|
||||
sideThickness=sideThickness,
|
||||
mountPointElevation=mountPointElevation,
|
||||
mountPointType=mountPointType,
|
||||
sideSupport=sideSupport,
|
||||
trayLeftPadding=trayLeftPadding
|
||||
);
|
||||
bottomScrewTray (
|
||||
u = trayU,
|
||||
trayWidth = baseWidth,
|
||||
trayDepth = baseDepth,
|
||||
trayThickness = baseThickness,
|
||||
frontLipHeight = frontLipHeight,
|
||||
backLipHeight = backLipHeight,
|
||||
mountPoints = mountPoints,
|
||||
frontThickness = frontThickness,
|
||||
sideThickness = sideThickness,
|
||||
mountPointElevation = mountPointElevation,
|
||||
mountPointType = mountPointType,
|
||||
sideSupport = sideSupport,
|
||||
trayLeftPadding = trayLeftPadding
|
||||
);
|
||||
}
|
||||
|
||||
traySystem();
|
||||
@ -62,23 +62,28 @@ module bottomScrewTray(u, trayWidth, trayDepth, trayThickness, mountPoints, moun
|
||||
|
||||
mountPointPosThickness = 2;
|
||||
|
||||
apply_pn() {
|
||||
for (i = [0:len(mountPoints)-1]) {
|
||||
x = mountPoints[i][0];
|
||||
y = mountPoints[i][1];
|
||||
if (len(mountPoints) > 0) {
|
||||
apply_pn() {
|
||||
for (i = [0:len(mountPoints)-1]) {
|
||||
x = mountPoints[i][0];
|
||||
y = mountPoints[i][1];
|
||||
|
||||
translate(v=[x, y, 0])
|
||||
cylinder(r=screwRadiusSlacked(mountPointType)+mountPointPosThickness, h=mountPointElevation);
|
||||
}
|
||||
|
||||
for (i = [0:len(mountPoints)-1]) {
|
||||
x = mountPoints[i][0];
|
||||
y = mountPoints[i][1];
|
||||
|
||||
translate(v=[x, y, -trayThickness])
|
||||
mirror(v=[0,0,1])
|
||||
counterSunkHead_N(mountPointType, inf, inf);
|
||||
translate(v = [x, y, 0])
|
||||
cylinder(r = screwRadiusSlacked(mountPointType)+mountPointPosThickness, h = mountPointElevation);
|
||||
}
|
||||
|
||||
for (i = [0:len(mountPoints)-1]) {
|
||||
x = mountPoints[i][0];
|
||||
y = mountPoints[i][1];
|
||||
|
||||
translate(v = [x, y, -trayThickness])
|
||||
mirror(v = [0, 0, 1])
|
||||
counterSunkHead_N(mountPointType, inf, inf);
|
||||
}
|
||||
|
||||
children(0);
|
||||
}
|
||||
} else {
|
||||
children(0);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user