Rewrite keystone.scad (#35)
* helper/keystone: rewrite completely * rack-mount/patch-panel: edit to adapt to the new keystone * helper/keystone: fill the lug-side opening * rack-mount/patch-panel: allow combining two types of keystones and plates freely * rack-mount/patch-panel/entry: apply suggestions Co-authored-by: Zhao (Jack) Wang <jazwang@proton.me> * rack-mount/patch-panel: fix animate.scad & regen gif --------- Co-authored-by: Zhao (Jack) Wang <jazwang@proton.me>
This commit is contained in:
@ -3,10 +3,11 @@
|
|||||||
include <./apply.scad>
|
include <./apply.scad>
|
||||||
include <./dovetail.scad>
|
include <./dovetail.scad>
|
||||||
include <./filet.scad>
|
include <./filet.scad>
|
||||||
include <./keystone.scad>
|
include <./keystone1.scad>
|
||||||
|
include <./keystone2.scad>
|
||||||
include <./math.scad>
|
include <./math.scad>
|
||||||
include <./matrix.scad>
|
include <./matrix.scad>
|
||||||
include <./screws.scad>
|
include <./screws.scad>
|
||||||
include <./sine.scad>
|
include <./sine.scad>
|
||||||
|
|
||||||
$fn=64;
|
$fn=64;
|
||||||
|
|||||||
@ -1,4 +1,3 @@
|
|||||||
|
|
||||||
include <../config/common.scad>
|
include <../config/common.scad>
|
||||||
|
|
||||||
// rj45 slot-to-slot keystone jack model and negative
|
// rj45 slot-to-slot keystone jack model and negative
|
||||||
@ -45,3 +44,15 @@ module rj45KeystoneJack_N() {
|
|||||||
rj45Keystone();
|
rj45Keystone();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module keystone1(outerWidth, outerHeight) {
|
||||||
|
rotate([0, 0, 180]) // To keep the same direction with keystone2
|
||||||
|
difference() {
|
||||||
|
translate([0, 0, 5.9 / 2])
|
||||||
|
cube([outerWidth, outerHeight, 5.9], center = true);
|
||||||
|
|
||||||
|
translate([-(keystoneMainBodyWidth + xySlack) / 2, (heightWithHookCatch + heightWithBottomLug - keystoneMainBodyHeight) / 2, 0])
|
||||||
|
rotate([90, 0, 0])
|
||||||
|
rj45KeystoneJack_N();
|
||||||
|
}
|
||||||
|
}
|
||||||
42
helper/keystone2.scad
Normal file
42
helper/keystone2.scad
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
include <../config/common.scad>
|
||||||
|
|
||||||
|
// These all constants are obtained by measuring rj45 keystone modules
|
||||||
|
// in hand. frontToRearDepth and rearPanelThickness are adjusted after testing.
|
||||||
|
// Before printing the Patch Panel, print a keystone2(outerWidth = 19,
|
||||||
|
// outerHeight = 27) to test if it fits.
|
||||||
|
frontWidth = 14.5;
|
||||||
|
frontHeight = 16.2;
|
||||||
|
|
||||||
|
frontToRearDepth = 8.4;
|
||||||
|
|
||||||
|
rearWidth = frontWidth;
|
||||||
|
rearHeight = 19.55;
|
||||||
|
rearPanelThickness = 2 - supportedOverhangSlack;
|
||||||
|
|
||||||
|
maximumWidth = frontWidth;
|
||||||
|
maximumHeight = 22.15;
|
||||||
|
|
||||||
|
lugHeight = 1.3;
|
||||||
|
|
||||||
|
module keystone2(plateThickness = 1, outerWidth, outerHeight) {
|
||||||
|
assert(outerWidth > maximumWidth);
|
||||||
|
assert(outerHeight > maximumHeight);
|
||||||
|
|
||||||
|
difference() {
|
||||||
|
// Outer cube
|
||||||
|
translate([-outerWidth / 2, -outerHeight / 2, 0])
|
||||||
|
cube([outerWidth, outerHeight, frontToRearDepth + rearPanelThickness]);
|
||||||
|
|
||||||
|
// Front panel hole
|
||||||
|
translate([-(frontWidth + xySlack) / 2, -(frontHeight + xySlack) / 2, 0])
|
||||||
|
cube([frontWidth + xySlack, frontHeight + xySlack, plateThickness]);
|
||||||
|
|
||||||
|
// Middle cavity
|
||||||
|
translate([-(maximumWidth + xySlack) / 2, -frontHeight / 2 - lugHeight - xySlack / 2, plateThickness])
|
||||||
|
cube([rearWidth + xySlack, outerHeight + 1000, frontToRearDepth - plateThickness]);
|
||||||
|
|
||||||
|
// Rear panel hole
|
||||||
|
translate([-(rearWidth + xySlack) / 2, -(frontHeight + xySlack) / 2, frontToRearDepth])
|
||||||
|
cube([rearWidth + xySlack, rearHeight + xySlack, rearPanelThickness]);
|
||||||
|
}
|
||||||
|
}
|
||||||
Binary file not shown.
|
Before Width: | Height: | Size: 7.6 KiB After Width: | Height: | Size: 7.0 KiB |
@ -12,17 +12,12 @@ module animatePatchPanel(at=$t) {
|
|||||||
|
|
||||||
plateThickness = 3;
|
plateThickness = 3;
|
||||||
keystoneSpacing = 19;
|
keystoneSpacing = 19;
|
||||||
slots = max(1,ceil(at*8));
|
allSlots = [2, 2, 2, 2, 2, 2, 2, 5, 2];
|
||||||
|
numSlots = max(1,ceil(at*8));
|
||||||
|
slots = [each [for (i=[1:numSlots]) allSlots[i]]];
|
||||||
|
|
||||||
rotate(a=[90,0,0])
|
rotate(a=[90,0,0])
|
||||||
mirror(v=[0,0,1])
|
|
||||||
render()
|
render()
|
||||||
patchPanelSystem(numSlots = slots, plateThickness=plateThickness, keystoneSpacing=keystoneSpacing);
|
patchPanelSystem(slots = slots, plateThickness=plateThickness, keystoneSpacing=keystoneSpacing);
|
||||||
|
|
||||||
// keystone visualization
|
|
||||||
for (i = [0:slots-1]) {
|
|
||||||
translate(v=[keystoneSpacing*i + 12, 0,0,]) // hardcoded offset
|
|
||||||
%rj45Keystone();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
}
|
||||||
@ -12,7 +12,11 @@ module patchPanelSystem (
|
|||||||
|
|
||||||
// begin config ////////////////////////////////////////////////////////////////////////////////////////////////////////
|
// begin config ////////////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
numSlots = 8,
|
// 1 for the original keystone mount design, 2 for a visually cleaner keystone mount
|
||||||
|
// but where the keystone is a bit harder to remove
|
||||||
|
// 3 for a cube with the height of plateThickness,
|
||||||
|
// 4 and 5 for cubes with the same height as keystone1 and 2
|
||||||
|
slots = [2, 2, 2, 2, 2, 2, 2, 5, 2],
|
||||||
plateThickness = 3,
|
plateThickness = 3,
|
||||||
keystoneSpacing = 19,
|
keystoneSpacing = 19,
|
||||||
center = false
|
center = false
|
||||||
@ -21,7 +25,7 @@ center = false
|
|||||||
|
|
||||||
) {
|
) {
|
||||||
mirror(v = [0, 0, 1])
|
mirror(v = [0, 0, 1])
|
||||||
patchPanel(slots = numSlots, center=center);
|
patchPanel(slots = slots, plateThickness = 3, keystoneSpacing = 19, center=center);
|
||||||
}
|
}
|
||||||
|
|
||||||
patchPanelSystem();
|
patchPanelSystem();
|
||||||
|
|||||||
@ -8,35 +8,34 @@ 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, center=false) {
|
module patchPanel(slots, plateThickness = 3, screwToXEdge = 4.5, screwToYEdge = 4.5, keystoneSpacing = 19, center = false) {
|
||||||
|
slotsWidth = len(slots) * keystoneSpacing;
|
||||||
|
slotsMinPadding = railScrewHoleToInnerEdge+4;
|
||||||
|
plateLength = rackMountScrewWidth + 2 * screwToXEdge;
|
||||||
|
plateHeight = 2 * uDiff + 2 * screwToXEdge;
|
||||||
|
leftRailScrewToSlots = center
|
||||||
|
? (plateLength-(slotsWidth+slotsMinPadding))/2
|
||||||
|
: slotsMinPadding;
|
||||||
|
|
||||||
difference() {
|
difference() {
|
||||||
supportPlateThickness = 5.9;
|
plateBase(U = 2, plateThickness = plateThickness, screwType = mainRailScrewType, screwToXEdge = screwToXEdge, screwToYEdge = screwToYEdge, filletR = 2);
|
||||||
supportPlateHeight = 29;
|
translate([leftRailScrewToSlots, -screwToYEdge - 10 * eps, -plateThickness - 10 * eps])
|
||||||
supportPlateEdgeSpacing = 3;
|
cube([slotsWidth, plateHeight + 2 * 10 * eps, plateThickness + 2 * 10 * eps]);
|
||||||
supportPlateWidth = slots * keystoneSpacing + supportPlateEdgeSpacing;
|
}
|
||||||
supportPlateMinPadding = railScrewHoleToInnerEdge+4;
|
|
||||||
|
|
||||||
// TODO: these values should belong somewhere closer to plateBase.scad
|
for(i = [0 : len(slots) - 1]) {
|
||||||
railScrewToEdge = 4.5;
|
translate([leftRailScrewToSlots + keystoneSpacing / 2 + i * keystoneSpacing, uDiff, -plateThickness])
|
||||||
plateLength = rackMountScrewWidth + 2*railScrewToEdge;
|
let (slot = slots[i])
|
||||||
|
if (slot == 1) keystone1(outerWidth = keystoneSpacing, outerHeight = plateHeight);
|
||||||
leftRailScrewToSupportDx = center
|
else if (slot == 2) keystone2(outerWidth = keystoneSpacing, outerHeight = plateHeight);
|
||||||
? (plateLength-(supportPlateWidth+supportPlateMinPadding))/2
|
else if (slot == 3) plate(outerWidth = keystoneSpacing, outerHeight = plateHeight, thickness = plateThickness);
|
||||||
: supportPlateMinPadding;
|
else if (slot == 4) plate(outerWidth = keystoneSpacing, outerHeight = plateHeight, thickness = 5.9);
|
||||||
|
else if (slot == 5) plate(outerWidth = keystoneSpacing, outerHeight = plateHeight, thickness = 9.9);
|
||||||
union() {
|
else assert(false);
|
||||||
plateBase(U = 2, plateThickness = plateThickness, screwType = mainRailScrewType, screwToXEdge=railScrewToEdge, screwToYEdge=railScrewToEdge, filletR = 2);
|
|
||||||
translate(v = [leftRailScrewToSupportDx, - railScrewToEdge, - supportPlateThickness])
|
|
||||||
cube(size = [supportPlateWidth, supportPlateHeight, supportPlateThickness]);
|
|
||||||
}
|
|
||||||
|
|
||||||
render()
|
|
||||||
union() {
|
|
||||||
for (i = [0:slots-1]) {
|
|
||||||
translate(v = [leftRailScrewToSupportDx+supportPlateEdgeSpacing + i*keystoneSpacing, 0, eps])
|
|
||||||
rotate(a = [-90, 0, 0])
|
|
||||||
rj45KeystoneJack_N();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module plate(outerWidth, outerHeight, thickness) {
|
||||||
|
translate([0, 0, thickness / 2])
|
||||||
|
cube([outerWidth, outerHeight, thickness], center = true);
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user