Giter Site home page Giter Site logo

gridfinity-boxes's Introduction

gridfinity-boxes

A Gridfinity Box Generator

This is the first stage of, I hope, an extensive gridfinity generator to cover a large proportion of uses out there. Right now this covers the simple container case, with new features being added progressively, such as:

  • Deep holes to store square or rounded objects
  • Flanges at the rear wall to allow labeling.
  • Inserts for screws or magnets at the base of the box
  • More as I and others think of them.

Of note, the Gridfinity spec sheet does not specify several dimensions, such as radii of stacking lips, etc. Some interpolation has been made. The result is that boxes generated with this tool fit so well that a 3x2 can lift up an unloaded “standard” base plate, even through stacking.

The project is being shared at github, at https://github.com/chmarr/gridfinity-boxes . Please send all bug reports and feature requests there, after searching for existing issues, of course, :) I will still read comments here, and would love to see people's makes.

I'd like to acknowledge an existing OpenSCAD generator here: https://www.printables.com/model/174346-gridfinity-openscad-model . This project is not a remix of that, but rather a “clean-room” implementation.

The base-plate that was used for testing dimensions is this one: https://www.printables.com/model/417152-gridfinity-specification/files .

Quickstart Instructions

Some familiarity with OpenSCAD is required. But it's fairly simple; much, much simpler than Fusion360. First, download all the .scad files into the same folder.

Edit one of the sample files (simple_box.scad, box_with_inserts.scad, etc) and make changes to the values as required. Then render and save your .stl file.

Involved Instructions

Tip: If you have git on your computer, try cloning this project rather than downloading. You can keep up-to-date simply by using 'git pull'.

By examining the example .scad files, you can see the gridfinity_* calls that need to be executed to create the desired features. Documentation on the expected-to-be-called SCAD modules follows.

There are serveral possible modules to call, specified below with their "signatures":

  • gridfinity_module_base(count, holes=0, hole_width, hole_height, hole_offset=0.2)
  • gridfinity_wall(count, height, z_offset=module_unit_height)
  • gridfinity_internal_mass(count, height, z_offset=module_unit_height)
  • gridfinity_square_bores(count, size, z_offset, repeat=[1,1], top_radius=0, bottom_radius=0, top_sides=[1,1,1,1], bottom_sides=[1,1,1,1])
  • gridfinity_internal_dividers(count, divider_count, divider_thickness, divider_height, radius, sides=[1,1,1,1], z_offset=module_unit_height)
  • gridfinity_internal_fillets(count, radius, sides=[1,1,1,1], z_offset=module_unit_height)
  • gridfinity_stacking_lip(count, z_offset)

One doesn't need to call them all; just the ones to get the feature you want. Generally, the first two will be called, with the others being optional.

Common parameters

All dimensions except count are in mm.

  • count -- Specified as a tuple [x,y]. The number of gridfinity spaces for the box in each dimension.
  • height -- The height of the feature. This is in mm, and usually a multiple of the gridfinity_unit_height of 7.
  • z_offset -- The base height of the feature. Most features begin at the top of the module base, so this is the default. Internal fillets and the stacking lip will usually appear higher.
  • radius -- The radius of the fillet at the internal bottom.
  • sides -- A 4-tuple boolean values indicating which side the fillet is to appear on. A "true" or "non-zero" value indicates to put a fillet there. The order is "[right, back, left, front]". I.e., the value [0,1,0,1] will create fillets at the back and front. The default is "all sides".

gridfinity_module_base

Creates the container base, including the X x Y inserts and a overall base layer. Always 7mm high. The origin of this and other features is the bottom-center of the first insert.

  • holes -- Selects to put holes in the bottom of the module, as per spec. 0-No holes. 1-Holes in corners only. 2-Holes everywhere. 3-Slide-in holes in corners
  • hole_width -- The width of a slide in hole. Typically very slightly smaller than the magnet to allow it to be wedged in. (Only if holes==3)
  • hole_height -- The height of a slide in hole. Typically this is slightly larger than the magnet to account for variability. (Only if holes==3)
  • hole_offset -- The vertical offset of the hole from the bottom. Typically just one or two layer's worth to keep the magnet close to the base magnets. (Only if holes==3. Defaults to 0.2)

gridfinity_wall

Creates the wall around the outside of the box.

gridfinity_internal_mass

Within the walls, creates a solid mass. Most useful as the positive part of a combination with the square_bores below.

gridfinity_square_bores

Creates a repeating set of "bores" to subtract from the internal_mass created above.

  • size -- The [x,y,depth] of the bores to create.
  • z_offset -- The z-offset of the top of the bore. this is typically level with the top of the internal mass.
  • repeat -- The number of separate bores to create in the X and Y direction.
  • top_radius -- If non-0, the radius of the curve at the top of the bore.
  • bottom_radius -- If non-0, the radius of the curve at the bottom of the bore.
  • top_sides, bottom_sides -- Which sides of the bore, at the top and bottom, that have a curved side. Each value is a 4-tuple of true/false values, where true creates a curve on that side. The order is "[right, back, left, front]". The default is "all sides".

gridfinity_internal_dividers

  • divider_count - the number of dividers in the [x,y] dimension. [0,0] creates no dividers
  • divider_thickness - the thickness of the divider walls
  • divider_height - the height of the divider measured from the internal bottom

gridfinity_internal_fillets

Creates rounded fillets, either at the top of the base, or the top of the internal mass. This is deprecated in favour of gridfinity_internal_dividers, which does the same thing.

gridfinity_stacking_lip

Create a fixed-height lip on the box to allow other gridfinity modules to stack atop this.

gridfinity-boxes's People

Contributors

chmarr avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

gridfinity-boxes's Issues

Allow import of shapes to create bores.

Instead of simple square or circular shapes, allow bores to be shaped according to an imported file:

  • A vector or SVG is used directly.
  • A solid, imported or not, is projected to a plane.
  • An image is converted to a height map, chopped horizontally, and projected as above.

Wether or not multiple shapes is supported is to be determined.

Add "Label tabs"

Add option to create tabs that can be labelled. Some options:

  • Height size.
  • Width and alignment. Eg: whole width; aligned left 50mm; "left-ish", etc.
  • Angle: angled down; flat; up and backwards so it's sticking up, and can act as a handle, but might interfere with the box behind.
  • Front or back of box. Front would work well for tabs that stick up, but for those that are flat or angle down, would interfere with contents removal.

Add repeatable holes, or "pluges" into internal_mass

We wan't to be able to create rectangular or circular holes in the body of the box. Specifically if an internal_mass is added to raise the bed of the internals, we then want to create holes in that to store objects.

Holes should have a X and Y dimension - them being equal will create a square - and specify a rounding radius for the sides. If the radius is equal to half the X and Y dimensions, then a circle will be created. Should we have a separate module to create circle plunges? The hole will be centered in the space.

In addition, a top-edge radius is to be added. This will create a fairly complex curve in the top corners, which might not be easily managed with a simple minkowski operation.

Finally, a X and Y "repeat" function to be added, to create multiple such holes in the mass, spaced equally across. Initially, spacing between side and hole will be the same between holes.

Add "compartments" facility.

This will be a multi-part feature.

The first part will be to allow the internal space to be divided into compartments of equal size. The user specifies:

  • The number of compartments in the X and Y dimensions.
  • The width of the wall between compartments.
  • The height of the compartmental wall.
  • The radius of the fillet, and which sides the fillet will appear on, in each compartment.

Create better example files.

Replace the example files with one with traditional "top of file" parameterisation. One file for each "class" of box so that the file is not a mess of conditionals. A few conditionals is fine.

Allow thinner walls

Walls are currently fixed at 2.6mm, which is the width of the Stacking Lip.

Allow thinner walls. Give two options for the stacking lip: reduce to match walls; project lip past wall. The latter will require a 45º support underneath the projection, likely projecting beneath the z_offset.

Allow half-unit boxes.

Allow boxes with dimensions of half-unit Gridfinity squares.

Remember to allow a 0.5mm gap between boxes in the same square, just like gaps between full squares.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.