introduce script to generate assembly animation. still needs cleanup
This commit is contained in:
25
rack/assembly/addMagnetsToMagnetModules.scad
Normal file
25
rack/assembly/addMagnetsToMagnetModules.scad
Normal file
@ -0,0 +1,25 @@
|
||||
include <./common.scad>
|
||||
|
||||
$vpt = [21,-15,20];
|
||||
$vpr = [65,0,40];
|
||||
$vpd = 50;
|
||||
$vpf = 22.50;
|
||||
|
||||
addMagnetsToMagnetModules(at=$t);
|
||||
|
||||
module addMagnetsToMagnetModules(at=0) {
|
||||
t = lerp(a=8,b=0,t=at);
|
||||
|
||||
if (!plasticMask) {
|
||||
magnetModule();
|
||||
}
|
||||
|
||||
function insertMagnetTrans(t=0) =
|
||||
translate(v=[sideWallConnW-(magnetFaceToSideWallConnOuterYEdge+magnetHSlacked) + t,
|
||||
magnetModuleMagnetMountDy,
|
||||
magnetModuleMagnetMountDz]) *
|
||||
rotate(a=[0,90,0]);
|
||||
|
||||
multmatrix(insertMagnetTrans(t=t))
|
||||
magnet();
|
||||
}
|
||||
26
rack/assembly/addMagnetsToSideWall.scad
Normal file
26
rack/assembly/addMagnetsToSideWall.scad
Normal file
@ -0,0 +1,26 @@
|
||||
include <./common.scad>
|
||||
|
||||
$vpt = [40,44,70];
|
||||
$vpr = [77,0,40];
|
||||
$vpd = 370;
|
||||
$vpf = 22.50;
|
||||
|
||||
addMagnetsToSideWall(at=$t);
|
||||
|
||||
module addMagnetsToSideWall(at=0) {
|
||||
t = lerp(a=8,b=0,t=at);
|
||||
|
||||
if (!plasticMask) {
|
||||
sideWallLeft();
|
||||
}
|
||||
|
||||
function insertMagnetTrans(t=0) =
|
||||
translate(v=[sideWallThickness+t, magnetMountToYBarFront, magnetMountToYBarTop-sideWallZHingeTotalClearance]) *
|
||||
rotate(a=[0,90,0]);
|
||||
|
||||
multmatrix(insertMagnetTrans(t=t))
|
||||
magnet();
|
||||
|
||||
multmatrix(translate(v=[0,0,sideWallZ - 2*(magnetMountToYBarTop- sideWallZHingeTotalClearance)]) * insertMagnetTrans(t=t))
|
||||
magnet();
|
||||
}
|
||||
59
rack/assembly/attachSideConnectorModulesToYBars.scad
Normal file
59
rack/assembly/attachSideConnectorModulesToYBars.scad
Normal file
@ -0,0 +1,59 @@
|
||||
include <./common.scad>
|
||||
use <./screwXBarAndYBar.scad>
|
||||
use <./addMagnetsToMagnetModules.scad>
|
||||
|
||||
$vpt = [116,90,18];
|
||||
$vpr = [56,0,42];
|
||||
$vpd = 550;
|
||||
$vpf = 22.50;
|
||||
|
||||
attachSideConnectorModulesToYBars(at=$t);
|
||||
|
||||
module attachSideConnectorModulesToYBars(at=0) {
|
||||
elevation = lerp(a=8, b=0, t=at);
|
||||
|
||||
// side module to front corner ybar
|
||||
function sideModuleTrans(t=0) =
|
||||
translate(v=[sideWallConnW,0,t-sideWallConnLugDepression])
|
||||
* yBarSideModuleConnectorTrans
|
||||
* mirror(v=[1,0,0]); // mirror for magnetModule
|
||||
|
||||
screwXBarAndYBar(at=1);
|
||||
|
||||
multmatrix(sideModuleTrans(elevation))
|
||||
union() {
|
||||
addMagnetsToMagnetModules(at=1);
|
||||
|
||||
translate(v=[yBarScrewHoleToOuterYEdge,yBarScrewHoleToFrontXEdge,sideWallConnLugDepression + 2*elevation])
|
||||
caseScrewA();
|
||||
}
|
||||
|
||||
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * sideModuleTrans(elevation))
|
||||
union() {
|
||||
addMagnetsToMagnetModules(at=1);
|
||||
|
||||
translate(v=[yBarScrewHoleToOuterYEdge,yBarScrewHoleToFrontXEdge,sideWallConnLugDepression + 2*elevation])
|
||||
caseScrewA();
|
||||
}
|
||||
|
||||
multmatrix(yBarMirrorOtherCornerTrans * sideModuleTrans(elevation))
|
||||
union() {
|
||||
|
||||
if (!plasticMask) {
|
||||
hingeModule();
|
||||
}
|
||||
|
||||
translate(v=[yBarScrewHoleToOuterYEdge,yBarScrewHoleToFrontXEdge,sideWallConnLugDepression + 2*elevation])
|
||||
caseScrewA();
|
||||
}
|
||||
|
||||
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * yBarMirrorOtherCornerTrans * sideModuleTrans(elevation))
|
||||
union() {
|
||||
if (!plasticMask) {
|
||||
hingeModule();
|
||||
}
|
||||
|
||||
translate(v=[yBarScrewHoleToOuterYEdge,yBarScrewHoleToFrontXEdge,sideWallConnLugDepression + 2*elevation])
|
||||
caseScrewA();
|
||||
}
|
||||
}
|
||||
29
rack/assembly/attachXBarWithYBar.scad
Normal file
29
rack/assembly/attachXBarWithYBar.scad
Normal file
@ -0,0 +1,29 @@
|
||||
include <./common.scad>
|
||||
use <./slideHexNutsIntoYBar.scad>
|
||||
|
||||
$vpt = [116,90,18];
|
||||
$vpr = [56,0,42];
|
||||
$vpd = 550;
|
||||
$vpf = 22.50;
|
||||
|
||||
attachXBarWithYBar(at=$t);
|
||||
|
||||
module attachXBarWithYBar(at=0) {
|
||||
|
||||
t = lerp(a=20, b=0, t=at);
|
||||
|
||||
// assemble x-y bar trays
|
||||
multmatrix(translate(v = [0, 0, t]))
|
||||
slideHexNutsIntoYBar(at=1);
|
||||
|
||||
multmatrix(translate(v = [0, 0, t])*xBarSpaceToYBarSpace*xBarMirrorOtherCornerTrans*yBarSpaceToXBarSpace)
|
||||
slideHexNutsIntoYBar(at=1);
|
||||
|
||||
if (!plasticMask) {
|
||||
multmatrix(xBarSpaceToYBarSpace)
|
||||
xBar();
|
||||
|
||||
multmatrix(yBarMirrorOtherCornerTrans*xBarSpaceToYBarSpace)
|
||||
xBar();
|
||||
}
|
||||
}
|
||||
50
rack/assembly/attachXYPlates.scad
Normal file
50
rack/assembly/attachXYPlates.scad
Normal file
@ -0,0 +1,50 @@
|
||||
include <./common.scad>
|
||||
use <./slideHexNutsIntoYBarXYPlate.scad>
|
||||
|
||||
$vpt = [96,110,70];
|
||||
$vpr = [68,0,36];
|
||||
$vpd = 700;
|
||||
$vpf = 22.50;
|
||||
|
||||
attachXYPlates(at=$t);
|
||||
|
||||
module attachXYPlates(at=0,r=0) {
|
||||
|
||||
t = lerp(a=10,b=0,t=at);
|
||||
|
||||
// TODO fix xyPlate transformations
|
||||
function xyPlateToYBarTrans() = translate(v=[6,6,0]) * yBarBasePlateConnectorTrans;
|
||||
|
||||
slideHexNutsIntoYBarXYPlate(at=1);
|
||||
|
||||
multmatrix(xyPlateToYBarTrans())
|
||||
xyPlateWithScrews(t=t);
|
||||
|
||||
multmatrix(upperXYTrayTrans * xyPlateToYBarTrans())
|
||||
xyPlateWithScrews(t=t);
|
||||
|
||||
module xyPlateWithScrews(t=0) {
|
||||
|
||||
module screw(t=0) {
|
||||
translate(v=[0,0,-t])
|
||||
mirror(v=[0,0,1])
|
||||
caseScrewA();
|
||||
}
|
||||
|
||||
if (!plasticMask) {
|
||||
translate(v = [0, 0, -t])
|
||||
xyPlate();
|
||||
}
|
||||
|
||||
screw(t=2*t);
|
||||
|
||||
translate(v=[xyPlateConnDx, 0,0])
|
||||
screw(t=2*t);
|
||||
|
||||
translate(v=[0, xyPlateConnDy,0])
|
||||
screw(t=2*t);
|
||||
|
||||
translate(v=[xyPlateConnDx, xyPlateConnDy,0])
|
||||
screw(t=2*t);
|
||||
}
|
||||
}
|
||||
36
rack/assembly/attachXYTrays.scad
Normal file
36
rack/assembly/attachXYTrays.scad
Normal file
@ -0,0 +1,36 @@
|
||||
include <./common.scad>
|
||||
use <./attachSideConnectorModulesToYBars.scad>
|
||||
use <./propUpBottomXYTraywithSideWalls.scad>
|
||||
|
||||
$vpt = [71,123,88];
|
||||
$vpr = [44,0,47];
|
||||
$vpd = 450;
|
||||
$vpf = 22.50;
|
||||
|
||||
attachXYTrays(at=$t);
|
||||
|
||||
module attachXYTrays(at=0,r=0) {
|
||||
|
||||
t1 = lerp(a=12, b=0, t=min(1, 2*at));
|
||||
t2 = lerp(a=16, b=0, t=max(0, 2*at - 1));
|
||||
|
||||
module singleScrew() {
|
||||
translate(v = [mainRailSlideHexOnYBarDx, mainRailSlideHexOnYBarDy, -5])
|
||||
rotate(a=[-45,0,0])
|
||||
translate(v=[0,0,14 + t2]) // length of caseScrewB
|
||||
caseScrewA();
|
||||
}
|
||||
|
||||
translate(v=[0,0,t1])
|
||||
multmatrix(upperXYTrayTrans) {
|
||||
attachSideConnectorModulesToYBars(at=1);
|
||||
|
||||
if (at >= 1/2) {
|
||||
mirrorAllTrayCornersFromYBarSpace()
|
||||
multmatrix(yBarMainRailConnectorTrans)
|
||||
singleScrew();
|
||||
}
|
||||
}
|
||||
|
||||
propUpBottomXYTraywithSideWalls(at=1,r=r);
|
||||
}
|
||||
106
rack/assembly/common.scad
Normal file
106
rack/assembly/common.scad
Normal file
@ -0,0 +1,106 @@
|
||||
include <../../helper/common.scad>
|
||||
include <../../config/common.scad>
|
||||
include <../mainRail.scad>
|
||||
include <../yBar.scad>
|
||||
include <../xBar.scad>
|
||||
include <../side/magnetModule.scad>
|
||||
include <../side/hingeModule.scad>
|
||||
include <../side/sideWallRight.scad>
|
||||
include <../side/sideWallLeft.scad>
|
||||
include <../stackEnds.scad>
|
||||
include <../xyPlate.scad>
|
||||
|
||||
screwMask = false;
|
||||
plasticMask = false;
|
||||
sideSupportRailMask = true;
|
||||
|
||||
|
||||
xBarSpaceToYBarSpace =
|
||||
yBarXBarConnectorTrans *
|
||||
xBarConnectorToYBarConnectorTrans *
|
||||
inv4x4(xBarYBarConnectorTrans);
|
||||
|
||||
yBarSpaceToXBarSpace =
|
||||
xBarYBarConnectorTrans *
|
||||
yBarConnectorToXBarConnectorTrans *
|
||||
inv4x4(yBarXBarConnectorTrans);
|
||||
|
||||
upperXYTrayTrans =
|
||||
yBarMainRailConnectorTrans *
|
||||
mirrorMainRailOtherSideTrans *
|
||||
inv4x4(yBarMainRailConnectorTrans);
|
||||
|
||||
function feetToYBarTrans(t=0) =
|
||||
translate(v=[connectorRectWidth/2,connectorRectDepth/2,-t]) *
|
||||
yBarStackConnectorTrans *
|
||||
mirror(v=[0,1,0]);
|
||||
|
||||
function stackConnectorTrans(t=0) =
|
||||
upperXYTrayTrans *
|
||||
yBarStackConnectorTrans;
|
||||
|
||||
module mirrorAllTrayCornersFromYBarSpace() {
|
||||
children(0);
|
||||
|
||||
multmatrix(yBarMirrorOtherCornerTrans)
|
||||
children(0);
|
||||
|
||||
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * yBarMirrorOtherCornerTrans)
|
||||
children(0);
|
||||
|
||||
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * yBarMirrorOtherCornerTrans * yBarMirrorOtherCornerTrans)
|
||||
children(0);
|
||||
}
|
||||
|
||||
secondStackTrans = upperXYTrayTrans * mirror(v=[0,0,1]);
|
||||
|
||||
|
||||
module caseScrewA() {
|
||||
if (!screwMask) {
|
||||
color([1, 1, 1]) {
|
||||
difference() {
|
||||
scale(v = [0.9, 0.9, 0.9])
|
||||
counterSunkHead_N(rackFrameScrewType, screwExtension = 10, headExtension = 0.5);
|
||||
|
||||
cylinder($fn = 6, r = 1.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module caseScrewB() {
|
||||
if (!screwMask) {
|
||||
color([1, 1, 1]) {
|
||||
difference() {
|
||||
scale(v = [0.9, 0.9, 0.9])
|
||||
counterSunkHead_N(rackFrameScrewType, screwExtension = 14, headExtension = 0.5);
|
||||
|
||||
cylinder($fn = 6, r = 1.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module hingeDowel() {
|
||||
if (!screwMask) {
|
||||
color([0, 1, 1])
|
||||
cylinder(h = dowelPinH, r = dowelPinR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module magnet() {
|
||||
if (!screwMask) {
|
||||
color([1, 1, 1])
|
||||
cylinder(r = magnetR, h = magnetH);
|
||||
}
|
||||
}
|
||||
|
||||
module arrow(length) {
|
||||
color([1,0,1]) {
|
||||
translate(v = [0, 0, length-2])
|
||||
cylinder(r1 = 2, r2 = 0.2, h = 2);
|
||||
|
||||
cylinder(r = 1, h = length-2);
|
||||
}
|
||||
}
|
||||
47
rack/assembly/connectXYTrayWithMainRails.scad
Normal file
47
rack/assembly/connectXYTrayWithMainRails.scad
Normal file
@ -0,0 +1,47 @@
|
||||
include <./common.scad>
|
||||
use <./attachSideConnectorModulesToYBars.scad>
|
||||
|
||||
$vpt = [96,110,70];
|
||||
$vpr = [68,0,36];
|
||||
$vpd = 700;
|
||||
$vpf = 22.50;
|
||||
|
||||
connectXYTrayWithMainRails(at=$t);
|
||||
|
||||
module connectXYTrayWithMainRails(at=0) {
|
||||
|
||||
attachSideConnectorModulesToYBars(at=1);
|
||||
|
||||
function mainRailTrans() =
|
||||
yBarMainRailConnectorTrans;
|
||||
|
||||
module railAndScrew(at) {
|
||||
t1 = lerp(a=12, b=0, t=min(1, 2*at));
|
||||
t2 = lerp(a=16, b=0, t=max(0, 2*at - 1));
|
||||
|
||||
if (!plasticMask) {
|
||||
translate(v=[0,0,t1])
|
||||
mainRail();
|
||||
}
|
||||
|
||||
if (at >= 1/2) {
|
||||
multmatrix(
|
||||
translate(v = [mainRailSlideHexOnYBarDx, mainRailSlideHexOnYBarDy, -5])*
|
||||
rotate(a = [-45, 0, 0]))
|
||||
translate(v = [0, 0, 14 + t2]) // length of caseScrewB
|
||||
caseScrewB();
|
||||
}
|
||||
}
|
||||
|
||||
multmatrix(mainRailTrans())
|
||||
railAndScrew(at=at);
|
||||
|
||||
multmatrix(yBarMirrorOtherCornerTrans * mainRailTrans())
|
||||
railAndScrew(at=at);
|
||||
|
||||
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * mainRailTrans())
|
||||
railAndScrew(at=at);
|
||||
|
||||
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * yBarMirrorOtherCornerTrans * mainRailTrans())
|
||||
railAndScrew(at=at);
|
||||
}
|
||||
@ -1,47 +1,43 @@
|
||||
include <../helper/common.scad>
|
||||
include <../config/common.scad>
|
||||
include <./mainRail.scad>
|
||||
include <./yBar.scad>
|
||||
include <./xBar.scad>
|
||||
include <./side/magnetModule.scad>
|
||||
include <./side/hingeModule.scad>
|
||||
include <./side/sideWallRight.scad>
|
||||
include <./side/sideWallLeft.scad>
|
||||
include <./stackEnds.scad>
|
||||
include <./xyPlate.scad>
|
||||
include <./common.scad>
|
||||
|
||||
include <../rack-mount/side-rail/dualMount.scad>
|
||||
$vpt = [23,22,20];
|
||||
$vpr = [57,0,46];
|
||||
$vpd = 60;
|
||||
|
||||
// TODO: this is completly broken. fix this and figure out a nice way to run this with cli commands
|
||||
assemblyInstructions();
|
||||
assemblyInstructions(stepNum=0);
|
||||
|
||||
module assemblyInstructions () {
|
||||
module assemblyInstructions (stepNum=1) {
|
||||
|
||||
screwMask = false;
|
||||
plasticMask = false;
|
||||
sideSupportRailMask = true;
|
||||
|
||||
// Instruction List (in order)
|
||||
// render()
|
||||
// addHeatSetInsertsYBar(at=$t);
|
||||
// addMagnetsToMagnetModules(at=$t);
|
||||
// addMagnetsToSideWall(at=$t);
|
||||
// attachXBarWithYBar(at=$t);
|
||||
// screwXBarAndYBar(at=$t);
|
||||
// attachSideConnectorModulesToYBars(at=$t);
|
||||
// connectXYTrayWithMainRails(at=1);
|
||||
// insertDowelsIntoSideWall(at=$t);
|
||||
// propUpBottomXYTraywithSideWalls(at=$t);
|
||||
// attachXYTrays(at=$t);
|
||||
// slideHexNutToFeet(at=$t);
|
||||
// insertFeet(at=$t);
|
||||
// screwFeet(at=$t);
|
||||
// attachXYPlates(at=$t);
|
||||
module pickStep(stepNum) {
|
||||
children(stepNum);
|
||||
}
|
||||
|
||||
pickStep(stepNum=stepNum) {
|
||||
slideHexNutsIntoYBar(at = $t); // moved
|
||||
addMagnetsToMagnetModules(at = $t); // moved
|
||||
addMagnetsToSideWall(at = $t); // moved
|
||||
attachXBarWithYBar(at = $t); // moved
|
||||
screwXBarAndYBar(at=$t); // moved
|
||||
attachSideConnectorModulesToYBars(at=$t); // moved
|
||||
connectXYTrayWithMainRails(at=1); // moved
|
||||
insertDowelsIntoSideWall(at=$t); // moved
|
||||
propUpBottomXYTraywithSideWalls(at=$t); // moved
|
||||
attachXYTrays(at=$t); // moved
|
||||
slideHexNutToFeet(at=$t);
|
||||
insertFeet(at=$t); // moved
|
||||
screwFeet(at=$t); // moved
|
||||
attachXYPlates(at=$t); // moved
|
||||
}
|
||||
|
||||
|
||||
// Final builds:
|
||||
// render()
|
||||
finalSingle();
|
||||
// finalSingle();
|
||||
// finalDouble();
|
||||
|
||||
// Features:
|
||||
@ -51,7 +47,9 @@ module assemblyInstructions () {
|
||||
// sideSwivel(at=$t);
|
||||
|
||||
|
||||
module addHeatSetInsertsYBar(at=0) {
|
||||
module slideHexNutsIntoYBar(at=0) {
|
||||
|
||||
|
||||
t = lerp(a=10,b=0.35,t=at); // non zero b for exposing the heatset gears for diagramming
|
||||
|
||||
if (!plasticMask) {
|
||||
@ -65,7 +63,7 @@ module assemblyInstructions () {
|
||||
yBarSideModuleConnectorTrans;
|
||||
|
||||
function mainRailHeatSetTrans(t=0) =
|
||||
translate(v=[mainRailHeatSetOnYBarDx,mainRailHeatSetOnYBarDy,t-heatSetHeight]) *
|
||||
translate(v=[mainRailSlideHexOnYBarDx,mainRailSlideHexOnYBarDy,t-heatSetHeight]) *
|
||||
yBarMainRailConnectorTrans;
|
||||
|
||||
function xBarHeatSetTrans(t=0) =
|
||||
@ -134,10 +132,10 @@ module assemblyInstructions () {
|
||||
|
||||
// assemble x-y bar trays
|
||||
multmatrix(translate(v = [0, 0, t]))
|
||||
addHeatSetInsertsYBar(at=1);
|
||||
slideHexNutsIntoYBar(at=1);
|
||||
|
||||
multmatrix(translate(v = [0, 0, t])*xBarSpaceToYBarSpace*xBarMirrorOtherCornerTrans*yBarSpaceToXBarSpace)
|
||||
addHeatSetInsertsYBar(at=1);
|
||||
slideHexNutsIntoYBar(at=1);
|
||||
|
||||
if (!plasticMask) {
|
||||
multmatrix(xBarSpaceToYBarSpace)
|
||||
@ -156,10 +154,10 @@ module assemblyInstructions () {
|
||||
translate(v=[27,xBarSideThickness + extension,6]) * rotate(a=[270,0,0]);
|
||||
|
||||
// screw to connect x and y bars
|
||||
addHeatSetInsertsYBar(at=1);
|
||||
slideHexNutsIntoYBar(at=1);
|
||||
|
||||
multmatrix(xBarSpaceToYBarSpace*xBarMirrorOtherCornerTrans*yBarSpaceToXBarSpace)
|
||||
addHeatSetInsertsYBar(at=1);
|
||||
slideHexNutsIntoYBar(at=1);
|
||||
|
||||
multmatrix(xBarSpaceToYBarSpace)
|
||||
union() {
|
||||
@ -554,94 +552,5 @@ module assemblyInstructions () {
|
||||
finalSingle(r=r);
|
||||
}
|
||||
|
||||
xBarSpaceToYBarSpace =
|
||||
yBarXBarConnectorTrans *
|
||||
xBarConnectorToYBarConnectorTrans *
|
||||
inv4x4(xBarYBarConnectorTrans);
|
||||
|
||||
yBarSpaceToXBarSpace =
|
||||
xBarYBarConnectorTrans *
|
||||
yBarConnectorToXBarConnectorTrans *
|
||||
inv4x4(yBarXBarConnectorTrans);
|
||||
|
||||
upperXYTrayTrans =
|
||||
yBarMainRailConnectorTrans *
|
||||
mirrorMainRailOtherSideTrans *
|
||||
inv4x4(yBarMainRailConnectorTrans);
|
||||
|
||||
function feetToYBarTrans(t=0) =
|
||||
translate(v=[connectorRectWidth/2,connectorRectDepth/2,-t]) *
|
||||
yBarStackConnectorTrans *
|
||||
mirror(v=[0,1,0]);
|
||||
|
||||
function stackConnectorTrans(t=0) =
|
||||
upperXYTrayTrans *
|
||||
yBarStackConnectorTrans;
|
||||
|
||||
module mirrorAllTrayCornersFromYBarSpace() {
|
||||
children(0);
|
||||
|
||||
multmatrix(yBarMirrorOtherCornerTrans)
|
||||
children(0);
|
||||
|
||||
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * yBarMirrorOtherCornerTrans)
|
||||
children(0);
|
||||
|
||||
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * yBarMirrorOtherCornerTrans * yBarMirrorOtherCornerTrans)
|
||||
children(0);
|
||||
}
|
||||
|
||||
secondStackTrans = upperXYTrayTrans * mirror(v=[0,0,1]);
|
||||
|
||||
|
||||
module caseScrewA() {
|
||||
if (!screwMask) {
|
||||
color([1, 1, 1]) {
|
||||
difference() {
|
||||
scale(v = [0.9, 0.9, 0.9])
|
||||
counterSunkHead_N(rackFrameScrewType, screwExtension = 6, headExtension = 0.5);
|
||||
|
||||
cylinder($fn = 6, r = 1.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module caseScrewB() {
|
||||
if (!screwMask) {
|
||||
color([1, 1, 1]) {
|
||||
difference() {
|
||||
scale(v = [0.9, 0.9, 0.9])
|
||||
counterSunkHead_N(rackFrameScrewType, screwExtension = 10, headExtension = 0.5);
|
||||
|
||||
cylinder($fn = 6, r = 1.5);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
module hingeDowel() {
|
||||
if (!screwMask) {
|
||||
color([0, 1, 1])
|
||||
cylinder(h = dowelPinH, r = dowelPinR);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
module magnet() {
|
||||
if (!screwMask) {
|
||||
color([1, 1, 1])
|
||||
cylinder(r = magnetR, h = magnetH);
|
||||
}
|
||||
}
|
||||
|
||||
module arrow(length) {
|
||||
color([1,0,1]) {
|
||||
translate(v = [0, 0, length-2])
|
||||
cylinder(r1 = 2, r2 = 0.2, h = 2);
|
||||
|
||||
cylinder(r = 1, h = length-2);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
25
rack/assembly/insertDowelsIntoSideWall.scad
Normal file
25
rack/assembly/insertDowelsIntoSideWall.scad
Normal file
@ -0,0 +1,25 @@
|
||||
include <./common.scad>
|
||||
use <./addMagnetsToSideWall.scad>
|
||||
|
||||
$vpt = [65,120,96];
|
||||
$vpr = [66,0,112];
|
||||
$vpd = 500;
|
||||
$vpf = 22.50;
|
||||
|
||||
insertDowelsIntoSideWall(at=$t);
|
||||
|
||||
module insertDowelsIntoSideWall(at=0) {
|
||||
|
||||
t = lerp(a=10, b=0, t=at);
|
||||
|
||||
hingeHoleH = hingePoleH-sideWallConnLugDepression;
|
||||
|
||||
addMagnetsToSideWall(at=1);
|
||||
|
||||
translate(v=[hingePoleDx,hingePoleDy, (sideWallZ-hingeHoleH) + t])
|
||||
hingeDowel();
|
||||
|
||||
translate(v=[hingePoleDx,hingePoleDy, (hingeHoleH-hingePoleH)-t])
|
||||
hingeDowel();
|
||||
|
||||
}
|
||||
47
rack/assembly/insertFeet.scad
Normal file
47
rack/assembly/insertFeet.scad
Normal file
@ -0,0 +1,47 @@
|
||||
include <./common.scad>
|
||||
use <./slideHexNutToFeet.scad>
|
||||
use <./attachXYPlates.scad>
|
||||
|
||||
$vpt = [95,90,10];
|
||||
$vpr = [105,0,38];
|
||||
$vpd = 650;
|
||||
$vpf = 22.50;
|
||||
|
||||
insertFeet(at=$t);
|
||||
|
||||
module insertFeet(at=0,r=0) {
|
||||
|
||||
t = lerp(a=10,b=0,t=at);
|
||||
|
||||
attachXYPlates(at=1,r=r);
|
||||
|
||||
multmatrix(feetToYBarTrans(t=t))
|
||||
slideHexNutToFeet(at=1);
|
||||
|
||||
multmatrix(yBarMirrorOtherCornerTrans * feetToYBarTrans(t=t))
|
||||
slideHexNutToFeet(at=1);
|
||||
}
|
||||
|
||||
module screwFeet(at=0,r=0) {
|
||||
|
||||
t = lerp(a=20, b=0, t=at);
|
||||
|
||||
function screwTrans(t=0) = translate(v=[-t - 9,0,connectorBottomToScrew]) * rotate(a=[0,-90,0]);
|
||||
mirrorOtherFeetStackConnectorTrans = translate(v=[stackConnectorDx,0,0]) * mirror(v=[1,0,0]);
|
||||
|
||||
|
||||
module screwToFeetModule() {
|
||||
multmatrix(feetToYBarTrans(t = 0)*screwTrans(t = t))
|
||||
caseScrewB(); // we might want a longer screw?
|
||||
|
||||
multmatrix(feetToYBarTrans(t = 0)*mirrorOtherFeetStackConnectorTrans*screwTrans(t = t))
|
||||
caseScrewB();
|
||||
}
|
||||
|
||||
screwToFeetModule();
|
||||
|
||||
multmatrix(yBarMirrorOtherCornerTrans)
|
||||
screwToFeetModule();
|
||||
|
||||
insertFeet(at=1,r=r);
|
||||
}
|
||||
32
rack/assembly/propUpBottomXYTraywithSideWalls.scad
Normal file
32
rack/assembly/propUpBottomXYTraywithSideWalls.scad
Normal file
@ -0,0 +1,32 @@
|
||||
include <./common.scad>
|
||||
use <./insertDowelsIntoSideWall.scad>
|
||||
use <./connectXYTrayWithMainRails.scad>
|
||||
|
||||
$vpt = [96,110,70];
|
||||
$vpr = [68,0,36];
|
||||
$vpd = 700;
|
||||
$vpf = 22.50;
|
||||
|
||||
propUpBottomXYTraywithSideWalls(at=$t, r=0);
|
||||
|
||||
module propUpBottomXYTraywithSideWalls(at=0, r=0) {
|
||||
|
||||
t = lerp(a=10,b=0,t=at);
|
||||
|
||||
function sideWallToYBarTrans(t=0,r=0) =
|
||||
yBarMirrorOtherCornerTrans *
|
||||
yBarSideModuleConnectorTrans * // bring to y bar space
|
||||
mirror(v=[0,1,0]) *
|
||||
translate(v=[0,0,t]) *
|
||||
translate(v=[sideWallConnW/2.0, -hingePoleR, sideWallZHingeTotalClearance]) * // bring to side module space
|
||||
rotate(a=[0,0,-r]) *
|
||||
translate(v=[-hingePoleDx, -hingePoleDy, 0]);
|
||||
|
||||
connectXYTrayWithMainRails(at=1);
|
||||
|
||||
multmatrix(sideWallToYBarTrans(t=t, r=r))
|
||||
insertDowelsIntoSideWall(at=1);
|
||||
|
||||
multmatrix(xBarSpaceToYBarSpace * xBarMirrorOtherCornerTrans * yBarSpaceToXBarSpace * sideWallToYBarTrans(t=t,r=r))
|
||||
insertDowelsIntoSideWall(at=1);
|
||||
}
|
||||
33
rack/assembly/screwFeet.scad
Normal file
33
rack/assembly/screwFeet.scad
Normal file
@ -0,0 +1,33 @@
|
||||
include <./common.scad>
|
||||
use <./insertFeet.scad>
|
||||
|
||||
$vpt = [95,90,10];
|
||||
$vpr = [105,0,38];
|
||||
$vpd = 650;
|
||||
$vpf = 22.50;
|
||||
|
||||
screwFeet(at=$t);
|
||||
|
||||
module screwFeet(at=0,r=0) {
|
||||
|
||||
t = lerp(a=20, b=0, t=at);
|
||||
|
||||
function screwTrans(t=0) = translate(v=[-t - 9,0,connectorBottomToScrew]) * rotate(a=[0,-90,0]);
|
||||
mirrorOtherFeetStackConnectorTrans = translate(v=[stackConnectorDx,0,0]) * mirror(v=[1,0,0]);
|
||||
|
||||
|
||||
module screwToFeetModule() {
|
||||
multmatrix(feetToYBarTrans(t = 0)*screwTrans(t = t))
|
||||
caseScrewA();
|
||||
|
||||
multmatrix(feetToYBarTrans(t = 0)*mirrorOtherFeetStackConnectorTrans*screwTrans(t = t))
|
||||
caseScrewA();
|
||||
}
|
||||
|
||||
screwToFeetModule();
|
||||
|
||||
multmatrix(yBarMirrorOtherCornerTrans)
|
||||
screwToFeetModule();
|
||||
|
||||
insertFeet(at=1,r=r);
|
||||
}
|
||||
42
rack/assembly/screwXBarAndYBar.scad
Normal file
42
rack/assembly/screwXBarAndYBar.scad
Normal file
@ -0,0 +1,42 @@
|
||||
include <./common.scad>
|
||||
use <./attachXBarWithYBar.scad>
|
||||
|
||||
$vpt = [103,90,20];
|
||||
$vpr = [68,0,36];
|
||||
$vpd = 500;
|
||||
$vpf = 22.50;
|
||||
|
||||
screwXBarAndYBar(at=$t);
|
||||
|
||||
module screwXBarAndYBar(at=0) {
|
||||
screwExtension = lerp(a=16, b=0, t=at);
|
||||
|
||||
// in x bar space
|
||||
function xBarYBarScrewTrans(extension) =
|
||||
translate(v=[27,xBarSideThickness + extension,8]) * rotate(a=[270,0,0]);
|
||||
|
||||
attachXBarWithYBar(at=1);
|
||||
|
||||
multmatrix(xBarSpaceToYBarSpace)
|
||||
union() {
|
||||
|
||||
if (!plasticMask) { xBar(); }
|
||||
|
||||
multmatrix(xBarYBarScrewTrans(screwExtension))
|
||||
caseScrewB();
|
||||
|
||||
multmatrix(xBarMirrorOtherCornerTrans * xBarYBarScrewTrans(screwExtension))
|
||||
caseScrewB();
|
||||
}
|
||||
|
||||
multmatrix(yBarMirrorOtherCornerTrans*xBarSpaceToYBarSpace)
|
||||
union() {
|
||||
if (!plasticMask) { xBar(); }
|
||||
|
||||
multmatrix(xBarYBarScrewTrans(screwExtension))
|
||||
caseScrewB();
|
||||
|
||||
multmatrix(xBarMirrorOtherCornerTrans * xBarYBarScrewTrans(screwExtension))
|
||||
caseScrewB();
|
||||
}
|
||||
}
|
||||
31
rack/assembly/slideHexNutToFeet.scad
Normal file
31
rack/assembly/slideHexNutToFeet.scad
Normal file
@ -0,0 +1,31 @@
|
||||
include <./common.scad>
|
||||
|
||||
$vpt = [75,-10,-14];
|
||||
$vpr = [74,0,120];
|
||||
$vpd = 300;
|
||||
$vpf = 22.50;
|
||||
|
||||
slideHexNutToFeet(at=$t);
|
||||
|
||||
module slideHexNutToFeet(at=0) {
|
||||
|
||||
t = lerp(a=8, b=0, t=at);
|
||||
|
||||
module slideNut() {
|
||||
if (!screwMask) {
|
||||
rotate(a = [0, 0, 90])
|
||||
rotate(a = [90, 0, 0])
|
||||
hexNut(rackFrameScrewType);
|
||||
}
|
||||
}
|
||||
|
||||
translate(v=[0,t,connectorBottomToScrew + 0.5]) // where does this come from again? slack?
|
||||
slideNut();
|
||||
|
||||
translate(v=[stackConnectorDx,t,connectorBottomToScrew + 0.5]) // where does this come from again? slack?
|
||||
slideNut();
|
||||
|
||||
if (!plasticMask) {
|
||||
stackConnectorFeet();
|
||||
}
|
||||
}
|
||||
52
rack/assembly/slideHexNutsIntoYBar.scad
Normal file
52
rack/assembly/slideHexNutsIntoYBar.scad
Normal file
@ -0,0 +1,52 @@
|
||||
include <./common.scad>
|
||||
|
||||
$vpt = [43,66,41];
|
||||
$vpr = [44,0,47];
|
||||
$vpd = 350;
|
||||
$vpf = 22.50;
|
||||
|
||||
slideHexNutsIntoYBar(at=$t);
|
||||
|
||||
module slideHexNutsIntoYBar(at=0)
|
||||
{
|
||||
|
||||
t = lerp(a=20,b=0,t=at);
|
||||
|
||||
if (!plasticMask) {
|
||||
yBar();
|
||||
}
|
||||
|
||||
function sideModuleTrans(t=0) =
|
||||
yBarSideModuleConnectorTrans *
|
||||
translate(v = [yBarScrewHoleToOuterYEdge, yBarScrewHoleToFrontXEdge+t, -(4+sideWallConnLugDepression)]) *
|
||||
rotate(a=[0,0,90]);
|
||||
|
||||
function mainRailTrans(t=0) =
|
||||
yBarMainRailConnectorTrans *
|
||||
translate(v = [mainRailSlideHexOnYBarDx+t, mainRailSlideHexOnYBarDy, -5]) *
|
||||
rotate(a=[-45,0,0]);
|
||||
|
||||
function xBarTrans(t=0) =
|
||||
translate(v = [-5, 27, 8+t]) *
|
||||
yBarXBarConnectorTrans *
|
||||
rotate(a=[0,90,0]);
|
||||
|
||||
module slideHexNutsOneCorner(t=0) {
|
||||
multmatrix(sideModuleTrans(t = t))
|
||||
hexNut(rackFrameScrewType);
|
||||
|
||||
multmatrix(mainRailTrans(t = t))
|
||||
hexNut(rackFrameScrewType);
|
||||
|
||||
multmatrix(xBarTrans(t = t))
|
||||
hexNut(rackFrameScrewType);
|
||||
}
|
||||
|
||||
if (!screwMask) {
|
||||
slideHexNutsOneCorner(t = t);
|
||||
|
||||
multmatrix(yBarMirrorOtherCornerTrans)
|
||||
slideHexNutsOneCorner(t = t);
|
||||
}
|
||||
|
||||
}
|
||||
41
rack/assembly/slideHexNutsIntoYBarXYPlate.scad
Normal file
41
rack/assembly/slideHexNutsIntoYBarXYPlate.scad
Normal file
@ -0,0 +1,41 @@
|
||||
include <./common.scad>
|
||||
use <./attachXYTrays.scad>
|
||||
|
||||
$vpt = [71,123,88];
|
||||
$vpr = [44,0,47];
|
||||
$vpd = 450;
|
||||
$vpf = 22.50;
|
||||
|
||||
slideHexNutsIntoYBarXYPlate(at=$t);
|
||||
|
||||
module slideHexNutsIntoYBarXYPlate(at=0) {
|
||||
|
||||
t = lerp(a=12,b=0,t=at);
|
||||
|
||||
attachXYTrays(at=1,r=0);
|
||||
|
||||
slideHexNuts(t=t);
|
||||
|
||||
multmatrix(upperXYTrayTrans)
|
||||
slideHexNuts(t=t);
|
||||
|
||||
module plateHexNut(t) {
|
||||
multmatrix(yBarBasePlateConnectorTrans)
|
||||
translate(v=[_heatSetX+t, _heatSetY, 4 + _baseConnRecession]) // TODO gotta rename these
|
||||
hexNut(rackFrameScrewType);
|
||||
}
|
||||
|
||||
module slideHexNuts(t=0) {
|
||||
|
||||
plateHexNut(t=t);
|
||||
|
||||
translate(v=[xyPlateConnDx, 0,0])
|
||||
plateHexNut(t=-t);
|
||||
|
||||
translate(v=[0, xyPlateConnDy,0])
|
||||
plateHexNut(t=t);
|
||||
|
||||
translate(v=[xyPlateConnDx, xyPlateConnDy,0])
|
||||
plateHexNut(t=-t);
|
||||
}
|
||||
}
|
||||
@ -2,8 +2,8 @@ include <../../helper/common.scad>
|
||||
include <../../config/common.scad>
|
||||
include <../sharedVariables.scad>
|
||||
|
||||
mainRailHeatSetOnYBarDx = railSideMountThickness + 5;
|
||||
mainRailHeatSetOnYBarDy = railFrontThickness + 2;
|
||||
mainRailSlideHexOnYBarDx = railSideMountThickness + 5;
|
||||
mainRailSlideHexOnYBarDy = railFrontThickness + 2;
|
||||
|
||||
module onYBarToMainRailNegative() {
|
||||
|
||||
@ -14,7 +14,7 @@ module onYBarToMainRailNegative() {
|
||||
translate(v=[-slotZSlack/2, -slotSlack/2,0])
|
||||
cube(size = [railTotalWidth+slotZSlack, railTotalDepth + slotSlack, railFootThickness]);
|
||||
|
||||
translate(v = [mainRailHeatSetOnYBarDx, mainRailHeatSetOnYBarDy, -5])
|
||||
translate(v = [mainRailSlideHexOnYBarDx, mainRailSlideHexOnYBarDy, -5])
|
||||
rotate(a=[-45,0,0])
|
||||
hexNutPocket_N("m3", openSide=false, backSpace=5);
|
||||
}
|
||||
@ -36,7 +36,7 @@ module onMainRailYBarConnectorNegative() {
|
||||
|
||||
screwOffset = 9;
|
||||
|
||||
translate(v = [mainRailHeatSetOnYBarDx, mainRailHeatSetOnYBarDy + screwOffset, -5 + screwOffset])
|
||||
translate(v = [mainRailSlideHexOnYBarDx, mainRailSlideHexOnYBarDy + screwOffset, -5 + screwOffset])
|
||||
rotate(a=[-45,0,0])
|
||||
counterSunkHead_N(rackFrameScrewType, screwExtension=inf50, headExtension=inf50);
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ include <../config/common.scad>
|
||||
include <./sharedVariables.scad>
|
||||
include <./connector/connectors.scad>
|
||||
|
||||
mainRail();
|
||||
*mainRail();
|
||||
|
||||
module mainRail() {
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
include <./sideWallBase.scad>
|
||||
|
||||
sideWallLeft();
|
||||
*sideWallLeft();
|
||||
|
||||
module sideWallLeft() {
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
include <./sideWallBase.scad>
|
||||
|
||||
sideWallRight();
|
||||
*sideWallRight();
|
||||
|
||||
module sideWallRight() {
|
||||
|
||||
|
||||
@ -3,7 +3,7 @@ include <../config/common.scad>
|
||||
include <./sharedVariables.scad>
|
||||
include <./connector/connectors.scad>
|
||||
|
||||
xBar();
|
||||
*xBar();
|
||||
|
||||
module xBar() {
|
||||
|
||||
|
||||
@ -1,7 +1,7 @@
|
||||
include <../helper/common.scad>
|
||||
include <./connector/connectors.scad>
|
||||
|
||||
xyPlate();
|
||||
*xyPlate();
|
||||
|
||||
xyPlateConnDx = xBarX + 2*_heatSetX; // X distance between connectors
|
||||
xyPlateConnDy = yBarDepth - 2*basePlateScrewMountToYBarXZFace; // Y distance between connectors
|
||||
|
||||
@ -3,7 +3,7 @@ include <../config/common.scad>
|
||||
include <./connector/connectors.scad>
|
||||
include <./sharedVariables.scad>
|
||||
|
||||
yBar();
|
||||
*yBar();
|
||||
|
||||
module yBar() {
|
||||
|
||||
|
||||
Reference in New Issue
Block a user