fix ventilation for sidewalls
This commit is contained in:
@ -131,41 +131,76 @@ module sideWallBase() {
|
||||
}
|
||||
}
|
||||
|
||||
module sideWallVerticalRibs(numRibs, ribZ, ribYDiff, ribExtrusion=1) {
|
||||
module applySideWallDefaultVentilation(numVents) {
|
||||
|
||||
ribRampLength = 5;
|
||||
ribWidth = 2;
|
||||
r = 2; // vent roundness
|
||||
ventLength = sideWallY - 2*sideWallDefaultVentilationToZEdge;
|
||||
ventZDiff = (sideWallZ - 2*sideWallDefaultVentilationToYEdge)/(numVents-1);
|
||||
|
||||
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);
|
||||
apply_n() {
|
||||
for (i = [0:numVents-1]) {
|
||||
translate(v = [0, sideWallDefaultVentilationToZEdge, i * ventZDiff + sideWallDefaultVentilationToYEdge])
|
||||
vent();
|
||||
}
|
||||
|
||||
halfspace(vpos=[1,0,0], p=[0,0,0]);
|
||||
children(0);
|
||||
}
|
||||
|
||||
|
||||
module verticalRib(ribExtend, ribWidth) {
|
||||
|
||||
roundness = 0.5;
|
||||
|
||||
module vent() {
|
||||
translate(v=[-inf/2,r,-sideWallDefaultVentilationWidth/2])
|
||||
minkowski() {
|
||||
hull() {
|
||||
translate(v=[0,0,roundness])
|
||||
cube(size = [eps, ribWidth, eps]);
|
||||
rotate(a=[0,90,0])
|
||||
cylinder(r=r,h=inf);
|
||||
cube(size = [inf, max(eps, ventLength-2*r), max(eps,sideWallDefaultVentilationWidth-2*r)]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
translate(v = [0, 0, ribRampLength])
|
||||
cube(size = [ribExtend, ribWidth, ribZ-2*(ribRampLength+roundness)]);
|
||||
module applySideWallBracing(numRibs) {
|
||||
|
||||
translate(v = [0, 0, ribZ-roundness])
|
||||
cube(size = [eps, ribWidth, eps]);
|
||||
apply_p() {
|
||||
// TODO add horizontal bracing
|
||||
sideWallVerticalBracing(numRibs = numRibs);
|
||||
children(0);
|
||||
}
|
||||
|
||||
module sideWallVerticalBracing(numRibs, ribZ, ribExtrusion=1) {
|
||||
|
||||
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);
|
||||
}
|
||||
|
||||
halfspace(vpos=[1,0,0], p=[0,0,0]);
|
||||
}
|
||||
|
||||
sphere(r=roundness);
|
||||
}
|
||||
module verticalRib(ribExtend, ribWidth) {
|
||||
|
||||
roundness = 0.5;
|
||||
translate(v=[0,-ribWidth/2,0])
|
||||
minkowski() {
|
||||
hull() {
|
||||
translate(v=[0,0,roundness])
|
||||
cube(size = [eps, ribWidth, eps]);
|
||||
|
||||
translate(v = [0, 0, ribRampLength])
|
||||
cube(size = [ribExtend, ribWidth, ribZ-2*(ribRampLength+roundness)]);
|
||||
|
||||
translate(v = [0, 0, ribZ-roundness])
|
||||
cube(size = [eps, ribWidth, eps]);
|
||||
}
|
||||
|
||||
sphere(r=roundness);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,37 +4,9 @@ include <./sideWallBase.scad>
|
||||
|
||||
module sideWallLeft() {
|
||||
|
||||
applySideWallVerticalRibs()
|
||||
applyEpicVentilation()
|
||||
numVentsCustom = ceil((sideWallZ - 2*sideWallDefaultVentilationToYEdge)/10);
|
||||
|
||||
applySideWallBracing(numRibs=2)
|
||||
applySideWallDefaultVentilation(numVents=numVentsCustom)
|
||||
sideWallBase();
|
||||
|
||||
module applyEpicVentilation() {
|
||||
apply_n() {
|
||||
for (i = [1:8]) {
|
||||
translate(v = [0, 41, i * 12 + 10])
|
||||
vent();
|
||||
}
|
||||
children(0);
|
||||
}
|
||||
|
||||
module vent() {
|
||||
minkowski() {
|
||||
rotate(a=[0,90,0])
|
||||
cylinder(r=2,h=1);
|
||||
|
||||
cube(size = [10, 100, 1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module applySideWallVerticalRibs() {
|
||||
echo("sideWallZ", sideWallZ);
|
||||
apply_p() {
|
||||
translate(v = [0, 30, 0])
|
||||
sideWallVerticalRibs(numRibs = 2, ribZ = sideWallZ, ribYDiff = 120, ribExtrusion = 1.5);
|
||||
|
||||
children(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -4,40 +4,11 @@ include <./sideWallBase.scad>
|
||||
|
||||
module sideWallRight() {
|
||||
|
||||
applyEpicVentilation()
|
||||
numVentsCustom = ceil((sideWallZ - 2*sideWallDefaultVentilationToYEdge)/10);
|
||||
|
||||
mirror(v=[1,0,0])
|
||||
applySideWallVerticalRibs()
|
||||
applySideWallBracing(numRibs=2)
|
||||
applySideWallDefaultVentilation(numVents=numVentsCustom)
|
||||
sideWallBase();
|
||||
|
||||
module applyEpicVentilation() {
|
||||
|
||||
apply_n() {
|
||||
translate(v=[-10,0,0])
|
||||
for (i = [1:8]) {
|
||||
translate(v = [0, 41, i * 12 + 10])
|
||||
vent();
|
||||
}
|
||||
children(0);
|
||||
}
|
||||
|
||||
module vent() {
|
||||
minkowski() {
|
||||
rotate(a=[0,90,0])
|
||||
cylinder(r=2,h=1);
|
||||
|
||||
cube(size = [10, 100, 1]);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
module applySideWallVerticalRibs() {
|
||||
apply_p() {
|
||||
translate(v = [0, 30, 0])
|
||||
sideWallVerticalRibs(numRibs = 2, ribZ = sideWallZ, ribYDiff = 120, ribExtrusion = 1.5);
|
||||
|
||||
children(0);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -32,3 +32,8 @@ sideWallX = (yBarWidth-(railTotalWidth+railSlotToInnerYEdge)) - sideWallXGapClea
|
||||
|
||||
hingePoleDx = sideWallSlotToOuterYEdge + sideWallConnW/2.0;
|
||||
hingePoleDy = sideWallY - (sideWallSlotToOuterXEdge + (hingePoleR+radiusXYSlack));
|
||||
|
||||
sideWallDefaultVerticalBracingToZEdge = 30;
|
||||
sideWallDefaultVentilationToZEdge = 40;
|
||||
sideWallDefaultVentilationToYEdge = 25;
|
||||
sideWallDefaultVentilationWidth = 6;
|
||||
Reference in New Issue
Block a user