side wall improvements: add option to not include ventilation holes for side walls, and add horizontal bracing

This commit is contained in:
zhao
2024-02-25 11:14:31 -05:00
parent 3c7dd8985f
commit d46b778560
44 changed files with 56 additions and 33 deletions

View File

@ -1,5 +1,8 @@
// Config aggregator file
// Config aggregator file + some extra configs
include <./dowel.scad>
include <./magnet.scad>
include <./rackFrame.scad>
include <./print.scad>
sideWallVentilation = true;

View File

@ -14,6 +14,7 @@ use <./hingeModule.scad>
module sideWallBase() {
applyHingeConnector()
applySideWallBracing(numVerticalRibs=2)
applyMagnetConnector()
applyHandle()
sideWallBase();
@ -135,13 +136,18 @@ module applySideWallDefaultVentilation(numVents) {
r = 2; // vent roundness
ventLength = sideWallY - 2*sideWallDefaultVentilationToZEdge;
ventZDiff = (sideWallZ - 2*sideWallDefaultVentilationToYEdge)/(numVents-1);
ventZDiff = numVents == 1
? 0 // TODO kinda ugly
: (sideWallZ - 2*sideWallDefaultVentilationToYEdge)/(numVents-1);
apply_n() {
if (numVents > 0) {
for (i = [0:numVents-1]) {
translate(v = [0, sideWallDefaultVentilationToZEdge, i*ventZDiff+sideWallDefaultVentilationToYEdge])
vent();
}
}
children(0);
}
@ -155,50 +161,65 @@ module applySideWallDefaultVentilation(numVents) {
}
}
module applySideWallBracing(numRibs) {
module applySideWallBracing(numVerticalRibs) {
apply_p() {
// TODO add horizontal bracing
sideWallVerticalBracing(numRibs = numRibs);
union() {
sideWallVerticalBracing(numRibs = numVerticalRibs);
sideWallHorizontalBracing();
}
children(0);
}
module sideWallVerticalBracing(numRibs, ribZ, ribExtrusion=1) {
module sideWallVerticalBracing(numRibs) {
ribRampLength = 5;
ribWidth = 2;
ribZ = sideWallZ;
ribYDiff = sideWallY - 2*sideWallDefaultVerticalBracingToZEdge;
translate(v=[0,sideWallDefaultVerticalBracingToZEdge,0])
intersection() {
for (i = [0:numRibs-1]) {
translate(v = [sideWallThickness, i*ribYDiff, (sideWallZ-ribZ)/2])
translate(v = [ribExtrusion-ribWidth, 0, 0])
verticalRib(ribExtend=4, ribWidth=ribWidth);
translate(v = [0, i*ribYDiff, 0])
verticalRib();
}
halfspace(vpos=[1,0,0], p=[0,0,0]);
}
module verticalRib(ribExtend, ribWidth) {
module verticalRib(height=4, thickness=3, rampLength=0) {
roundness = 0.5;
translate(v=[0,-ribWidth/2,0])
minkowski() {
translate(v=[sideWallThickness-eps,-thickness/2,0])
hull() {
translate(v=[0,0,roundness])
cube(size = [eps, ribWidth, eps]);
cube(size = [eps, thickness, eps]);
translate(v = [0, 0, ribRampLength])
cube(size = [ribExtend, ribWidth, ribZ-2*(ribRampLength+roundness)]);
translate(v = [0, 0, rampLength])
cube(size = [height, thickness, sideWallZ-2*rampLength]);
translate(v = [0, 0, ribZ-roundness])
cube(size = [eps, ribWidth, eps]);
translate(v = [0, 0, sideWallZ])
cube(size = [eps, thickness, eps]);
}
}
}
sphere(r=roundness);
module sideWallHorizontalBracing() {
ribThickness = 2.5;
horizontalRib(thickness=ribThickness);
translate(v=[0,0,sideWallZ-ribThickness])
horizontalRib(thickness=ribThickness);
module horizontalRib(height=4, thickness=3, rampLength=5) {
ribLength = sideWallY + rampLength - sideWallDefaultHorizontalBracingToZEdge;
translate(v = [sideWallThickness-eps, sideWallY-ribLength, 0])
hull() {
cube(size = [height, ribLength, thickness]);
translate(v=[0,-rampLength,0])
cube(size=[eps, eps, thickness]);
}
}
}

View File

@ -4,9 +4,8 @@ sideWallLeft();
module sideWallLeft() {
numVentsCustom = ceil((sideWallZ - 2*sideWallDefaultVentilationToYEdge)/10);
numVentsCustom = sideWallVentilation? ceil((sideWallZ - 2*sideWallDefaultVentilationToYEdge)/10): 0;
applySideWallBracing(numRibs=2)
applySideWallDefaultVentilation(numVents=numVentsCustom)
sideWallBase();
}

View File

@ -4,10 +4,9 @@ sideWallRight();
module sideWallRight() {
numVentsCustom = ceil((sideWallZ - 2*sideWallDefaultVentilationToYEdge)/10);
numVentsCustom = sideWallVentilation? ceil((sideWallZ - 2*sideWallDefaultVentilationToYEdge)/10): 0;
mirror(v=[1,0,0])
applySideWallBracing(numRibs=2)
applySideWallDefaultVentilation(numVents=numVentsCustom)
sideWallBase();
}

View File

@ -34,6 +34,7 @@ hingePoleDx = sideWallSlotToOuterYEdge + sideWallConnW/2.0;
hingePoleDy = sideWallY - (sideWallSlotToOuterXEdge + (hingePoleR+radiusXYSlack));
sideWallDefaultVerticalBracingToZEdge = 30;
sideWallDefaultHorizontalBracingToZEdge = sideWallDefaultVerticalBracingToZEdge;
sideWallDefaultVentilationToZEdge = 40;
sideWallDefaultVentilationToYEdge = 25;
sideWallDefaultVentilationWidth = 6;

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.