WIP on sideWall and sideWallConnector
This commit is contained in:
3
TODO.md
3
TODO.md
@ -9,7 +9,8 @@
|
|||||||
- Start working on actual cases
|
- Start working on actual cases
|
||||||
|
|
||||||
### Ideas
|
### Ideas
|
||||||
|
- Clean up `sharedVariables.scad`!!!
|
||||||
|
- Start using matrices for transformations. Enforce strict local/global hierarchy of matrix transformations.
|
||||||
- Instead of using names like 'mainRailSlotToInnerYZFace', experiment with a central distance/dimension directory. Like:
|
- Instead of using names like 'mainRailSlotToInnerYZFace', experiment with a central distance/dimension directory. Like:
|
||||||
```openscad
|
```openscad
|
||||||
// Define identifiers:
|
// Define identifiers:
|
||||||
|
|||||||
@ -2,33 +2,7 @@ include <./config.scad>
|
|||||||
include <../helper/screws.scad>
|
include <../helper/screws.scad>
|
||||||
include <../helper/math.scad>
|
include <../helper/math.scad>
|
||||||
include <../helper/halfspace.scad>
|
include <../helper/halfspace.scad>
|
||||||
|
include <./sharedVariables.scad>
|
||||||
/* Small horizontal planes at the top and bottom of the main rails. Used so we can fasten the rail to the frame
|
|
||||||
Note that this value is also used for a depression at the bottom/top of the frame for aligning the rail */
|
|
||||||
railFootThickness = 3;
|
|
||||||
|
|
||||||
railTotalHeight = screwDiff * (numRailScrews + 1) + 2 * railFootThickness;
|
|
||||||
|
|
||||||
railFrontThickness = 6; // Make sure that the nuts for the chosen screw type can slot within the front face
|
|
||||||
railSideMountThickness = 2.5;
|
|
||||||
|
|
||||||
// Distance between the middle of a screw mount and the rail's vertical edges
|
|
||||||
railScrewHoleToInnerEdge = 5;
|
|
||||||
railScrewHoleToOuterEdge = 7;
|
|
||||||
|
|
||||||
// Distance between the midpoint of the rail screw holes.
|
|
||||||
rackMountScrewWidth = maxUnitWidth + 2 * railScrewHoleToInnerEdge;
|
|
||||||
|
|
||||||
// Extra spacing for screws.
|
|
||||||
frontScrewSpacing = 15;
|
|
||||||
|
|
||||||
sideSupportScrewHoleToBackEdge = 4;
|
|
||||||
sideSupportDepth = sideSupportScrewHoleToBackEdge + frontScrewSpacing;
|
|
||||||
|
|
||||||
frontFaceWidth = railScrewHoleToInnerEdge + railScrewHoleToOuterEdge;
|
|
||||||
|
|
||||||
railTotalWidth = frontFaceWidth;
|
|
||||||
railTotalDepth = railFrontThickness+sideSupportDepth;
|
|
||||||
|
|
||||||
*mainRail();
|
*mainRail();
|
||||||
|
|
||||||
|
|||||||
@ -1,4 +1,53 @@
|
|||||||
|
// Main rail variables:
|
||||||
|
|
||||||
|
/* Small horizontal planes at the top and bottom of the main rails. Used so we can fasten the rail to the frame
|
||||||
|
Note that this value is also used for a depression at the bottom/top of the frame for aligning the rail */
|
||||||
|
railFootThickness = 3;
|
||||||
|
|
||||||
|
railTotalHeight = screwDiff * (numRailScrews + 1) + 2 * railFootThickness;
|
||||||
|
|
||||||
|
railFrontThickness = 6; // Make sure that the nuts for the chosen screw type can slot within the front face
|
||||||
|
railSideMountThickness = 2.5;
|
||||||
|
|
||||||
|
// Distance between the middle of a screw mount and the rail's vertical edges
|
||||||
|
railScrewHoleToInnerEdge = 5;
|
||||||
|
railScrewHoleToOuterEdge = 7;
|
||||||
|
|
||||||
|
// Distance between the midpoint of the rail screw holes.
|
||||||
|
rackMountScrewWidth = maxUnitWidth + 2 * railScrewHoleToInnerEdge;
|
||||||
|
|
||||||
|
// Extra spacing for screws.
|
||||||
|
frontScrewSpacing = 15;
|
||||||
|
|
||||||
|
sideSupportScrewHoleToBackEdge = 4;
|
||||||
|
sideSupportDepth = sideSupportScrewHoleToBackEdge + frontScrewSpacing;
|
||||||
|
|
||||||
|
frontFaceWidth = railScrewHoleToInnerEdge + railScrewHoleToOuterEdge;
|
||||||
|
|
||||||
|
railTotalWidth = frontFaceWidth;
|
||||||
|
railTotalDepth = railFrontThickness+sideSupportDepth;
|
||||||
|
|
||||||
|
|
||||||
|
// Side Wall variables:
|
||||||
sideWallThickness = 2.5;
|
sideWallThickness = 2.5;
|
||||||
|
|
||||||
sideWallSlotToOuterYEdge = 3;
|
sideWallSlotToOuterYEdge = 3;
|
||||||
sideWallSlotToOuterXEdge = 3; // TODO rename to variables found in ybar;
|
sideWallSlotToOuterXEdge = 3; // TODO rename to variables found in ybar;
|
||||||
|
sideWallConnectorSlotWidth = 7;
|
||||||
|
|
||||||
|
|
||||||
|
// Y Bar variables:
|
||||||
|
railSlotToXZ = 3;
|
||||||
|
sideWallSlotToXZ = 3;
|
||||||
|
|
||||||
|
railSlotToInnerYEdge = 2;
|
||||||
|
railSlotToSideWallSlot = 2;
|
||||||
|
|
||||||
|
yBarWidth = railSlotToInnerYEdge + railTotalWidth+ railSlotToSideWallSlot
|
||||||
|
+ sideWallSlotToOuterYEdge + sideWallConnectorSlotWidth;
|
||||||
|
yBarDepth = maxUnitDepth + 2*railSlotToInnerYEdge;
|
||||||
|
yBarHeight = 15;
|
||||||
|
yBarWallThickness = 3;
|
||||||
|
yBarRoundness = baseRoundness;
|
||||||
|
|
||||||
|
joinCornerDepth = 32;
|
||||||
|
|||||||
@ -2,30 +2,35 @@ include <../helper/math.scad>
|
|||||||
include <../helper/halfspace.scad>
|
include <../helper/halfspace.scad>
|
||||||
include <../misc/magnet.scad>
|
include <../misc/magnet.scad>
|
||||||
include <./config.scad>
|
include <./config.scad>
|
||||||
include <./yBar.scad>
|
include <./mainRail.scad>
|
||||||
include <./sideWallConnector.scad>
|
|
||||||
include <./sharedVariables.scad>
|
include <./sharedVariables.scad>
|
||||||
|
|
||||||
|
include <./sideWallConnector.scad>
|
||||||
|
|
||||||
sideWallZ = 110;
|
|
||||||
sideWallY = 110;
|
|
||||||
sideWallX = 12;
|
|
||||||
|
|
||||||
sideWallZGapClearance = 0.2;
|
sideWallZGapClearance = 0.2;
|
||||||
|
sideWallZ = railTotalHeight - 2*(railFootThickness + sideWallZGapClearance);
|
||||||
|
|
||||||
|
sideWallY = yBarDepth;
|
||||||
|
|
||||||
// make these global
|
sideWallXGapClearance = 0.2;
|
||||||
hingePoleToInnerSideWallX = (hingePoleToConnectorOuterYZFace + sideWallSlotToOuterYEdge) - sideWallThickness;
|
sideWallX = (yBarWidth-(railTotalWidth+railSlotToInnerYEdge)) - sideWallXGapClearance;
|
||||||
hingePoleToInnerSideWallY = (hingePoleToConnectorOuterXZFace + sideWallSlotToOuterXEdge) - sideWallThickness;
|
|
||||||
|
|
||||||
|
hingePoleDx = hingePoleToConnectorOuterYZFace + sideWallSlotToOuterYEdge;
|
||||||
|
hingePoleDy = hingePoleToConnectorOuterXZFace + sideWallSlotToOuterXEdge;
|
||||||
|
|
||||||
|
echo("Side Wall Height", sideWallZ);
|
||||||
|
echo("Side Wall Depth", sideWallY);
|
||||||
|
|
||||||
module sideWall() {
|
module sideWall() {
|
||||||
|
|
||||||
applyHingeConnector()
|
applyHingeConnector()
|
||||||
applyMagnetConnector()
|
applyMagnetConnector()
|
||||||
|
applyEpicVentilation()
|
||||||
|
applyHingeHandle()
|
||||||
sideWallBase();
|
sideWallBase();
|
||||||
|
|
||||||
|
|
||||||
module sideWallBase() {
|
module sideWallBase() {
|
||||||
|
|
||||||
module roundThingHelper(x,y,z,r) {
|
module roundThingHelper(x,y,z,r) {
|
||||||
@ -50,54 +55,80 @@ module sideWall() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
module applyHingeConnector() {
|
module applyHingeConnector() {
|
||||||
|
|
||||||
hingeHolePositiveRad = hingeHoleR+1;
|
hingeHoleShellR = hingeHoleR+1;
|
||||||
|
|
||||||
module hingeProjectConstructionPlane() {
|
|
||||||
translate(v=[sideWallX-(sideWallThickness+hingePoleToInnerSideWallX) - hingeHolePositiveRad,sideWallY,0])
|
|
||||||
cube(size=[2*hingeHolePositiveRad, eps, sideWallZ]);
|
|
||||||
}
|
|
||||||
|
|
||||||
apply_pn() {
|
apply_pn() {
|
||||||
|
|
||||||
hull() {
|
hull() {
|
||||||
translate(v = [sideWallX-(sideWallThickness+hingePoleToInnerSideWallX), sideWallY-(sideWallThickness+
|
hingeShell();
|
||||||
hingePoleToInnerSideWallY), 0])
|
hingeBacksideProjectionPlane();
|
||||||
cylinder(r = hingeHoleR+1, h = sideWallZ);
|
|
||||||
|
|
||||||
hingeProjectConstructionPlane();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
union() {
|
union() {
|
||||||
translate(v = [sideWallX-(sideWallThickness+hingePoleToInnerSideWallX), sideWallY-(sideWallThickness+
|
hingeHole();
|
||||||
hingePoleToInnerSideWallY), 0])
|
// Trim parts of the wall for rotational clearance
|
||||||
cylinder(r = hingeHoleR, h = sideWallZ);
|
halfspace(p=[sideWallX-5, sideWallY, 0], vpos=[1,1.5,0]);
|
||||||
|
|
||||||
// TODO annoying constant
|
|
||||||
halfspace(p=[sideWallX-3.3, sideWallY, 0], vpos=[1,1,0]);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
children(0);
|
children(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module hingeShell() {
|
||||||
|
translate(v = [sideWallX-hingePoleDx, sideWallY-(sideWallThickness+hingePoleDy), 0])
|
||||||
|
cylinder(r = hingeHoleShellR, h = sideWallZ);
|
||||||
|
}
|
||||||
|
|
||||||
|
// XZ plane in line with the back of the case. Project the hinge pole shell onto this to fill any weird
|
||||||
|
// geometries from the curves of the side wall
|
||||||
|
module hingeBacksideProjectionPlane() {
|
||||||
|
translate(v=[sideWallX-hingePoleDx - hingeHoleShellR,sideWallY,0])
|
||||||
|
cube(size=[2*hingeHoleShellR, eps, sideWallZ]);
|
||||||
|
}
|
||||||
|
|
||||||
|
module hingeHole() {
|
||||||
|
translate(v = [sideWallX-hingePoleDx, sideWallY-(sideWallThickness+hingePoleDy), 0])
|
||||||
|
cylinder(r = hingeHoleR, h = sideWallZ);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: add correct magnet translations, also remove random variables
|
||||||
module applyMagnetConnector() {
|
module applyMagnetConnector() {
|
||||||
apply_p() {
|
apply_p() {
|
||||||
|
union() {
|
||||||
|
translate(v = [sideWallThickness, magnetMountToYBarFront + 2, magnetMountToYBarTop+1])
|
||||||
|
sideMagnetMount();
|
||||||
|
|
||||||
translate(v=[sideWallThickness,10,10])
|
translate(v = [sideWallThickness, magnetMountToYBarFront + 2, sideWallZ - (magnetMountToYBarTop + 1)])
|
||||||
rotate(a=[0,90,0])
|
sideMagnetMount();
|
||||||
sideWallConnectorMagnetSide();
|
}
|
||||||
|
|
||||||
children(0);
|
children(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
module sideMagnetMount() {
|
||||||
|
rotate(a=[0,90,0])
|
||||||
|
sideWallConnectorMagnetSide();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
module applyEpicVentilation() {
|
module applyEpicVentilation() {
|
||||||
|
children(0);
|
||||||
|
}
|
||||||
|
|
||||||
|
module applyHingeHandle() {
|
||||||
|
children(0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
sideWall();
|
sideWall();
|
||||||
|
|
||||||
|
translate(v=[10,sideWallSlotToXZ,-2])
|
||||||
|
mirror(v=[1,0,0])
|
||||||
|
sideWallConnectorMagnet();
|
||||||
|
|
||||||
|
translate(v=[3,100,0])
|
||||||
|
mirror(v=[0,1,0])
|
||||||
|
sideWallConnectorHinge();
|
||||||
@ -4,7 +4,6 @@ include <../helper/halfspace.scad>
|
|||||||
include <../misc/magnet.scad>
|
include <../misc/magnet.scad>
|
||||||
include <./sharedVariables.scad>
|
include <./sharedVariables.scad>
|
||||||
|
|
||||||
sideWallConnectorSlotWidth = 7;
|
|
||||||
|
|
||||||
sideWallConnW = 7;
|
sideWallConnW = 7;
|
||||||
sideWallConnD = 20;
|
sideWallConnD = 20;
|
||||||
@ -15,10 +14,13 @@ yBarScrewHoleToOuterYEdge = 3.5;
|
|||||||
yBarScrewHoleToFrontXEdge = 16;
|
yBarScrewHoleToFrontXEdge = 16;
|
||||||
|
|
||||||
magnetFaceToSideWallConnOuterYEdge = 2;
|
magnetFaceToSideWallConnOuterYEdge = 2;
|
||||||
magnetMountExtraRadius = magnetRSlacked + 1;
|
magnetMountShellRadius = magnetRSlacked + 1;
|
||||||
|
|
||||||
innerSideWallToYBarMagnetConn = magnetFaceToSideWallConnOuterYEdge + sideWallSlotToOuterYEdge - sideWallThickness;
|
innerSideWallToYBarMagnetConn = magnetFaceToSideWallConnOuterYEdge + sideWallSlotToOuterYEdge - sideWallThickness;
|
||||||
|
|
||||||
|
magnetMountToYBarTop = magnetMountShellRadius;
|
||||||
|
magnetMountToYBarFront = magnetMountShellRadius + sideWallSlotToXZ;
|
||||||
|
|
||||||
hingePoleR = 2;
|
hingePoleR = 2;
|
||||||
hingePoleH = 5;
|
hingePoleH = 5;
|
||||||
hingeHoleR = hingePoleR + 0.2;
|
hingeHoleR = hingePoleR + 0.2;
|
||||||
@ -67,27 +69,40 @@ module sideWallConnectorMagnet() {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// TODO: clean up
|
|
||||||
module applyMagnetMount() {
|
module applyMagnetMount() {
|
||||||
apply_p() {
|
|
||||||
difference() {
|
|
||||||
hull() {
|
|
||||||
translate(v = [0, 4, magnetMountExtraRadius+sideWallConnH])
|
|
||||||
rotate(a = [0, 90, 0])
|
|
||||||
cylinder(r = magnetMountExtraRadius, h = sideWallConnW-magnetFaceToSideWallConnOuterYEdge);
|
|
||||||
|
|
||||||
translate(v = [0, 0, sideWallConnH])
|
magnetMountDx = magnetMountShellRadius;
|
||||||
cube(size = [sideWallConnW-magnetFaceToSideWallConnOuterYEdge, 2*magnetMountExtraRadius, eps]);
|
magnetMountDy = magnetMountShellRadius + 2;
|
||||||
}
|
magnetMountDz = magnetMountShellRadius + sideWallConnLugDepression +1;
|
||||||
|
|
||||||
translate(v = [sideWallConnW-(magnetFaceToSideWallConnOuterYEdge+magnetHSlacked), 4, 6])
|
|
||||||
rotate(a = [0, 90, 0])
|
|
||||||
cylinder(r = magnetRSlacked, h = magnetHSlacked);
|
|
||||||
}
|
|
||||||
|
|
||||||
|
apply_pn() {
|
||||||
|
magnetMountShell();
|
||||||
|
magnetMountHole();
|
||||||
children(0);
|
children(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
module magnetMountShell() {
|
||||||
|
hull() {
|
||||||
|
translate(v = [0, magnetMountDy, magnetMountDz])
|
||||||
|
rotate(a = [0, 90, 0])
|
||||||
|
cylinder(r = magnetMountShellRadius, h = sideWallConnW-magnetFaceToSideWallConnOuterYEdge);
|
||||||
|
|
||||||
|
translate(v = [0, 2, sideWallConnH])
|
||||||
|
cube(size = [sideWallConnW-magnetFaceToSideWallConnOuterYEdge, 2*magnetMountShellRadius, eps]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
module magnetMountHole() {
|
||||||
|
translate(v = [sideWallConnW-(magnetFaceToSideWallConnOuterYEdge+magnetHSlacked),
|
||||||
|
magnetMountDy,
|
||||||
|
magnetMountDz])
|
||||||
|
rotate(a = [0, 90, 0])
|
||||||
|
cylinder(r = magnetRSlacked, h = magnetHSlacked);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
module sideWallConnectorHinge() {
|
module sideWallConnectorHinge() {
|
||||||
@ -134,7 +149,7 @@ module sideWallConnectorHinge() {
|
|||||||
module sideWallConnectorMagnetSide() {
|
module sideWallConnectorMagnetSide() {
|
||||||
// oriented so that the xy face is the side wall's inner face
|
// oriented so that the xy face is the side wall's inner face
|
||||||
difference() {
|
difference() {
|
||||||
cylinder(r1=magnetMountExtraRadius+2 ,r2 = magnetMountExtraRadius, h = innerSideWallToYBarMagnetConn);
|
cylinder(r1=magnetMountShellRadius + 0.5,r2 = magnetMountShellRadius, h = innerSideWallToYBarMagnetConn);
|
||||||
|
|
||||||
translate(v=[0, 0, innerSideWallToYBarMagnetConn-magnetHSlacked])
|
translate(v=[0, 0, innerSideWallToYBarMagnetConn-magnetHSlacked])
|
||||||
cylinder(r = magnetRSlacked, h = magnetHSlacked);
|
cylinder(r = magnetRSlacked, h = magnetHSlacked);
|
||||||
|
|||||||
@ -3,7 +3,6 @@ include <../helper/sphericalFilet.scad>
|
|||||||
include <../helper/cylindricalFilet.scad>
|
include <../helper/cylindricalFilet.scad>
|
||||||
include <../helper/screws.scad>
|
include <../helper/screws.scad>
|
||||||
include <../misc/magnet.scad>
|
include <../misc/magnet.scad>
|
||||||
|
|
||||||
include <./config.scad>
|
include <./config.scad>
|
||||||
include <./mainRail.scad>
|
include <./mainRail.scad>
|
||||||
|
|
||||||
@ -13,19 +12,8 @@ include <./xyBarConnector.scad>
|
|||||||
include <./sideWallConnector.scad>
|
include <./sideWallConnector.scad>
|
||||||
include <./yBarBasePlateConnector.scad>
|
include <./yBarBasePlateConnector.scad>
|
||||||
|
|
||||||
railSlotToInnerYEdge = 2;
|
include <./sharedVariables.scad>
|
||||||
railSlotToXZ = 3;
|
|
||||||
railSlotToSideWallSlot = 2;
|
|
||||||
sideWallSlotToXZ = 3;
|
|
||||||
|
|
||||||
yBarDepth = maxUnitDepth + 2*railSlotToInnerYEdge;
|
|
||||||
yBarWidth = railSlotToInnerYEdge + railTotalWidth+ railSlotToSideWallSlot
|
|
||||||
+ sideWallSlotToOuterYEdge + sideWallConnectorSlotWidth;
|
|
||||||
yBarHeight = 15;
|
|
||||||
yBarWallThickness = 3;
|
|
||||||
yBarRoundness = baseRoundness;
|
|
||||||
|
|
||||||
joinCornerDepth = 32;
|
|
||||||
|
|
||||||
echo("Bar total depth: ", yBarDepth);
|
echo("Bar total depth: ", yBarDepth);
|
||||||
echo("Bar total width: ", yBarWidth);
|
echo("Bar total width: ", yBarWidth);
|
||||||
|
|||||||
Reference in New Issue
Block a user