WIP on sideWall and sideWallConnector
This commit is contained in:
@ -2,30 +2,35 @@ include <../helper/math.scad>
|
||||
include <../helper/halfspace.scad>
|
||||
include <../misc/magnet.scad>
|
||||
include <./config.scad>
|
||||
include <./yBar.scad>
|
||||
include <./sideWallConnector.scad>
|
||||
include <./mainRail.scad>
|
||||
|
||||
include <./sharedVariables.scad>
|
||||
|
||||
include <./sideWallConnector.scad>
|
||||
|
||||
sideWallZ = 110;
|
||||
sideWallY = 110;
|
||||
sideWallX = 12;
|
||||
|
||||
sideWallZGapClearance = 0.2;
|
||||
sideWallZ = railTotalHeight - 2*(railFootThickness + sideWallZGapClearance);
|
||||
|
||||
sideWallY = yBarDepth;
|
||||
|
||||
// make these global
|
||||
hingePoleToInnerSideWallX = (hingePoleToConnectorOuterYZFace + sideWallSlotToOuterYEdge) - sideWallThickness;
|
||||
hingePoleToInnerSideWallY = (hingePoleToConnectorOuterXZFace + sideWallSlotToOuterXEdge) - sideWallThickness;
|
||||
sideWallXGapClearance = 0.2;
|
||||
sideWallX = (yBarWidth-(railTotalWidth+railSlotToInnerYEdge)) - sideWallXGapClearance;
|
||||
|
||||
hingePoleDx = hingePoleToConnectorOuterYZFace + sideWallSlotToOuterYEdge;
|
||||
hingePoleDy = hingePoleToConnectorOuterXZFace + sideWallSlotToOuterXEdge;
|
||||
|
||||
echo("Side Wall Height", sideWallZ);
|
||||
echo("Side Wall Depth", sideWallY);
|
||||
|
||||
module sideWall() {
|
||||
|
||||
applyHingeConnector()
|
||||
applyMagnetConnector()
|
||||
applyEpicVentilation()
|
||||
applyHingeHandle()
|
||||
sideWallBase();
|
||||
|
||||
|
||||
module sideWallBase() {
|
||||
|
||||
module roundThingHelper(x,y,z,r) {
|
||||
@ -50,54 +55,80 @@ module sideWall() {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module applyHingeConnector() {
|
||||
|
||||
hingeHolePositiveRad = hingeHoleR+1;
|
||||
|
||||
module hingeProjectConstructionPlane() {
|
||||
translate(v=[sideWallX-(sideWallThickness+hingePoleToInnerSideWallX) - hingeHolePositiveRad,sideWallY,0])
|
||||
cube(size=[2*hingeHolePositiveRad, eps, sideWallZ]);
|
||||
}
|
||||
hingeHoleShellR = hingeHoleR+1;
|
||||
|
||||
apply_pn() {
|
||||
|
||||
hull() {
|
||||
translate(v = [sideWallX-(sideWallThickness+hingePoleToInnerSideWallX), sideWallY-(sideWallThickness+
|
||||
hingePoleToInnerSideWallY), 0])
|
||||
cylinder(r = hingeHoleR+1, h = sideWallZ);
|
||||
|
||||
hingeProjectConstructionPlane();
|
||||
hingeShell();
|
||||
hingeBacksideProjectionPlane();
|
||||
}
|
||||
|
||||
union() {
|
||||
translate(v = [sideWallX-(sideWallThickness+hingePoleToInnerSideWallX), sideWallY-(sideWallThickness+
|
||||
hingePoleToInnerSideWallY), 0])
|
||||
cylinder(r = hingeHoleR, h = sideWallZ);
|
||||
|
||||
// TODO annoying constant
|
||||
halfspace(p=[sideWallX-3.3, sideWallY, 0], vpos=[1,1,0]);
|
||||
hingeHole();
|
||||
// Trim parts of the wall for rotational clearance
|
||||
halfspace(p=[sideWallX-5, sideWallY, 0], vpos=[1,1.5,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() {
|
||||
apply_p() {
|
||||
union() {
|
||||
translate(v = [sideWallThickness, magnetMountToYBarFront + 2, magnetMountToYBarTop+1])
|
||||
sideMagnetMount();
|
||||
|
||||
translate(v=[sideWallThickness,10,10])
|
||||
rotate(a=[0,90,0])
|
||||
sideWallConnectorMagnetSide();
|
||||
translate(v = [sideWallThickness, magnetMountToYBarFront + 2, sideWallZ - (magnetMountToYBarTop + 1)])
|
||||
sideMagnetMount();
|
||||
}
|
||||
|
||||
children(0);
|
||||
}
|
||||
|
||||
|
||||
module sideMagnetMount() {
|
||||
rotate(a=[0,90,0])
|
||||
sideWallConnectorMagnetSide();
|
||||
}
|
||||
}
|
||||
|
||||
module applyEpicVentilation() {
|
||||
children(0);
|
||||
}
|
||||
|
||||
module applyHingeHandle() {
|
||||
children(0);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
sideWall();
|
||||
|
||||
translate(v=[10,sideWallSlotToXZ,-2])
|
||||
mirror(v=[1,0,0])
|
||||
sideWallConnectorMagnet();
|
||||
|
||||
translate(v=[3,100,0])
|
||||
mirror(v=[0,1,0])
|
||||
sideWallConnectorHinge();
|
||||
Reference in New Issue
Block a user