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
|
||||
railScrewHoleToInnerEdge = 5;
|
||||
railScrewHoleToOuterEdge = 7;
|
||||
railScrewHoleToOuterEdge = 9;
|
||||
|
||||
// Distance between the midpoint of the rail screw holes.
|
||||
rackMountScrewWidth = maxUnitWidth + 2 * railScrewHoleToInnerEdge;
|
||||
@ -30,7 +30,7 @@ frontFaceWidth = railScrewHoleToInnerEdge + railScrewHoleToOuterEdge;
|
||||
railTotalWidth = frontFaceWidth;
|
||||
railTotalDepth = railFrontThickness+sideSupportDepth;
|
||||
|
||||
mainRail();
|
||||
*mainRail();
|
||||
|
||||
echo("Total Rail Height: ", railTotalHeight);
|
||||
|
||||
|
||||
@ -1,6 +1,7 @@
|
||||
include <./config.scad>
|
||||
include <../helper/screws.scad>
|
||||
|
||||
sideWallConnectorSlotWidth = 7;
|
||||
module sideWallConnector_N() {
|
||||
|
||||
lugW = 7;
|
||||
|
||||
@ -13,15 +13,16 @@ include <./xyBarConnector.scad>
|
||||
include <./sideWallConnector.scad>
|
||||
include <./yBarBasePlateConnector.scad>
|
||||
|
||||
// TODO clean up
|
||||
// TODO: How do I nicely explain this?
|
||||
railSlotSpacing = 3;
|
||||
sideSpacing = 12;
|
||||
railSlotToInnerYEdge = 2;
|
||||
railSlotToXZ = 3;
|
||||
railSlotToSideWallSlot = 0;
|
||||
sideWallSlotToOuterYEdge = 3;
|
||||
sideWallSlotToXZ = 3;
|
||||
|
||||
yBarDepth = maxUnitDepth + 2*railSlotSpacing;
|
||||
yBarWidth = railSlotSpacing + railTotalWidth + sideSpacing;
|
||||
yBarDepth = maxUnitDepth + 2*railSlotToInnerYEdge;
|
||||
yBarWidth = railSlotToInnerYEdge + railTotalWidth+ railSlotToSideWallSlot
|
||||
+ sideWallSlotToOuterYEdge + sideWallConnectorSlotWidth;
|
||||
yBarHeight = 15;
|
||||
|
||||
yBarWallThickness = 3;
|
||||
yBarRoundness = baseRoundness;
|
||||
|
||||
@ -29,8 +30,9 @@ joinCornerDepth = 32;
|
||||
|
||||
echo("Bar total depth: ", yBarDepth);
|
||||
echo("Bar total width: ", yBarWidth);
|
||||
echo("Bar total height: ", yBarHeight);
|
||||
|
||||
*yBar();
|
||||
yBar();
|
||||
|
||||
module yBar() {
|
||||
|
||||
@ -57,12 +59,12 @@ module yBar() {
|
||||
module applyBasePlateConnector() {
|
||||
apply_pn() {
|
||||
mirrorOtherCorner() {
|
||||
translate(v = [yBarWidth-12, joinCornerDepth, yBarWallThickness]) // why do we need 0.01 here???
|
||||
translate(v = [yBarWidth-yBarBasePlateConnectorWidth, joinCornerDepth, yBarWallThickness])
|
||||
yBarBasePlateMount_P();
|
||||
}
|
||||
|
||||
mirrorOtherCorner() {
|
||||
translate(v = [yBarWidth-12, joinCornerDepth, 0])
|
||||
translate(v = [yBarWidth-yBarBasePlateConnectorWidth, joinCornerDepth, 0])
|
||||
yBarBasePlateMount_N();
|
||||
}
|
||||
|
||||
@ -83,7 +85,7 @@ module yBar() {
|
||||
module applySideWallConnector() {
|
||||
apply_n() {
|
||||
mirrorOtherCorner()
|
||||
translate(v = [yBarWidth-(railTotalWidth+railSlotSpacing)-9, railSlotSpacing, yBarHeight])
|
||||
translate(v = [yBarWidth-(railTotalWidth+railSlotToInnerYEdge+railSlotToSideWallSlot+sideWallConnectorSlotWidth), sideWallSlotToXZ, yBarHeight])
|
||||
sideWallConnector_N();
|
||||
|
||||
children(0);
|
||||
@ -93,7 +95,7 @@ module yBar() {
|
||||
module applyRailConnector() {
|
||||
apply_n() {
|
||||
mirrorOtherCorner()
|
||||
translate(v = [yBarWidth-(railTotalWidth+railSlotSpacing), railSlotSpacing, yBarHeight-railFootThickness])
|
||||
translate(v = [yBarWidth-(railTotalWidth+railSlotToInnerYEdge), railSlotToXZ, yBarHeight-railFootThickness])
|
||||
railFeetSlot_N();
|
||||
|
||||
children(0);
|
||||
|
||||
@ -7,6 +7,9 @@ _mountX = 12;
|
||||
_mountY = 14;
|
||||
_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
|
||||
_innerXFaceToScrew = 6;
|
||||
_innerYFaceToScrew = 8;
|
||||
|
||||
Reference in New Issue
Block a user