some more cleanup

This commit is contained in:
zhao
2023-08-17 23:54:58 -04:00
parent 63af3ac058
commit 717d323264
3 changed files with 17 additions and 17 deletions

View File

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

View File

@ -2,48 +2,48 @@ include <../../helper/common.scad>
include <../../config/common.scad> include <../../config/common.scad>
include <../sharedVariables.scad> include <../sharedVariables.scad>
_mountX = 12; // Dimensions for the connector block, applied to y-bar
_mountY = 14; yBarXYPlateBlockX = 12;
_mountZ = 10; yBarXYPlateBlockY = 14;
yBarXYPlateBlockZ = 10;
// Needed for yBar to align this connector to its inner Y edge // Needed for y bar to align this connector to its inner Y edge
yBarBasePlateConnectorWidth = _mountX; yBarBasePlateConnectorWidth = yBarXYPlateBlockX;
// 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;
_baseConnRecession = 3; _baseConnRecession = 3;
_baseConnY = 8; _baseConnY = 8;
_baseConnOuterXFaceToScrew = 2; _baseConnOuterXFaceToScrew = 2;
_heatSetX = _mountX - _innerXFaceToScrew; basePlateYBarSlideNutDx = yBarXYPlateBlockX - _innerXFaceToScrew;
_heatSetY = _mountY - _innerYFaceToScrew; basePlateYBarSlideNutDy = yBarXYPlateBlockY - _innerYFaceToScrew;
// TODO refactor this entire file // TODO refactor this entire file
basePlateScrewMountToYBarXZFace = _heatSetY + joinCornerDepth; // Distance to the nearest YBar XZ face basePlateScrewMountToYBarXZFace = basePlateYBarSlideNutDy + joinCornerDepth; // Distance to the nearest YBar XZ face
basePlateScrewMountToYBarYZFace = (yBarWidth+_heatSetX) - yBarBasePlateConnectorWidth; basePlateScrewMountToYBarYZFace = (yBarWidth+basePlateYBarSlideNutDx) - yBarBasePlateConnectorWidth;
module onYBarBasePlateConnectorPositive() { module onYBarBasePlateConnectorPositive() {
translate(v=[0,0,yBarWallThickness]) translate(v=[0,0,yBarWallThickness])
intersection() { intersection() {
cube(size = [_mountX, _mountY, _mountZ]); cube(size = [yBarXYPlateBlockX, yBarXYPlateBlockY, yBarXYPlateBlockZ]);
halfspace(vpos=[0, -1, -1], p=[0, _mountY-1, _mountZ-1]); halfspace(vpos=[0, -1, -1], p=[0, yBarXYPlateBlockY-1, yBarXYPlateBlockZ-1]);
} }
} }
module onYBarBasePlateConnectorNegative() { module onYBarBasePlateConnectorNegative() {
translate(v=[_heatSetX, _heatSetY, 4 + _baseConnRecession]) translate(v=[basePlateYBarSlideNutDx, basePlateYBarSlideNutDy, 4 + _baseConnRecession])
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 = [_heatSetX, _heatSetY, _baseConnRecession+overhangSlack]) translate(v = [basePlateYBarSlideNutDx, basePlateYBarSlideNutDy, _baseConnRecession+overhangSlack])
roundCutSlice(radius = heatSetInsertSlotRadiusSlacked(rackFrameScrewType)+2*radiusXYSlack); roundCutSlice(radius = heatSetInsertSlotRadiusSlacked(rackFrameScrewType)+2*radiusXYSlack);
translate(v = [_heatSetX, _heatSetY, 0]) translate(v = [basePlateYBarSlideNutDx, basePlateYBarSlideNutDy, 0])
roundCutSlice(radius = _baseConnY/2 + 2*radiusXYSlack); roundCutSlice(radius = _baseConnY/2 + 2*radiusXYSlack);
} }

View File

@ -3,7 +3,7 @@ include <./connector/connectors.scad>
*xyPlate(); *xyPlate();
xyPlateConnDx = xBarX + 2*_heatSetX; // X distance between connectors xyPlateConnDx = xBarX + 2*basePlateYBarSlideNutDx; // X distance between connectors
xyPlateConnDy = yBarDepth - 2*basePlateScrewMountToYBarXZFace; // Y distance between connectors xyPlateConnDy = yBarDepth - 2*basePlateScrewMountToYBarXZFace; // Y distance between connectors
module xyPlate() { module xyPlate() {