diff --git a/rack/base1.stl b/old/base1.stl similarity index 100% rename from rack/base1.stl rename to old/base1.stl diff --git a/rack/body/base1.scad b/old/body/base1.scad similarity index 100% rename from rack/body/base1.scad rename to old/body/base1.scad diff --git a/rack/body/l1.scad b/old/body/l1.scad similarity index 100% rename from rack/body/l1.scad rename to old/body/l1.scad diff --git a/rack/body/legToleranceTest.scad b/old/body/legToleranceTest.scad similarity index 100% rename from rack/body/legToleranceTest.scad rename to old/body/legToleranceTest.scad diff --git a/rack/body/m4Leg.scad b/old/body/m4Leg.scad similarity index 100% rename from rack/body/m4Leg.scad rename to old/body/m4Leg.scad diff --git a/rack/body/side/side.scad b/old/body/side/side.scad similarity index 100% rename from rack/body/side/side.scad rename to old/body/side/side.scad diff --git a/rack/body/side/side.stl b/old/body/side/side.stl similarity index 100% rename from rack/body/side/side.stl rename to old/body/side/side.stl diff --git a/rack/body/top1.scad b/old/body/top1.scad similarity index 100% rename from rack/body/top1.scad rename to old/body/top1.scad diff --git a/rack/body/top1.stl b/old/body/top1.stl similarity index 100% rename from rack/body/top1.stl rename to old/body/top1.stl diff --git a/rack/frontPlate.scad b/old/frontPlate.scad similarity index 100% rename from rack/frontPlate.scad rename to old/frontPlate.scad diff --git a/rack/frontPlate2u.stl b/old/frontPlate2u.stl similarity index 100% rename from rack/frontPlate2u.stl rename to old/frontPlate2u.stl diff --git a/rack/l1.stl b/old/l1.stl similarity index 100% rename from rack/l1.stl rename to old/l1.stl diff --git a/rack/legToleranceTest.stl b/old/legToleranceTest.stl similarity index 100% rename from rack/legToleranceTest.stl rename to old/legToleranceTest.stl diff --git a/rack/m4Leg.stl b/old/m4Leg.stl similarity index 100% rename from rack/m4Leg.stl rename to old/m4Leg.stl diff --git a/rack/m4LegM.stl b/old/m4LegM.stl similarity index 100% rename from rack/m4LegM.stl rename to old/m4LegM.stl diff --git a/rack/open-frame.scad b/old/open-frame.scad similarity index 100% rename from rack/open-frame.scad rename to old/open-frame.scad diff --git a/rack/patch-panel.scad b/old/patch-panel.scad similarity index 100% rename from rack/patch-panel.scad rename to old/patch-panel.scad diff --git a/power/old/src/open-frame.scad b/old/power/old/src/open-frame.scad similarity index 100% rename from power/old/src/open-frame.scad rename to old/power/old/src/open-frame.scad diff --git a/power/src/Untitled.scad b/old/power/src/Untitled.scad similarity index 100% rename from power/src/Untitled.scad rename to old/power/src/Untitled.scad diff --git a/power/src/base.scad b/old/power/src/base.scad similarity index 100% rename from power/src/base.scad rename to old/power/src/base.scad diff --git a/power/src/join.scad b/old/power/src/join.scad similarity index 100% rename from power/src/join.scad rename to old/power/src/join.scad diff --git a/power/src/plate.stl b/old/power/src/plate.stl similarity index 100% rename from power/src/plate.stl rename to old/power/src/plate.stl diff --git a/power/src/sfx-psu.scad b/old/power/src/sfx-psu.scad similarity index 100% rename from power/src/sfx-psu.scad rename to old/power/src/sfx-psu.scad diff --git a/power/stl/backPlate.stl b/old/power/stl/backPlate.stl similarity index 100% rename from power/stl/backPlate.stl rename to old/power/stl/backPlate.stl diff --git a/power/stl/feet.stl b/old/power/stl/feet.stl similarity index 100% rename from power/stl/feet.stl rename to old/power/stl/feet.stl diff --git a/power/stl/joinTest.stl b/old/power/stl/joinTest.stl similarity index 100% rename from power/stl/joinTest.stl rename to old/power/stl/joinTest.stl diff --git "a/power/stl/joinTest\\.stl" "b/old/power/stl/joinTest\\.stl" similarity index 100% rename from "power/stl/joinTest\\.stl" rename to "old/power/stl/joinTest\\.stl" diff --git a/power/stl/legTest.stl b/old/power/stl/legTest.stl similarity index 100% rename from power/stl/legTest.stl rename to old/power/stl/legTest.stl diff --git a/power/stl/plate.stl b/old/power/stl/plate.stl similarity index 100% rename from power/stl/plate.stl rename to old/power/stl/plate.stl diff --git a/power/stl/railInsert.stl b/old/power/stl/railInsert.stl similarity index 100% rename from power/stl/railInsert.stl rename to old/power/stl/railInsert.stl diff --git a/power/stl/screwtest.stl b/old/power/stl/screwtest.stl similarity index 100% rename from power/stl/screwtest.stl rename to old/power/stl/screwtest.stl diff --git a/power/stl/support1.stl b/old/power/stl/support1.stl similarity index 100% rename from power/stl/support1.stl rename to old/power/stl/support1.stl diff --git a/power/stl/support2.stl b/old/power/stl/support2.stl similarity index 100% rename from power/stl/support2.stl rename to old/power/stl/support2.stl diff --git a/power/stl/top.stl b/old/power/stl/top.stl similarity index 100% rename from power/stl/top.stl rename to old/power/stl/top.stl diff --git a/power/stl/topBarInsert.stl b/old/power/stl/topBarInsert.stl similarity index 100% rename from power/stl/topBarInsert.stl rename to old/power/stl/topBarInsert.stl diff --git a/power/stl/untitled.fpp b/old/power/stl/untitled.fpp similarity index 100% rename from power/stl/untitled.fpp rename to old/power/stl/untitled.fpp diff --git a/rack/rack-tray/rack-tray.scad b/old/rack-tray/rack-tray.scad similarity index 100% rename from rack/rack-tray/rack-tray.scad rename to old/rack-tray/rack-tray.scad diff --git a/rack/rackCase.scad b/old/rackCase.scad similarity index 100% rename from rack/rackCase.scad rename to old/rackCase.scad diff --git a/rack/rackCase.stl b/old/rackCase.stl similarity index 100% rename from rack/rackCase.stl rename to old/rackCase.stl diff --git a/rack/rackCase180.stl b/old/rackCase180.stl similarity index 100% rename from rack/rackCase180.stl rename to old/rackCase180.stl diff --git a/rack/rackCaseForBox.scad b/old/rackCaseForBox.scad similarity index 100% rename from rack/rackCaseForBox.scad rename to old/rackCaseForBox.scad diff --git a/rack/rackCaseForBox.stl b/old/rackCaseForBox.stl similarity index 100% rename from rack/rackCaseForBox.stl rename to old/rackCaseForBox.stl diff --git a/rack/rackCaseForBoxM.stl b/old/rackCaseForBoxM.stl similarity index 100% rename from rack/rackCaseForBoxM.stl rename to old/rackCaseForBoxM.stl diff --git a/rack/rackCaseFrontPlat.stl b/old/rackCaseFrontPlat.stl similarity index 100% rename from rack/rackCaseFrontPlat.stl rename to old/rackCaseFrontPlat.stl diff --git a/rack/rackCaseFrontPlate.stl b/old/rackCaseFrontPlate.stl similarity index 100% rename from rack/rackCaseFrontPlate.stl rename to old/rackCaseFrontPlate.stl diff --git a/rack/rackCaselid.stl b/old/rackCaselid.stl similarity index 100% rename from rack/rackCaselid.stl rename to old/rackCaselid.stl diff --git a/rack/risers.scad b/old/risers.scad similarity index 100% rename from rack/risers.scad rename to old/risers.scad diff --git a/rack/screwmount-test.stl b/old/screwmount-test.stl similarity index 100% rename from rack/screwmount-test.stl rename to old/screwmount-test.stl diff --git a/rack/screwmount.scad b/old/screwmount.scad similarity index 100% rename from rack/screwmount.scad rename to old/screwmount.scad diff --git a/old/screws.scad b/old/screws.scad new file mode 100644 index 0000000..266655d --- /dev/null +++ b/old/screws.scad @@ -0,0 +1,113 @@ + +/* Some common screw dimensions */ + + +inf = 400; // basically infinity + +/********************************************************************************/ +// M3 dimensions + +m3HoleRadiusSlack = 0.15; +m3Diameter = 3.0; +m3Radius = m3Diameter/2.0; + +m3RadiusSlacked = m3Radius + m3HoleRadiusSlack; + +// legacy TODO: replace +m3ptr = m3RadiusSlacked; + +// NUTS! +m3HexNutWidthAcrossFlats = 5.41; +m3HexNutWidthAcrossCorners = FtoG(m3HexNutWidthAcrossFlats); + +m3HexNutThickness = 2.18; + +module m3HexNutPocketNegative() { + hexNutPocketNegative(m3RadiusSlacked, + m3HexNutWidthAcrossCorners/2 + 0.1, + m3HexNutThickness + 0.2); +} + + +// TODO: remove test + +*difference() { + cube(size=[8,12,5], center=true); + + rotate(a=[0,0,20]) + m3HexNutPocketNegative(); +} + +*m3HexNutPocketNegative(); + + +/********************************************************************************/ +// M4 dimensions + +m4HoleRadiusSlack = 0.15; +m4Diameter = 4.0; +m4Radius = m4Diameter/2.0; +m4RadiusSlacked = m4Radius + m4HoleRadiusSlack; + +m4HexNutWidthAcrossFlats = 6.89; +m4HexNutWidthAcrossCorners = FtoG(m4HexNutWidthAcrossFlats); + +m4HexNutThickness = 3.07; + +module m4HexNutPocketNegative() { + hexNutPocketNegative(m4RadiusSlacked, + m4HexNutWidthAcrossCorners/2 + 0.1, + m4HexNutThickness + 0.2); +} + + +// TODO: remove test + +*difference() { + translate(v=[0,1,0]) + cube(size=[10,12,6], center=true); + + rotate(a=[0,0,20]) + m4HexNutPocketNegative(); +} + +*m4HexNutPocketNegative(); + +/********************************************************************************/ + +// Convert a regular hexagon widthAcrossFlats to widthAcrossCorners +function FtoG(widthAcrossFlats) = widthAcrossFlats * (2/sqrt(3)); + +// Convert a regular hexagon widthAcrossCorners to widthAcrossFlats +function GtoF(widthAcrossCorners) = widthAcrossCorners * (sqrt(3)/2); + + +module hexNutPocketNegative( + innerRadius, + widthAcrossCorners, + thickness) +{ + + union() { + + hull() { + // hexagonal cylinder representing where the nut should fit + cylinder(r=widthAcrossCorners, h=thickness, center=true, $fn=6); + + // negative volume for sliding in the nut + translate(v=[inf,0,0]) + cylinder(r=widthAcrossCorners, h=thickness, center=true, $fn=6); + } + + // negative volume for screw lead + translate(v=[0,0,-10]) + cylinder(r=innerRadius, h = inf, $fn=32); + + hull() { + translate(v=[inf,0,0]) + cylinder(r=innerRadius, h = inf, $fn=32); + cylinder(r=innerRadius, h = inf, $fn=32); + } + } +} + diff --git a/rack/screws.stl b/old/screws.stl similarity index 100% rename from rack/screws.stl rename to old/screws.stl diff --git a/profiles/rockpro/bottom.stl b/profiles/sbc/rockpro/bottom.stl similarity index 100% rename from profiles/rockpro/bottom.stl rename to profiles/sbc/rockpro/bottom.stl diff --git a/profiles/rockpro/case.scad b/profiles/sbc/rockpro/case.scad similarity index 100% rename from profiles/rockpro/case.scad rename to profiles/sbc/rockpro/case.scad diff --git a/profiles/rockpro/dual-tray-plate-part.scad b/profiles/sbc/rockpro/dual-tray-plate-part.scad similarity index 100% rename from profiles/rockpro/dual-tray-plate-part.scad rename to profiles/sbc/rockpro/dual-tray-plate-part.scad diff --git a/profiles/rockpro/dual-tray-plate-part.stl b/profiles/sbc/rockpro/dual-tray-plate-part.stl similarity index 100% rename from profiles/rockpro/dual-tray-plate-part.stl rename to profiles/sbc/rockpro/dual-tray-plate-part.stl diff --git a/profiles/rockpro/dual-tray.scad b/profiles/sbc/rockpro/dual-tray.scad similarity index 100% rename from profiles/rockpro/dual-tray.scad rename to profiles/sbc/rockpro/dual-tray.scad diff --git a/profiles/rockpro/dual-tray.stl b/profiles/sbc/rockpro/dual-tray.stl similarity index 100% rename from profiles/rockpro/dual-tray.stl rename to profiles/sbc/rockpro/dual-tray.stl diff --git a/profiles/rockpro/newcase.scad b/profiles/sbc/rockpro/newcase.scad similarity index 100% rename from profiles/rockpro/newcase.scad rename to profiles/sbc/rockpro/newcase.scad diff --git a/profiles/rockpro/newcase.stl b/profiles/sbc/rockpro/newcase.stl similarity index 100% rename from profiles/rockpro/newcase.stl rename to profiles/sbc/rockpro/newcase.stl diff --git a/profiles/rockpro/railTest.stl b/profiles/sbc/rockpro/railTest.stl similarity index 100% rename from profiles/rockpro/railTest.stl rename to profiles/sbc/rockpro/railTest.stl diff --git a/profiles/rockpro/rockpro.scad b/profiles/sbc/rockpro/rockpro.scad similarity index 100% rename from profiles/rockpro/rockpro.scad rename to profiles/sbc/rockpro/rockpro.scad diff --git a/profiles/rockpro/top.stl b/profiles/sbc/rockpro/top.stl similarity index 100% rename from profiles/rockpro/top.stl rename to profiles/sbc/rockpro/top.stl diff --git a/profiles/rpi/frontPlate.scad b/profiles/sbc/rpi/frontPlate.scad similarity index 100% rename from profiles/rpi/frontPlate.scad rename to profiles/sbc/rpi/frontPlate.scad diff --git a/profiles/rpi/frontPlate.stl b/profiles/sbc/rpi/frontPlate.stl similarity index 100% rename from profiles/rpi/frontPlate.stl rename to profiles/sbc/rpi/frontPlate.stl diff --git a/profiles/rpi/rpi2b.scad b/profiles/sbc/rpi/rpi2b.scad similarity index 100% rename from profiles/rpi/rpi2b.scad rename to profiles/sbc/rpi/rpi2b.scad diff --git a/profiles/rpi/rpi2b.stl b/profiles/sbc/rpi/rpi2b.stl similarity index 100% rename from profiles/rpi/rpi2b.stl rename to profiles/sbc/rpi/rpi2b.stl diff --git a/profiles/rpi/rpi2bDimTest.stl b/profiles/sbc/rpi/rpi2bDimTest.stl similarity index 100% rename from profiles/rpi/rpi2bDimTest.stl rename to profiles/sbc/rpi/rpi2bDimTest.stl diff --git a/profiles/rpi/top.scad b/profiles/sbc/rpi/top.scad similarity index 100% rename from profiles/rpi/top.scad rename to profiles/sbc/rpi/top.scad diff --git a/profiles/rpi/top.stl b/profiles/sbc/rpi/top.stl similarity index 100% rename from profiles/rpi/top.stl rename to profiles/sbc/rpi/top.stl diff --git a/profiles/rpi/voronoi.scad b/profiles/sbc/rpi/voronoi.scad similarity index 100% rename from profiles/rpi/voronoi.scad rename to profiles/sbc/rpi/voronoi.scad diff --git a/rack2/assemble.scad b/rack/assemble.scad similarity index 95% rename from rack2/assemble.scad rename to rack/assemble.scad index db76f0c..3c13233 100644 --- a/rack2/assemble.scad +++ b/rack/assemble.scad @@ -1,4 +1,4 @@ -include <../math.scad> +include <../helper/math.scad> include <./config.scad> include <./mainRail.scad> include <./yBar.scad> diff --git a/rack2/config.scad b/rack/config.scad similarity index 100% rename from rack2/config.scad rename to rack/config.scad diff --git a/rack/connectors.scad b/rack/connectors.scad new file mode 100644 index 0000000..e69de29 diff --git a/rack2/mainRail.scad b/rack/mainRail.scad similarity index 99% rename from rack2/mainRail.scad rename to rack/mainRail.scad index ecb8437..d3856be 100644 --- a/rack2/mainRail.scad +++ b/rack/mainRail.scad @@ -1,6 +1,6 @@ include <./config.scad> include <./screws.scad> -include <../math.scad> +include <../helper/math.scad> /* Small horizontal planes at the top and bottom of the main rails. Used so we can fasten the rail to the frame Note that this value is also used for a depression at the bottom/top of the frame for aligning the rail */ diff --git a/rack/screws.scad b/rack/screws.scad index 266655d..3d18670 100644 --- a/rack/screws.scad +++ b/rack/screws.scad @@ -1,113 +1,97 @@ +/* Some common screw dimensions and helper functions/modules */ -/* Some common screw dimensions */ - - -inf = 400; // basically infinity +include <../helper/math.scad> +include <../helper/common.scad> /********************************************************************************/ // M3 dimensions - -m3HoleRadiusSlack = 0.15; +m3HoleRadiusSlack = 0.4; // higher slack for not-so straight heat set inserts m3Diameter = 3.0; -m3Radius = m3Diameter/2.0; - +m3Radius = m3Diameter / 2.0; m3RadiusSlacked = m3Radius + m3HoleRadiusSlack; -// legacy TODO: replace -m3ptr = m3RadiusSlacked; - -// NUTS! m3HexNutWidthAcrossFlats = 5.41; m3HexNutWidthAcrossCorners = FtoG(m3HexNutWidthAcrossFlats); - m3HexNutThickness = 2.18; -module m3HexNutPocketNegative() { - hexNutPocketNegative(m3RadiusSlacked, - m3HexNutWidthAcrossCorners/2 + 0.1, - m3HexNutThickness + 0.2); -} +m3HeatSetInsertSlotRadiusSlack = -0.1; +m3HeatSetInsertSlotHeightSlack = 0.5; +m3HeatSetInsertSlotRadius = 2.5; +m3HeatSetInsertSlotHeight = 6; -// TODO: remove test - -*difference() { - cube(size=[8,12,5], center=true); - - rotate(a=[0,0,20]) - m3HexNutPocketNegative(); -} - -*m3HexNutPocketNegative(); - +m3HeatSetInsertSlotRadiusSlacked = m3HeatSetInsertSlotRadius+m3HeatSetInsertSlotRadiusSlack; +m3HeatSetInsertSlotHeightSlacked = m3HeatSetInsertSlotHeight+m3HeatSetInsertSlotHeightSlack; /********************************************************************************/ // M4 dimensions - m4HoleRadiusSlack = 0.15; m4Diameter = 4.0; -m4Radius = m4Diameter/2.0; +m4Radius = m4Diameter / 2.0; m4RadiusSlacked = m4Radius + m4HoleRadiusSlack; - m4HexNutWidthAcrossFlats = 6.89; m4HexNutWidthAcrossCorners = FtoG(m4HexNutWidthAcrossFlats); - m4HexNutThickness = 3.07; -module m4HexNutPocketNegative() { - hexNutPocketNegative(m4RadiusSlacked, - m4HexNutWidthAcrossCorners/2 + 0.1, - m4HexNutThickness + 0.2); -} - - -// TODO: remove test - -*difference() { - translate(v=[0,1,0]) - cube(size=[10,12,6], center=true); - - rotate(a=[0,0,20]) - m4HexNutPocketNegative(); -} - -*m4HexNutPocketNegative(); - /********************************************************************************/ -// Convert a regular hexagon widthAcrossFlats to widthAcrossCorners -function FtoG(widthAcrossFlats) = widthAcrossFlats * (2/sqrt(3)); +module heatSetInsertSlot_N(screwType) { + if (screwType == "m3") { + union() { + // actual slot for insert + cylinder(h = m3HeatSetInsertSlotHeightSlacked, r = m3HeatSetInsertSlotRadiusSlacked); -// Convert a regular hexagon widthAcrossCorners to widthAcrossFlats -function GtoF(widthAcrossCorners) = widthAcrossCorners * (sqrt(3)/2); + // extra space above slot to help with insertion + translate(v=[0, 0, m3HeatSetInsertSlotHeightSlacked]) + cylinder(h = inf50, r = 1.3*m3HeatSetInsertSlotRadiusSlacked); + } + } else { + error("Unsupported screw type"); + } +} +function screwRadiusSlacked(screwType) = + (screwType == "m3") + ? m3RadiusSlacked + : (screwType == "m4") + ? m4RadiusSlacked + : error("Unsupported screw type"); -module hexNutPocketNegative( - innerRadius, - widthAcrossCorners, - thickness) -{ +module hexNutPocket_N(screwType) { + if (screwType == "m3") { + hexNutPocketHelper_N(m3RadiusSlacked, m3HexNutWidthAcrossCorners / 2 + 0.1, m3HexNutThickness + 0.2); + } else if (screwType == "m4") { + hexNutPocketHelper_N(m4RadiusSlacked, m4HexNutWidthAcrossCorners / 2 + 0.1, m4HexNutThickness + 0.2); + } else { + error("Unsupported screw type"); + } +} +module hexNutPocketHelper_N(innerRadius, widthAcrossCorners, thickness) { union() { - hull() { // hexagonal cylinder representing where the nut should fit - cylinder(r=widthAcrossCorners, h=thickness, center=true, $fn=6); + cylinder(r = widthAcrossCorners, h = thickness, center = true, $fn = 6); // negative volume for sliding in the nut - translate(v=[inf,0,0]) - cylinder(r=widthAcrossCorners, h=thickness, center=true, $fn=6); + translate(v = [inf50, 0, 0]) + cylinder(r = widthAcrossCorners, h = thickness, center = true, $fn = 6); } // negative volume for screw lead - translate(v=[0,0,-10]) - cylinder(r=innerRadius, h = inf, $fn=32); + translate(v = [0, 0, - 10]) + cylinder(r = innerRadius, h = inf50, $fn = 32); hull() { - translate(v=[inf,0,0]) - cylinder(r=innerRadius, h = inf, $fn=32); - cylinder(r=innerRadius, h = inf, $fn=32); + translate(v = [inf50, 0, 0]) + cylinder(r = innerRadius, h = inf50, $fn = 32); + cylinder(r = innerRadius, h = inf50, $fn = 32); } } } +// Convert a regular hexagon widthAcrossFlats to widthAcrossCorners +function FtoG(widthAcrossFlats) = widthAcrossFlats * (2 / sqrt(3)); + +// Convert a regular hexagon widthAcrossCorners to widthAcrossFlats +function GtoF(widthAcrossCorners) = widthAcrossCorners * (sqrt(3) / 2); diff --git a/rack2/stackConnector.scad b/rack/stackConnector.scad similarity index 97% rename from rack2/stackConnector.scad rename to rack/stackConnector.scad index 9aaf4cd..71ab558 100644 --- a/rack2/stackConnector.scad +++ b/rack/stackConnector.scad @@ -1,6 +1,6 @@ -include <../math.scad> +include <../helper/math.scad> include <../misc/magnet.scad> -include <../common.scad> +include <../helper/common.scad> connectorTaperStartHeight = 2; connectorRectWidth = 10; diff --git a/rack2/xBar.scad b/rack/xBar.scad similarity index 100% rename from rack2/xBar.scad rename to rack/xBar.scad diff --git a/rack2/yBar.scad b/rack/yBar.scad similarity index 98% rename from rack2/yBar.scad rename to rack/yBar.scad index 1572e6c..bcb4f41 100644 --- a/rack2/yBar.scad +++ b/rack/yBar.scad @@ -1,4 +1,4 @@ -include <../math.scad> +include <../helper/math.scad> include <../misc/magnet.scad> include <../helper/sphericalFilet.scad> include <../helper/cylindricalFilet.scad> diff --git a/rack2/mainRail.stl b/rack2/mainRail.stl deleted file mode 100644 index 94ebd91..0000000 Binary files a/rack2/mainRail.stl and /dev/null differ diff --git a/rack2/mainRailS.stl b/rack2/mainRailS.stl deleted file mode 100644 index 6de58f5..0000000 Binary files a/rack2/mainRailS.stl and /dev/null differ diff --git a/rack2/mainRailShort.stl b/rack2/mainRailShort.stl deleted file mode 100644 index 6de58f5..0000000 Binary files a/rack2/mainRailShort.stl and /dev/null differ diff --git a/rack2/screws.scad b/rack2/screws.scad deleted file mode 100644 index 67ab710..0000000 --- a/rack2/screws.scad +++ /dev/null @@ -1,97 +0,0 @@ -/* Some common screw dimensions and helper functions/modules */ - -include <../math.scad> -include <../common.scad> - -/********************************************************************************/ -// M3 dimensions -m3HoleRadiusSlack = 0.4; // higher slack for not-so straight heat set inserts -m3Diameter = 3.0; -m3Radius = m3Diameter / 2.0; -m3RadiusSlacked = m3Radius + m3HoleRadiusSlack; - -m3HexNutWidthAcrossFlats = 5.41; -m3HexNutWidthAcrossCorners = FtoG(m3HexNutWidthAcrossFlats); -m3HexNutThickness = 2.18; - -m3HeatSetInsertSlotRadiusSlack = -0.1; -m3HeatSetInsertSlotHeightSlack = 0.5; - -m3HeatSetInsertSlotRadius = 2.5; -m3HeatSetInsertSlotHeight = 6; - -m3HeatSetInsertSlotRadiusSlacked = m3HeatSetInsertSlotRadius+m3HeatSetInsertSlotRadiusSlack; -m3HeatSetInsertSlotHeightSlacked = m3HeatSetInsertSlotHeight+m3HeatSetInsertSlotHeightSlack; - -/********************************************************************************/ -// M4 dimensions -m4HoleRadiusSlack = 0.15; -m4Diameter = 4.0; -m4Radius = m4Diameter / 2.0; -m4RadiusSlacked = m4Radius + m4HoleRadiusSlack; -m4HexNutWidthAcrossFlats = 6.89; -m4HexNutWidthAcrossCorners = FtoG(m4HexNutWidthAcrossFlats); -m4HexNutThickness = 3.07; - -/********************************************************************************/ - -module heatSetInsertSlot_N(screwType) { - if (screwType == "m3") { - union() { - // actual slot for insert - cylinder(h = m3HeatSetInsertSlotHeightSlacked, r = m3HeatSetInsertSlotRadiusSlacked); - - // extra space above slot to help with insertion - translate(v=[0, 0, m3HeatSetInsertSlotHeightSlacked]) - cylinder(h = inf50, r = 1.3*m3HeatSetInsertSlotRadiusSlacked); - } - } else { - error("Unsupported screw type"); - } -} - -function screwRadiusSlacked(screwType) = - (screwType == "m3") - ? m3RadiusSlacked - : (screwType == "m4") - ? m4RadiusSlacked - : error("Unsupported screw type"); - -module hexNutPocket_N(screwType) { - if (screwType == "m3") { - hexNutPocketHelper_N(m3RadiusSlacked, m3HexNutWidthAcrossCorners / 2 + 0.1, m3HexNutThickness + 0.2); - } else if (screwType == "m4") { - hexNutPocketHelper_N(m4RadiusSlacked, m4HexNutWidthAcrossCorners / 2 + 0.1, m4HexNutThickness + 0.2); - } else { - error("Unsupported screw type"); - } -} - -module hexNutPocketHelper_N(innerRadius, widthAcrossCorners, thickness) { - union() { - hull() { - // hexagonal cylinder representing where the nut should fit - cylinder(r = widthAcrossCorners, h = thickness, center = true, $fn = 6); - - // negative volume for sliding in the nut - translate(v = [inf50, 0, 0]) - cylinder(r = widthAcrossCorners, h = thickness, center = true, $fn = 6); - } - - // negative volume for screw lead - translate(v = [0, 0, - 10]) - cylinder(r = innerRadius, h = inf50, $fn = 32); - - hull() { - translate(v = [inf50, 0, 0]) - cylinder(r = innerRadius, h = inf50, $fn = 32); - cylinder(r = innerRadius, h = inf50, $fn = 32); - } - } -} - -// Convert a regular hexagon widthAcrossFlats to widthAcrossCorners -function FtoG(widthAcrossFlats) = widthAcrossFlats * (2 / sqrt(3)); - -// Convert a regular hexagon widthAcrossCorners to widthAcrossFlats -function GtoF(widthAcrossCorners) = widthAcrossCorners * (sqrt(3) / 2); diff --git a/rack2/stackConnector.stl b/rack2/stackConnector.stl deleted file mode 100644 index e6df8cd..0000000 Binary files a/rack2/stackConnector.stl and /dev/null differ