wip on base connector

This commit is contained in:
zhao
2023-01-13 17:21:30 -05:00
parent ba1dc567b7
commit eecdf8c49e
8 changed files with 9053 additions and 78 deletions

View File

@ -10,3 +10,38 @@ inf10 = 10;
inf50 = 50; inf50 = 50;
inf1000 = 1000; inf1000 = 1000;
inf = inf1000; inf = inf1000;
module apply_p() {
union() {
children(0);
children(1);
}
}
module apply_n() {
difference() {
children(1);
children(0);
}
}
module apply_pn() {
difference() {
union() {
children(0);
children(2);
}
children(1);
}
}
module apply_np() {
difference() {
union() {
children(1);
children(2);
}
children(0);
}
}

View File

@ -10,6 +10,9 @@ m3Diameter = 3.0;
m3Radius = m3Diameter / 2.0; m3Radius = m3Diameter / 2.0;
m3RadiusSlacked = m3Radius + m3HoleRadiusSlack; m3RadiusSlacked = m3Radius + m3HoleRadiusSlack;
m3CounterSunkHeadRadius = 3;
m3CounterSunkHeadLength = 1.7;
m3HexNutWidthAcrossFlats = 5.41; m3HexNutWidthAcrossFlats = 5.41;
m3HexNutWidthAcrossCorners = FtoG(m3HexNutWidthAcrossFlats); m3HexNutWidthAcrossCorners = FtoG(m3HexNutWidthAcrossFlats);
m3HexNutThickness = 2.18; m3HexNutThickness = 2.18;
@ -35,7 +38,7 @@ m4HexNutThickness = 3.07;
/********************************************************************************/ /********************************************************************************/
module heatSetInsertSlot_N(screwType) { module heatSetInsertSlot_N(screwType, topExtension=inf50) {
if (screwType == "m3") { if (screwType == "m3") {
union() { union() {
// actual slot for insert // actual slot for insert
@ -43,7 +46,7 @@ module heatSetInsertSlot_N(screwType) {
// extra space above slot to help with insertion // extra space above slot to help with insertion
translate(v=[0, 0, m3HeatSetInsertSlotHeightSlacked]) translate(v=[0, 0, m3HeatSetInsertSlotHeightSlacked])
cylinder(h = inf50, r = 1.3*m3HeatSetInsertSlotRadiusSlacked); cylinder(h = topExtension, r = m3HeatSetInsertSlotRadiusSlacked);
} }
} else { } else {
error("Unsupported screw type"); error("Unsupported screw type");
@ -57,6 +60,24 @@ function screwRadiusSlacked(screwType) =
? m4RadiusSlacked ? m4RadiusSlacked
: error("Unsupported screw type"); : error("Unsupported screw type");
module counterSunkHead_N(screwType, screwExtension=0, headExtension=0) {
if (screwType == "m3") {
cylinder(r1=m3RadiusSlacked, r2=m3CounterSunkHeadRadius, h=m3CounterSunkHeadLength);
translate(v=[0,0,-screwExtension])
cylinder(r=m3RadiusSlacked, h=screwExtension);
translate(v=[0,0,m3CounterSunkHeadLength])
cylinder(r=m3CounterSunkHeadRadius, h=headExtension);
} else {
error("Unsupported screw type");
}
}
module hexNutPocket_N(screwType) { module hexNutPocket_N(screwType) {
if (screwType == "m3") { if (screwType == "m3") {
hexNutPocketHelper_N(m3RadiusSlacked, m3HexNutWidthAcrossCorners / 2 + 0.1, m3HexNutThickness + 0.2); hexNutPocketHelper_N(m3RadiusSlacked, m3HexNutWidthAcrossCorners / 2 + 0.1, m3HexNutThickness + 0.2);

View File

@ -4,8 +4,6 @@ include <../helper/screws.scad>
include <./config.scad> include <./config.scad>
include <./derivedConfig.scad> include <./derivedConfig.scad>
include <./xyBarConnector.scad> include <./xyBarConnector.scad>
include <./xBarBasePlateConnector.scad>
// Temporary // Temporary
include <./yBar.scad> include <./yBar.scad>
@ -49,7 +47,7 @@ module xBar() {
// TODO refactor - probably better off mirroring the side faces and hulling the shell // TODO refactor - probably better off mirroring the side faces and hulling the shell
difference() { difference() {
union() { union() {
intersection () { intersection() {
positive(); positive();
halfspace(vpos = [1, 0, 1], p = [0.5, 0, 0]); halfspace(vpos = [1, 0, 1], p = [0.5, 0, 0]);
@ -69,21 +67,10 @@ module xBar() {
yBarConnectorFromX_N(); yBarConnectorFromX_N();
} }
} }
// TODO change me?
translate(v=[0,xBarWidth,0])
basePlateMount();
translate(v=[xBarDepth,xBarWidth,0])
mirror(v=[1,0,0])
basePlateMount();
} }
xBar(); xBar();
} }
translate(v=[-30,0,0])
*yBar();
xBar(); xBar();

View File

@ -1,53 +0,0 @@
include <../helper/common.scad>
include <../helper/screws.scad>
include <./config.scad>
module basePlateMount() {
screwHoleToBase = 6;
mountHeight = 10;
mountWidth = 10;
mountThickness = 2;
module support() {
r = 4;
difference () {
translate(v = [0, mountThickness, r/2])
rotate(a = [90, 0, 0])
rotate(a = [0, 0, 90])
cylinder(h = mountThickness, r = r, $fn = 3);
cube(size=[inf10, inf10, inf10]);
}
//translate([-r/2, -2,0])
//cube(size=[r/2, 0.1, 0.1]);
}
module positive() {
cube(size = [mountWidth, mountThickness, mountHeight]);
translate(v=[mountWidth,0,0])
mirror(v=[1,0,0])
hull() {
support();
}
}
module basePlateMount() {
translate(v=[0,-mountThickness,0])
difference() {
positive();
translate(v = [mountWidth/2, inf50/2, screwHoleToBase])
rotate(a = [90, 0, 0])
cylinder(h = inf50, r = screwRadiusSlacked(rackFrameScrewType));
}
}
basePlateMount();
}

View File

@ -45,10 +45,12 @@ module yBarConnectorFromXLug() {
// TODO fix this up, no center=true // TODO fix this up, no center=true
translate(v = [-1, y1+(y2-y1)/2, 0]) translate(v = [-1, y1+(y2-y1)/2, 0])
rotate(a = [0, 45, 0]) rotate(a = [0, 45, 0])
scale(v=[0.90,0.90,0.95]) scale(v=[0.90,0.95,0.90])
cube(size = [3, 10, 6], center = true); cube(size = [3, 10, 6], center = true);
mirror(v=[0,0,1]) mirror(v=[0,0,1])
halfspace(vpos=[0,0,1], p=[0,0,0]); halfspace(vpos=[0,0,1], p=[0,0,0]);
halfspace(vpos=[1,0,0], p=[-2,0,0]);
} }
} }

View File

@ -11,6 +11,7 @@ include <./mainRail.scad>
include <./stackConnector.scad> include <./stackConnector.scad>
include <./xyBarConnector.scad> include <./xyBarConnector.scad>
include <./sideWallConnector.scad> include <./sideWallConnector.scad>
include <./yBarBasePlateConnector.scad>
// TODO clean up // TODO clean up
// TODO: How do I nicely explain this? // TODO: How do I nicely explain this?
@ -24,6 +25,8 @@ yBarHeight = 15;
yBarWallThickness = 3; yBarWallThickness = 3;
yBarRoundness = baseRoundness; yBarRoundness = baseRoundness;
joinCornerDepth = 32;
echo("Bar total depth: ", yBarDepth); echo("Bar total depth: ", yBarDepth);
echo("Bar total width: ", yBarWidth); echo("Bar total width: ", yBarWidth);
@ -34,8 +37,8 @@ module yBar() {
difference() { difference() {
sphericalFiletEdge(yBarWidth, yBarDepth, yBarHeight, yBarRoundness); sphericalFiletEdge(yBarWidth, yBarDepth, yBarHeight, yBarRoundness);
translate(v = [yBarWallThickness, 32, yBarWallThickness]) translate(v = [yBarWallThickness, joinCornerDepth, yBarWallThickness])
cylindricalFiletEdge(yBarWidth, yBarDepth-32*2, yBarHeight, yBarRoundness); cylindricalFiletEdge(yBarWidth, yBarDepth-2*joinCornerDepth, yBarHeight, yBarRoundness);
} }
} }
@ -55,7 +58,7 @@ module yBar() {
} }
} }
module sideBar() { module yBar() {
module mirrorOtherCorner() { module mirrorOtherCorner() {
children(0); children(0);
@ -67,12 +70,30 @@ module yBar() {
} }
difference() { difference() {
union() {
positive(); positive();
mirrorOtherCorner()
translate(v=[yBarWidth-12, joinCornerDepth,0.01])
yBarBasePlateMount_P(mountX=12, mountZ=yBarHeight);
}
union() {
mirrorOtherCorner() mirrorOtherCorner()
singleCornerNoStackConnector_N(); singleCornerNoStackConnector_N();
mirrorOtherCorner()
translate(v=[yBarWidth-12, joinCornerDepth, 0])
yBarBasePlateMount_N();
}
} }
} }
sideBar(); yBar();
} }
translate(v=[yBarWidth-12, joinCornerDepth, m3CounterSunkHeadLength])
*yBarBasePlateMount_N();
yBar();
//counterSunkHead_N("m3", 1, 1);

View File

@ -0,0 +1,28 @@
include <../helper/common.scad>
include <../helper/screws.scad>
include <./config.scad>
module yBarBasePlateMount_P(mountX=12, mountY=12, mountZ=12) {
cube(size=[mountX, mountY, mountZ]);
}
module yBarBasePlateMount_N(innerEdgeToScrew=6, baseConnectorRecession = 2) {
translate(v=[innerEdgeToScrew,innerEdgeToScrew, m3HeatSetInsertSlotHeightSlacked + baseConnectorRecession])
mirror(v=[0,0,1])
heatSetInsertSlot_N(rackFrameScrewType, topExtension=inf10);
translate(v=[2,2,0])
cube(size=[inf50,8,baseConnectorRecession]);
translate(v=[innerEdgeToScrew,innerEdgeToScrew, baseConnectorRecession+m3CounterSunkHeadLength])
mirror(v=[0,0,1])
*counterSunkHead_N(rackFrameScrewType, screwExtension=0, headExtension=eps);
}
*difference() {
yBarBasePlateMount_P();
yBarBasePlateMount_N(innerEdgeToScrew=6,wallThickness=3);
}
*yBarBasePlateMount_N(innerEdgeToScrew=6);

8934
stl/rack/xBar.stl Normal file

File diff suppressed because it is too large Load Diff