update slack on ybar side module connector

This commit is contained in:
zhao
2023-04-19 23:37:54 -04:00
parent 94dc110bef
commit 76e8880ba4
13 changed files with 87954 additions and 87934 deletions

View File

@ -11,21 +11,19 @@ include <./config.scad>
partList = ["yBar", "xBar", "mainRail", "xyPlate", "sideModule"];
module applyConnector(on, to, transformation) {
// Default is to apply the positive first
module applyConnector(on,to) {
}
module connectorPositive(on, to) {
if (on == "yBar" && to == "xBar") {
onYBarToXBarPositive();
}
module xBarConnectorFromY_N() {
y = 27;
z = 6;
translate(v = [-m3HeatSetInsertSlotHeightSlacked, y, z])
rotate(a = [0, 90, 0])
heatSetInsertSlot_N(rackFrameScrewType);
}
module xBarConnectorFromY_P() {
module onYBarToXBarPositive() {
rotate(a=[0,0,-90])
dovetail(
topWidth = 15,
@ -40,8 +38,29 @@ module applyConnector(on, to, transformation) {
backFaceScale = 1.2);
}
}
module yBarConnectorFromX_N() {
module connectorNegative(on, to) {
if (on == "yBar" && to == "xBar") {
onYBarToXBarNegative();
} else if (on == "xBar" && to == "yBar") {
onXBarToYBarNegative();
} else if (on == "yBar" && to == "sideModule") {
onYBarSideModuleNegative();
}
module onYBarToXBarNegative() {
y = 27;
z = 6;
translate(v = [-m3HeatSetInsertSlotHeightSlacked, y, z])
rotate(a = [0, 90, 0])
heatSetInsertSlot_N(rackFrameScrewType);
}
module onXBarToYBarNegative() {
y = 27;
z = 6;
slack = xySlack;
@ -49,17 +68,9 @@ module applyConnector(on, to, transformation) {
translate(v=[-0.5,14,0])
mirror(v=[1,0,0])
rotate(a=[0,0,-90])
dovetail(
topWidth = 15+slack,
bottomWidth = 12+slack,
height = 2+slack,
length = yBarHeight,
headExtension = 1,
baseExtension = 2,
frontFaceLength = 0.5,
frontFaceScale = 1.05,
backFaceLength = 5,
backFaceScale = 1.2);
dovetail(topWidth = 15+slack, bottomWidth = 12+slack, height = 2+slack, length = yBarHeight,
headExtension = 1, baseExtension = 2, frontFaceLength = 0.5, frontFaceScale = 1.05,
backFaceLength = 5, backFaceScale = 1.2);
// TODO clean this up
translate(v = [-6, y, z])
@ -67,6 +78,14 @@ module applyConnector(on, to, transformation) {
counterSunkHead_N(rackFrameScrewType, screwExtension=inf10, headExtension=inf10);
}
module onYBarSideModuleNegative() {
translate(v = [-xySlack/2, -xySlack/2, -sideWallConnLugDepression])
cube(size = [sideWallConnW+xySlack, sideWallConnD+xySlack, sideWallConnLugDepression]);
translate(v = [yBarScrewHoleToOuterYEdge, yBarScrewHoleToFrontXEdge, -(m3HeatSetInsertSlotHeightSlacked+sideWallConnLugDepression)])
heatSetInsertSlot_N(rackFrameScrewType);
}
}