add new print-friendly folder, and update rbuild accordingly. also refactor+fix xBar

This commit is contained in:
zhao
2023-02-12 11:07:07 -05:00
parent d48554c304
commit 97a5783d0d
32 changed files with 117448 additions and 398443 deletions

View File

@ -4,43 +4,4 @@ include <./mainRail.scad>
include <./yBar.scad> include <./yBar.scad>
include <./xBar.scad> include <./xBar.scad>
translate(v=[12,2,18]) // TODO
mainRail();
translate(v=[12,2 + 200,18])
mirror(v=[0,1,0])
*mainRail();
translate(v=[12 + 216,2,18])
mirror(v=[1,0,0])
*mainRail();
translate(v=[12 + 216,2 + 200,18])
rotate(a=[0,0,180])
*mainRail();
*xyPlane();
translate(v=[0,0,250])
mirror(v=[0,0,1])
*xyPlane();
module xyPlane() {
yBar();
translate(v = [240, 0, 0])
mirror(v = [1, 0, 0])
yBar();
translate(v = [30, 0, 0])
xBar();
translate(v = [30, 206, 0])
mirror(v = [0, 1, 0])
xBar();
}
yBar();
translate(v = [30, 0, 0])
xBar();

View File

@ -0,0 +1,5 @@
include <../side/hingeModule.scad>
// Oriented for 3d printing.
// Supports generally not required (? need to print to test)
hingeModule();

View File

@ -0,0 +1,6 @@
include <../side/hingeModule.scad>
// Oriented for 3d printing.
// Supports generally not required (? need to print to test)
mirror(v=[1,0,0])
hingeModule();

View File

@ -0,0 +1,5 @@
include <../side/magnetModule.scad>
// Oriented for 3d printing.
// Supports generally not required (? need to print to test)
magnetModule();

View File

@ -0,0 +1,6 @@
include <../side/magnetModule.scad>
// Oriented for 3d printing.
// Supports generally not required (? need to print to test)
mirror(v=[1,0,0])
magnetModule();

View File

@ -0,0 +1,14 @@
include <../mainRail.scad>
// Oriented for 3d printing.
// Supports not required.
multmatrix(mainRailPrintOrientation)
mainRail();
mainRailPrintOrientation = [
[cos(-90), 0, sin(-90), railTotalHeight],
[0, 1, 0, 0 ],
[-sin(-90), 0, cos(-90), 0 ],
[0, 0, 0, 1 ]
];

View File

@ -0,0 +1,5 @@
include <../side/sideWallLeft.scad>
// Oriented for 3d printing.
// Supports generally not required (? need to print to test)
sideWallLeft();

View File

@ -0,0 +1,5 @@
include <../side/sideWallRight.scad>
// Oriented for 3d printing.
// Supports generally not required (? need to print to test)
sideWallRight();

5
rack/print/xBar_P.scad Normal file
View File

@ -0,0 +1,5 @@
include <../xBar.scad>
// Oriented for 3d printing.
// Supports generally not required: depending on roundness.
xBar();

5
rack/print/yBar_P.scad Normal file
View File

@ -0,0 +1,5 @@
include <../yBar.scad>
// Oriented for 3d printing.
// Supports required at XY wall connections, and depending on roundness
yBar();

View File

@ -2,6 +2,7 @@ include <../config.scad>
include <./sideWallVariables.scad> include <./sideWallVariables.scad>
include <../sharedVariables.scad> include <../sharedVariables.scad>
include <../../helper/halfspace.scad> include <../../helper/halfspace.scad>
include <../../helper/screws.scad>
module hingeModule() { module hingeModule() {

View File

@ -4,6 +4,7 @@ include <./sideWallVariables.scad>
include <../sharedVariables.scad> include <../sharedVariables.scad>
include <../../helper/halfspace.scad> include <../../helper/halfspace.scad>
include <../../misc/magnet.scad> include <../../misc/magnet.scad>
include <../../helper/screws.scad>
module magnetModule() { module magnetModule() {

View File

@ -13,11 +13,12 @@ include <./hingeModule.scad>
echo("Side Wall Height", sideWallZ); echo("Side Wall Height", sideWallZ);
echo("Side Wall Depth", sideWallY); echo("Side Wall Depth", sideWallY);
module sideWall() { *sideWallBase();
module sideWallBase() {
applyHingeConnector() applyHingeConnector()
applyMagnetConnector() applyMagnetConnector()
applyEpicVentilation()
applyHandle() applyHandle()
sideWallBase(); sideWallBase();
@ -96,29 +97,13 @@ module sideWall() {
children(0); children(0);
} }
module sideWallMagnetMountRotated() { module sideWallMagnetMountRotated() {
rotate(a=[0,90,0]) rotate(a=[0,90,0])
sideWallMagnetMount(); sideWallMagnetMount();
} }
} }
module applyEpicVentilation() {
children(0);
}
module applyHandle() { module applyHandle() {
children(0); children(0);
} }
} }
sideWall();
translate(v=[10,sideWallSlotToXZ,-2])
mirror(v=[1,0,0])
*magnetModule();
translate(v=[3,100,0])
mirror(v=[0,1,0])
*hingeModule();

View File

@ -0,0 +1,15 @@
include <./sideWallBase.scad>
*sideWallLeft();
module sideWallLeft() {
applyEpicVentilation()
sideWallBase();
module applyEpicVentilation() {
children(0);
}
}

View File

@ -0,0 +1,15 @@
include <./sideWallBase.scad>
*sideWallRight();
module sideWallRight() {
applyEpicVentilation()
mirror(v=[1,0,0])
sideWallBase();
module applyEpicVentilation() {
children(0);
}
}

View File

@ -1,6 +1,7 @@
include <../config.scad> include <../config.scad>
include <../sharedVariables.scad> include <../sharedVariables.scad>
include <../../misc/magnet.scad>
sideWallConnW = 7; sideWallConnW = 7;
sideWallConnD = 20; sideWallConnD = 20;

View File

@ -1,13 +1,10 @@
include <../helper/sphericalFilet.scad>
include <../helper/cylindricalFilet.scad> include <../helper/cylindricalFilet.scad>
include <../helper/screws.scad> include <../helper/screws.scad>
include <./config.scad> include <./config.scad>
include <./derivedConfig.scad>
include <./xyBarConnector.scad> include <./xyBarConnector.scad>
// Temporary // Temporary
include <./yBar.scad> include <./yBar.scad>
include <./mainRail.scad>
// It's actually the railSlotToInnerYEdge of the yBar, it'll be nice to be able to refer to it like yBar.railSlotToInnerYEdge // It's actually the railSlotToInnerYEdge of the yBar, it'll be nice to be able to refer to it like yBar.railSlotToInnerYEdge
xBarDepth = maxUnitWidth - 2*railSlotToInnerYEdge; xBarDepth = maxUnitWidth - 2*railSlotToInnerYEdge;
@ -22,18 +19,25 @@ xBarRoundness = baseRoundness;
module xBar() { module xBar() {
module positive() { applyYBarConnector()
mirror(v=[0,1,0]) xBarBase();
rotate(a=[0,0,-90])
module xBarBase() {
intersection() {
mirror(v = [0, 1, 0])
rotate(a = [0, 0, -90])
difference() { difference() {
cylindricalFiletEdge(xBarWidth, xBarDepth, xBarHeight, xBarRoundness); cylindricalFiletEdge(xBarWidth, xBarDepth, xBarHeight, xBarRoundness);
translate(v = [xBarWallThickness, xBarWallThickness, xBarWallThickness]) translate(v = [xBarWallThickness, xBarWallThickness, xBarWallThickness])
cylindricalFiletEdge(xBarWidth, xBarDepth - 2*xBarWallThickness, xBarHeight, xBarRoundness); cylindricalFiletEdge(xBarWidth, xBarDepth-2*xBarWallThickness, xBarHeight, xBarRoundness);
}
} }
module xBar() { // Shave off bottom corners to reduce elephant's foot at where xBar and YBar join
halfspace(vpos = [1, 0, 1], p = [0.6, 0, 0]);
halfspace(vpos = [-1, 0, 1], p = [xBarDepth-0.6, 0, 0]);
}
}
module mirrorOtherCorner() { module mirrorOtherCorner() {
children(0); children(0);
@ -45,31 +49,17 @@ module xBar() {
} }
} }
// TODO refactor - probably better off mirroring the side faces and hulling the shell module applyYBarConnector() {
difference() { apply_pn() {
union() {
intersection() {
positive();
halfspace(vpos = [1, 0, 1], p = [0.5, 0, 0]);
halfspace(vpos = [-1, 0, 1], p = [xBarDepth-0.5, 0, 0]);
}
yBarConnectorFromXLug();
mirrorOtherCorner() mirrorOtherCorner()
yBarConnectorFromXLug(); yBarConnectorFromXLug();
}
union() {
yBarConnectorFromX_N();
mirrorOtherCorner() mirrorOtherCorner()
yBarConnectorFromX_N(); yBarConnectorFromX_N();
children(0);
} }
} }
}
xBar();
} }

View File

@ -48,9 +48,7 @@ module yBarConnectorFromXLug() {
scale(v=[0.90,0.95,0.90]) scale(v=[0.90,0.95,0.90])
cube(size = [3, 10, 6], center = true); cube(size = [3, 10, 6], center = true);
mirror(v=[0,0,1])
halfspace(vpos=[0,0,1], p=[0,0,0]); halfspace(vpos=[0,0,1], p=[0,0,0]);
halfspace(vpos=[1,0,0], p=[-2,0,0]); halfspace(vpos=[1,0,0], p=[-2,0,0]);
} }
} }

View File

@ -1,7 +1,7 @@
#!/bin/bash #!/bin/bash
STL_TARGET_DIR=stl STL_TARGET_DIR=stl
RACK_DIR=rack RACK_DIR=rack/print
RACK_TARGET_DIR="$STL_TARGET_DIR"/"$RACK_DIR" RACK_TARGET_DIR="$STL_TARGET_DIR"/"$RACK_DIR"
echo "Starting build" echo "Starting build"
@ -17,9 +17,10 @@ rbuild() {
build_scad "$item" build_scad "$item"
elif [[ "$command" == "clean" ]]; then elif [[ "$command" == "clean" ]]; then
clean_scad "$item" clean_scad "$item"
else
echo "Command not supported 😔";
fi fi
echo "That all folks"
} }
build_scad() { build_scad() {
@ -50,7 +51,14 @@ build_scad_file() {
} }
build_scad_dir() { build_scad_dir() {
echo "build_scad_dir TODO"
for ITEM in "$RACK_DIR"/*.scad; do
local base_item="$(basename "${ITEM}")";
build_scad_file "${base_item%.*}";
done
} }
clean_scad_file() { clean_scad_file() {

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

27302
stl/rack/print/mainRail_P.stl Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

5182
stl/rack/print/xBar_P.stl Normal file

File diff suppressed because it is too large Load Diff

36318
stl/rack/print/yBar_P.stl Normal file

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff

File diff suppressed because it is too large Load Diff