add profiles.scad
This commit is contained in:
@ -20,8 +20,8 @@ m3HexNutThickness = 2.18;
|
|||||||
m3HeatSetInsertSlotRadiusSlack = -0.1;
|
m3HeatSetInsertSlotRadiusSlack = -0.1;
|
||||||
m3HeatSetInsertSlotHeightSlack = 0.5;
|
m3HeatSetInsertSlotHeightSlack = 0.5;
|
||||||
|
|
||||||
m3HeatSetInsertSlotRadius = 2.5;
|
m3HeatSetInsertSlotRadius = 2.3;
|
||||||
m3HeatSetInsertSlotHeight = 6;
|
m3HeatSetInsertSlotHeight = 5.7;
|
||||||
|
|
||||||
m3HeatSetInsertSlotRadiusSlacked = m3HeatSetInsertSlotRadius+m3HeatSetInsertSlotRadiusSlack;
|
m3HeatSetInsertSlotRadiusSlacked = m3HeatSetInsertSlotRadius+m3HeatSetInsertSlotRadiusSlack;
|
||||||
m3HeatSetInsertSlotHeightSlacked = m3HeatSetInsertSlotHeight+m3HeatSetInsertSlotHeightSlack;
|
m3HeatSetInsertSlotHeightSlacked = m3HeatSetInsertSlotHeight+m3HeatSetInsertSlotHeightSlack;
|
||||||
|
|||||||
@ -6,32 +6,39 @@
|
|||||||
- "_N" appended to a module is meant to denote that this module is a negative volume, and should only be used to
|
- "_N" appended to a module is meant to denote that this module is a negative volume, and should only be used to
|
||||||
substract from other volumes. "_P" is meant to denote a positive value. Modules are positive by default.
|
substract from other volumes. "_P" is meant to denote a positive value. Modules are positive by default.
|
||||||
*/
|
*/
|
||||||
|
include <./profiles.scad>
|
||||||
|
|
||||||
|
profile = "default";
|
||||||
|
|
||||||
|
echo("Profile:", profile);
|
||||||
|
|
||||||
// Maximum width for rackmount units. Change this according your max expected enclosure width.
|
// Maximum width for rackmount units. Change this according your max expected enclosure width.
|
||||||
// Changing this will directly affect the required build volume.
|
// Changing this will directly affect the required build volume.
|
||||||
maxUnitWidth = 200;
|
maxUnitWidth = getConfigValue(profile, "maxUnitWidth");
|
||||||
|
|
||||||
// Maximum (recommended) unit depth. There technically isn't a max unit depth because there's no physical bound on
|
// Maximum (recommended) unit depth. There technically isn't a max unit depth because there's no physical bound on
|
||||||
// how far a rack unit can extrude back. This parameter basically controls the distance between the front of the front
|
// how far a rack unit can extrude back. This parameter basically controls the distance between the front of the front
|
||||||
// rails and the back of the back rails. Changing this will directly affect the required build volume.
|
// rails and the back of the back rails. Changing this will directly affect the required build volume.
|
||||||
maxUnitDepth = 200;
|
maxUnitDepth = getConfig("maxUnitDepth");
|
||||||
|
|
||||||
// Vertical distance between the midpoint of adjacent screws mounts. Affects build volume.
|
// Vertical distance between the midpoint of adjacent screws mounts. Affects build volume.
|
||||||
screwDiff = 10;
|
screwDiff = getConfig("screwDiff");
|
||||||
|
|
||||||
// Number screw slots on the main rail. Affects build volume.
|
// Number screw slots on the main rail. Affects build volume.
|
||||||
numRailScrews = 20;
|
numRailScrews = getConfig("numRailScrews");
|
||||||
|
|
||||||
// Screw type used for rackmount units. See screws.scad.
|
// Screw type used for rackmount units. See screws.scad.
|
||||||
mainRailScrewType = "m4";
|
mainRailScrewType = getConfig("mainRailScrewType");
|
||||||
|
|
||||||
// Screw type used to affix side rails.
|
// Screw type used to affix side rails.
|
||||||
mainRailSideMountScrewType = "m4";
|
mainRailSideMountScrewType = getConfig("mainRailSideMountScrewType");
|
||||||
|
|
||||||
// Screw type used for constructing the actual rack frame.
|
// Screw type used for constructing the actual rack frame.
|
||||||
rackFrameScrewType = "m3";
|
rackFrameScrewType = getConfig("rackFrameScrewType");
|
||||||
// Currently, only m3 screws are supported here (tolerance issues)
|
// Currently, only m3 screws are supported here (tolerance issues)
|
||||||
assert(rackFrameScrewType == "m3");
|
assert(rackFrameScrewType == "m3");
|
||||||
|
|
||||||
// Fillet radius for main rack profile
|
// Fillet radius for main rack profile
|
||||||
baseRoundness = 5;
|
baseRoundness = getConfig("baseRoundness");
|
||||||
|
|
||||||
|
echo("numRailScrews", numRailScrews);
|
||||||
@ -9,21 +9,21 @@ mainRail();
|
|||||||
|
|
||||||
translate(v=[12,2 + 200,18])
|
translate(v=[12,2 + 200,18])
|
||||||
mirror(v=[0,1,0])
|
mirror(v=[0,1,0])
|
||||||
mainRail();
|
*mainRail();
|
||||||
|
|
||||||
translate(v=[12 + 216,2,18])
|
translate(v=[12 + 216,2,18])
|
||||||
mirror(v=[1,0,0])
|
mirror(v=[1,0,0])
|
||||||
mainRail();
|
*mainRail();
|
||||||
|
|
||||||
translate(v=[12 + 216,2 + 200,18])
|
translate(v=[12 + 216,2 + 200,18])
|
||||||
rotate(a=[0,0,180])
|
rotate(a=[0,0,180])
|
||||||
mainRail();
|
*mainRail();
|
||||||
|
|
||||||
xyPlane();
|
*xyPlane();
|
||||||
|
|
||||||
translate(v=[0,0,250])
|
translate(v=[0,0,250])
|
||||||
mirror(v=[0,0,1])
|
mirror(v=[0,0,1])
|
||||||
xyPlane();
|
*xyPlane();
|
||||||
|
|
||||||
module xyPlane() {
|
module xyPlane() {
|
||||||
yBar();
|
yBar();
|
||||||
@ -39,3 +39,8 @@ module xyPlane() {
|
|||||||
mirror(v = [0, 1, 0])
|
mirror(v = [0, 1, 0])
|
||||||
xBar();
|
xBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
yBar();
|
||||||
|
|
||||||
|
translate(v = [30, 0, 0])
|
||||||
|
xBar();
|
||||||
@ -30,7 +30,7 @@ frontFaceWidth = railScrewHoleToInnerEdge + railScrewHoleToOuterEdge;
|
|||||||
railTotalWidth = frontFaceWidth;
|
railTotalWidth = frontFaceWidth;
|
||||||
railTotalDepth = railFrontThickness+sideSupportDepth;
|
railTotalDepth = railFrontThickness+sideSupportDepth;
|
||||||
|
|
||||||
*mainRail();
|
mainRail();
|
||||||
|
|
||||||
echo("Total Rail Height: ", railTotalHeight);
|
echo("Total Rail Height: ", railTotalHeight);
|
||||||
|
|
||||||
|
|||||||
44
rack/profiles.scad
Normal file
44
rack/profiles.scad
Normal file
@ -0,0 +1,44 @@
|
|||||||
|
/*
|
||||||
|
case-files v2
|
||||||
|
This file contains
|
||||||
|
Example usage:
|
||||||
|
|
||||||
|
profileName = "mini";
|
||||||
|
varName = "mainRailSideMountScrewType";
|
||||||
|
|
||||||
|
profile = getProfile(profileName);
|
||||||
|
echo("val:", getConfigValue(profile, varName));
|
||||||
|
*/
|
||||||
|
|
||||||
|
_profileConfigs = [
|
||||||
|
["default", [
|
||||||
|
["maxUnitWidth", 205],
|
||||||
|
["maxUnitDepth", 205],
|
||||||
|
["screwDiff", 10],
|
||||||
|
["numRailScrews", 20],
|
||||||
|
["mainRailScrewType", "m4"],
|
||||||
|
["mainRailSideMountScrewType", "m4"],
|
||||||
|
["rackFrameScrewType", "m3"],
|
||||||
|
["baseRoundness", 5],
|
||||||
|
]],
|
||||||
|
["micro", [
|
||||||
|
["maxUnitWidth", 105],
|
||||||
|
["maxUnitDepth", 105],
|
||||||
|
["numRailScrews", 10],
|
||||||
|
["baseRoundness", 5]
|
||||||
|
]],
|
||||||
|
["mini", [
|
||||||
|
["maxUnitWidth", 205],
|
||||||
|
["maxUnitDepth", 205],
|
||||||
|
["numRailScrews", 20],
|
||||||
|
["baseRoundness", 5]
|
||||||
|
]]
|
||||||
|
];
|
||||||
|
|
||||||
|
function _getConfigValueRaw(profile, varName) = profile[search([varName], profile)[0]][1];
|
||||||
|
function _getProfileRaw(profileName) = _profileConfigs[search([profileName], _profileConfigs)[0]][1];
|
||||||
|
|
||||||
|
function _getConfigValueOrThrowError(val) = val == undef? assert(false, "blah") 0: val;
|
||||||
|
|
||||||
|
function getConfigValue(profile, varName) = _getConfigValueOrThrowError(_getConfigValueRaw(profile, varName));
|
||||||
|
function getProfile(profileName) = _getConfigValueOrThrowError(_getProfileRaw(profileName));
|
||||||
@ -17,7 +17,7 @@ xBarHeight = 15;
|
|||||||
xBarWallThickness = 2;
|
xBarWallThickness = 2;
|
||||||
xBarRoundness = baseRoundness;
|
xBarRoundness = baseRoundness;
|
||||||
|
|
||||||
//echo(xBarDepth);
|
*xBar();
|
||||||
|
|
||||||
module xBar() {
|
module xBar() {
|
||||||
|
|
||||||
@ -71,6 +71,4 @@ module xBar() {
|
|||||||
xBar();
|
xBar();
|
||||||
}
|
}
|
||||||
|
|
||||||
xBar();
|
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
@ -42,18 +42,22 @@ module yBar() {
|
|||||||
yBarBase();
|
yBarBase();
|
||||||
|
|
||||||
module yBarBase() {
|
module yBarBase() {
|
||||||
|
intersection() {
|
||||||
difference() {
|
difference() {
|
||||||
sphericalFiletEdge(yBarWidth, yBarDepth, yBarHeight, yBarRoundness);
|
sphericalFiletEdge(yBarWidth, yBarDepth, yBarHeight, yBarRoundness);
|
||||||
|
|
||||||
translate(v = [yBarWallThickness, joinCornerDepth, yBarWallThickness])
|
translate(v = [yBarWallThickness, joinCornerDepth, yBarWallThickness])
|
||||||
cylindricalFiletEdge(yBarWidth, yBarDepth-2*joinCornerDepth, yBarHeight, yBarRoundness);
|
cylindricalFiletEdge(yBarWidth, yBarDepth-2*joinCornerDepth, yBarHeight, yBarRoundness);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
halfspace(vpos=[-1, 0, 1], p=[yBarWidth-0.5, 0,0]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module applyBasePlateConnector() {
|
module applyBasePlateConnector() {
|
||||||
apply_pn() {
|
apply_pn() {
|
||||||
mirrorOtherCorner() {
|
mirrorOtherCorner() {
|
||||||
translate(v = [yBarWidth-12, joinCornerDepth, 0.01]) // why do we need 0.01 here???
|
translate(v = [yBarWidth-12, joinCornerDepth, yBarWallThickness]) // why do we need 0.01 here???
|
||||||
yBarBasePlateMount_P();
|
yBarBasePlateMount_P();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -5,7 +5,7 @@ include <./config.scad>
|
|||||||
|
|
||||||
_mountX = 12;
|
_mountX = 12;
|
||||||
_mountY = 14;
|
_mountY = 14;
|
||||||
_mountZ = 13;
|
_mountZ = 10;
|
||||||
|
|
||||||
// x and y faces of the yBarBasePlateMount_P block
|
// x and y faces of the yBarBasePlateMount_P block
|
||||||
_innerXFaceToScrew = 6;
|
_innerXFaceToScrew = 6;
|
||||||
@ -31,20 +31,30 @@ module yBarBasePlateMount_N() {
|
|||||||
mirror(v=[0,0,1])
|
mirror(v=[0,0,1])
|
||||||
heatSetInsertSlot_N(rackFrameScrewType, topExtension=inf10);
|
heatSetInsertSlot_N(rackFrameScrewType, topExtension=inf10);
|
||||||
|
|
||||||
|
|
||||||
hull() {
|
hull() {
|
||||||
|
|
||||||
translate(v = [heatSetX, heatSetY, 0])
|
translate(v = [heatSetX, heatSetY, 0])
|
||||||
cylinder(r=_baseConnY/2, h=_baseConnRecession);
|
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]);
|
cube(size = [eps, _baseConnY, _baseConnRecession]);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
hull() {
|
||||||
|
translate(v = [heatSetX, heatSetY, 0])
|
||||||
|
cylinder(r=_baseConnY/2+0.25, h=eps);
|
||||||
|
|
||||||
|
translate(v = [inf50, heatSetY-_baseConnY/2, 0])
|
||||||
|
cube(size = [eps, _baseConnY + 0.5, eps]);
|
||||||
|
|
||||||
|
translate(v = [heatSetX, heatSetY, 1])
|
||||||
|
cylinder(r=_baseConnY/2, h=eps);
|
||||||
|
|
||||||
|
translate(v = [inf50, heatSetY-_baseConnY/2, 1])
|
||||||
|
cube(size = [eps, _baseConnY, eps]);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
*difference() {
|
*difference() {
|
||||||
yBarBasePlateMount_P();
|
yBarBasePlateMount_P();
|
||||||
yBarBasePlateMount_N();
|
yBarBasePlateMount_N();
|
||||||
}
|
}
|
||||||
|
|
||||||
//yBarBasePlateMount_N();
|
|
||||||
|
|||||||
27302
stl/rack/mainRail.stl
Normal file
27302
stl/rack/mainRail.stl
Normal file
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user