further work on rack-mount refactor
This commit is contained in:
21
rack-mount/enclosed-box/animate.scad
Normal file
21
rack-mount/enclosed-box/animate.scad
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
use <./entry.scad>
|
||||||
|
|
||||||
|
$vpt = [120,-30,63];
|
||||||
|
$vpr = [74,0,25];
|
||||||
|
$vpd = 550;
|
||||||
|
$vpf = 22.50;
|
||||||
|
|
||||||
|
animateEnclosedBoxSystem(at=$t);
|
||||||
|
|
||||||
|
module animateEnclosedBoxSystem(at=$t) {
|
||||||
|
|
||||||
|
zOrientation = "middle";
|
||||||
|
x=150;
|
||||||
|
y=70;
|
||||||
|
z=20;
|
||||||
|
dx = abs(lerp(a=-20, b=20, t=at));
|
||||||
|
dy = abs(lerp(a=-50, b=50, t=at));
|
||||||
|
dz = abs(lerp(a=-15, b=15, t=at));
|
||||||
|
|
||||||
|
enclosedBoxSystem(visualize=true, zOrientation=zOrientation, boxWidth=x+dx, boxDepth=y+dy, boxHeight=z+dz);
|
||||||
|
}
|
||||||
@ -11,55 +11,64 @@ use <./frontBoxHolder.scad>
|
|||||||
This system does not require any mounting holes on the enclosed box.
|
This system does not require any mounting holes on the enclosed box.
|
||||||
|
|
||||||
!!! Please also make sure that the correct rack frame preset is set in rackFrame.scad !!!
|
!!! Please also make sure that the correct rack frame preset is set in rackFrame.scad !!!
|
||||||
|
|
||||||
TODO support full box (so for the micro profile it would be 180) this may require widening the main rail
|
|
||||||
*/
|
*/
|
||||||
|
module enclosedBoxSystem (
|
||||||
|
|
||||||
// begin config ////////////////////////////////////////////////////////////////////////////////////////////////////////
|
// begin config ////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
// Does not affect any part dimensions. Set this to true to visualize how a box would be mounted.
|
// Does not affect any part dimensions. Set this to true to visualize how a box would be mounted.
|
||||||
visualize = false;
|
visualize = false,
|
||||||
|
zOrientation = "middle", // ["middle" | "bottom"]
|
||||||
|
recessSideRail = false,
|
||||||
|
|
||||||
boxWidth = 170;
|
boxWidth = 170,
|
||||||
boxHeight = 27.0;
|
boxHeight = 27,
|
||||||
boxDepth = 100;
|
boxDepth = 100,
|
||||||
|
|
||||||
railDefaultThickness = 1.5;
|
railDefaultThickness = 1.5,
|
||||||
railSideThickness = 3;
|
railSideThickness = 3,
|
||||||
|
|
||||||
frontPlateThickness = 3;
|
frontPlateThickness = 3,
|
||||||
frontPlateCutoutYSpace = 3;
|
frontPlateCutoutYSpace = 3,
|
||||||
frontPlateCutoutXSpace = 5;
|
frontPlateCutoutXSpace = 5,
|
||||||
|
|
||||||
zOrientation = "middle"; // or "bottom"
|
|
||||||
|
|
||||||
// end config //////////////////////////////////////////////////////////////////////////////////////////////////////////
|
// end config //////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
) {
|
||||||
|
leftRailTrans = identity;
|
||||||
|
rightRailTrans = visualize
|
||||||
|
? translate(v = [boxWidth, 0, 0])*mirror(v = [1, 0, 0])
|
||||||
|
: translate(v = [sideRailBaseWidth*2, 0, 0])*mirror(v = [1, 0, 0]);
|
||||||
|
|
||||||
leftRailTrans = identity;
|
u = findU(boxHeight, railDefaultThickness);
|
||||||
rightRailTrans = visualize
|
railBottomThickness = railBottomThickness(u, boxHeight, railDefaultThickness, zOrientation);
|
||||||
? translate(v=[boxWidth,0,0]) * mirror(v=[1,0,0])
|
frontBoxHolderTrans = visualize
|
||||||
: translate(v=[sideRailBaseWidth*2,0,0]) * mirror(v=[1,0,0]);
|
? translate(v = [railSideThickness-(railSupportsDx-boxWidth)/2, 0, sideRailLowerMountPointToBottom-
|
||||||
|
railBottomThickness])*mirror(v = [0, 1, 0])*rotate(a = [90, 0, 0])
|
||||||
|
: mirror(v = [0, 1, 0])*translate(v = [0, uDiff, frontPlateThickness-railBottomThickness]);
|
||||||
|
|
||||||
u = findU(boxHeight, railDefaultThickness);
|
if (visualize) {
|
||||||
railBottomThickness = railBottomThickness(u, boxHeight, railDefaultThickness, zOrientation);
|
|
||||||
frontBoxHolderTrans = visualize
|
|
||||||
? translate(v=[railSideThickness-(railSupportsDx-boxWidth)/2,0, sideRailLowerMountPointToBottom-railBottomThickness]) * mirror(v=[0,1,0]) * rotate(a=[90,0,0])
|
|
||||||
: mirror(v=[0,1,0]) * translate(v=[0,uDiff,frontPlateThickness - railBottomThickness]);
|
|
||||||
|
|
||||||
if (visualize) {
|
|
||||||
%cube(size = [boxWidth, boxDepth, boxHeight]);
|
%cube(size = [boxWidth, boxDepth, boxHeight]);
|
||||||
|
}
|
||||||
|
|
||||||
|
multmatrix(leftRailTrans)
|
||||||
|
sideSupportRailBase(top = true, recess = recessSideRail, defaultThickness = railDefaultThickness, supportedZ =
|
||||||
|
boxHeight, supportedY = boxDepth, supportedX = boxWidth, zOrientation = zOrientation, railSideThickness =
|
||||||
|
railSideThickness);
|
||||||
|
|
||||||
|
multmatrix(rightRailTrans)
|
||||||
|
sideSupportRailBase(top = true, recess = recessSideRail, defaultThickness = railDefaultThickness, supportedZ =
|
||||||
|
boxHeight, supportedY = boxDepth, supportedX = boxWidth, zOrientation = zOrientation, railSideThickness =
|
||||||
|
railSideThickness);
|
||||||
|
|
||||||
|
multmatrix(frontBoxHolderTrans)
|
||||||
|
frontBoxHolder(
|
||||||
|
cutoutOffsetX = (rackMountScrewWidth-(boxWidth-2*frontPlateCutoutXSpace))/2, cutoutOffsetY = railBottomThickness+
|
||||||
|
frontPlateCutoutYSpace,
|
||||||
|
cutoutX = boxWidth-2*frontPlateCutoutXSpace, cutoutY = boxHeight-2*frontPlateCutoutYSpace,
|
||||||
|
zOrientation = zOrientation, supportedZ = boxHeight, supportWidth = max(10, boxWidth-(sideRailBaseWidth+10)),
|
||||||
|
supportRailDefaultThickness = railDefaultThickness, plateThickness = frontPlateThickness
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
multmatrix(leftRailTrans)
|
enclosedBoxSystem();
|
||||||
sideSupportRailBase(top=true, defaultThickness=railDefaultThickness, supportedZ=boxHeight, supportedY=boxDepth, supportedX=boxWidth, zOrientation=zOrientation, railSideThickness=railSideThickness);
|
|
||||||
|
|
||||||
multmatrix(rightRailTrans)
|
|
||||||
sideSupportRailBase(top=true, defaultThickness=railDefaultThickness, supportedZ=boxHeight, supportedY=boxDepth, supportedX=boxWidth, zOrientation=zOrientation, railSideThickness=railSideThickness);
|
|
||||||
|
|
||||||
multmatrix(frontBoxHolderTrans)
|
|
||||||
frontBoxHolder(
|
|
||||||
cutoutOffsetX=(rackMountScrewWidth-(boxWidth-2*frontPlateCutoutXSpace))/2, cutoutOffsetY=railBottomThickness+frontPlateCutoutYSpace,
|
|
||||||
cutoutX=boxWidth-2*frontPlateCutoutXSpace, cutoutY=boxHeight-2*frontPlateCutoutYSpace,
|
|
||||||
zOrientation = zOrientation, supportedZ=boxHeight, supportWidth=max(10, boxWidth-(sideRailBaseWidth+10)), supportRailDefaultThickness = railDefaultThickness, plateThickness=frontPlateThickness
|
|
||||||
);
|
|
||||||
@ -4,7 +4,7 @@ include <./helper.scad>
|
|||||||
//sideSupportRailBase(top=true, defaultThickness=1.5, supportedZ=27.2, supportedY=101.5, supportedX=159);
|
//sideSupportRailBase(top=true, defaultThickness=1.5, supportedZ=27.2, supportedY=101.5, supportedX=159);
|
||||||
|
|
||||||
|
|
||||||
module sideSupportRailBase(top=true, supportedZ, supportedY, supportedX, zOrientation="middle", defaultThickness=2, railSideThickness=4) {
|
module sideSupportRailBase(top=true, recess=false, supportedZ, supportedY, supportedX, zOrientation="middle", defaultThickness=2, railSideThickness=4) {
|
||||||
|
|
||||||
mountBlockDepth = 10;
|
mountBlockDepth = 10;
|
||||||
screwMountGlobalDz = screwDiff / 2.0; // vertical distance between local origin and main rail screw mount
|
screwMountGlobalDz = screwDiff / 2.0; // vertical distance between local origin and main rail screw mount
|
||||||
@ -16,12 +16,14 @@ module sideSupportRailBase(top=true, supportedZ, supportedY, supportedX, zOrient
|
|||||||
u = findU(supportedZ, railBaseThickness);
|
u = findU(supportedZ, railBaseThickness);
|
||||||
railBottomThickness = railBottomThickness(u, supportedZ, railBaseThickness, zOrientation);
|
railBottomThickness = railBottomThickness(u, supportedZ, railBaseThickness, zOrientation);
|
||||||
|
|
||||||
assert(supportedX <= maxUnitWidth);
|
assert(supportedX <= maxUnitWidth, "Configured supported width is too high for rack profile");
|
||||||
assert (zOrientation == "middle" || zOrientation == "bottom", "Z-Orientation not supported");
|
assert (zOrientation == "middle" || zOrientation == "bottom", "Z-Orientation not supported");
|
||||||
assert(railBottomThickness >= railBaseThickness);
|
assert(railBottomThickness >= railBaseThickness);
|
||||||
|
// require recessed rail if supportedX is close to maxUnitWidth
|
||||||
|
assert(recess || (supportedX+2*railSideThickness <= maxUnitWidth), "Configured supported width requires recessed side rail.");
|
||||||
|
|
||||||
railSideHeight = supportedZ + railBaseThickness + railBottomThickness + overhangSlack;
|
railSideHeight = supportedZ + railBaseThickness + railBottomThickness + overhangSlack;
|
||||||
frontMountPad = (sideRailScrewToMainRailFrontDx-mountBlockDepth/2)-xySlack;
|
frontMountPad = (sideRailScrewToMainRailFrontDx-mountBlockDepth/2);
|
||||||
|
|
||||||
translate(v=[-railSideThickness, 0, -railBottomThickness])
|
translate(v=[-railSideThickness, 0, -railBottomThickness])
|
||||||
applyMainRailMounts()
|
applyMainRailMounts()
|
||||||
@ -127,7 +129,12 @@ module sideSupportRailBase(top=true, supportedZ, supportedY, supportedX, zOrient
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
frontCutTrans = recess ? translate(v=[0,frontMountPad,0]): translate(v=[0,xySlack,0]);
|
||||||
|
multmatrix(frontCutTrans) {
|
||||||
cylindricalFiletNegative(p0=[sideRailBaseWidth,0,0],p1=[sideRailBaseWidth,0,inf], n=[1,-1,0],r=r);
|
cylindricalFiletNegative(p0=[sideRailBaseWidth,0,0],p1=[sideRailBaseWidth,0,inf], n=[1,-1,0],r=r);
|
||||||
|
halfspace(vpos=[0,-1,0], p=[0,0,0]);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
28
rack-mount/patch-panel/animate.scad
Normal file
28
rack-mount/patch-panel/animate.scad
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
include <../common.scad>
|
||||||
|
use <./entry.scad>
|
||||||
|
|
||||||
|
$vpt = [110,-42,36];
|
||||||
|
$vpr = [77,0,23];
|
||||||
|
$vpd = 445;
|
||||||
|
$vpf = 22.50;
|
||||||
|
|
||||||
|
animatePatchPanel(at=$t);
|
||||||
|
|
||||||
|
module animatePatchPanel(at=$t) {
|
||||||
|
|
||||||
|
plateThickness = 3;
|
||||||
|
keystoneSpacing = 19;
|
||||||
|
slots = max(1,ceil(at*8));
|
||||||
|
|
||||||
|
rotate(a=[90,0,0])
|
||||||
|
mirror(v=[0,0,1])
|
||||||
|
render()
|
||||||
|
patchPanelSystem(numSlots = slots, plateThickness=plateThickness, keystoneSpacing=keystoneSpacing);
|
||||||
|
|
||||||
|
// keystone visualization
|
||||||
|
for (i = [0:slots-1]) {
|
||||||
|
translate(v=[keystoneSpacing*i + 12, 0,0,]) // hardcoded offset
|
||||||
|
%rj45Keystone();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,18 +1,26 @@
|
|||||||
use <./patchPanel.scad>
|
use <./patchPanel.scad>
|
||||||
|
|
||||||
/*
|
/*
|
||||||
Parametric patch panel -
|
Parametric patch panel for rj45 keystones
|
||||||
|
|
||||||
Please also make sure that the correct rack frame preset is set in rackFrame.scad.
|
Please also make sure that the correct rack frame preset is set in rackFrame.scad.
|
||||||
|
|
||||||
TODO add support for 2d arrays
|
TODO add support for 2d arrays
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
module patchPanelSystem (
|
||||||
|
|
||||||
// begin config ////////////////////////////////////////////////////////////////////////////////////////////////////////
|
// begin config ////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
numSlots = 8;
|
numSlots = 8,
|
||||||
|
plateThickness = 3,
|
||||||
|
keystoneSpacing = 19
|
||||||
|
|
||||||
// end config //////////////////////////////////////////////////////////////////////////////////////////////////////////
|
// end config //////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
mirror(v=[0,0,1])
|
) {
|
||||||
patchPanel(slots=numSlots);
|
mirror(v = [0, 0, 1])
|
||||||
|
patchPanel(slots = numSlots);
|
||||||
|
}
|
||||||
|
|
||||||
|
patchPanelSystem();
|
||||||
@ -7,12 +7,9 @@ use <../plateBase.scad>
|
|||||||
|
|
||||||
Please also make sure that the correct rack frame preset is set in rackFrame.scad.
|
Please also make sure that the correct rack frame preset is set in rackFrame.scad.
|
||||||
*/
|
*/
|
||||||
*patchPanel(slots=2);
|
|
||||||
|
|
||||||
module patchPanel (slots=8) {
|
module patchPanel (slots=8, plateThickness=3, keystoneSpacing=19) {
|
||||||
difference() {
|
difference() {
|
||||||
plateThickness = 3;
|
|
||||||
keystoneSpacing = 19;
|
|
||||||
supportPlateThickness = 5.9;
|
supportPlateThickness = 5.9;
|
||||||
supportPlateHeight = 29;
|
supportPlateHeight = 29;
|
||||||
supportPlateEdgeSpacing = 3;
|
supportPlateEdgeSpacing = 3;
|
||||||
|
|||||||
@ -20,7 +20,7 @@ module plateBase(U, plateThickness, screwType, screwToXEdge=4.5, screwToYEdge=4.
|
|||||||
|
|
||||||
mirror4XY(p=[screwToXEdge, screwToYEdge], dx=screwDx, dy=screwDy)
|
mirror4XY(p=[screwToXEdge, screwToYEdge], dx=screwDx, dy=screwDy)
|
||||||
translate(v=[0,0,plateThickness])
|
translate(v=[0,0,plateThickness])
|
||||||
cylinder(r=screwRadiusSlacked(screwType), h=plateThickness*2, center=true);
|
cylinder(r=screwRadiusSlacked(screwType), h=inf, center=true);
|
||||||
}
|
}
|
||||||
|
|
||||||
module base() {
|
module base() {
|
||||||
|
|||||||
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 !!!
|
!!! Please also make sure that the correct rack frame preset is set in rackFrame.scad !!!
|
||||||
*/
|
*/
|
||||||
|
|
||||||
|
module traySystem (
|
||||||
|
|
||||||
// begin config ////////////////////////////////////////////////////////////////////////////////////////////////////////
|
// begin config ////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
trayU = 2;
|
trayU = 2,
|
||||||
|
|
||||||
baseWidth = 145;
|
baseWidth = 145,
|
||||||
baseDepth = 100;
|
baseDepth = 100,
|
||||||
|
|
||||||
baseThickness = 3; // tray bottom thickness
|
baseThickness = 3, // tray bottom thickness
|
||||||
frontThickness = 3; // front plate thickness
|
frontThickness = 3, // front plate thickness
|
||||||
sideThickness = 3;
|
sideThickness = 3,
|
||||||
|
|
||||||
backLipHeight = 2;
|
backLipHeight = 2,
|
||||||
frontLipHeight = 2;
|
frontLipHeight = 2,
|
||||||
|
|
||||||
sideSupport = true;
|
sideSupport = true,
|
||||||
trayLeftPadding = 10; // extra space between the left rail and tray. configure this to move the tray left/right.
|
trayLeftPadding = 10, // extra space between the left rail and tray. configure this to move the tray left/right.
|
||||||
|
|
||||||
mountPointType = "m3";
|
mountPointType = "m3",
|
||||||
mountPointElevation = 1; // basically standoff height
|
mountPointElevation = 1, // basically standoff height
|
||||||
|
|
||||||
// add/config standoff coordinates here. Format is [[x,y]]
|
// add/config standoff coordinates here. Format is [[x,y]]
|
||||||
mountPoints = [
|
mountPoints = [
|
||||||
@ -34,22 +36,27 @@ mountPoints = [
|
|||||||
[30+75,10],
|
[30+75,10],
|
||||||
[30,10+75],
|
[30,10+75],
|
||||||
[30+75,10+75],
|
[30+75,10+75],
|
||||||
];
|
]
|
||||||
|
|
||||||
// end config //////////////////////////////////////////////////////////////////////////////////////////////////////////
|
// end config //////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
) {
|
||||||
|
|
||||||
bottomScrewTray(
|
bottomScrewTray (
|
||||||
u=trayU,
|
u = trayU,
|
||||||
trayWidth=baseWidth,
|
trayWidth = baseWidth,
|
||||||
trayDepth=baseDepth,
|
trayDepth = baseDepth,
|
||||||
trayThickness=baseThickness,
|
trayThickness = baseThickness,
|
||||||
frontLipHeight=frontLipHeight,
|
frontLipHeight = frontLipHeight,
|
||||||
backLipHeight=backLipHeight,
|
backLipHeight = backLipHeight,
|
||||||
mountPoints=mountPoints,
|
mountPoints = mountPoints,
|
||||||
frontThickness=frontThickness,
|
frontThickness = frontThickness,
|
||||||
sideThickness=sideThickness,
|
sideThickness = sideThickness,
|
||||||
mountPointElevation=mountPointElevation,
|
mountPointElevation = mountPointElevation,
|
||||||
mountPointType=mountPointType,
|
mountPointType = mountPointType,
|
||||||
sideSupport=sideSupport,
|
sideSupport = sideSupport,
|
||||||
trayLeftPadding=trayLeftPadding
|
trayLeftPadding = trayLeftPadding
|
||||||
);
|
);
|
||||||
|
}
|
||||||
|
|
||||||
|
traySystem();
|
||||||
@ -62,23 +62,28 @@ module bottomScrewTray(u, trayWidth, trayDepth, trayThickness, mountPoints, moun
|
|||||||
|
|
||||||
mountPointPosThickness = 2;
|
mountPointPosThickness = 2;
|
||||||
|
|
||||||
|
if (len(mountPoints) > 0) {
|
||||||
apply_pn() {
|
apply_pn() {
|
||||||
for (i = [0:len(mountPoints)-1]) {
|
for (i = [0:len(mountPoints)-1]) {
|
||||||
x = mountPoints[i][0];
|
x = mountPoints[i][0];
|
||||||
y = mountPoints[i][1];
|
y = mountPoints[i][1];
|
||||||
|
|
||||||
translate(v=[x, y, 0])
|
translate(v = [x, y, 0])
|
||||||
cylinder(r=screwRadiusSlacked(mountPointType)+mountPointPosThickness, h=mountPointElevation);
|
cylinder(r = screwRadiusSlacked(mountPointType)+mountPointPosThickness, h = mountPointElevation);
|
||||||
}
|
}
|
||||||
|
|
||||||
for (i = [0:len(mountPoints)-1]) {
|
for (i = [0:len(mountPoints)-1]) {
|
||||||
x = mountPoints[i][0];
|
x = mountPoints[i][0];
|
||||||
y = mountPoints[i][1];
|
y = mountPoints[i][1];
|
||||||
|
|
||||||
translate(v=[x, y, -trayThickness])
|
translate(v = [x, y, -trayThickness])
|
||||||
mirror(v=[0,0,1])
|
mirror(v = [0, 0, 1])
|
||||||
counterSunkHead_N(mountPointType, inf, inf);
|
counterSunkHead_N(mountPointType, inf, inf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
children(0);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
children(0);
|
children(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user