update variables

This commit is contained in:
zhao
2023-08-18 00:29:41 -04:00
parent 717d323264
commit e7ba539e90
16 changed files with 101 additions and 109 deletions

View File

@ -1,14 +1,14 @@
include <../../helper/common.scad> include <../../helper/common.scad>
include <../../config/common.scad> include <../../config/common.scad>
include <../mainRail.scad> use <../mainRail.scad>
include <../yBar.scad> use <../yBar.scad>
include <../xBar.scad> use <../xBar.scad>
include <../side/magnetModule.scad> use <../side/magnetModule.scad>
include <../side/hingeModule.scad> use <../side/hingeModule.scad>
include <../side/sideWallRight.scad> use <../side/sideWallRight.scad>
include <../side/sideWallLeft.scad> use <../side/sideWallLeft.scad>
include <../stackEnds.scad> use <../stackEnds.scad>
include <../xyPlate.scad> use <../xyPlate.scad>
screwMask = false; screwMask = false;
plasticMask = false; plasticMask = false;

View File

@ -21,7 +21,7 @@ module slideHexNutsIntoYBarXYPlate(at=0) {
module plateHexNut(t) { module plateHexNut(t) {
multmatrix(yBarBasePlateConnectorTrans) multmatrix(yBarBasePlateConnectorTrans)
translate(v=[basePlateYBarSlideNutDx+t, basePlateYBarSlideNutDy, 4 + _baseConnRecession]) // TODO gotta rename these translate(v=[basePlateYBarSlideNutDx+t, basePlateYBarSlideNutDy, 4 + plateBlockBaseConnRecession]) // TODO gotta rename these
hexNut(rackFrameScrewType); hexNut(rackFrameScrewType);
} }

View File

@ -2,28 +2,6 @@ include <../../helper/common.scad>
include <../../config/common.scad> include <../../config/common.scad>
include <../sharedVariables.scad> include <../sharedVariables.scad>
// Dimensions for the connector block, applied to y-bar
yBarXYPlateBlockX = 12;
yBarXYPlateBlockY = 14;
yBarXYPlateBlockZ = 10;
// Needed for y bar to align this connector to its inner Y edge
yBarBasePlateConnectorWidth = yBarXYPlateBlockX;
// x and y faces of the yBarBasePlateMount_P block
_innerXFaceToScrew = 6;
_innerYFaceToScrew = 8;
_baseConnRecession = 3;
_baseConnY = 8;
_baseConnOuterXFaceToScrew = 2;
basePlateYBarSlideNutDx = yBarXYPlateBlockX - _innerXFaceToScrew;
basePlateYBarSlideNutDy = yBarXYPlateBlockY - _innerYFaceToScrew;
// TODO refactor this entire file
basePlateScrewMountToYBarXZFace = basePlateYBarSlideNutDy + joinCornerDepth; // Distance to the nearest YBar XZ face
basePlateScrewMountToYBarYZFace = (yBarWidth+basePlateYBarSlideNutDx) - yBarBasePlateConnectorWidth;
module onYBarBasePlateConnectorPositive() { module onYBarBasePlateConnectorPositive() {
translate(v=[0,0,yBarWallThickness]) translate(v=[0,0,yBarWallThickness])
intersection() { intersection() {
@ -34,17 +12,17 @@ module onYBarBasePlateConnectorPositive() {
module onYBarBasePlateConnectorNegative() { module onYBarBasePlateConnectorNegative() {
translate(v=[basePlateYBarSlideNutDx, basePlateYBarSlideNutDy, 4 + _baseConnRecession]) translate(v=[basePlateYBarSlideNutDx, basePlateYBarSlideNutDy, 4 + plateBlockBaseConnRecession])
mirror(v=[0,0,1]) mirror(v=[0,0,1])
hexNutPocket_N("m3", openSide=false, backSpace=5, bridgeBack=true); hexNutPocket_N("m3", openSide=false, backSpace=5, bridgeBack=true);
hull() { hull() {
// This has always been a pretty annoying to fit part. Increasing slack to 2*radiusXYSlack to compensate. TODO fix // This has always been a pretty annoying to fit part. Increasing slack to 2*radiusXYSlack to compensate. TODO fix
translate(v = [basePlateYBarSlideNutDx, basePlateYBarSlideNutDy, _baseConnRecession+overhangSlack]) translate(v = [basePlateYBarSlideNutDx, basePlateYBarSlideNutDy, plateBlockBaseConnRecession+overhangSlack])
roundCutSlice(radius = heatSetInsertSlotRadiusSlacked(rackFrameScrewType)+2*radiusXYSlack); roundCutSlice(radius = heatSetInsertSlotRadiusSlacked(rackFrameScrewType)+2*radiusXYSlack);
translate(v = [basePlateYBarSlideNutDx, basePlateYBarSlideNutDy, 0]) translate(v = [basePlateYBarSlideNutDx, basePlateYBarSlideNutDy, 0])
roundCutSlice(radius = _baseConnY/2 + 2*radiusXYSlack); roundCutSlice(radius = plateBlockBaseConnY/2 + 2*radiusXYSlack);
} }
} }

View File

@ -7,11 +7,7 @@ include <./mainRailYBarConnectors.scad>
include <./sideModuleYBarConnectors.scad> include <./sideModuleYBarConnectors.scad>
include <./stackYBarConnectors.scad> include <./stackYBarConnectors.scad>
include <./basePlateYBarConnectors.scad> include <./basePlateYBarConnectors.scad>
include <./transformations.scad>
mirror(v=[1,0,0])
*connectorDebug(on="xBar", to="yBar", trans=identity);
*connectorDebug(on="yBar", to="xBar", trans=identity);
// Default is to apply the positive first // Default is to apply the positive first
module applyConnector(on, to, trans) { module applyConnector(on, to, trans) {
@ -27,7 +23,6 @@ module applyConnector(on, to, trans) {
} }
} }
module connectorDebug(on, to, trans) { module connectorDebug(on, to, trans) {
color([0,1,0]) color([0,1,0])
@ -37,10 +32,8 @@ module connectorDebug(on, to, trans) {
color([1,0,0]) color([1,0,0])
multmatrix(trans) multmatrix(trans)
connectorNegative(on=on, to=to); connectorNegative(on=on, to=to);
} }
module applyConnectorDebug(on,to,trans) { module applyConnectorDebug(on,to,trans) {
echo("on: ", on, "-- to:", to); echo("on: ", on, "-- to:", to);
@ -83,5 +76,4 @@ module connectorNegative(on, to) {
} else if (on == "mainRail" && to == "yBar") { } else if (on == "mainRail" && to == "yBar") {
onMainRailYBarConnectorNegative(); onMainRailYBarConnectorNegative();
} }
} }

View File

@ -3,22 +3,6 @@ include <../../config/common.scad>
include <../sharedVariables.scad> include <../sharedVariables.scad>
connectorYEdgeToYBarYEdge = 5;
connectorXEdgeToYBarXEdge = 5;
connectorRectWidth = 10;
connectorRectDepth = 10;
connectorTotalHeight = 10;
connectorSocketMagnetExtrudeHeight = 1;
connectorTaperStartHeight = 3;
connectorTopR = 3;
connectorRectPlugSlack = -0.2;
connectorRectSocketSlack = 0.2;
connectorBottomToScrew = 6;
module stackConnectorBase(rectSlack, topSlack=0.0) { module stackConnectorBase(rectSlack, topSlack=0.0) {
wSlacked = connectorRectWidth + rectSlack; wSlacked = connectorRectWidth + rectSlack;

View File

@ -0,0 +1,34 @@
include <../../helper/common.scad>
include <../../config/common.scad>
include <../sharedVariables.scad>
// Y-bar
yBarMirrorOtherCornerTrans = translate(v = [0, yBarDepth, 0]) * mirror(v = [0, 1, 0]);
yBarBasePlateConnectorTrans = translate(v = [yBarWidth-yBarBasePlateConnectorWidth, joinCornerDepth, 0]);
yBarStackConnectorTrans = translate(v = [connectorXEdgeToYBarXEdge, connectorYEdgeToYBarYEdge, 0]);
yBarSideModuleConnectorTrans = translate(v = [
yBarWidth-(railTotalWidth+railSlotToInnerYEdge+railSlotToSideWallSlot+sideWallConnectorSlotWidth),
sideWallSlotToXZ,
yBarHeight
]);
yBarMainRailConnectorTrans = translate(v = [
yBarWidth-(railTotalWidth+railSlotToInnerYEdge),
railSlotToXZ,
yBarHeight-railFootThickness
]);
yBarXBarConnectorTrans = translate(v = [yBarWidth+eps, 0, 0]);
// X-bar
xBarYBarConnectorTrans = rotate(a=[0,0,-90]);
xBarMirrorOtherCornerTrans = translate(v = [0, xBarX, 0]) * mirror(v = [0, 1, 0]);
// Main rail
mirrorMainRailOtherSideTrans = translate(v = [0, 0, railTotalHeight]) * mirror(v=[0,0,1]);

View File

@ -67,9 +67,4 @@ module mainRail() {
children(0); children(0);
} }
} }
} }
// used in assembly
mirrorMainRailOtherSideTrans = translate(v = [0, 0, railTotalHeight]) * mirror(v=[0,0,1]);

View File

@ -1,4 +1,4 @@
include <../stackEnds.scad> use <../stackEnds.scad>
// Oriented for 3d printing. No supports required, but it's reccommended to print this with a brim. // Oriented for 3d printing. No supports required, but it's reccommended to print this with a brim.
// Adding a brim will require some post-processing in the form of trimming the bottom. // Adding a brim will require some post-processing in the form of trimming the bottom.

View File

@ -1,4 +1,4 @@
include <../stackEnds.scad> use <../stackEnds.scad>
// Oriented for 3d printing. No supports required. // Oriented for 3d printing. No supports required.
stackConnectorBottom(); stackConnectorBottom();

View File

@ -29,15 +29,13 @@ frontFaceWidth = railScrewHoleToInnerEdge + railScrewHoleToOuterEdge;
railTotalWidth = frontFaceWidth; railTotalWidth = frontFaceWidth;
railTotalDepth = railFrontThickness+sideSupportDepth; railTotalDepth = railFrontThickness+sideSupportDepth;
// Side Wall variables, cannot put in sideWallVariables due to dependency by ybar
// Side Wall variables:
sideWallThickness = 2.5; sideWallThickness = 2.5;
sideWallSlotToOuterYEdge = 3; sideWallSlotToOuterYEdge = 3;
sideWallSlotToOuterXEdge = 3; // TODO rename to variables found in ybar; sideWallSlotToOuterXEdge = 3; // TODO rename to variables found in ybar
sideWallConnectorSlotWidth = 7; sideWallConnectorSlotWidth = 7;
// Y Bar variables: // Y Bar variables:
railSlotToXZ = 3; railSlotToXZ = 3;
sideWallSlotToXZ = 3; sideWallSlotToXZ = 3;
@ -66,5 +64,48 @@ xBarRoundness = baseRoundness;
rackTotalWidth = 2*yBarWidth + xBarX; rackTotalWidth = 2*yBarWidth + xBarX;
rackTotalDepth = yBarDepth; rackTotalDepth = yBarDepth;
// Dimensions for the connector block, applied to y-bar
yBarXYPlateBlockX = 12;
yBarXYPlateBlockY = 14;
yBarXYPlateBlockZ = 10;
// Needed for y bar to align this connector to its inner Y edge
yBarBasePlateConnectorWidth = yBarXYPlateBlockX;
// x and y faces of the yBarBasePlateMount_P block
plateBlockInnerXFaceToScrew = 6;
plateBlockInnerYFaceToScrew = 8;
plateBlockBaseConnRecession = 3;
plateBlockBaseConnY = 8;
basePlateYBarSlideNutDx = yBarXYPlateBlockX - plateBlockInnerXFaceToScrew;
basePlateYBarSlideNutDy = yBarXYPlateBlockY - plateBlockInnerYFaceToScrew;
basePlateScrewMountToYBarXZFace = basePlateYBarSlideNutDy + joinCornerDepth; // Distance to the nearest YBar XZ face
basePlateScrewMountToYBarYZFace = (yBarWidth+basePlateYBarSlideNutDx) - yBarBasePlateConnectorWidth;
xyPlateConnDx = xBarX + 2*basePlateYBarSlideNutDx; // X distance between connectors
xyPlateConnDy = yBarDepth - 2*basePlateScrewMountToYBarXZFace; // Y distance between connectors
plateGap = 1; // distance between edge of xy plate and other parts plateGap = 1; // distance between edge of xy plate and other parts
assert(plateGap >= xySlack); assert(plateGap >= xySlack);
connectorYEdgeToYBarYEdge = 5;
connectorXEdgeToYBarXEdge = 5;
connectorRectWidth = 10;
connectorRectDepth = 10;
connectorTotalHeight = 10;
connectorSocketMagnetExtrudeHeight = 1;
connectorTaperStartHeight = 3;
connectorTopR = 3;
connectorRectPlugSlack = -0.2;
connectorRectSocketSlack = 0.2;
connectorBottomToScrew = 6;
// Distance from midpoint of stack connectors to each other
stackConnectorDx = rackTotalWidth - 2*(connectorXEdgeToYBarXEdge + connectorRectWidth/2);
stackConnectorDy = rackTotalDepth - 2*(connectorYEdgeToYBarYEdge + connectorRectDepth/2);
stackConnectorDualSpacing = 0.5;

View File

@ -6,9 +6,6 @@ include <./sideWallVariables.scad>
translate(v=[10,-5,-(2+sideWallZHingeTotalClearance)]) translate(v=[10,-5,-(2+sideWallZHingeTotalClearance)])
*magnetModule(); *magnetModule();
magnetModuleMagnetMountDy = magnetMountToYBarFront - sideWallSlotToXZ;
magnetModuleMagnetMountDz = magnetMountToYBarTop + sideWallConnLugDepression;
module magnetModule() { module magnetModule() {
applyYBarScrewMount() applyYBarScrewMount()

View File

@ -37,3 +37,6 @@ sideWallDefaultVerticalBracingToZEdge = 30;
sideWallDefaultVentilationToZEdge = 40; sideWallDefaultVentilationToZEdge = 40;
sideWallDefaultVentilationToYEdge = 25; sideWallDefaultVentilationToYEdge = 25;
sideWallDefaultVentilationWidth = 6; sideWallDefaultVentilationWidth = 6;
magnetModuleMagnetMountDy = magnetMountToYBarFront - sideWallSlotToXZ;
magnetModuleMagnetMountDz = magnetMountToYBarTop + sideWallConnLugDepression;

View File

@ -2,11 +2,6 @@ include <../helper/common.scad>
include <./sharedVariables.scad> include <./sharedVariables.scad>
include <./connector/connectors.scad> include <./connector/connectors.scad>
// Distance from midpoint of stack connectors to each other
stackConnectorDx = rackTotalWidth - 2*(connectorXEdgeToYBarXEdge + connectorRectWidth/2);
stackConnectorDy = rackTotalDepth - 2*(connectorYEdgeToYBarYEdge + connectorRectDepth/2);
stackConnectorDualSpacing = 0.5;
module rackJoiner() { module rackJoiner() {
translate(v=[0,0,stackConnectorDualSpacing/2]) translate(v=[0,0,stackConnectorDualSpacing/2])
stackConnectorPlug(); stackConnectorPlug();

View File

@ -45,7 +45,3 @@ module xBar() {
} }
} }
xBarYBarConnectorTrans = rotate(a=[0,0,-90]);
xBarMirrorOtherCornerTrans = translate(v = [0, xBarX, 0]) * mirror(v = [0, 1, 0]);

View File

@ -3,9 +3,6 @@ include <./connector/connectors.scad>
*xyPlate(); *xyPlate();
xyPlateConnDx = xBarX + 2*basePlateYBarSlideNutDx; // X distance between connectors
xyPlateConnDy = yBarDepth - 2*basePlateScrewMountToYBarXZFace; // Y distance between connectors
module xyPlate() { module xyPlate() {
translate(v=-[connPosX,connPosY,0]) // center around one of the YBarConnector holes translate(v=-[connPosX,connPosY,0]) // center around one of the YBarConnector holes
@ -87,9 +84,9 @@ module xyPlate() {
difference() { difference() {
hull() { hull() {
// TODO: we don't need to heatset insert values anymore // TODO: we don't need to heatset insert values anymore
translate(v=[0,0,_baseConnRecession]) translate(v=[0,0,plateBlockBaseConnRecession])
roundCutSlice(radius = heatSetInsertSlotRadiusSlacked(rackFrameScrewType), length=5); roundCutSlice(radius = heatSetInsertSlotRadiusSlacked(rackFrameScrewType), length=5);
roundCutSlice(radius = _baseConnY/2, length=15); roundCutSlice(radius = plateBlockBaseConnY/2, length=15);
} }
mirror(v=[0,0,1]) mirror(v=[0,0,1])
counterSunkHead_N(rackFrameScrewType, headExtension = eps, screwExtension = inf10); counterSunkHead_N(rackFrameScrewType, headExtension = eps, screwExtension = inf10);

View File

@ -34,23 +34,3 @@ module yBar() {
children(0); children(0);
} }
} }
yBarMirrorOtherCornerTrans = translate(v = [0, yBarDepth, 0]) * mirror(v = [0, 1, 0]);
yBarBasePlateConnectorTrans = translate(v = [yBarWidth-yBarBasePlateConnectorWidth, joinCornerDepth, 0]);
yBarStackConnectorTrans = translate(v = [connectorXEdgeToYBarXEdge, connectorYEdgeToYBarYEdge, 0]);
yBarSideModuleConnectorTrans = translate(v = [
yBarWidth-(railTotalWidth+railSlotToInnerYEdge+railSlotToSideWallSlot+sideWallConnectorSlotWidth),
sideWallSlotToXZ,
yBarHeight
]);
yBarMainRailConnectorTrans = translate(v = [
yBarWidth-(railTotalWidth+railSlotToInnerYEdge),
railSlotToXZ,
yBarHeight-railFootThickness
]);
yBarXBarConnectorTrans = translate(v = [yBarWidth+eps, 0, 0]);