split sideWallConnector into parts

This commit is contained in:
zhao
2023-02-05 09:39:52 -05:00
parent 7af767263b
commit cf481a4486
8 changed files with 180 additions and 167 deletions

View File

@ -0,0 +1,44 @@
include <../config.scad>
include <./sideWallVariables.scad>
include <../sharedVariables.scad>
include <../../helper/halfspace.scad>
module hingeModule() {
applyHingePole()
applyYBarScrewMount()
base();
module base() {
intersection() {
cube(size = [sideWallConnW, sideWallConnD, sideWallConnLugDepression]);
// TODO: pattern for this? beef up mirror4XY?
cVal = 0.5;
halfspace(p=[0,cVal,0], vpos=[0,1,1]);
halfspace(p=[cVal,0,0], vpos=[1,0,1]);
halfspace(p=[sideWallConnW-cVal,0,0], vpos=[-1,0,1]);
halfspace(p=[0,sideWallConnD-cVal,0], vpos=[0,-1,1]);
}
}
module applyHingePole() {
apply_p() {
translate(v = [sideWallConnW-hingePoleR, hingePoleR, sideWallConnH])
cylinder(r = hingePoleR, h = hingePoleH);
children(0);
}
}
module applyYBarScrewMount() {
apply_n() {
translate(v = [yBarScrewHoleToOuterYEdge, yBarScrewHoleToFrontXEdge, sideWallConnLugDepression])
counterSunkHead_N(rackFrameScrewType, headExtension = eps, screwExtension = inf10);
children(0);
}
}
}

View File

@ -0,0 +1,69 @@
include <../config.scad>
include <./sideWallVariables.scad>
include <../sharedVariables.scad>
include <../../helper/halfspace.scad>
include <../../misc/magnet.scad>
module magnetModule() {
applyYBarScrewMount()
applyMagnetMount()
base();
module base() {
intersection() {
cube(size = [sideWallConnW, sideWallConnD, sideWallConnLugDepression]);
// TODO: pattern for this? beef up mirror4XY?
cVal = 0.5;
halfspace(p=[0,cVal,0], vpos=[0,1,1]);
halfspace(p=[cVal,0,0], vpos=[1,0,1]);
halfspace(p=[sideWallConnW-cVal,0,0], vpos=[-1,0,1]);
halfspace(p=[0,sideWallConnD-cVal,0], vpos=[0,-1,1]);
}
}
module applyYBarScrewMount() {
apply_n() {
translate(v = [yBarScrewHoleToOuterYEdge, yBarScrewHoleToFrontXEdge, sideWallConnLugDepression])
counterSunkHead_N(rackFrameScrewType, headExtension = eps, screwExtension = inf10);
children(0);
}
}
module applyMagnetMount() {
magnetMountDx = magnetMountShellRadius;
magnetMountDy = magnetMountToYBarFront - sideWallSlotToXZ;
magnetMountDz = magnetMountToYBarTop + sideWallConnLugDepression;
apply_pn() {
magnetMountShell();
magnetMountHole();
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);
}
}
}

View File

@ -0,0 +1,16 @@
include <../config.scad>
include <./sideWallVariables.scad>
include <../sharedVariables.scad>
include <../../helper/halfspace.scad>
include <../../misc/magnet.scad>
module sideWallMagnetMount() {
// oriented so that the xy face is the side wall's inner face
difference() {
cylinder(r1 = magnetMountShellRadius+0.5, r2 = magnetMountShellRadius, h = innerSideWallToYBarMagnetConn);
translate(v=[0, 0, innerSideWallToYBarMagnetConn-magnetHSlacked])
cylinder(r = magnetRSlacked, h = magnetHSlacked);
}
}

View File

@ -0,0 +1,27 @@
include <../config.scad>
include <../sharedVariables.scad>
sideWallConnW = 7;
sideWallConnD = 20;
sideWallConnH = 2;
sideWallConnLugDepression = sideWallConnH;
yBarScrewHoleToOuterYEdge = 3.5;
yBarScrewHoleToFrontXEdge = 16;
magnetFaceToSideWallConnOuterYEdge = 2;
magnetMountShellRadius = magnetRSlacked + 1;
innerSideWallToYBarMagnetConn = magnetFaceToSideWallConnOuterYEdge + sideWallSlotToOuterYEdge - sideWallThickness;
magnetMountToYBarTop = magnetMountShellRadius + 1;
magnetMountToYBarFront = magnetMountShellRadius + sideWallSlotToXZ + 2;
hingePoleR = 2;
hingePoleH = 5;
hingeHoleR = hingePoleR + 0.2;
hingePoleToConnectorOuterYZFace = hingePoleR/2;
hingePoleToConnectorOuterXZFace = hingePoleR/2;

View File

@ -0,0 +1,13 @@
include <../config.scad>
include <./sideWallVariables.scad>
include <../sharedVariables.scad>
module yBarSideWallConnector_N() {
translate(v = [0, 0, -sideWallConnLugDepression])
cube(size = [sideWallConnW, sideWallConnD, sideWallConnLugDepression]);
translate(v = [yBarScrewHoleToOuterYEdge, yBarScrewHoleToFrontXEdge, -(m3HeatSetInsertSlotHeightSlacked+sideWallConnLugDepression)])
heatSetInsertSlot_N(rackFrameScrewType);
}