finish instructions

This commit is contained in:
zhao
2023-05-12 14:06:24 -04:00
parent 9a43da5eca
commit 2f379fc744
6 changed files with 375 additions and 246 deletions

View File

@ -23,3 +23,5 @@ module mirror4XY(p, dx, dy) {
translate(v=[px+dx, py+dy, 0]) translate(v=[px+dx, py+dy, 0])
children(0); children(0);
} }
function lerp(a, b, t) = (b * t + a * (1 - t));

View File

@ -84,6 +84,17 @@ module counterSunkHead_N(screwType, screwExtension=0, headExtension=0) {
} }
} }
module hexNut(screwType) {
if (screwType == "m3") {
translate(v=[0,0,-m3HexNutThickness/2])
difference() {
cylinder(r=m3HexNutWidthAcrossCorners/2, h=m3HexNutThickness, $fn=6);
cylinder(r=m3Radius,h=inf10);
}
} else {
error("Unsupported screw type");
}
}
module hexNutPocket_N(screwType, openSide=true) { module hexNutPocket_N(screwType, openSide=true) {
if (screwType == "m3") { if (screwType == "m3") {

View File

@ -7,11 +7,325 @@ include <./side/magnetModule.scad>
include <./side/hingeModule.scad> include <./side/hingeModule.scad>
include <./side/sideWallRight.scad> include <./side/sideWallRight.scad>
include <./side/sideWallLeft.scad> include <./side/sideWallLeft.scad>
include <./stackEnds.scad>
include <./xyPlate.scad>
assemblyInstructions(); assemblyInstructions();
module assemblyInstructions () { module assemblyInstructions () {
// Instruction List (in order)
// TODO: add steps to glue magnets and add heatset inserts
// attachXBarWithYBar(at=$t);
// screwXBarAndYBar(at=$t);
// attachSideConnectorModulesToYBars(at=$t);
// connectXYTrayWithMainRails(at=$t);
// insertDowelsIntoSideWall(at=$t);
// propUpBottomXYTraywithSideWalls(at=$t);
// attachXYTrays(at=$t);
// slideHexNutToFeet(at=$t);
// insertFeet(at=$t);
// screwFeet(at=$t);
// attachXYPlates(at=$t);
// end instructions
final();
module attachXBarWithYBar(at=0) {
t = lerp(a=20, b=0, t=at);
// assemble x-y bar trays
multmatrix(translate(v = [0, 0, t]))
yBar();
multmatrix(translate(v = [0, 0, t])*xBarSpaceToYBarSpace*xBarMirrorOtherCornerTrans*yBarSpaceToXBarSpace)
yBar();
multmatrix(xBarSpaceToYBarSpace)
xBar();
multmatrix(yBarMirrorOtherCornerTrans*xBarSpaceToYBarSpace)
xBar();
}
module screwXBarAndYBar(at=0) {
screwExtension = lerp(a=15, b=0, t=at);
// in x bar space
function xBarYBarScrewTrans(extension) =
translate(v=[27,xBarSideThickness + extension,6]) * rotate(a=[270,0,0]);
// screw to connect x and y bars
yBar();
multmatrix(xBarSpaceToYBarSpace*xBarMirrorOtherCornerTrans*yBarSpaceToXBarSpace)
yBar();
multmatrix(xBarSpaceToYBarSpace)
union() {
xBar();
multmatrix(xBarYBarScrewTrans(screwExtension))
caseScrewB();
multmatrix(xBarMirrorOtherCornerTrans * xBarYBarScrewTrans(screwExtension))
caseScrewB();
}
multmatrix(yBarMirrorOtherCornerTrans*xBarSpaceToYBarSpace)
union() {
xBar();
multmatrix(xBarYBarScrewTrans(screwExtension))
caseScrewB();
multmatrix(xBarMirrorOtherCornerTrans * xBarYBarScrewTrans(screwExtension))
caseScrewB();
}
}
module attachSideConnectorModulesToYBars(at=0) {
elevation = lerp(a=8, b=0, t=at);
// side module to front corner ybar
function sideModuleTrans(t=0) =
translate(v=[sideWallConnW,0,t-sideWallConnLugDepression])
* yBarSideModuleConnectorTrans
* mirror(v=[1,0,0]); // mirror for magnetModule
screwXBarAndYBar(at=1);
multmatrix(sideModuleTrans(elevation))
union() {
magnetModule();
translate(v=[yBarScrewHoleToOuterYEdge,yBarScrewHoleToFrontXEdge,sideWallConnLugDepression + 2*elevation])
caseScrewA();
}
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * sideModuleTrans(elevation))
union() {
magnetModule();
translate(v=[yBarScrewHoleToOuterYEdge,yBarScrewHoleToFrontXEdge,sideWallConnLugDepression + 2*elevation])
caseScrewA();
}
multmatrix(yBarMirrorOtherCornerTrans * sideModuleTrans(elevation))
union() {
hingeModule();
translate(v=[yBarScrewHoleToOuterYEdge,yBarScrewHoleToFrontXEdge,sideWallConnLugDepression + 2*elevation])
caseScrewA();
}
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * yBarMirrorOtherCornerTrans * sideModuleTrans(elevation))
union() {
hingeModule();
translate(v=[yBarScrewHoleToOuterYEdge,yBarScrewHoleToFrontXEdge,sideWallConnLugDepression + 2*elevation])
caseScrewA();
}
}
module connectXYTrayWithMainRails(at=0) {
elevation = lerp(a=5, b=0, t=at);
attachSideConnectorModulesToYBars(at=1);
function mainRailTrans(elevation) = translate(v=[0,0,elevation]) * yBarMainRailConnectorTrans;
module railAndScrew(elevation) {
mainRail();
translate(v=[railSideMountThickness + 5, railFrontThickness + 4,railFootThickness + 2*elevation])
caseScrewA();
}
multmatrix(mainRailTrans(elevation=elevation))
railAndScrew(elevation=elevation);
multmatrix(yBarMirrorOtherCornerTrans * mainRailTrans(elevation=elevation))
railAndScrew(elevation=elevation);
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * mainRailTrans(elevation=elevation))
railAndScrew(elevation=elevation);
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * yBarMirrorOtherCornerTrans * mainRailTrans(elevation=elevation))
railAndScrew(elevation=elevation);
}
module insertDowelsIntoSideWall(at=0) {
t = lerp(a=10, b=0, t=at);
hingeHoleH = hingePoleH-sideWallConnLugDepression;
sideWallLeft();
translate(v=[hingePoleDx,hingePoleDy, (sideWallZ-hingeHoleH) + t])
hingeDowel();
translate(v=[hingePoleDx,hingePoleDy, (hingeHoleH-hingePoleH)-t])
hingeDowel();
}
module propUpBottomXYTraywithSideWalls(at=0, r=0) {
t = lerp(a=10,b=0,t=at);
function sideWallToYBarTrans(t=0,r=0) =
yBarMirrorOtherCornerTrans *
yBarSideModuleConnectorTrans * // bring to y bar space
mirror(v=[0,1,0]) *
translate(v=[0,0,t]) *
translate(v=[sideWallConnW/2.0, -hingePoleR, sideWallZHingeTotalClearance]) * // bring to side module space
rotate(a=[0,0,-r]) *
translate(v=[-hingePoleDx, -hingePoleDy, 0]);
connectXYTrayWithMainRails(at=1);
multmatrix(sideWallToYBarTrans(t=t, r=r))
insertDowelsIntoSideWall(at=1);
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * sideWallToYBarTrans(t=t,r=r))
insertDowelsIntoSideWall(at=1);
}
module attachXYTrays(at=0) {
t = lerp(a=10,b=0,t=at);
module singleScrew(t=0) {
translate(v = [railSideMountThickness+5, railFrontThickness+4, railFootThickness + 2*t])
caseScrewA();
}
translate(v=[0,0,t])
multmatrix(upperXYTrayTrans) {
attachSideConnectorModulesToYBars(at=1);
multmatrix(yBarMainRailConnectorTrans)
singleScrew(t=t);
multmatrix(yBarMirrorOtherCornerTrans * yBarMainRailConnectorTrans)
singleScrew(t=t);
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * yBarMirrorOtherCornerTrans * yBarMainRailConnectorTrans)
singleScrew(t=t);
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * yBarMirrorOtherCornerTrans * yBarMirrorOtherCornerTrans * yBarMainRailConnectorTrans)
singleScrew(t=t);
}
propUpBottomXYTraywithSideWalls(at=1,r=0);
}
module slideHexNutToFeet(at=0) {
t = lerp(a=8, b=0, t=at);
module slideNut() {
rotate(a = [0, 0, 90])
rotate(a = [90, 0, 0])
color([0, 1, 1])
hexNut(rackFrameScrewType);
}
translate(v=[0,t,connectorBottomToScrew + 0.5]) // where does this come from again? slack?
slideNut();
translate(v=[stackConnectorDx,t,connectorBottomToScrew + 0.5]) // where does this come from again? slack?
slideNut();
stackConnectorFeet();
}
module insertFeet(at=0) {
t = lerp(a=10,b=0,t=at);
attachXYTrays(at=1);
multmatrix(feetToYBarTrans(t=t))
slideHexNutToFeet(at=1);
multmatrix(yBarMirrorOtherCornerTrans * feetToYBarTrans(t=t))
slideHexNutToFeet(at=1);
}
module screwFeet(at=0) {
t = lerp(a=20, b=0, t=at);
function screwTrans(t=0) = translate(v=[-t - 9,0,connectorBottomToScrew]) * rotate(a=[0,-90,0]);
mirrorOtherFeetStackConnectorTrans = translate(v=[stackConnectorDx,0,0]) * mirror(v=[1,0,0]);
module screwToFeetModule() {
multmatrix(feetToYBarTrans(t = 0)*screwTrans(t = t))
caseScrewB(); // we might want a longer screw?
multmatrix(feetToYBarTrans(t = 0)*mirrorOtherFeetStackConnectorTrans*screwTrans(t = t))
caseScrewB();
}
screwToFeetModule();
multmatrix(yBarMirrorOtherCornerTrans)
screwToFeetModule();
insertFeet(at=1);
}
module attachXYPlates(at=0) {
t = lerp(a=10,b=0,t=at);
// TODO fix xyPlate transformations
function xyPlateToYBarTrans() = translate(v=[6,6,0]) * yBarBasePlateConnectorTrans;
screwFeet(at=1);
multmatrix(xyPlateToYBarTrans())
xyPlateWithScrews(t=t);
multmatrix(upperXYTrayTrans * xyPlateToYBarTrans())
xyPlateWithScrews(t=t);
module xyPlateWithScrews(t=0) {
module screw(t=0) {
translate(v=[0,0,-t])
mirror(v=[0,0,1])
caseScrewA();
}
translate(v=[0,0,-t])
xyPlate();
screw(t=2*t);
translate(v=[xyPlateConnDx, 0,0])
screw(t=2*t);
translate(v=[0, xyPlateConnDy,0])
screw(t=2*t);
translate(v=[xyPlateConnDx, xyPlateConnDy,0])
screw(t=2*t);
}
}
module final() {
attachXYPlates(at=1);
}
xBarSpaceToYBarSpace = xBarSpaceToYBarSpace =
yBarXBarConnectorTrans * yBarXBarConnectorTrans *
xBarConnectorToYBarConnectorTrans * xBarConnectorToYBarConnectorTrans *
@ -22,18 +336,15 @@ module assemblyInstructions () {
yBarConnectorToXBarConnectorTrans * yBarConnectorToXBarConnectorTrans *
inv4x4(yBarXBarConnectorTrans); inv4x4(yBarXBarConnectorTrans);
module xyTray() { upperXYTrayTrans =
yBar(); yBarMainRailConnectorTrans *
mirrorMainRailOtherSideTrans *
inv4x4(yBarMainRailConnectorTrans);
multmatrix(xBarSpaceToYBarSpace*xBarMirrorOtherCornerTrans*yBarSpaceToXBarSpace) function feetToYBarTrans(t=0) =
yBar(); translate(v=[connectorRectWidth/2,connectorRectDepth/2,-t]) *
yBarStackConnectorTrans *
multmatrix(xBarSpaceToYBarSpace) mirror(v=[0,1,0]);
xBar();
multmatrix(yBarMirrorOtherCornerTrans*xBarSpaceToYBarSpace)
xBar();
}
module caseScrewA() { module caseScrewA() {
@ -72,202 +383,4 @@ module assemblyInstructions () {
} }
} }
module attachXBarWithYBar() {
// assemble x-y bar trays
multmatrix(translate(v = [0, 0, 20]))
yBar();
multmatrix(translate(v = [0, 0, 20])*xBarSpaceToYBarSpace*xBarMirrorOtherCornerTrans*yBarSpaceToXBarSpace)
yBar();
multmatrix(xBarSpaceToYBarSpace)
xBar();
multmatrix(yBarMirrorOtherCornerTrans*xBarSpaceToYBarSpace)
xBar();
}
module screwXBarAndYBar(screwExtension=13) {
// in x bar space
function xBarYBarScrewTrans(extension) =
translate(v=[27,xBarSideThickness + extension,6]) * rotate(a=[270,0,0]);
// screw to connect x and y bars
yBar();
multmatrix(xBarSpaceToYBarSpace*xBarMirrorOtherCornerTrans*yBarSpaceToXBarSpace)
yBar();
multmatrix(xBarSpaceToYBarSpace)
union() {
xBar();
multmatrix(xBarYBarScrewTrans(screwExtension))
caseScrewB();
multmatrix(xBarMirrorOtherCornerTrans * xBarYBarScrewTrans(screwExtension))
caseScrewB();
}
multmatrix(yBarMirrorOtherCornerTrans*xBarSpaceToYBarSpace)
union() {
xBar();
multmatrix(xBarYBarScrewTrans(screwExtension))
caseScrewB();
multmatrix(xBarMirrorOtherCornerTrans * xBarYBarScrewTrans(screwExtension))
caseScrewB();
}
}
module attachSideConnectorModulesToYBars(elevation=0) {
// attach side connector modules to y bars
// side module to front corner ybar
function sideModuleTrans(t=0) =
translate(v=[sideWallConnW,0,t-sideWallConnLugDepression])
* yBarSideModuleConnectorTrans
* mirror(v=[1,0,0]); // mirror for magnetModule
screwXBarAndYBar(screwExtension=0);
multmatrix(sideModuleTrans(elevation))
union() {
magnetModule();
translate(v=[yBarScrewHoleToOuterYEdge,yBarScrewHoleToFrontXEdge,sideWallConnLugDepression + 2*elevation])
caseScrewA();
}
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * sideModuleTrans(elevation))
union() {
magnetModule();
translate(v=[yBarScrewHoleToOuterYEdge,yBarScrewHoleToFrontXEdge,sideWallConnLugDepression + 2*elevation])
caseScrewA();
}
multmatrix(yBarMirrorOtherCornerTrans * sideModuleTrans(elevation))
union() {
hingeModule();
translate(v=[yBarScrewHoleToOuterYEdge,yBarScrewHoleToFrontXEdge,sideWallConnLugDepression + 2*elevation])
caseScrewA();
}
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * yBarMirrorOtherCornerTrans * sideModuleTrans(elevation))
union() {
hingeModule();
translate(v=[yBarScrewHoleToOuterYEdge,yBarScrewHoleToFrontXEdge,sideWallConnLugDepression + 2*elevation])
caseScrewA();
}
}
module connectXYTrayWithMainRails(elevation=5) {
attachSideConnectorModulesToYBars();
function mainRailTrans(elevation) = translate(v=[0,0,elevation]) * yBarMainRailConnectorTrans;
module railAndScrew(elevation) {
mainRail();
translate(v=[railSideMountThickness + 5, railFrontThickness + 4,railFootThickness + 2*elevation])
caseScrewA();
}
multmatrix(mainRailTrans(elevation=elevation))
railAndScrew(elevation=elevation);
multmatrix(yBarMirrorOtherCornerTrans * mainRailTrans(elevation=elevation))
railAndScrew(elevation=elevation);
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * mainRailTrans(elevation=elevation))
railAndScrew(elevation=elevation);
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * yBarMirrorOtherCornerTrans * mainRailTrans(elevation=elevation))
railAndScrew(elevation=elevation);
}
module insertDowelsIntoSideWall(t=10) {
hingeHoleH = hingePoleH-sideWallConnLugDepression;
sideWallLeft();
translate(v=[hingePoleDx,hingePoleDy, (sideWallZ-hingeHoleH) + t])
hingeDowel();
translate(v=[hingePoleDx,hingePoleDy, (hingeHoleH-hingePoleH)-t])
hingeDowel();
}
//propUpBottomXYTraywithSideWalls(t=0,r=0);
module propUpBottomXYTraywithSideWalls(t=0, r=0) {
function sideWallToYBarTrans(t=0,r=0) =
yBarMirrorOtherCornerTrans *
yBarSideModuleConnectorTrans * // bring to y bar space
mirror(v=[0,1,0]) *
translate(v=[0,0,t]) *
translate(v=[sideWallConnW/2.0, -hingePoleR, sideWallZHingeTotalClearance]) * // bring to side module space
rotate(a=[0,0,-r]) *
translate(v=[-hingePoleDx, -hingePoleDy, 0]);
connectXYTrayWithMainRails(elevation=0);
multmatrix(sideWallToYBarTrans(t=t, r=r))
insertDowelsIntoSideWall(t=0);
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * sideWallToYBarTrans(t=t,r=r))
insertDowelsIntoSideWall(t=0);
}
attachXYTrays(t=0);
module attachXYTrays(t=0) {
function upperXYTrayTrans(t=0) = yBarMainRailConnectorTrans * mirrorMainRailOtherSideTrans * inv4x4(yBarMainRailConnectorTrans);
module singleScrew(t=0) {
translate(v = [railSideMountThickness+5, railFrontThickness+4, railFootThickness + 2*t])
caseScrewA();
}
translate(v=[0,0,t])
multmatrix(upperXYTrayTrans(t=0)) {
attachSideConnectorModulesToYBars();
multmatrix(yBarMainRailConnectorTrans)
singleScrew(t=t);
multmatrix(yBarMirrorOtherCornerTrans * yBarMainRailConnectorTrans)
singleScrew(t=t);
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * yBarMirrorOtherCornerTrans * yBarMainRailConnectorTrans)
singleScrew(t=t);
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * yBarMirrorOtherCornerTrans * yBarMirrorOtherCornerTrans * yBarMainRailConnectorTrans)
singleScrew(t=t);
}
propUpBottomXYTraywithSideWalls(t=0,r=10);
}
module attachFeet() {
}
module attachTops() {
}
} }

View File

@ -53,7 +53,7 @@ module onYBarBasePlateConnectorNegative() {
roundCutSlice(radius = _baseConnY/2 + radiusXYSlack); roundCutSlice(radius = _baseConnY/2 + radiusXYSlack);
} }
}
module roundCutSlice(radius, length=inf50) { module roundCutSlice(radius, length=inf50) {
@ -64,5 +64,3 @@ module onYBarBasePlateConnectorNegative() {
cube(size = [eps, radius*2, eps]); cube(size = [eps, radius*2, eps]);
} }
} }
}

View File

@ -1,4 +1,3 @@
include <./stackConnector.scad>
include <../helper/halfspace.scad> include <../helper/halfspace.scad>
include <../helper/slack.scad> include <../helper/slack.scad>
include <./sharedVariables.scad> include <./sharedVariables.scad>
@ -7,8 +6,7 @@ include <./sharedVariables.scad>
stackConnectorDx = rackTotalWidth - 2*(connectorXEdgeToYBarXEdge + connectorRectWidth/2); stackConnectorDx = rackTotalWidth - 2*(connectorXEdgeToYBarXEdge + connectorRectWidth/2);
stackConnectorDy = rackTotalDepth - 2*(connectorYEdgeToYBarYEdge + connectorRectDepth/2); stackConnectorDy = rackTotalDepth - 2*(connectorYEdgeToYBarYEdge + connectorRectDepth/2);
*stackConnectorFeet();
stackConnectorFeet();
module stackConnectorFeet() { module stackConnectorFeet() {
@ -16,7 +14,8 @@ module stackConnectorFeet() {
height = 18; height = 18;
protrusionAngle = 30; protrusionAngle = 30;
translate(v = [stackConnectorDx/2, 0, 2])
mirror(v=[0,0,1]) {
// stack connectors along rack x axis // stack connectors along rack x axis
translate(v = [-(stackConnectorDx+connectorRectWidth)/2, -connectorRectDepth/2, 2-overhangSlack]) translate(v = [-(stackConnectorDx+connectorRectWidth)/2, -connectorRectDepth/2, 2-overhangSlack])
mirror(v = [0, 0, 1]) { mirror(v = [0, 0, 1]) {
@ -26,6 +25,7 @@ module stackConnectorFeet() {
stackConnectorBottom(); stackConnectorBottom();
} }
band(); band();
}
module band() { module band() {
@ -40,9 +40,9 @@ module stackConnectorFeet() {
} }
halfspace(vpos=[0,1,-0.8],p=[0,-8,2]); halfspace(vpos=[0,1,-0.8],p=[0,-8,2]);
halfspace(vpos=[0,-1,0.75],p=[0,5,2]); halfspace(vpos=[0,-1,0.75],p=[0,6,2]);
halfspace(vpos=[0,-1,0],p=[0,14,2]); halfspace(vpos=[0,-1,0],p=[0,16,2]);
halfspace(vpos=[0,1,0],p=[0,-5,2]); halfspace(vpos=[0,1,0],p=[0,-5,2]);
} }

View File

@ -1,14 +1,26 @@
include <../helper/slack.scad> include <../helper/slack.scad>
include <./yBar.scad> include <./yBar.scad>
include <./xBar.scad> include <./xBar.scad>
include <./connector/connectors.scad>
xyPlate(); *xyPlate();
xyPlateConnDx = xBarX + 2*_heatSetX; // 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
applyYBarConnectors() applyYBarConnectors()
plateBody(); plateBody();
connYBarCornerDx = yBarWidth; // distance from a plate body corner and the nearest yBar corner
connYBarCornerDy = xBarY; // distance from a plate body corner and the nearest yBar corner
connPosX = basePlateScrewMountToYBarYZFace - connYBarCornerDx; // distance between plateBody corner at (0,0,0) and the related corner
connPosY = basePlateScrewMountToYBarXZFace - connYBarCornerDy;
module plateBody() { module plateBody() {
plateBodyX = xBarX - xySlack; plateBodyX = xBarX - xySlack;
plateBodyY = (yBarDepth - 2*xBarY) - xySlack; plateBodyY = (yBarDepth - 2*xBarY) - xySlack;
@ -20,30 +32,23 @@ module xyPlate() {
module applyYBarConnectors() { module applyYBarConnectors() {
// TODO rename _heatSetX to something more indicative of yBarBasePlateConnector // TODO ren
connDx = xBarX + 2*_heatSetX; // X distance between connectors echo("connPosX", connPosX);
connDy = yBarDepth - 2*basePlateScrewMountToYBarXZFace; // Y distance between connectors echo("connPosY", connPosY);
connYBarCornerDx = yBarWidth; // distance from a plate body corner and the nearest yBar corner
connYBarCornerDy = xBarY; // distance from a plate body corner and the nearest yBar corner
connPosX = basePlateScrewMountToYBarYZFace - connYBarCornerDx; // distance between plateBody corner at (0,0,0) and the related corner
connPosY = basePlateScrewMountToYBarXZFace - connYBarCornerDy;
apply_p() { apply_p() {
union() { union() {
translate(v=[connPosX, connPosY, 0]) translate(v=[connPosX, connPosY, 0])
yBarConnector(); yBarConnector();
translate(v=[connPosX, connPosY+connDy, 0]) translate(v=[connPosX, connPosY+xyPlateConnDy, 0])
yBarConnector(); yBarConnector();
translate(v=[connPosX+connDx, connPosY, 0]) translate(v=[connPosX+xyPlateConnDx, connPosY, 0])
rotate(a=[0,0,180]) rotate(a=[0,0,180])
yBarConnector(); yBarConnector();
translate(v=[connPosX+connDx, connPosY+connDy, 0]) translate(v=[connPosX+xyPlateConnDx, connPosY+xyPlateConnDy, 0])
rotate(a=[0,0,180]) rotate(a=[0,0,180])
yBarConnector(); yBarConnector();