diff --git a/STL/fiveway.stl b/STL/fiveway.stl new file mode 100644 index 0000000..7c15ea7 Binary files /dev/null and b/STL/fiveway.stl differ diff --git a/STL/fourway.stl b/STL/fourway.stl new file mode 100644 index 0000000..4248cc8 Binary files /dev/null and b/STL/fourway.stl differ diff --git a/STL/minus.stl b/STL/minus.stl new file mode 100644 index 0000000..5f65a8f Binary files /dev/null and b/STL/minus.stl differ diff --git a/STL/plate_240x210.stl b/STL/plate_240x210.stl new file mode 100644 index 0000000..7325b1c Binary files /dev/null and b/STL/plate_240x210.stl differ diff --git a/STL/plus.stl b/STL/plus.stl new file mode 100644 index 0000000..0feabea Binary files /dev/null and b/STL/plus.stl differ diff --git a/STL/sixway.stl b/STL/sixway.stl new file mode 100644 index 0000000..f530769 Binary files /dev/null and b/STL/sixway.stl differ diff --git a/STL/strut-180.stl b/STL/strut-180.stl new file mode 100644 index 0000000..f46fb0c Binary files /dev/null and b/STL/strut-180.stl differ diff --git a/STL/strut-2.stl b/STL/strut-2.stl new file mode 100644 index 0000000..353f340 Binary files /dev/null and b/STL/strut-2.stl differ diff --git a/STL/strut-30.stl b/STL/strut-30.stl new file mode 100644 index 0000000..149e105 Binary files /dev/null and b/STL/strut-30.stl differ diff --git a/STL/strut-wa-180.stl b/STL/strut-wa-180.stl new file mode 100644 index 0000000..afee44a Binary files /dev/null and b/STL/strut-wa-180.stl differ diff --git a/STL/threeflat.stl b/STL/threeflat.stl new file mode 100644 index 0000000..9700146 Binary files /dev/null and b/STL/threeflat.stl differ diff --git a/STL/threeway.stl b/STL/threeway.stl new file mode 100644 index 0000000..8d16efa Binary files /dev/null and b/STL/threeway.stl differ diff --git a/frame.code-workspace b/frame.code-workspace new file mode 100644 index 0000000..876a149 --- /dev/null +++ b/frame.code-workspace @@ -0,0 +1,8 @@ +{ + "folders": [ + { + "path": "." + } + ], + "settings": {} +} \ No newline at end of file diff --git a/frame.scad b/frame.scad new file mode 100644 index 0000000..78acea2 --- /dev/null +++ b/frame.scad @@ -0,0 +1,185 @@ + +// ----------------------------------------------------------------------- +// frame is a project to generate connectors to build a frame which can +// be used to build anything by combining the connections and the struts. +// It will, however, just produce parts for a frame, not the walls or +// plates to be used to hold any equipment. +// +// The frames consist of two kinds of elements: +// - struts: Currently just a straight line between two connectors. +// The strut has two endings which are a bit smaller than +// the strut and fit into the connectors. +// - connectors: The connectors in different variations +// -------------------------------------------------------------------- +/* [Connector Options] */ +// The kind of connections +Connector_kind = 0; // [ 0 : None, 1 : Strut, 2 : Minus, 3 : Plus, 4 : Three Flat, 5 : Three Corner, 6 : Four Corner, 7 : Five Connectors, 8 : Six Connectors ] +// The length of a strut without connectors +strut_length = 10; // [ 1.0 : 220.0 ] +// Use the attachment for struts? +strut_attachment = false; + +/* [Hidden] */ +// ********************** +// ** Static Settings: ** +// ********************** +include + +// -------------------------------------------------------------------- +// a strut, beginning and ending with a connector. +// The connectors are a bit smaller than the holes in the +// connections to make them fit better. +// Please edit the connector_correction in static.scad to +// your needs. +// -------------------------------------------------------------------- +module strut (strutlength, size, wall, correction, attachment) { + + shift = wall + correction; + plugsize = size - 2 * shift; + translate ([0, shift, shift]) + cube(plugsize); + translate([plugsize, 0, 0]) + cube([strutlength, size, size]); + translate([plugsize + strutlength, shift, shift]) + cube(plugsize); + if (attachment[0]) { + // the attachment is located on the front of the strut, but + // raised for the amount of thickness of the plate. The + // width of the attachment is variable but should not be too + // small. + translate([plugsize, -attachment[2], attachment[1]]) + cube([strutlength, attachment[2], wall]); + } +} + + +// -------------------------------------------------------------------- +// a single connector which connects to one side of a strut. +// Will be combined to multiple way connectors by adding, translating +// and rotating the required connectors +// -------------------------------------------------------------------- +module connector(size = connector_length, wall = wall_thickness) { + difference () { + cube(size); + translate([wall, wall, wall]) + #cube([size , size - 2 * wall, size - 2 * wall]); + } +} + +// -------------------------------------------------------------------- +// a straight connection of two connectors +// -------------------------------------------------------------------- +module minus(size, wall) { + cube(size); + translate ([size, 0, 0]) + connector(size = size, wall = wall); + translate ([0, 0, size]) + rotate (a = [0, 180, 0]) + connector(size = size, wall = wall); + +} + +// -------------------------------------------------------------------- +// four connections with a 90 degree angle +// -------------------------------------------------------------------- +module plus(size, wall) { + minus(size = size, wall = wall); + translate ([size, 0, 0]) + rotate (a = [0, 0, 90]) + minus(size = size, wall = wall); +} + +// -------------------------------------------------------------------- +// A three way connector +// -------------------------------------------------------------------- +module threeflat(size, wall) { + minus(size = size, wall = wall); + translate ([size, size, 0]) + rotate (a = [0, 0, 90]) + connector(size = size, wall = wall); +} + +// -------------------------------------------------------------------- +// A three way connector to build the corners of a housing +// The basic building block for the connections. All others +// just add a connector to the previous one. +// -------------------------------------------------------------------- +module threecorner(size, wall) { + cube(size); + translate ([size, 0, 0]) + connector(size = size, wall = wall); + translate ([size, size, 0]) + rotate (a = [0, 0, 90]) + connector(size = size, wall = wall); + translate ([size, 0, size]) + rotate (a = [0, 270, 0]) + connector(size = size, wall = wall); +} + +// -------------------------------------------------------------------- +// A four way connector used either as a stand in the four corners +// or for a new section between the bottom and the top +// -------------------------------------------------------------------- +module fourcorner(size, wall) { + threecorner(size = size, wall = wall); + translate ([0, 0, size]) + rotate (a = [0, 180, 0]) + connector(size = size, wall = wall); +} + +// -------------------------------------------------------------------- +// basicly a plus with a connection on the top +// -------------------------------------------------------------------- +module fiveway(size, wall) { + fourcorner(size = size, wall = wall); + rotate (a = [0, 0, 270]) + connector(size = size, wall = wall); +} + +// -------------------------------------------------------------------- +// a plus with a connection on the bottom and the top, +// like a star ... +// -------------------------------------------------------------------- +module sixway(size, wall) { + fiveway(size = size, wall = wall); + rotate (a = [0, 90, 0]) + connector(size = size, wall = wall); +} + +// ---------------------------------------------------------------------------- +module main() { + if (Connector_kind == 0) { + echo("No connection selected. Please select one of the connector types"); + } + else if (Connector_kind == 1) { + strut(strutlength = strut_length, + size = CONNECTOR_LENGTH, + wall = WALL_THICKNESS, + attachment = [strut_attachment, PLATE_THICKNESS, PLATEHOLDER_WIDTH], + correction = CONNECTOR_CORRECTION); + } + else if (Connector_kind == 2) { + minus(size = CONNECTOR_LENGTH, wall = WALL_THICKNESS); + } + else if (Connector_kind == 3) { + plus(size = CONNECTOR_LENGTH, wall = WALL_THICKNESS); + } + else if (Connector_kind == 4) { + threeflat(size = CONNECTOR_LENGTH, wall = WALL_THICKNESS); + } + else if (Connector_kind == 5) { + threecorner(size = CONNECTOR_LENGTH, wall = WALL_THICKNESS); + } + else if (Connector_kind == 6) { + fourcorner(size = CONNECTOR_LENGTH, wall = WALL_THICKNESS); + } + else if (Connector_kind == 7) { + fiveway(size = CONNECTOR_LENGTH, wall = WALL_THICKNESS); + } + else if (Connector_kind == 8) { + sixway(size = CONNECTOR_LENGTH, wall = WALL_THICKNESS); + } +} + +// Do it! +main(); \ No newline at end of file diff --git a/plate.scad b/plate.scad new file mode 100644 index 0000000..0509bd2 --- /dev/null +++ b/plate.scad @@ -0,0 +1,70 @@ +// -------------------------------------------------------------------- +// Build a plate with holesfor using it with the frames +// -------------------------------------------------------------------- +/* [Connector Options] */ +// The width of the plate +Plate_width = 240; +// The deepth of the plate +Plate_deepth = 210; +// The height of the plate +Plate_height = 3; +// The diameter of the holes +Hole_diameter = 10; +// Use corner cutouts? +Corner_cutouts = false; + + +/* [Hidden] */ + +include + +include + +// -------------------------------------------------------------------- +// A baseplate with holes and, if appliceable, cut outs at the corners +// -------------------------------------------------------------------- +module baseplate(width, deepth, height, diameter, corners) { + platesize = [deepth, width, height]; + difference () { + cube(platesize, center = true); + holes(platesize, diameter, corners); + if (corners) + corners(CONNECTOR_LENGTH, width, deepth); + } +} + +// -------------------------------------------------------------------- +// Holes in the baseplate +// Uses the convinient BOSL2 library for putting the holes on the plate +// -------------------------------------------------------------------- +module holes(ps = [0,0,0], dm = 20, c = false) { + fact = 5 - floor(sqrt(dm)); + translate([0,0,-ps[2]]) + grid_copies(n = [11 * fact, 8 * fact], size = [ps[0] - (c ? 15 : 0) - dm * (fact+1), ps[1] - (c ? 15 : 0) - dm * (fact+1)], stagger = true) + cylinder(d = dm, h = 2*ps[2]); +} + +// -------------------------------------------------------------------- +// Corner cutouts for the frame +// Required only if the frame doesn't have the attachments to put the +// baseplate on it. In that case the plate lies directly on the frame's +// struts and the corners need to be cut out to place the plate. +// -------------------------------------------------------------------- +module corners(size, width, deepth) { + x = (deepth - size) / 2; + y = (width - size) / 2; + + translate([x, y, 0]) + cube(size, center = true); + translate([-x, y, 0]) + cube(size, center = true); + translate([-x, -y, 0]) + cube(size, center = true); + translate([x, -y, 0]) + cube(size, center = true); + +} + + +// do it! +baseplate(width=Plate_width, deepth=Plate_deepth, height=Plate_height, diameter=Hole_diameter, corners = Corner_cutouts); \ No newline at end of file diff --git a/readme.md b/readme.md new file mode 100644 index 0000000..33d28f2 --- /dev/null +++ b/readme.md @@ -0,0 +1,5 @@ +# frame + +Frame provides the elements to build a shelf or what else can be assembled by putting together the struts, connectors and the baseplates. + +Anything is configurable by changing the settings in static.scad or using the configurator of the files frame.scad and plate.scad \ No newline at end of file diff --git a/static.scad b/static.scad new file mode 100644 index 0000000..ca39442 --- /dev/null +++ b/static.scad @@ -0,0 +1,9 @@ +// ********************** +// ** Static Settings: ** +// ********************** +$fn=50; +CONNECTOR_CORRECTION = 0.1; +CONNECTOR_LENGTH = 15; +WALL_THICKNESS = 2; +PLATE_THICKNESS = 3; +PLATEHOLDER_WIDTH = 5; \ No newline at end of file