diff --git a/README.md b/README.md index 3ea6c33..c4353c0 100644 --- a/README.md +++ b/README.md @@ -56,19 +56,19 @@ Requirements: ### Examples: Generate all project files for the `micro` profile: -`python3 rbuild.py -b all --nightly -c micro` +`python3 rbuild.py -b all -c micro` -This will build all the required STLs for a micro rack in the `stl/custom/` directory. The `--nightly` is optional and -means the build script will use the `openscad-nightly` command, instead of `openscad`. This usually results in much -faster build times and is generally recommended. +This will build all the required STLs for a micro rack in the `stl/custom/` directory. For generating a specific part: -`python3 rbuild.py -b yBar --nightly -c micro -t custom` +`python3 rbuild.py -b yBar -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/rackFrame.scad). +`rbuild.py` also support an optional `--nightly` flag, which means the build script will use the `openscad-nightly` command, instead of `openscad`. + 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 [config/slack.scad](config/slack.scad). Please also adjust [config/printing.scad](config/printing.scad) to match your diff --git a/config/slack.scad b/config/slack.scad index becb91e..314bc40 100644 --- a/config/slack.scad +++ b/config/slack.scad @@ -13,15 +13,15 @@ - These values depend on print orientation and it's assumed parts are printed in their recommended orientations. */ -xySlack = 0.3; +xySlack = 0.4; radiusXYSlack = xySlack/2; -zSlack = 0.2; +zSlack = 0.0; -overhangSlack = 0.4; +overhangSlack = 0.7; -supportedOverhangSlack = 0.4; +supportedOverhangSlack = 0.7; // special slack cases, change if neccessary xBarYBarDovetailSlack = xySlack; \ No newline at end of file diff --git a/rack-mount/bottomScrewTray.scad b/rack-mount/bottomScrewTray.scad index 38da92b..21079ac 100644 --- a/rack-mount/bottomScrewTray.scad +++ b/rack-mount/bottomScrewTray.scad @@ -5,7 +5,7 @@ use <./rackEars.scad> // Config variables //trayAlignment = "middle"; // middle, right, left -trayWidth = 150; +trayWidth = 110; trayDepth = 100; trayThickness = 3; @@ -17,26 +17,47 @@ bottomScrewTray(u=5); module bottomScrewTray(u) { - screwDx = rackMountScrewWidth; - echo(screwDx); + + frontLipHeight = 5; + backLipHeight = 5; // also applies to sides + lipThickness = 3; + + rackEarSideThickness = 3; + rackEarFrontThickness = 3; + + screwDx = rackMountScrewWidth; // x dist between the mount holes screwDz = uDiff * u; plateLength = screwDx + 2*rackMountScrewXDist; plateHeight = screwDz + 2*rackMountScrewZDist; - leftScrewDistToTray = 10+4+3; - assert(leftScrewDistToTray >= 5); + minScrewToTraySpacing = 8; + + // TODO: toggle this based on left/right/middle alignment + leftScrewDistToTray = minScrewToTraySpacing + 2 +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=[0,0,trayThickness]) + cube(size=[trayWidth, lipThickness, frontLipHeight]); + + translate(v=[0,trayDepth-lipThickness,trayThickness]) + cube(size=[trayWidth, lipThickness, backLipHeight]); + + translate(v=[0,0,trayThickness]) + cube(size=[lipThickness, trayDepth, backLipHeight]); + + translate(v=[trayWidth-lipThickness,0,trayThickness]) + cube(size=[lipThickness, trayDepth, backLipHeight]); + + translate(v=[leftScrewGlobalX,0,rackMountScrewZDist]) + rackEarModule(frontThickness=rackEarFrontThickness,sideThickness=rackEarSideThickness,frontWidth=leftScrewDistToTray+rackMountScrewXDist+rackEarSideThickness, sideDepth=trayDepth-lipThickness, u=u); translate(v=[rightScrewGlobalX,0,rackMountScrewZDist]) mirror(v=[1,0,0]) - rackEarModule(frontThickness=3,sideThickness=3,frontWidth=30, sideDepth=trayDepth-3, u=5); + rackEarModule(frontThickness=rackEarFrontThickness,sideThickness=rackEarSideThickness,frontWidth=rightScrewGlobalX-trayWidth+rackMountScrewXDist+rackEarSideThickness, sideDepth=trayDepth-lipThickness, u=u); } \ No newline at end of file diff --git a/rack-mount/bottomScrewTray.stl b/rack-mount/bottomScrewTray.stl new file mode 100644 index 0000000..20afdd4 Binary files /dev/null and b/rack-mount/bottomScrewTray.stl differ diff --git a/rack/side/hingeModule.scad b/rack/side/hingeModule.scad index 4b5155c..e187f7e 100644 --- a/rack/side/hingeModule.scad +++ b/rack/side/hingeModule.scad @@ -4,7 +4,7 @@ include <../sharedVariables.scad> include <./sideWallVariables.scad> translate(v=[10,20,-2 - sideWallZHingeTotalClearance]) -hingeModule(); +*hingeModule(); module hingeModule() { diff --git a/rack/side/magnetModule.scad b/rack/side/magnetModule.scad index 97d1c32..1af99c4 100644 --- a/rack/side/magnetModule.scad +++ b/rack/side/magnetModule.scad @@ -4,7 +4,7 @@ include <../sharedVariables.scad> include <./sideWallVariables.scad> translate(v=[10,-5,-(2+sideWallZHingeTotalClearance)]) -magnetModule(); +*magnetModule(); magnetModuleMagnetMountDy = magnetMountToYBarFront - sideWallSlotToXZ; magnetModuleMagnetMountDz = magnetMountToYBarTop + sideWallConnLugDepression; diff --git a/rack/side/sideWallLeft.scad b/rack/side/sideWallLeft.scad index 0d0738b..9069695 100644 --- a/rack/side/sideWallLeft.scad +++ b/rack/side/sideWallLeft.scad @@ -5,13 +5,13 @@ sideWallLeft(); module sideWallLeft() { applySideWallVerticalRibs() - //applyEpicVentilation() + applyEpicVentilation() sideWallBase(); module applyEpicVentilation() { apply_n() { for (i = [1:8]) { - translate(v = [0, 41, i * 18 + 10]) + translate(v = [0, 41, i * 12 + 10]) vent(); } children(0); @@ -20,17 +20,18 @@ module sideWallLeft() { module vent() { minkowski() { rotate(a=[0,90,0]) - cylinder(r=1,h=1); + cylinder(r=2,h=1); - cube(size = [10, 80, 5]); + cube(size = [10, 100, 1]); } } } module applySideWallVerticalRibs() { + echo("sideWallZ", sideWallZ); apply_p() { - translate(v = [0, 20, 0]) - sideWallVerticalRibs(numRibs = 9, ribZ = sideWallZ, ribYDiff = 20, ribExtrusion = 1.5); + translate(v = [0, 30, 0]) + sideWallVerticalRibs(numRibs = 2, ribZ = sideWallZ, ribYDiff = 120, ribExtrusion = 1.5); children(0); } diff --git a/rack/side/sideWallRight.scad b/rack/side/sideWallRight.scad index 2376fa1..8e9c0f2 100644 --- a/rack/side/sideWallRight.scad +++ b/rack/side/sideWallRight.scad @@ -4,17 +4,17 @@ sideWallRight(); module sideWallRight() { - //applyEpicVentilation() + applyEpicVentilation() mirror(v=[1,0,0]) applySideWallVerticalRibs() - //render() sideWallBase(); module applyEpicVentilation() { apply_n() { + translate(v=[-10,0,0]) for (i = [1:8]) { - translate(v = [0, 41, i * 18 + 10]) + translate(v = [0, 41, i * 12 + 10]) vent(); } children(0); @@ -22,8 +22,10 @@ module sideWallRight() { module vent() { minkowski() { - sphere(r=1); - cube(size = [10, 40, 3]); + rotate(a=[0,90,0]) + cylinder(r=2,h=1); + + cube(size = [10, 100, 1]); } } @@ -31,8 +33,8 @@ module sideWallRight() { module applySideWallVerticalRibs() { apply_p() { - translate(v = [0, 20, 0]) - sideWallVerticalRibs(numRibs = 9, ribZ = sideWallZ, ribYDiff = 20, ribExtrusion = 1.5); + translate(v = [0, 30, 0]) + sideWallVerticalRibs(numRibs = 2, ribZ = sideWallZ, ribYDiff = 120, ribExtrusion = 1.5); children(0); } diff --git a/rbuild.py b/rbuild.py index 8c295c7..eb2ea63 100644 --- a/rbuild.py +++ b/rbuild.py @@ -115,7 +115,6 @@ def run_build(args): if filename_rack_mount: build_single(RACK_MOUNT_BUILD_DIR, rackMountBuildDirFull, filename_rack, config_var, dz, nightly) - def build_single(build_dir, target_dir, filename, config, dz, nightly): print('Building:', filename, 'from', build_dir, 'to', target_dir) openscad_args = construct_openscad_args(build_dir, target_dir, filename, config, dz) @@ -171,7 +170,7 @@ def run_openscad(options, nightly): else: command = ['openscad'] - command += ['-q', '--export-format', 'binstl'] + options + command += ['--export-format', 'binstl'] + options try: subprocess.check_output(command, universal_newlines=True, stderr=subprocess.DEVNULL) diff --git a/stl/micro/rack-mount/dualLBracketSupportRail_P1.stl b/stl/micro/rack-mount/dualLBracketSupportRail_P1.stl index 0fb05ad..06cdb9d 100644 Binary files a/stl/micro/rack-mount/dualLBracketSupportRail_P1.stl and b/stl/micro/rack-mount/dualLBracketSupportRail_P1.stl differ diff --git a/stl/micro/rack-mount/dualLBracketSupportRail_P2.stl b/stl/micro/rack-mount/dualLBracketSupportRail_P2.stl index 82a11f1..1917d1a 100644 Binary files a/stl/micro/rack-mount/dualLBracketSupportRail_P2.stl and b/stl/micro/rack-mount/dualLBracketSupportRail_P2.stl differ diff --git a/stl/micro/rack/eval_P.stl b/stl/micro/rack/eval_P.stl index 55e4891..639ca7e 100644 Binary files a/stl/micro/rack/eval_P.stl and b/stl/micro/rack/eval_P.stl differ diff --git a/stl/micro/rack/hingeModule_P1.stl b/stl/micro/rack/hingeModule_P1.stl index 9f13ce0..7088697 100644 Binary files a/stl/micro/rack/hingeModule_P1.stl and b/stl/micro/rack/hingeModule_P1.stl differ diff --git a/stl/micro/rack/magnetModule_P1.stl b/stl/micro/rack/magnetModule_P1.stl index 3d1e29c..b431d5e 100644 Binary files a/stl/micro/rack/magnetModule_P1.stl and b/stl/micro/rack/magnetModule_P1.stl differ diff --git a/stl/micro/rack/magnetModule_P2.stl b/stl/micro/rack/magnetModule_P2.stl index f06b99a..6d58bc5 100644 Binary files a/stl/micro/rack/magnetModule_P2.stl and b/stl/micro/rack/magnetModule_P2.stl differ diff --git a/stl/micro/rack/mainRail_P.stl b/stl/micro/rack/mainRail_P.stl index bb992af..93f7c3b 100644 Binary files a/stl/micro/rack/mainRail_P.stl and b/stl/micro/rack/mainRail_P.stl differ diff --git a/stl/micro/rack/sideWallLeft_P.stl b/stl/micro/rack/sideWallLeft_P.stl index 58ef79f..cadefa2 100644 Binary files a/stl/micro/rack/sideWallLeft_P.stl and b/stl/micro/rack/sideWallLeft_P.stl differ diff --git a/stl/micro/rack/sideWallRight_P.stl b/stl/micro/rack/sideWallRight_P.stl index 65adabe..e4201ff 100644 Binary files a/stl/micro/rack/sideWallRight_P.stl and b/stl/micro/rack/sideWallRight_P.stl differ diff --git a/stl/micro/rack/stackConnectorBottom_P.stl b/stl/micro/rack/stackConnectorBottom_P.stl index 771e41d..16598ac 100644 Binary files a/stl/micro/rack/stackConnectorBottom_P.stl and b/stl/micro/rack/stackConnectorBottom_P.stl differ diff --git a/stl/micro/rack/stackConnectorDual_P.stl b/stl/micro/rack/stackConnectorDual_P.stl index dcf1730..81320d3 100644 Binary files a/stl/micro/rack/stackConnectorDual_P.stl and b/stl/micro/rack/stackConnectorDual_P.stl differ diff --git a/stl/micro/rack/xBar_P.stl b/stl/micro/rack/xBar_P.stl index 08321c4..ed00a3d 100644 Binary files a/stl/micro/rack/xBar_P.stl and b/stl/micro/rack/xBar_P.stl differ diff --git a/stl/micro/rack/xyPlate_P.stl b/stl/micro/rack/xyPlate_P.stl index 6700901..abc4ce5 100644 Binary files a/stl/micro/rack/xyPlate_P.stl and b/stl/micro/rack/xyPlate_P.stl differ diff --git a/stl/micro/rack/yBar_P.stl b/stl/micro/rack/yBar_P.stl index 91b23e2..1f8ad05 100644 Binary files a/stl/micro/rack/yBar_P.stl and b/stl/micro/rack/yBar_P.stl differ