Merge pull request #15 from jazwa/fixed-module-option

Fix side modules. They are now fixed on the yBars. This means a "left" and "right" yBar must be introduced for symmetry. Old behavior can be enabled by setting fixedSideModules to false in config/rackFrame.scad.
This commit is contained in:
Zhao (Jack) Wang
2024-10-19 14:33:48 -04:00
committed by GitHub
36 changed files with 221 additions and 104 deletions

View File

@ -27,10 +27,9 @@ Please see [the assembly guide](./assembly-guide).
| Item | Name | Quantity | Comment |
|---------------------------------------------------------------|---------------------------|----------|----------------------------------------------------------------------------------------------------------------------------------|
| <img src="media/bom/fhcs_short.gif" height="60" width="72"> | M3x8 FHCS | 8 | Extras are useful and inexpensive. If you plan on eventually stacking multiple racks together, don't hesitate to get a lot more. |
| <img src="media/bom/fhcs_medium.gif" height="60" width="72"> | M3x12 FHCS | 12 | ☝️ |
| <img src="media/bom/fhcs_medium.gif" height="60" width="72"> | M3x12 FHCS | 12 | Extras are useful and inexpensive. If you plan on eventually stacking multiple racks together, don't hesitate to get a lot more. |
| <img src="media/bom/fhcs_long.gif" height="60" width="72"> | M3x16 FHCS | 16 | ☝️ |
| <img src="media/bom/hex_nut.gif" height="60" width="72"> | M3 hex nut | 36 | ☝️ |
| <img src="media/bom/hex_nut.gif" height="60" width="72"> | M3 hex nut | 28 | ☝️ |
| <img src="media/bom/dowel.gif" height="60" width="72"> | 3x10 steel dowel pin | 4 | 3mm diameter, 10mm height |
| <img src="media/bom/magnet.gif" height="60" width="72"> | 6x2 neodymium disc magnet | 8 | 6mm diameter, 2mm height |
| <img src="media/bom/glue.gif" height="60" width="72"> | super glue | \>= 2ml | Used to glue magnets to plastic |
@ -38,13 +37,11 @@ Please see [the assembly guide](./assembly-guide).
### Printing - Single Rack:
| Part | Quantity |
|--------------------------------------------------------------|----------|
| [Y-Bar](./rack/print/yBar_P.scad) | 4 |
|------------------------------------------------------|----------|
| [Left Y-Bar](./rack/print/yBarLeft_P.scad) | 2 |
| [Right Y-Bar](./rack/print/yBarRight_P.scad) | 2 |
| [X-Bar](./rack/print/xBar_P.scad) | 4 |
| [Main Rail](./rack/print/mainRail_P.scad) | 4 |
| [Left Magnet Module](./rack/print/magnetModuleLeft_P.scad) | 2 |
| [Right Magnet Module](./rack/print/magnetModuleRight_P.scad) | 2 |
| [Hinge Module](./rack/print/hingeModule.scad) | 4 |
| [Left Side Wall](./rack/print/sideWallLeft_P.scad) | 1 |
| [Right Side Wall](./rack/print/sideWallRight_P.scad) | 1 |
| [XY-Plate](./rack/print/xyPlate_P.scad) | 2 |

View File

@ -8,7 +8,7 @@
Slide in M3 hex nuts into the Y-bars - 4 times. Each corner should have 3 hex nuts:
![slideHexNutsIntoYBar](./gifs/slideHexNutsIntoYBar.gif)
Glue magnets into magnet side-modules - 4 times:
Glue magnets into magnet side-modules on the Y-bars - 4 times:
![addMagnetsToMagnetModules](./gifs/addMagnetsToMagnetModules.gif)
Glue top and bottom magnets into side walls - 2 times:
@ -17,14 +17,15 @@ Glue top and bottom magnets into side walls - 2 times:
Insert top and bottom dowel rods into side walls - 2 times:
![insertDowelsIntoSideWall](./gifs/insertDowelsIntoSideWall.gif)
Slide Y-bars into X-bars - 2 times:
Slide Y-bars into X-bars. Do this 2 times. You should end up with 2 trays. Orientation on the Y-bars matters here; make sure that the magnets are on the same side:
![attachXBarWithYBar](./gifs/attachXBarWithYBar.gif)
Screw together Y-bars and X-bars using 4 M3x16 FHCS screws (one screw per corner) - 2 times:
![screwXBarAndYBar](./gifs/screwXBarAndYBar.gif)
Screw in the side-modules with M3x8 FHCS screws. Orientation matters here. The magnets modules should be on the eventual front side, facing outwards, and the two hinge modules should be in the back. Do this 2 times (for both trays):
![attachSideConnectorModulesToYBars](./gifs/attachSideConnectorModulesToYBars.gif)
<!-- This step is only needed if the fixedSideModules is set to false. -->
<!-- Screw in the side-modules with M3x8 FHCS screws. Orientation matters here. The magnets modules should be on the eventual front side, facing outwards, and the two hinge modules should be in the back. Do this 2 times (for both trays): -->
<!-- ![attachSideConnectorModulesToYBars](./gifs/attachSideConnectorModulesToYBars.gif) -->
Screw in the main rails with M3x16 FHCS screws.
![connectXYTrayWithMainRails](./gifs/connectXYTrayWithMainRails.gif)

Binary file not shown.

Before

Width:  |  Height:  |  Size: 51 KiB

After

Width:  |  Height:  |  Size: 44 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 42 KiB

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 138 KiB

After

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 208 KiB

After

Width:  |  Height:  |  Size: 166 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 146 KiB

After

Width:  |  Height:  |  Size: 111 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 325 KiB

After

Width:  |  Height:  |  Size: 112 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 190 KiB

After

Width:  |  Height:  |  Size: 116 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 162 KiB

After

Width:  |  Height:  |  Size: 108 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 245 KiB

After

Width:  |  Height:  |  Size: 155 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 91 KiB

After

Width:  |  Height:  |  Size: 46 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 69 KiB

After

Width:  |  Height:  |  Size: 31 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 29 KiB

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 43 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 84 KiB

After

Width:  |  Height:  |  Size: 73 KiB

View File

@ -1,5 +1,7 @@
// Manually set this variable to toggle rack profile
profileName = "micro";
profileName = "default";
fixedSideModules = true;
_profileConfigs = [
// You can introduce a custom profile like:

Binary file not shown.

Before

Width:  |  Height:  |  Size: 182 KiB

After

Width:  |  Height:  |  Size: 173 KiB

View File

@ -21,9 +21,9 @@ visualize = false,
zOrientation = "middle", // ["middle" | "bottom"]
recessSideRail = false,
boxWidth = 170,
boxWidth = 200,
boxHeight = 27,
boxDepth = 100,
boxDepth = 120,
railDefaultThickness = 1.5,
railSideThickness = 3,

Binary file not shown.

Before

Width:  |  Height:  |  Size: 7.9 KiB

After

Width:  |  Height:  |  Size: 7.6 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 96 KiB

After

Width:  |  Height:  |  Size: 86 KiB

View File

@ -1,4 +1,5 @@
include <./common.scad>
use <./slideHexNutsIntoYBar.scad>
$vpt = [21,-15,20];
$vpr = [65,0,40];
@ -10,9 +11,17 @@ addMagnetsToMagnetModules(at=$t);
module addMagnetsToMagnetModules(at=0) {
t = lerp(a=6,b=0,t=at);
if (!plasticMask) {
if (fixedSideModules) {
multmatrix(yBarToMagnetModuleTrans)
slideHexNutsIntoYBar(at=1);
}
else {
magnetModule();
}
}
function insertMagnetTrans(t=0) =
translate(v=[sideWallConnW-(magnetFaceToSideWallConnOuterYEdge+magnetHSlacked) + t,
@ -20,6 +29,9 @@ module addMagnetsToMagnetModules(at=0) {
magnetModuleMagnetMountDz]) *
rotate(a=[0,90,0]);
multmatrix(insertMagnetTrans(t=t))
magnet();
}

View File

@ -2,6 +2,11 @@ include <./common.scad>
use <./screwXBarAndYBar.scad>
use <./addMagnetsToMagnetModules.scad>
/*
NOTE You only need to do this step if the `fixedSideModules` option is set to false.
*/
$vpt = [116,90,18];
$vpr = [56,0,42];
$vpd = 550;
@ -20,18 +25,24 @@ module attachSideConnectorModulesToYBars(at=0) {
screwXBarAndYBar(at=1);
if (!fixedSideModules) {
multmatrix(sideModuleTrans(elevation))
union() {
addMagnetsToMagnetModules(at=1);
translate(v=[yBarScrewHoleToOuterYEdge,yBarScrewHoleToFrontXEdge,sideWallConnLugDepression + 2*elevation])
caseScrewShort();
}
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * sideModuleTrans(elevation))
union() {
addMagnetsToMagnetModules(at=1);
translate(v=[yBarScrewHoleToOuterYEdge,yBarScrewHoleToFrontXEdge,sideWallConnLugDepression + 2*elevation])
caseScrewShort();
}
@ -57,3 +68,4 @@ module attachSideConnectorModulesToYBars(at=0) {
caseScrewShort();
}
}
}

View File

@ -1,5 +1,6 @@
include <./common.scad>
use <./slideHexNutsIntoYBar.scad>
use <./addMagnetsToMagnetModules.scad>
$vpt = [116,90,18];
$vpr = [56,0,42];
@ -14,10 +15,22 @@ module attachXBarWithYBar(at=0) {
// assemble x-y bar trays
multmatrix(translate(v = [0, 0, t]))
if (fixedSideModules) {
multmatrix(inv4x4(yBarToMagnetModuleTrans))
addMagnetsToMagnetModules(at=1); // same as slideHexNutsIntoYBar, but the magnet has already been inserted
} else {
slideHexNutsIntoYBar(at=1);
}
multmatrix(translate(v = [0, 0, t])*xBarSpaceToYBarSpace*xBarMirrorOtherCornerTrans*yBarSpaceToXBarSpace)
if (fixedSideModules) {
multmatrix(inv4x4(yBarToMagnetModuleTrans))
addMagnetsToMagnetModules(at=1);
} else {
slideHexNutsIntoYBar(at=1);
}
if (!plasticMask) {
multmatrix(xBarSpaceToYBarSpace)

View File

@ -56,6 +56,14 @@ module mirrorAllTrayCornersFromYBarSpace() {
secondStackTrans = upperXYTrayTrans * mirror(v=[0,0,1]);
yBarToMagnetModuleTrans =
translate(v=[13,0,sideWallConnLugDepression]) *
inv4x4(yBarSideModuleConnectorTrans) *
mirror(v=[1,0,0]);
module caseScrewShort() {
if (!screwMask) {
color([1, 1, 1]) {

View File

@ -32,8 +32,11 @@ module slideHexNutsIntoYBar(at=0)
rotate(a=[0,90,0]);
module slideHexNutsOneCorner(t=0) {
if (!fixedSideModules) {
multmatrix(sideModuleTrans(t = t))
hexNut(rackFrameScrewType);
}
multmatrix(mainRailTrans(t = t))
hexNut(rackFrameScrewType);

View File

@ -52,6 +52,10 @@ module connectorPositive(on, to) {
onYBarToXBarPositive();
} else if (on == "yBar" && to == "basePlate") {
onYBarBasePlateConnectorPositive();
} else if (on == "yBar" && to == "magnetModule") {
onYBarMagnetModulePositive();
} else if (on == "yBar" && to == "hingeModule") {
onYBarHingeModulePositive();
} else if (on == "basePlate" && to == "yBar") {
onBasePlateToYBarConnectorPositive();
} else if (on == "xBar" && to == "yBar") {
@ -69,6 +73,8 @@ module connectorNegative(on, to) {
onXBarToYBarNegative();
} else if (on == "yBar" && to == "sideModule") {
onYBarSideModuleNegative();
} else if (on == "yBar" && to == "hingeModule") {
onYBarHingeModuleNegative();
} else if (on == "yBar" && to == "mainRail") {
onYBarToMainRailNegative();
} else if (on == "yBar" && to == "stackConnector") {

View File

@ -2,13 +2,47 @@ include <../../helper/common.scad>
include <../../config/common.scad>
include <../sharedVariables.scad>
include <../side/sideWallVariables.scad>
include <../side/magnetModule.scad>
include <../side/hingeModule.scad>
module onYBarSideModuleNegative() {
module onYBarSideModuleNegative(fixed=false) {
translate(v = [-xySlack/2, -xySlack/2, -sideWallConnLugDepression])
cube(size = [sideWallConnW+xySlack, sideWallConnD+xySlack, sideWallConnLugDepression]);
if (!fixed) {
translate(v = [yBarScrewHoleToOuterYEdge, yBarScrewHoleToFrontXEdge, -(4+sideWallConnLugDepression)])
rotate(a=[0,0,90])
hexNutPocket_N("m3", openSide=false, backSpace=5, bridgeFront=true);
}
}
module onYBarMagnetModulePositive() {
translate(v=[sideWallConnW,0,-sideWallConnLugDepression])
mirror(v=[1,0,0])
magnetModule(fixed=true);
}
module onYBarHingeModulePositive() {
translate(v=[sideWallConnW,0,-sideWallConnLugDepression])
mirror(v=[1,0,0])
hingeModule(fixed=false);
}
module onYBarHingeModuleNegative() {
translate(v=[sideWallConnW,0,-sideWallConnLugDepression])
mirror(v=[1,0,0])
difference() {
cube(size=[sideWallConnW,sideWallConnD,sideWallConnLugDepression]);
hingeModule(fixed=true);
}
}

View File

@ -0,0 +1,7 @@
use <../yBar.scad>
// Oriented for 3d printing.
// Supports required at XY wall connections, and depending on roundness
mirror(v=[1,0,0])
yBar();

View File

@ -3,18 +3,18 @@ include <../../config/common.scad>
include <../sharedVariables.scad>
include <./sideWallVariables.scad>
hingeModule();
module hingeModule() {
module hingeModule(fixed=false) {
applyHingePole()
applyYBarScrewMount()
applyYBarScrewMount(fixed)
base();
module base() {
connW = sideWallConnW;
connD = sideWallConnD;
module base() {
intersection() {
union() {
@ -57,10 +57,13 @@ module hingeModule() {
}
module applyYBarScrewMount() {
module applyYBarScrewMount(fixed=false) {
apply_n() {
if (!fixed) {
translate(v = [yBarScrewHoleToOuterYEdge, yBarScrewHoleToFrontXEdge, sideWallConnLugDepression])
counterSunkHead_N(rackFrameScrewType, headExtension = eps, screwExtension = inf10);
}
children(0);
}

View File

@ -4,20 +4,19 @@ include <../sharedVariables.scad>
include <./sideWallVariables.scad>
magnetModule();
module magnetModule(fixed=false) {
module magnetModule() {
applyYBarScrewMount()
applyYBarScrewMount(fixed)
applyMagnetMount()
base();
module base() {
connW = sideWallConnW;
connD = sideWallConnD;
module base() {
intersection() {
cube(size = [connW, connD, sideWallConnLugDepression]);
// TODO: pattern for this? beef up mirror4XY?
@ -29,10 +28,14 @@ module magnetModule() {
}
}
module applyYBarScrewMount() {
module applyYBarScrewMount(fixed=false) {
apply_n() {
if (!fixed) {
translate(v = [yBarScrewHoleToOuterYEdge, yBarScrewHoleToFrontXEdge, sideWallConnLugDepression])
counterSunkHead_N(rackFrameScrewType, headExtension = eps, screwExtension = inf10);
}
children(0);
}

View File

@ -9,7 +9,7 @@ module yBar() {
applyOnYBarBothCorners(to="basePlate", trans=yBarBasePlateConnectorTrans)
applyOnYBarBothCorners(to="stackConnector", trans=yBarStackConnectorTrans)
applyOnYBarBothCorners(to="sideModule", trans=yBarSideModuleConnectorTrans)
applySideModules()
applyOnYBarBothCorners(to="mainRail", trans=yBarMainRailConnectorTrans)
applyOnYBarBothCorners(to="xBar", trans=yBarXBarConnectorTrans)
yBarBase();
@ -33,4 +33,20 @@ module yBar() {
applyConnector(on="yBar", to=to, trans=yBarMirrorOtherCornerTrans * trans)
children(0);
}
module applySideModules() {
if (!fixedSideModules) {
applyOnYBarBothCorners(to="sideModule", trans=yBarSideModuleConnectorTrans)
children(0);
} else {
applyConnector(on="yBar", to="magnetModule", trans=yBarSideModuleConnectorTrans)
applyConnector(on="yBar", to="hingeModule", trans=yBarMirrorOtherCornerTrans * yBarSideModuleConnectorTrans)
children(0);
}
}
}

View File

@ -253,7 +253,7 @@ def construct_openscad_animation_args(build_dir, target_dir, filename, config, d
target = os.path.join(target_dir, os.path.splitext(filename)[0] + '.png')
openscad_args = []
openscad_args += ['--colorscheme', 'BeforeDawn']
openscad_args += ['--colorscheme', 'Tomorrow Night']
openscad_args += ['--render']
openscad_args += ['--imgsize', '1920,1080']
openscad_args += ['--projection', 'o']
@ -286,7 +286,7 @@ def find_scad_file(directory, filename):
def run_openscad(options, nightly):
if nightly:
command = [PATH_TO_OPENSCAD_NIGHTLY, '--enable', 'all']
command = [PATH_TO_OPENSCAD_NIGHTLY, '--enable', 'fast-csg', '--enable', 'manifold']
else:
command = [PATH_TO_OPENSCAD]