add option to center patch panel
This commit is contained in:
@ -14,13 +14,14 @@ module patchPanelSystem (
|
|||||||
|
|
||||||
numSlots = 8,
|
numSlots = 8,
|
||||||
plateThickness = 3,
|
plateThickness = 3,
|
||||||
keystoneSpacing = 19
|
keystoneSpacing = 19,
|
||||||
|
center = false
|
||||||
|
|
||||||
// end config //////////////////////////////////////////////////////////////////////////////////////////////////////////
|
// end config //////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
) {
|
) {
|
||||||
mirror(v = [0, 0, 1])
|
mirror(v = [0, 0, 1])
|
||||||
patchPanel(slots = numSlots);
|
patchPanel(slots = numSlots, center=center);
|
||||||
}
|
}
|
||||||
|
|
||||||
patchPanelSystem();
|
patchPanelSystem();
|
||||||
|
|||||||
@ -8,15 +8,21 @@ 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.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
module patchPanel (slots=8, plateThickness=3, keystoneSpacing=19) {
|
module patchPanel (slots=8, plateThickness=3, keystoneSpacing=19, center=false) {
|
||||||
difference() {
|
difference() {
|
||||||
supportPlateThickness = 5.9;
|
supportPlateThickness = 5.9;
|
||||||
supportPlateHeight = 29;
|
supportPlateHeight = 29;
|
||||||
supportPlateEdgeSpacing = 3;
|
supportPlateEdgeSpacing = 3;
|
||||||
supportPlateWidth = slots * keystoneSpacing + supportPlateEdgeSpacing;
|
supportPlateWidth = slots * keystoneSpacing + supportPlateEdgeSpacing;
|
||||||
|
supportPlateMinPadding = railScrewHoleToInnerEdge+4;
|
||||||
|
|
||||||
leftRailScrewToSupportDx = railScrewHoleToInnerEdge+4;
|
// TODO: these values should belong somewhere closer to plateBase.scad
|
||||||
railScrewToEdge = 4.5;
|
railScrewToEdge = 4.5;
|
||||||
|
plateLength = rackMountScrewWidth + 2*railScrewToEdge;
|
||||||
|
|
||||||
|
leftRailScrewToSupportDx = center
|
||||||
|
? (plateLength-(supportPlateWidth+supportPlateMinPadding))/2
|
||||||
|
: supportPlateMinPadding;
|
||||||
|
|
||||||
union() {
|
union() {
|
||||||
plateBase(U = 2, plateThickness = plateThickness, screwType = mainRailScrewType, screwToXEdge=railScrewToEdge, screwToYEdge=railScrewToEdge, filletR = 2);
|
plateBase(U = 2, plateThickness = plateThickness, screwType = mainRailScrewType, screwToXEdge=railScrewToEdge, screwToYEdge=railScrewToEdge, filletR = 2);
|
||||||
@ -24,6 +30,7 @@ module patchPanel (slots=8, plateThickness=3, keystoneSpacing=19) {
|
|||||||
cube(size = [supportPlateWidth, supportPlateHeight, supportPlateThickness]);
|
cube(size = [supportPlateWidth, supportPlateHeight, supportPlateThickness]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
render()
|
||||||
union() {
|
union() {
|
||||||
for (i = [0:slots-1]) {
|
for (i = [0:slots-1]) {
|
||||||
translate(v = [leftRailScrewToSupportDx+supportPlateEdgeSpacing + i*keystoneSpacing, 0, eps])
|
translate(v = [leftRailScrewToSupportDx+supportPlateEdgeSpacing + i*keystoneSpacing, 0, eps])
|
||||||
@ -32,4 +39,4 @@ module patchPanel (slots=8, plateThickness=3, keystoneSpacing=19) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@ -31,4 +31,4 @@ module plateBase(U, plateThickness, screwType, screwToXEdge=4.5, screwToYEdge=4.
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user