diff --git a/rack/connector/connectors.scad b/rack/connector/connectors.scad index c3b3888..e3dc915 100644 --- a/rack/connector/connectors.scad +++ b/rack/connector/connectors.scad @@ -66,8 +66,6 @@ module connectorPositive(on, to) { onYBarToXBarPositive(); } else if (on == "yBar" && to == "basePlate") { onYBarBasePlateConnectorPositive(); - } else if (on == "xBar" && to == "yBar") { - onXBarToYBarPositive(); } else if (on == "mainRail" && to == "yBar") { onMainRailYBarConnectorPositive(); } diff --git a/rack/connector/xBarYBarConnectors.scad b/rack/connector/xBarYBarConnectors.scad index fc95387..46d7369 100644 --- a/rack/connector/xBarYBarConnectors.scad +++ b/rack/connector/xBarYBarConnectors.scad @@ -35,22 +35,6 @@ module onXBarToYBarNegative() { translate(v = [-xBarSideThickness, y, z]) rotate(a = [0, -90, 0]) counterSunkHead_N(rackFrameScrewType, screwExtension=inf10, headExtension=inf10); - - // lugs for snap fit and hold in place - translate(v=[-0.1,3,13.5]) - lug(); - - translate(v=[-0.1,26,13.5]) - lug(); -} - -module onXBarToYBarPositive() { - // lugs for snap fit and hold in place - translate(v=[-0.1,3,2]) - lug(); - - translate(v=[-0.1,26,2]) - lug(); } @@ -62,13 +46,6 @@ module onYBarToXBarNegative() { rotate(a = [180, 0, 0]) rotate(a = [0, 90, 0]) hexNutPocket_N("m3", openSide=false, backSpace=5); - - // lugs for snap fit and hold in place - translate(v=[-0.1,3,2]) - lug(); - - translate(v=[-0.1,26,2]) - lug(); } module onYBarToXBarPositive() { @@ -87,26 +64,8 @@ module onYBarToXBarPositive() { backFaceLength = 5, backFaceScale = 1.2 ); - - // lugs for snap fit and hold in place - translate(v=[-0.1,3,13.5]) - lug(); - - translate(v=[-0.1,26,13.5]) - lug(); } xBarConnectorToYBarConnectorTrans = mirror(v=[1,0,0]); yBarConnectorToXBarConnectorTrans = mirror(v=[-1,0,0]); - - - -module lug() { - hull() { - sphere(r=0.5); - - translate(v=[0,2,0]) - sphere(r=0.5); - } -} \ No newline at end of file diff --git a/rack/print/eval_P.scad b/rack/print/eval_P.scad index f6c6fcf..a86ed3e 100644 --- a/rack/print/eval_P.scad +++ b/rack/print/eval_P.scad @@ -2,8 +2,8 @@ include <../xBar.scad> include <../yBar.scad> include <../mainRail.scad> - -// Evaluation print for slack config +// Evaluation print for slack config, please see slack.scad +// to configure tolerances intersection() { yBar(); @@ -14,16 +14,15 @@ translate(v=[35,0,0]) intersection() { translate(v=[0,-xBarX + xBarSideThickness + 5,0]) xBar(); - halfspace(vpos=[0,1,0], p=[0,0,0]); } -translate(v=[60,20,0]) +translate(v=[35,18,0]) rotate(a=[0,0,90]) intersection() { + mirror(v=[0,1,0]) multmatrix(mainRailPrintOrientation) mainRail(); - halfspace(vpos=[-1,0,0], p=[19,0,0]); mainRailPrintOrientation = [ diff --git a/rbuild.py b/rbuild.py index cf919f4..06033e5 100644 --- a/rbuild.py +++ b/rbuild.py @@ -4,6 +4,7 @@ import argparse import subprocess import os import sys +from stl import mesh, stl # For actual dimensions, please see profiles.scad. @@ -82,7 +83,10 @@ def run_build(build_var, config_var): def build_single(build_dir, target_dir, filename, config): print('Building:', filename, 'from', build_dir, 'to', target_dir) - run_openscad(construct_openscad_args(build_dir, target_dir, filename, config)) + openscad_args = construct_openscad_args(build_dir, target_dir, filename, config) + run_openscad(openscad_args) + + convert_text_stl_to_binary(openscad_args[1]) def construct_openscad_args(build_dir, target_dir, filename, config): @@ -128,6 +132,15 @@ def run_openscad(options=['-h']): '(Currently need Linux for this)') +def convert_text_stl_to_binary(file_path): + mesh_data = mesh.Mesh.from_file(file_path) + + # Remove the original file + os.remove(file_path) + + mesh_data.save(file_path, mode=stl.Mode.BINARY) + + def assert_os(): if sys.platform == 'linux': return True diff --git a/stl/rack-mount/dualLBracketSupportRail_P1.stl b/stl/rack-mount/dualLBracketSupportRail_P1.stl index 9c2a025..b2bf1fa 100644 Binary files a/stl/rack-mount/dualLBracketSupportRail_P1.stl and b/stl/rack-mount/dualLBracketSupportRail_P1.stl differ diff --git a/stl/rack-mount/dualLBracketSupportRail_P2.stl b/stl/rack-mount/dualLBracketSupportRail_P2.stl index 6eb5586..ea54941 100644 Binary files a/stl/rack-mount/dualLBracketSupportRail_P2.stl and b/stl/rack-mount/dualLBracketSupportRail_P2.stl differ diff --git a/stl/rack/eval_P.stl b/stl/rack/eval_P.stl index 9bd4643..ac366de 100644 Binary files a/stl/rack/eval_P.stl and b/stl/rack/eval_P.stl differ diff --git a/stl/rack/hingeModule_P1.stl b/stl/rack/hingeModule_P1.stl index 0034b6a..c1c9e46 100644 Binary files a/stl/rack/hingeModule_P1.stl and b/stl/rack/hingeModule_P1.stl differ diff --git a/stl/rack/magnetModule_P1.stl b/stl/rack/magnetModule_P1.stl index 73bdbe1..c42437b 100644 Binary files a/stl/rack/magnetModule_P1.stl and b/stl/rack/magnetModule_P1.stl differ diff --git a/stl/rack/magnetModule_P2.stl b/stl/rack/magnetModule_P2.stl index baa0029..85941b5 100644 Binary files a/stl/rack/magnetModule_P2.stl and b/stl/rack/magnetModule_P2.stl differ diff --git a/stl/rack/mainRail_P.stl b/stl/rack/mainRail_P.stl index 7c93653..88cbf92 100644 Binary files a/stl/rack/mainRail_P.stl and b/stl/rack/mainRail_P.stl differ diff --git a/stl/rack/sideWallLeft_P.stl b/stl/rack/sideWallLeft_P.stl index 045b93a..f5a2b92 100644 Binary files a/stl/rack/sideWallLeft_P.stl and b/stl/rack/sideWallLeft_P.stl differ diff --git a/stl/rack/sideWallRight_P.stl b/stl/rack/sideWallRight_P.stl index a260e65..31864d8 100644 Binary files a/stl/rack/sideWallRight_P.stl and b/stl/rack/sideWallRight_P.stl differ diff --git a/stl/rack/stackConnectorBottom_P.stl b/stl/rack/stackConnectorBottom_P.stl index 855a71c..9685fcb 100644 Binary files a/stl/rack/stackConnectorBottom_P.stl and b/stl/rack/stackConnectorBottom_P.stl differ diff --git a/stl/rack/stackConnectorDual_P.stl b/stl/rack/stackConnectorDual_P.stl index f022a09..a525ec5 100644 Binary files a/stl/rack/stackConnectorDual_P.stl and b/stl/rack/stackConnectorDual_P.stl differ diff --git a/stl/rack/xBar_P.stl b/stl/rack/xBar_P.stl index 9e3fc56..117191a 100644 Binary files a/stl/rack/xBar_P.stl and b/stl/rack/xBar_P.stl differ diff --git a/stl/rack/xyPlate_P.stl b/stl/rack/xyPlate_P.stl index ededef1..9c64ef0 100644 Binary files a/stl/rack/xyPlate_P.stl and b/stl/rack/xyPlate_P.stl differ diff --git a/stl/rack/yBar_P.stl b/stl/rack/yBar_P.stl index cf477cd..82cc97f 100644 Binary files a/stl/rack/yBar_P.stl and b/stl/rack/yBar_P.stl differ