refactor yBar to include better variables
This commit is contained in:
@ -14,7 +14,7 @@ railSideMountThickness = 2.5;
|
|||||||
|
|
||||||
// Distance between the middle of a screw mount and the rail's vertical edges
|
// Distance between the middle of a screw mount and the rail's vertical edges
|
||||||
railScrewHoleToInnerEdge = 5;
|
railScrewHoleToInnerEdge = 5;
|
||||||
railScrewHoleToOuterEdge = 7;
|
railScrewHoleToOuterEdge = 9;
|
||||||
|
|
||||||
// Distance between the midpoint of the rail screw holes.
|
// Distance between the midpoint of the rail screw holes.
|
||||||
rackMountScrewWidth = maxUnitWidth + 2 * railScrewHoleToInnerEdge;
|
rackMountScrewWidth = maxUnitWidth + 2 * railScrewHoleToInnerEdge;
|
||||||
@ -30,7 +30,7 @@ frontFaceWidth = railScrewHoleToInnerEdge + railScrewHoleToOuterEdge;
|
|||||||
railTotalWidth = frontFaceWidth;
|
railTotalWidth = frontFaceWidth;
|
||||||
railTotalDepth = railFrontThickness+sideSupportDepth;
|
railTotalDepth = railFrontThickness+sideSupportDepth;
|
||||||
|
|
||||||
mainRail();
|
*mainRail();
|
||||||
|
|
||||||
echo("Total Rail Height: ", railTotalHeight);
|
echo("Total Rail Height: ", railTotalHeight);
|
||||||
|
|
||||||
|
|||||||
@ -1,6 +1,7 @@
|
|||||||
include <./config.scad>
|
include <./config.scad>
|
||||||
include <../helper/screws.scad>
|
include <../helper/screws.scad>
|
||||||
|
|
||||||
|
sideWallConnectorSlotWidth = 7;
|
||||||
module sideWallConnector_N() {
|
module sideWallConnector_N() {
|
||||||
|
|
||||||
lugW = 7;
|
lugW = 7;
|
||||||
|
|||||||
@ -13,15 +13,16 @@ include <./xyBarConnector.scad>
|
|||||||
include <./sideWallConnector.scad>
|
include <./sideWallConnector.scad>
|
||||||
include <./yBarBasePlateConnector.scad>
|
include <./yBarBasePlateConnector.scad>
|
||||||
|
|
||||||
// TODO clean up
|
railSlotToInnerYEdge = 2;
|
||||||
// TODO: How do I nicely explain this?
|
railSlotToXZ = 3;
|
||||||
railSlotSpacing = 3;
|
railSlotToSideWallSlot = 0;
|
||||||
sideSpacing = 12;
|
sideWallSlotToOuterYEdge = 3;
|
||||||
|
sideWallSlotToXZ = 3;
|
||||||
|
|
||||||
yBarDepth = maxUnitDepth + 2*railSlotSpacing;
|
yBarDepth = maxUnitDepth + 2*railSlotToInnerYEdge;
|
||||||
yBarWidth = railSlotSpacing + railTotalWidth + sideSpacing;
|
yBarWidth = railSlotToInnerYEdge + railTotalWidth+ railSlotToSideWallSlot
|
||||||
|
+ sideWallSlotToOuterYEdge + sideWallConnectorSlotWidth;
|
||||||
yBarHeight = 15;
|
yBarHeight = 15;
|
||||||
|
|
||||||
yBarWallThickness = 3;
|
yBarWallThickness = 3;
|
||||||
yBarRoundness = baseRoundness;
|
yBarRoundness = baseRoundness;
|
||||||
|
|
||||||
@ -29,8 +30,9 @@ joinCornerDepth = 32;
|
|||||||
|
|
||||||
echo("Bar total depth: ", yBarDepth);
|
echo("Bar total depth: ", yBarDepth);
|
||||||
echo("Bar total width: ", yBarWidth);
|
echo("Bar total width: ", yBarWidth);
|
||||||
|
echo("Bar total height: ", yBarHeight);
|
||||||
|
|
||||||
*yBar();
|
yBar();
|
||||||
|
|
||||||
module yBar() {
|
module yBar() {
|
||||||
|
|
||||||
@ -57,12 +59,12 @@ module yBar() {
|
|||||||
module applyBasePlateConnector() {
|
module applyBasePlateConnector() {
|
||||||
apply_pn() {
|
apply_pn() {
|
||||||
mirrorOtherCorner() {
|
mirrorOtherCorner() {
|
||||||
translate(v = [yBarWidth-12, joinCornerDepth, yBarWallThickness]) // why do we need 0.01 here???
|
translate(v = [yBarWidth-yBarBasePlateConnectorWidth, joinCornerDepth, yBarWallThickness])
|
||||||
yBarBasePlateMount_P();
|
yBarBasePlateMount_P();
|
||||||
}
|
}
|
||||||
|
|
||||||
mirrorOtherCorner() {
|
mirrorOtherCorner() {
|
||||||
translate(v = [yBarWidth-12, joinCornerDepth, 0])
|
translate(v = [yBarWidth-yBarBasePlateConnectorWidth, joinCornerDepth, 0])
|
||||||
yBarBasePlateMount_N();
|
yBarBasePlateMount_N();
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -83,7 +85,7 @@ module yBar() {
|
|||||||
module applySideWallConnector() {
|
module applySideWallConnector() {
|
||||||
apply_n() {
|
apply_n() {
|
||||||
mirrorOtherCorner()
|
mirrorOtherCorner()
|
||||||
translate(v = [yBarWidth-(railTotalWidth+railSlotSpacing)-9, railSlotSpacing, yBarHeight])
|
translate(v = [yBarWidth-(railTotalWidth+railSlotToInnerYEdge+railSlotToSideWallSlot+sideWallConnectorSlotWidth), sideWallSlotToXZ, yBarHeight])
|
||||||
sideWallConnector_N();
|
sideWallConnector_N();
|
||||||
|
|
||||||
children(0);
|
children(0);
|
||||||
@ -93,7 +95,7 @@ module yBar() {
|
|||||||
module applyRailConnector() {
|
module applyRailConnector() {
|
||||||
apply_n() {
|
apply_n() {
|
||||||
mirrorOtherCorner()
|
mirrorOtherCorner()
|
||||||
translate(v = [yBarWidth-(railTotalWidth+railSlotSpacing), railSlotSpacing, yBarHeight-railFootThickness])
|
translate(v = [yBarWidth-(railTotalWidth+railSlotToInnerYEdge), railSlotToXZ, yBarHeight-railFootThickness])
|
||||||
railFeetSlot_N();
|
railFeetSlot_N();
|
||||||
|
|
||||||
children(0);
|
children(0);
|
||||||
|
|||||||
@ -7,6 +7,9 @@ _mountX = 12;
|
|||||||
_mountY = 14;
|
_mountY = 14;
|
||||||
_mountZ = 10;
|
_mountZ = 10;
|
||||||
|
|
||||||
|
// Needed for yBar to align this connector to its inner Y edge
|
||||||
|
yBarBasePlateConnectorWidth = _mountX;
|
||||||
|
|
||||||
// x and y faces of the yBarBasePlateMount_P block
|
// x and y faces of the yBarBasePlateMount_P block
|
||||||
_innerXFaceToScrew = 6;
|
_innerXFaceToScrew = 6;
|
||||||
_innerYFaceToScrew = 8;
|
_innerYFaceToScrew = 8;
|
||||||
|
|||||||
Reference in New Issue
Block a user