add xyPlate
This commit is contained in:
@ -11,7 +11,7 @@ include <./profiles.scad>
|
||||
profileName = "micro";
|
||||
profile = getProfile(profileName);
|
||||
|
||||
echo("Profile:", profile);
|
||||
// echo("Profile:", profile);
|
||||
|
||||
function getConfig(name) = getConfigValue(profile, name);
|
||||
|
||||
|
||||
5
rack/print/xyPlate_P.scad
Normal file
5
rack/print/xyPlate_P.scad
Normal file
@ -0,0 +1,5 @@
|
||||
include <../xyPlate.scad>
|
||||
|
||||
// Oriented for 3d printing.
|
||||
// Supports generally not required.
|
||||
xyPlate();
|
||||
@ -7,9 +7,8 @@ include <./xyBarConnector.scad>
|
||||
include <./yBar.scad>
|
||||
|
||||
// It's actually the railSlotToInnerYEdge of the yBar, it'll be nice to be able to refer to it like yBar.railSlotToInnerYEdge
|
||||
xBarDepth = maxUnitWidth - 2*railSlotToInnerYEdge;
|
||||
|
||||
xBarWidth = 32;
|
||||
xBarX = maxUnitWidth - 2*railSlotToInnerYEdge;
|
||||
xBarY = 32;
|
||||
xBarHeight = 15;
|
||||
|
||||
xBarWallThickness = 2;
|
||||
@ -24,27 +23,25 @@ module xBar() {
|
||||
|
||||
module xBarBase() {
|
||||
intersection() {
|
||||
mirror(v = [0, 1, 0])
|
||||
rotate(a = [0, 0, -90])
|
||||
|
||||
difference() {
|
||||
cylindricalFiletEdge(xBarWidth, xBarDepth, xBarHeight, xBarRoundness);
|
||||
cylindricalFiletEdge(xBarY, xBarX, xBarHeight, xBarRoundness);
|
||||
|
||||
translate(v = [xBarWallThickness, xBarWallThickness, xBarWallThickness])
|
||||
cylindricalFiletEdge(xBarWidth, xBarDepth-2*xBarWallThickness, xBarHeight, xBarRoundness);
|
||||
cylindricalFiletEdge(xBarY, xBarX-2*xBarWallThickness, xBarHeight, xBarRoundness);
|
||||
}
|
||||
|
||||
// Shave off bottom corners to reduce elephant's foot at where xBar and YBar join
|
||||
halfspace(vpos = [1, 0, 1], p = [0.6, 0, 0]);
|
||||
halfspace(vpos = [-1, 0, 1], p = [xBarDepth-0.6, 0, 0]);
|
||||
halfspace(vpos = [0, 1, 1], p = [0, 0.6, 0]);
|
||||
halfspace(vpos = [0, -1, 1], p = [0, xBarX-0.6, 0]);
|
||||
}
|
||||
}
|
||||
|
||||
module mirrorOtherCorner() {
|
||||
children(0);
|
||||
|
||||
// TODO rename xBarDepth to xBarLength/xBarWidth
|
||||
translate(v = [xBarDepth, 0, 0])
|
||||
mirror(v = [1, 0, 0]) {
|
||||
translate(v = [0, xBarX, 0])
|
||||
mirror(v = [0, 1, 0]) {
|
||||
children(0);
|
||||
}
|
||||
}
|
||||
@ -53,9 +50,11 @@ module xBar() {
|
||||
apply_pn() {
|
||||
|
||||
mirrorOtherCorner()
|
||||
rotate(a=[0,0,-90])
|
||||
yBarConnectorFromXLug();
|
||||
|
||||
mirrorOtherCorner()
|
||||
rotate(a=[0,0,-90])
|
||||
yBarConnectorFromX_N();
|
||||
|
||||
children(0);
|
||||
|
||||
73
rack/xyPlate.scad
Normal file
73
rack/xyPlate.scad
Normal file
@ -0,0 +1,73 @@
|
||||
include <./yBar.scad>
|
||||
include <./xBar.scad>
|
||||
|
||||
xyPlate();
|
||||
|
||||
module xyPlate() {
|
||||
|
||||
applyYBarConnectors()
|
||||
plateBody();
|
||||
|
||||
module plateBody() {
|
||||
slack = 0.5;
|
||||
plateBodyX = xBarX - slack;
|
||||
plateBodyY = (yBarDepth - 2*xBarY) - slack;
|
||||
plateBodyH = xBarWallThickness;
|
||||
|
||||
translate(v=[slack/2, slack/2, 0])
|
||||
cube(size=[plateBodyX, plateBodyY, plateBodyH]);
|
||||
}
|
||||
|
||||
module applyYBarConnectors() {
|
||||
slack = 0.3;
|
||||
// TODO rename _heatSetX to something more indicative of yBarBasePlateConnector
|
||||
connDx = xBarX + 2*_heatSetX; // X distance between connectors
|
||||
connDy = yBarDepth - 2*basePlateScrewMountToYBarXZFace; // Y distance between connectors
|
||||
|
||||
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() {
|
||||
union() {
|
||||
translate(v=[connPosX, connPosY, 0])
|
||||
yBarConnector();
|
||||
|
||||
translate(v=[connPosX, connPosY+connDy, 0])
|
||||
yBarConnector();
|
||||
|
||||
translate(v=[connPosX+connDx, connPosY, 0])
|
||||
rotate(a=[0,0,180])
|
||||
yBarConnector();
|
||||
|
||||
translate(v=[connPosX+connDx, connPosY+connDy, 0])
|
||||
rotate(a=[0,0,180])
|
||||
yBarConnector();
|
||||
|
||||
}
|
||||
|
||||
children(0);
|
||||
}
|
||||
|
||||
module yBarConnector() {
|
||||
difference() {
|
||||
hull() {
|
||||
cylinder(r = _baseConnY/2 - slack/2, h = _baseConnRecession);
|
||||
|
||||
translate(v = [1-connPosX, -_baseConnY/2, 0])
|
||||
cube(size = [eps, _baseConnY-slack, _baseConnRecession]);
|
||||
|
||||
translate(v = [5-connPosX, -_baseConnY/2, 0])
|
||||
cube(size = [eps, _baseConnY-slack, eps]);
|
||||
}
|
||||
|
||||
cylinder(r=screwRadiusSlacked(rackFrameScrewType), h=inf, center=true);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
@ -2,6 +2,7 @@ include <../helper/common.scad>
|
||||
include <../helper/halfspace.scad>
|
||||
include <../helper/screws.scad>
|
||||
include <./config.scad>
|
||||
include <./sharedVariables.scad>
|
||||
|
||||
_mountX = 12;
|
||||
_mountY = 14;
|
||||
@ -18,6 +19,13 @@ _baseConnRecession = 3;
|
||||
_baseConnY = 8;
|
||||
_baseConnOuterXFaceToScrew = 2;
|
||||
|
||||
_heatSetX = _mountX - _innerXFaceToScrew;
|
||||
_heatSetY = _mountY - _innerYFaceToScrew;
|
||||
|
||||
// TODO refactor this entire file
|
||||
basePlateScrewMountToYBarXZFace = _heatSetY + joinCornerDepth; // Distance to the nearest YBar XZ face
|
||||
basePlateScrewMountToYBarYZFace = (yBarWidth+_heatSetX) - yBarBasePlateConnectorWidth;
|
||||
|
||||
module yBarBasePlateMount_P() {
|
||||
intersection() {
|
||||
cube(size = [_mountX, _mountY, _mountZ]);
|
||||
@ -27,32 +35,30 @@ module yBarBasePlateMount_P() {
|
||||
|
||||
module yBarBasePlateMount_N() {
|
||||
|
||||
heatSetX = _mountX - _innerXFaceToScrew;
|
||||
heatSetY = _mountY - _innerYFaceToScrew;
|
||||
|
||||
translate(v=[heatSetX, heatSetY, m3HeatSetInsertSlotHeightSlacked + _baseConnRecession])
|
||||
translate(v=[_heatSetX, _heatSetY, m3HeatSetInsertSlotHeightSlacked + _baseConnRecession])
|
||||
mirror(v=[0,0,1])
|
||||
heatSetInsertSlot_N(rackFrameScrewType, topExtension=inf10);
|
||||
|
||||
hull() {
|
||||
translate(v = [heatSetX, heatSetY, 0])
|
||||
translate(v = [_heatSetX, _heatSetY, 0])
|
||||
cylinder(r=_baseConnY/2, h=_baseConnRecession);
|
||||
|
||||
translate(v = [inf50, heatSetY-_baseConnY/2, 0])
|
||||
translate(v = [inf50, _heatSetY-_baseConnY/2, 0])
|
||||
cube(size = [eps, _baseConnY, _baseConnRecession]);
|
||||
}
|
||||
|
||||
hull() {
|
||||
translate(v = [heatSetX, heatSetY, 0])
|
||||
translate(v = [_heatSetX, _heatSetY, 0])
|
||||
cylinder(r=_baseConnY/2+0.25, h=eps);
|
||||
|
||||
translate(v = [inf50, heatSetY-_baseConnY/2, 0])
|
||||
translate(v = [inf50, _heatSetY-_baseConnY/2, 0])
|
||||
cube(size = [eps, _baseConnY + 0.5, eps]);
|
||||
|
||||
translate(v = [heatSetX, heatSetY, 1])
|
||||
translate(v = [_heatSetX, _heatSetY, 1])
|
||||
cylinder(r=_baseConnY/2, h=eps);
|
||||
|
||||
translate(v = [inf50, heatSetY-_baseConnY/2, 1])
|
||||
translate(v = [inf50, _heatSetY-_baseConnY/2, 1])
|
||||
cube(size = [eps, _baseConnY, eps]);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user