From c13cdf00937fd57166361f48e198741f3bc5c409 Mon Sep 17 00:00:00 2001 From: zhao Date: Mon, 3 Jul 2023 12:23:06 -0400 Subject: [PATCH] update readme and dovetail slacks --- README.md | 4 +-- config/slack.scad | 2 +- rack-mount/bottomScrewTray.scad | 42 +++++++++++++++++++++++++ rack-mount/common.scad | 8 ++--- rack-mount/rackEars.scad | 43 ++++++++++++++++++++++++++ rack/connector/xBarYBarConnectors.scad | 12 +++---- 6 files changed, 98 insertions(+), 13 deletions(-) create mode 100644 rack-mount/bottomScrewTray.scad create mode 100644 rack-mount/rackEars.scad diff --git a/README.md b/README.md index 2f016ae..3ea6c33 100644 --- a/README.md +++ b/README.md @@ -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 diff --git a/config/slack.scad b/config/slack.scad index bb77bf8..becb91e 100644 --- a/config/slack.scad +++ b/config/slack.scad @@ -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; diff --git a/rack-mount/bottomScrewTray.scad b/rack-mount/bottomScrewTray.scad new file mode 100644 index 0000000..38da92b --- /dev/null +++ b/rack-mount/bottomScrewTray.scad @@ -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); + +} \ No newline at end of file diff --git a/rack-mount/common.scad b/rack-mount/common.scad index 2f3edbb..47957c1 100644 --- a/rack-mount/common.scad +++ b/rack-mount/common.scad @@ -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; diff --git a/rack-mount/rackEars.scad b/rack-mount/rackEars.scad new file mode 100644 index 0000000..6196cc8 --- /dev/null +++ b/rack-mount/rackEars.scad @@ -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); \ No newline at end of file diff --git a/rack/connector/xBarYBarConnectors.scad b/rack/connector/xBarYBarConnectors.scad index c9b917c..65d1c69 100644 --- a/rack/connector/xBarYBarConnectors.scad +++ b/rack/connector/xBarYBarConnectors.scad @@ -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 );