From 096f8deaba61939d99ff4ae19fc1c195a9fe6ff5 Mon Sep 17 00:00:00 2001 From: zhao Date: Sat, 15 Apr 2023 11:56:20 -0400 Subject: [PATCH] wip feet --- rack/connector/connectors.scad | 72 ++++++++++++++++++++++++++++++++++ rack/print/yBar_P.scad | 8 +++- rack/sharedVariables.scad | 12 ++++++ rack/stackConnector.scad | 3 ++ rack/stackEnds.scad | 62 +++++++++++++++++++++++++++++ rack/xBar.scad | 11 +----- rack/yBar.scad | 2 +- 7 files changed, 158 insertions(+), 12 deletions(-) create mode 100644 rack/connector/connectors.scad create mode 100644 rack/stackEnds.scad diff --git a/rack/connector/connectors.scad b/rack/connector/connectors.scad new file mode 100644 index 0000000..c5a6435 --- /dev/null +++ b/rack/connector/connectors.scad @@ -0,0 +1,72 @@ +/* + Connector factory +*/ +include <../helper/screws.scad> +include <../helper/slack.scad> +include <../helper/dovetail.scad> +include <../helper/halfspace.scad> +include <./config.scad> + +// WIP + +partList = ["yBar", "xBar", "mainRail", "xyPlate", "sideModule"]; + +module applyConnector(on, to, transformation) { + if (on == "yBar" && to == "xBar") { + + } + + module xBarConnectorFromY_N() { + y = 27; + z = 6; + translate(v = [-m3HeatSetInsertSlotHeightSlacked, y, z]) + rotate(a = [0, 90, 0]) + heatSetInsertSlot_N(rackFrameScrewType); + + } + + module xBarConnectorFromY_P() { + rotate(a=[0,0,-90]) + dovetail( + topWidth = 15, + bottomWidth = 12, + height = 2, + length = yBarHeight, + headExtension = 1, + baseExtension = 2, + frontFaceLength = 2, + frontFaceScale = 0.95, + backFaceLength = 5, + backFaceScale = 1.2); + } + + + module yBarConnectorFromX_N() { + y = 27; + z = 6; + slack = xySlack; + + 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.05, + backFaceLength = 5, + backFaceScale = 1.2); + + // TODO clean this up + translate(v = [-6, y, z]) + rotate(a = [0, -90, 0]) + counterSunkHead_N(rackFrameScrewType, screwExtension=inf10, headExtension=inf10); + } + + +} + diff --git a/rack/print/yBar_P.scad b/rack/print/yBar_P.scad index 74818fb..129c914 100644 --- a/rack/print/yBar_P.scad +++ b/rack/print/yBar_P.scad @@ -4,4 +4,10 @@ include <../xBar.scad> // Oriented for 3d printing. // Supports required at XY wall connections, and depending on roundness -yBar(); \ No newline at end of file +yBar(); + + +translate(v=[40,0,0]) +mirror(v=[1,0,0]) +rotate(a=[0,0,90]) +*xBar(); \ No newline at end of file diff --git a/rack/sharedVariables.scad b/rack/sharedVariables.scad index 803f4bd..be753b4 100644 --- a/rack/sharedVariables.scad +++ b/rack/sharedVariables.scad @@ -51,3 +51,15 @@ yBarWallThickness = 3; yBarRoundness = baseRoundness; joinCornerDepth = 32; + +// It's actually the railSlotToInnerYEdge of the yBar, it'll be nice to be able to refer to it like yBar.railSlotToInnerYEdge +xBarX = maxUnitWidth - 2*railSlotToInnerYEdge; +xBarY = 32; +xBarHeight = 15; + +xBarWallThickness = 2; +xBarSideThickness = 6; +xBarRoundness = baseRoundness; + +rackTotalWidth = 2*yBarWidth + xBarX; +rackTotalDepth = yBarDepth; diff --git a/rack/stackConnector.scad b/rack/stackConnector.scad index 66aa29e..135b6ed 100644 --- a/rack/stackConnector.scad +++ b/rack/stackConnector.scad @@ -5,6 +5,9 @@ include <../helper/screws.scad> include <./config.scad> +connectorYEdgeToYBarYEdge = 5; +connectorXEdgeToYBarXEdge = 5; + connectorRectWidth = 10; connectorRectDepth = 10; connectorTotalHeight = 10; diff --git a/rack/stackEnds.scad b/rack/stackEnds.scad new file mode 100644 index 0000000..e251445 --- /dev/null +++ b/rack/stackEnds.scad @@ -0,0 +1,62 @@ +include <./stackConnector.scad> +include <../helper/halfspace.scad> +include <./sharedVariables.scad> + +// Distance from midpoint of stack connectors to each other +stackConnectorDx = rackTotalWidth - 2*(connectorXEdgeToYBarXEdge + connectorRectWidth/2); +stackConnectorDy = rackTotalDepth - 2*(connectorYEdgeToYBarYEdge + connectorRectDepth/2); + + +stackConnectorFeet(); + +module stackConnectorFeet() { + + bandThickness = 2; + height = 14; + protrusionAngle = 30; + + + // stack connectors along rack x axis + translate(v=[-(stackConnectorDx+connectorRectWidth)/2,-connectorRectDepth/2,0]) + mirror(v=[0,0,1]) { + translate(v = [stackConnectorDx, 0, 0]) + stackConnectorBottom(); + + stackConnectorBottom(); + } + band(); + + + module band() { + + intersection() { + translate(v=[0,0,2]) + difference() { + roundedCube(rackTotalWidth, inf50, height, 3, center = true); + + translate(v=[0,0,3]) + roundedCube(rackTotalWidth-6, inf50, height-6, 3, center = true); + } + + halfspace(vpos=[0,1,0],p=[0,-5,2]); + halfspace(vpos=[0,-1,0.75],p=[0,5,2]); + + halfspace(vpos=[0,-1,0],p=[0,14,2]); + } + + } + + module roundedCube(x,y,z,r, center=false) { + translate(v=[0,0,z/2]) + minkowski() { + cube(size=[x-2*r,y,z-2*r], center=center); + + rotate(a=[90,0,0]) + cylinder(r=r, h=eps); + } + } +} + +module stackConnectorHandle() { + +} \ No newline at end of file diff --git a/rack/xBar.scad b/rack/xBar.scad index 3d62c1c..1703616 100644 --- a/rack/xBar.scad +++ b/rack/xBar.scad @@ -2,19 +2,10 @@ include <../helper/cylindricalFilet.scad> include <../helper/screws.scad> include <./config.scad> include <./xyBarConnector.scad> - +include <./sharedVariables.scad> // Temporary include <./yBar.scad> -// It's actually the railSlotToInnerYEdge of the yBar, it'll be nice to be able to refer to it like yBar.railSlotToInnerYEdge -xBarX = maxUnitWidth - 2*railSlotToInnerYEdge; -xBarY = 32; -xBarHeight = 15; - -xBarWallThickness = 2; -xBarSideThickness = 6; -xBarRoundness = baseRoundness; - *xBar(); module xBar() { diff --git a/rack/yBar.scad b/rack/yBar.scad index e8e89d5..51fbedd 100644 --- a/rack/yBar.scad +++ b/rack/yBar.scad @@ -56,7 +56,7 @@ module yBar() { module applyStackConnector() { apply_n() { mirrorOtherCorner() - translate(v = [5, 5, 0]) + translate(v = [connectorXEdgeToYBarXEdge, connectorYEdgeToYBarYEdge, 0]) stackConnectorSocket_N(); children(0);