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 <./xBar.scad>
translate(v=[12,2,18])
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();
// TODO

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 <../sharedVariables.scad>
include <../../helper/halfspace.scad>
include <../../helper/screws.scad>
module hingeModule() {

View File

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

View File

@ -13,11 +13,12 @@ include <./hingeModule.scad>
echo("Side Wall Height", sideWallZ);
echo("Side Wall Depth", sideWallY);
module sideWall() {
*sideWallBase();
module sideWallBase() {
applyHingeConnector()
applyMagnetConnector()
applyEpicVentilation()
applyHandle()
sideWallBase();
@ -96,29 +97,13 @@ module sideWall() {
children(0);
}
module sideWallMagnetMountRotated() {
rotate(a=[0,90,0])
sideWallMagnetMount();
}
}
module applyEpicVentilation() {
children(0);
}
module applyHandle() {
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 <../sharedVariables.scad>
include <../../misc/magnet.scad>
sideWallConnW = 7;
sideWallConnD = 20;

View File

@ -1,13 +1,10 @@
include <../helper/sphericalFilet.scad>
include <../helper/cylindricalFilet.scad>
include <../helper/screws.scad>
include <./config.scad>
include <./derivedConfig.scad>
include <./xyBarConnector.scad>
// Temporary
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
xBarDepth = maxUnitWidth - 2*railSlotToInnerYEdge;
@ -22,54 +19,47 @@ xBarRoundness = baseRoundness;
module xBar() {
module positive() {
mirror(v=[0,1,0])
rotate(a=[0,0,-90])
difference() {
cylindricalFiletEdge(xBarWidth, xBarDepth, xBarHeight, xBarRoundness);
applyYBarConnector()
xBarBase();
translate(v = [xBarWallThickness, xBarWallThickness, xBarWallThickness])
cylindricalFiletEdge(xBarWidth, xBarDepth - 2*xBarWallThickness, xBarHeight, xBarRoundness);
module xBarBase() {
intersection() {
mirror(v = [0, 1, 0])
rotate(a = [0, 0, -90])
difference() {
cylindricalFiletEdge(xBarWidth, xBarDepth, xBarHeight, xBarRoundness);
translate(v = [xBarWallThickness, xBarWallThickness, xBarWallThickness])
cylindricalFiletEdge(xBarWidth, xBarDepth-2*xBarWallThickness, xBarHeight, xBarRoundness);
}
// 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 xBar() {
module mirrorOtherCorner() {
children(0);
module mirrorOtherCorner() {
// TODO rename xBarDepth to xBarLength/xBarWidth
translate(v = [xBarDepth, 0, 0])
mirror(v = [1, 0, 0]) {
children(0);
// TODO rename xBarDepth to xBarLength/xBarWidth
translate(v = [xBarDepth, 0, 0])
mirror(v = [1, 0, 0]) {
children(0);
}
}
// TODO refactor - probably better off mirroring the side faces and hulling the shell
difference() {
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()
yBarConnectorFromXLug();
}
union() {
yBarConnectorFromX_N();
mirrorOtherCorner()
yBarConnectorFromX_N();
}
}
}
xBar();
}
module applyYBarConnector() {
apply_pn() {
mirrorOtherCorner()
yBarConnectorFromXLug();
mirrorOtherCorner()
yBarConnectorFromX_N();
children(0);
}
}
}

View File

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