Files
rackstack/rack/xBar.scad
2023-01-16 17:31:16 -05:00

75 lines
1.5 KiB
OpenSCAD

include <../helper/sphericalFilet.scad>
include <../helper/cylindricalFilet.scad>
include <../helper/screws.scad>
include <./config.scad>
include <./derivedConfig.scad>
include <./xyBarConnector.scad>
// Temporary
include <./yBar.scad>
include <./mainRail.scad>
xBarDepth = maxUnitWidth - 2*railSlotSpacing;
xBarWidth = 32;
xBarHeight = 15;
xBarWallThickness = 2;
xBarRoundness = baseRoundness;
*xBar();
module xBar() {
module positive() {
mirror(v=[0,1,0])
rotate(a=[0,0,-90])
difference() {
cylindricalFiletEdge(xBarWidth, xBarDepth, xBarHeight, xBarRoundness);
translate(v = [xBarWallThickness, xBarWallThickness, xBarWallThickness])
cylindricalFiletEdge(xBarWidth, xBarDepth - 2*xBarWallThickness, xBarHeight, xBarRoundness);
}
}
module xBar() {
module mirrorOtherCorner() {
children(0);
// TODO rename xBarDepth to xBarLength/xBarWidth
translate(v = [xBarDepth, 0, 0])
mirror(v = [1, 0, 0]) {
children(0);
}
}
// TODO refactor - probably better off mirroring the side faces and hulling the shell
difference() {
union() {
intersection() {
positive();
halfspace(vpos = [1, 0, 1], p = [0.5, 0, 0]);
halfspace(vpos = [-1, 0, 1], p = [xBarDepth-0.5, 0, 0]);
}
yBarConnectorFromXLug();
mirrorOtherCorner()
yBarConnectorFromXLug();
}
union() {
yBarConnectorFromX_N();
mirrorOtherCorner()
yBarConnectorFromX_N();
}
}
}
xBar();
}