wip for dovetail join for x-y bar
This commit is contained in:
61
helper/dovetail.scad
Normal file
61
helper/dovetail.scad
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
include <./common.scad>
|
||||||
|
|
||||||
|
// centered on z axis
|
||||||
|
module dovetail(
|
||||||
|
topWidth,
|
||||||
|
bottomWidth,
|
||||||
|
height,
|
||||||
|
length,
|
||||||
|
headExtension=0,
|
||||||
|
baseExtension=0,
|
||||||
|
frontFaceLength = 0,
|
||||||
|
frontFaceScale = 0,
|
||||||
|
backFaceLength = 0,
|
||||||
|
backFaceScale = 0,
|
||||||
|
) {
|
||||||
|
|
||||||
|
translate(v=[0,0,frontFaceLength])
|
||||||
|
linear_extrude(length-(frontFaceLength+backFaceLength))
|
||||||
|
dovetailFace(topWidth,bottomWidth,height,headExtension,baseExtension);
|
||||||
|
|
||||||
|
translate(v=[0,0,frontFaceLength])
|
||||||
|
mirror(v=[0,0,1])
|
||||||
|
linear_extrude(frontFaceLength, scale=[frontFaceScale, frontFaceScale])
|
||||||
|
dovetailFace(topWidth,bottomWidth,height,headExtension,baseExtension);
|
||||||
|
|
||||||
|
translate(v=[0,0,length-backFaceLength])
|
||||||
|
linear_extrude(backFaceLength, scale=[backFaceScale,1])
|
||||||
|
dovetailFace(topWidth,bottomWidth,height,headExtension,baseExtension);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
module dovetailFace(topWidth, bottomWidth, height, headExtension, baseExtension) {
|
||||||
|
|
||||||
|
union() {
|
||||||
|
// base
|
||||||
|
polygon(points =
|
||||||
|
[[-bottomWidth/2, 0],
|
||||||
|
[-topWidth/2, height],
|
||||||
|
[topWidth/2, height],
|
||||||
|
[bottomWidth/2, 0]]
|
||||||
|
);
|
||||||
|
|
||||||
|
polygon(points =
|
||||||
|
[[-bottomWidth/2, -baseExtension],
|
||||||
|
[-bottomWidth/2,0 ],
|
||||||
|
[bottomWidth/2, 0],
|
||||||
|
[bottomWidth/2, -baseExtension]]
|
||||||
|
);
|
||||||
|
|
||||||
|
translate(v=[0,height])
|
||||||
|
polygon(points =
|
||||||
|
[[-topWidth/2, headExtension],
|
||||||
|
[-topWidth/2,0 ],
|
||||||
|
[topWidth/2, 0],
|
||||||
|
[topWidth/2, headExtension]]
|
||||||
|
);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
@ -24,6 +24,7 @@ module mirror4XY(p, dx, dy) {
|
|||||||
children(0);
|
children(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO: rename to simple align
|
||||||
module align(a,b) {
|
module align(a,b) {
|
||||||
|
|
||||||
rot_axis = cross(a,b);
|
rot_axis = cross(a,b);
|
||||||
|
|||||||
@ -1,5 +1,11 @@
|
|||||||
include <../yBar.scad>
|
include <../yBar.scad>
|
||||||
|
|
||||||
|
include <../xBar.scad>
|
||||||
|
|
||||||
// Oriented for 3d printing.
|
// Oriented for 3d printing.
|
||||||
// Supports required at XY wall connections, and depending on roundness
|
// Supports required at XY wall connections, and depending on roundness
|
||||||
yBar();
|
yBar();
|
||||||
|
|
||||||
|
translate(v=[140,0,0])
|
||||||
|
rotate(a=[0,0,90])
|
||||||
|
xBar();
|
||||||
@ -12,6 +12,7 @@ xBarY = 32;
|
|||||||
xBarHeight = 15;
|
xBarHeight = 15;
|
||||||
|
|
||||||
xBarWallThickness = 2;
|
xBarWallThickness = 2;
|
||||||
|
xBarSideThickness = 6;
|
||||||
xBarRoundness = baseRoundness;
|
xBarRoundness = baseRoundness;
|
||||||
|
|
||||||
*xBar();
|
*xBar();
|
||||||
@ -27,8 +28,8 @@ module xBar() {
|
|||||||
difference() {
|
difference() {
|
||||||
cylindricalFiletEdge(xBarY, xBarX, xBarHeight, xBarRoundness);
|
cylindricalFiletEdge(xBarY, xBarX, xBarHeight, xBarRoundness);
|
||||||
|
|
||||||
translate(v = [xBarWallThickness, xBarWallThickness, xBarWallThickness])
|
translate(v = [xBarWallThickness, xBarSideThickness, xBarWallThickness])
|
||||||
cylindricalFiletEdge(xBarY, xBarX-2*xBarWallThickness, xBarHeight, xBarRoundness);
|
cylindricalFiletEdge(xBarY, xBarX-2*xBarSideThickness, xBarHeight, xBarRoundness);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Shave off bottom corners to reduce elephant's foot at where xBar and YBar join
|
// Shave off bottom corners to reduce elephant's foot at where xBar and YBar join
|
||||||
@ -47,11 +48,7 @@ module xBar() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module applyYBarConnector() {
|
module applyYBarConnector() {
|
||||||
apply_pn() {
|
apply_n() {
|
||||||
|
|
||||||
mirrorOtherCorner()
|
|
||||||
rotate(a=[0,0,-90])
|
|
||||||
yBarConnectorFromXLug();
|
|
||||||
|
|
||||||
mirrorOtherCorner()
|
mirrorOtherCorner()
|
||||||
rotate(a=[0,0,-90])
|
rotate(a=[0,0,-90])
|
||||||
|
|||||||
@ -1,61 +1,43 @@
|
|||||||
include <../helper/screws.scad>
|
include <../helper/screws.scad>
|
||||||
|
include <../helper/dovetail.scad>
|
||||||
include <../helper/halfspace.scad>
|
include <../helper/halfspace.scad>
|
||||||
include <./config.scad>
|
include <./config.scad>
|
||||||
|
|
||||||
|
//xBarConnectorFromY_N();
|
||||||
|
|
||||||
module xBarConnectorFromY_N() {
|
module xBarConnectorFromY_N() {
|
||||||
y1 = 6;
|
y = 27;
|
||||||
y2 = 27;
|
|
||||||
z = 6;
|
z = 6;
|
||||||
|
translate(v = [-m3HeatSetInsertSlotHeightSlacked, y, z])
|
||||||
slack = 0.4;
|
|
||||||
|
|
||||||
translate(v = [-m3HeatSetInsertSlotHeightSlacked, y1, z])
|
|
||||||
rotate(a = [0, 90, 0])
|
rotate(a = [0, 90, 0])
|
||||||
heatSetInsertSlot_N(rackFrameScrewType);
|
heatSetInsertSlot_N(rackFrameScrewType);
|
||||||
|
|
||||||
translate(v = [-m3HeatSetInsertSlotHeightSlacked, y2, z])
|
}
|
||||||
rotate(a = [0, 90, 0])
|
|
||||||
heatSetInsertSlot_N(rackFrameScrewType);
|
|
||||||
|
|
||||||
// TODO fix this up
|
module xBarConnectorFromY_P() {
|
||||||
// TODO need to add slack values
|
rotate(a=[0,0,-90])
|
||||||
translate(v = [-1, y1+(y2-y1)/2, 0])
|
dovetail(topWidth = 15, bottomWidth = 12, height = 2, length = yBarHeight, headExtension = 1, baseExtension = 2, frontFaceLength = 0.5,
|
||||||
rotate(a = [0, 45, 0])
|
frontFaceScale = 0.90,
|
||||||
cube(size = [3+slack, 10+slack, 6+slack], center = true);
|
backFaceLength = 5,
|
||||||
|
backFaceScale = 1.2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
module yBarConnectorFromX_N() {
|
module yBarConnectorFromX_N() {
|
||||||
y1 = 6;
|
y = 27;
|
||||||
y2 = 27;
|
|
||||||
z = 6;
|
z = 6;
|
||||||
slack = 0.2;
|
slack = 0.3;
|
||||||
|
|
||||||
translate(v = [-inf50/2, y1, z])
|
|
||||||
|
translate(v=[-0.5,14,0])
|
||||||
|
mirror(v=[1,0,0])
|
||||||
|
rotate(a=[0,0,-90])
|
||||||
|
dovetail(topWidth = 15+slack, bottomWidth = 12+slack, height = 2+slack, length = yBarHeight, headExtension = 1, baseExtension = 2, frontFaceLength = 0.5,
|
||||||
|
frontFaceScale = 1.1,
|
||||||
|
backFaceLength = 5,
|
||||||
|
backFaceScale = 1.2);
|
||||||
|
|
||||||
|
translate(v = [-inf50/2, y, z])
|
||||||
rotate(a = [0, 90, 0])
|
rotate(a = [0, 90, 0])
|
||||||
cylinder(r = screwRadiusSlacked(rackFrameScrewType), h = inf50, $fn = 32);
|
cylinder(r = screwRadiusSlacked(rackFrameScrewType), h = inf50, $fn = 32);
|
||||||
|
|
||||||
translate(v = [-inf50/2, y2, z])
|
|
||||||
rotate(a = [0, 90, 0])
|
|
||||||
cylinder(r = screwRadiusSlacked(rackFrameScrewType), h = inf50, $fn = 32);
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: figure out nice abstraction to apply both positive and negative mods
|
|
||||||
module yBarConnectorFromXLug() {
|
|
||||||
y1 = 6;
|
|
||||||
y2 = 27;
|
|
||||||
z = 6;
|
|
||||||
|
|
||||||
slack = 0.2;
|
|
||||||
|
|
||||||
intersection() {
|
|
||||||
// TODO fix this up, no center=true
|
|
||||||
translate(v = [-1, y1+(y2-y1)/2, 0])
|
|
||||||
rotate(a = [0, 45, 0])
|
|
||||||
scale(v=[0.90,0.95,0.90])
|
|
||||||
cube(size = [3-slack, 10-slack, 6-slack], center = true);
|
|
||||||
|
|
||||||
halfspace(vpos=[0,0,1], p=[0,0,0]);
|
|
||||||
halfspace(vpos=[1,0,0], p=[-2,0,0]);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -15,11 +15,6 @@ include <./sharedVariables.scad>
|
|||||||
|
|
||||||
*yBar();
|
*yBar();
|
||||||
|
|
||||||
translate(v=[20,0,0])
|
|
||||||
*stackConnectorPlug();
|
|
||||||
|
|
||||||
*stackConnectorSocket_N();
|
|
||||||
|
|
||||||
module yBar() {
|
module yBar() {
|
||||||
|
|
||||||
applyBasePlateConnector()
|
applyBasePlateConnector()
|
||||||
@ -93,7 +88,12 @@ module yBar() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
module applyXBarConnector() {
|
module applyXBarConnector() {
|
||||||
apply_n() {
|
apply_pn() {
|
||||||
|
|
||||||
|
mirrorOtherCorner()
|
||||||
|
translate(v=[yBarWidth + 0.5,14,0])
|
||||||
|
xBarConnectorFromY_P();
|
||||||
|
|
||||||
mirrorOtherCorner()
|
mirrorOtherCorner()
|
||||||
translate(v = [yBarWidth+eps, 0, 0])
|
translate(v = [yBarWidth+eps, 0, 0])
|
||||||
xBarConnectorFromY_N();
|
xBarConnectorFromY_N();
|
||||||
|
|||||||
Reference in New Issue
Block a user