update readme and dovetail slacks

This commit is contained in:
zhao
2023-07-03 12:23:06 -04:00
parent e167b6880b
commit c13cdf0093
6 changed files with 98 additions and 13 deletions

View File

@ -66,8 +66,8 @@ For generating a specific part:
`python3 rbuild.py -b yBar --nightly -c micro -t custom`
Generated stls are put into the `stl/` directories. The actual variable values for different profiles can be found in
[rack/profiles.scad](config/profiles.scad).
Generated stls are put into the `stl/` directories. The actual variable values for different profiles can be found in
[rack/profiles.scad](config/rackFrame.scad).
We recommend you start by printing the `eval_P.stl` file first, just to determine if the default slack/layer height
configurations work for you. If parts are too tight/loose please take a look at

View File

@ -10,7 +10,7 @@
- The general philosophy for slack applications in this project is to subtract space from sockets, while not
modifying the plugs.
- Values are signed. Positive values can be interpreted as how much to remove from the socket along some dimension.
- This shouldn't be used to compensate for serious part shrinkage
- These values depend on print orientation and it's assumed parts are printed in their recommended orientations.
*/
xySlack = 0.3;

View File

@ -0,0 +1,42 @@
include <./common.scad>
use <./rackEars.scad>
// Rack mount tray that supports screws on the bottom of the rack-mount item
// Config variables
//trayAlignment = "middle"; // middle, right, left
trayWidth = 150;
trayDepth = 100;
trayThickness = 3;
mountPoints = [];
mountScrewType = "m3";
bottomScrewTray(u=5);
module bottomScrewTray(u) {
screwDx = rackMountScrewWidth;
echo(screwDx);
screwDz = uDiff * u;
plateLength = screwDx + 2*rackMountScrewXDist;
plateHeight = screwDz + 2*rackMountScrewZDist;
leftScrewDistToTray = 10+4+3;
assert(leftScrewDistToTray >= 5);
leftScrewGlobalX = -leftScrewDistToTray;
rightScrewGlobalX = screwDx + leftScrewGlobalX;
cube(size=[trayWidth, trayDepth, trayThickness]);
translate(v=[rackMountScrewXDist+leftScrewGlobalX+3,0,rackMountScrewZDist])
rackEarModule(frontThickness=3,sideThickness=3,frontWidth=leftScrewDistToTray, sideDepth=trayDepth-3, u=5);
translate(v=[rightScrewGlobalX,0,rackMountScrewZDist])
mirror(v=[1,0,0])
rackEarModule(frontThickness=3,sideThickness=3,frontWidth=30, sideDepth=trayDepth-3, u=5);
}

View File

@ -1,8 +1,7 @@
include <../rack/config.scad>
include <../rack/sharedVariables.scad>
include <../helper/math.scad>
include <../helper/screws.scad>
include <../helper/common.scad>
include <../config/common.scad>
/*
QoL redefinitions/variables/reimports for rack mount items
@ -10,7 +9,8 @@ include <../helper/screws.scad>
uDiff = screwDiff;
// ...
rackMountScrewXDist = 4;
rackMountScrewZDist = 4;

43
rack-mount/rackEars.scad Normal file
View File

@ -0,0 +1,43 @@
include <./common.scad>
// Rack ear modules.
// To be used either by itself if the mount-item supports it, or within another module
module rackEarStandAlone(frontThickness, sideThickness, frontWidth, sideDepth, sideHoles) {
// TODO
}
module rackEarModule(frontThickness, sideThickness, frontWidth, sideDepth, u, triangular=true) {
earHeight = u*uDiff + 2*rackMountScrewZDist;
difference() {
translate(v = [-rackMountScrewXDist, 0, -rackMountScrewZDist]) {
cube(size = [frontWidth, frontThickness, earHeight]);
if (triangular) {
hull() {
translate(v = [frontWidth-sideThickness, 0, 0])
cube(size = [sideThickness, frontThickness, earHeight]);
translate(v = [frontWidth-sideThickness, sideDepth, 0])
cube(size = [sideThickness, frontThickness, 1]);
}
} else {
translate(v = [frontWidth-sideThickness, 0, 0])
cube(size = [sideThickness, sideDepth, earHeight]);
}
}
union() {
rotate(a=[90,0,0])
cylinder(r=screwRadiusSlacked(mainRailScrewType), h=frontThickness*2, center=true);
translate(v=[0,0,u*uDiff])
rotate(a=[90,0,0])
cylinder(r=screwRadiusSlacked(mainRailScrewType), h=frontThickness*2, center=true);
}
}
}
rackEarModule(frontThickness=3,sideThickness=3,frontWidth=30, sideDepth=50, u=4);

View File

@ -8,17 +8,17 @@ module onXBarToYBarNegative() {
z = 8;
slack = xBarYBarDovetailSlack;
translate(v=[-slack,14,0])
translate(v=[-1,14,0])
mirror(v=[1,0,0])
rotate(a=[0,0,-90])
dovetail(
topWidth = 15+slack,
bottomWidth = 12+slack,
height = 2+slack,
height = 2,
length = yBarHeight,
headExtension = 1,
headExtension = 1+slack,
baseExtension = 2,
frontFaceLength = 0.5,
frontFaceLength = 0.5, // elephant foot compensation
frontFaceScale = 1.05,
backFaceLength = 5,
backFaceScale = 1.2
@ -57,7 +57,7 @@ module onYBarToXBarNegative() {
module onYBarToXBarPositive() {
translate(v=[xBarYBarDovetailSlack, 14,0]) // TODO: variable for the 14
translate(v=[1, 14,0]) // TODO: variable for the 14
rotate(a=[0,0,-90])
dovetail(
topWidth = 15-xySlack, // figure out why we need this
@ -67,7 +67,7 @@ module onYBarToXBarPositive() {
headExtension = 1,
baseExtension = 2,
frontFaceLength = 2,
frontFaceScale = 0.95,
frontFaceScale = 0.95, // elephant foot compensation
backFaceLength = 5,
backFaceScale = 1.2
);