forked from kennetek/gridfinity-rebuilt-openscad
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
416 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,4 @@ ignore/ | |
gridfinity-rebuilt.json | ||
stl/ | ||
batch/ | ||
docs/ | ||
site/ | ||
mkdocs.yml | ||
site/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,41 @@ | ||
# gridfinity-rebuilt-baseplate | ||
|
||
To round out the rebuilt catalog, we have baseplates. Originally, baseplates were not included as there was not anything really interesting to parameterize, unlike with bins. However, upon closer inspection, there is a couple things that would make peoples' lives easier. For instance, what is called here the "skeletonized" style, in that the baseplate is still thick to allow for magnets, but the center portion is removed. Additionally, being able to generate spacers for the sides of the bases, so that they fit perfectly inside your drawers. | ||
|
||
 | ||
|
||
## Script Parameters | ||
|
||
Parameter | Range | Description | ||
--- | ----- | --- | ||
gridx | { n>=0 \| n∈R } | number of bases along the x-axis<br> If set to zero, will fill with as many <br>bases that fit within `distancex` | ||
gridy | { n>=0 \| n∈R } | number of bases along the y-axis<br> If set to zero, will fill with as many <br>bases that fit within `distancey` | ||
length | { n>0 \| n∈R } | length of one unit of the base. <br> default: 42 (The Answer to the Ultimate Question of Life, <br>the Universe, and Everything.) | ||
distancex | { n>0 \| n∈R } | minimum length of baseplate along x <br>alternatively, how large is the drawer along x <br>(leave zero to ignore) | ||
distancey | { n>0 \| n∈R } | minimum length of baseplate along y <br>alternatively, how large is the drawer along y <br>(leave zero to ignore) | ||
fitx | { -1<=n<=1 \| n∈R } | alignment factor for extra space along x axis | ||
fity | { -1<=n<=1 \| n∈R } | alignment factor for extra space along y axis | ||
style_plate | { 0, 1, 2 } | the style of baseplate <br> • (0) thin (minimum material, only outline) <br> • (1) weighted (thick with space for tire iron) <br> • (2) skeletonized (thick, center hollowed) | ||
enable_magnet | boolean | toggle hole for magnet on top | ||
style_hole | { 0, 1, 2 } | the style of holes underneath the baseplate, if applicable <br> • (0) none <br> • (1) countersink <br> • (2) counterbore | ||
|
||
## Modules | ||
|
||
### gridfinityBaseplate | ||
|
||
Generates a baseplate to use with gridfinity bins. | ||
|
||
** `gridfinityBaseplate(gridx, gridy, length, distancex, distancey, style_plate, enable_magnet, style_hole)` ** | ||
|
||
Parameter | Range | Description | ||
--- | ----- | --- | ||
gridx | { n>=0 \| n∈R } | number of bases along the x-axis<br> If set to zero, will fill with as many <br>bases that fit within `distancex` | ||
gridy | { n>=0 \| n∈R } | number of bases along the y-axis<br> If set to zero, will fill with as many <br>bases that fit within `distancey` | ||
length | { n>0 \| n∈R } | length of one unit of the base. <br> default: 42 (The Answer to the Ultimate Question of Life, <br>the Universe, and Everything.) | ||
distancex | { n>0 \| n∈R } | minimum length of baseplate along x <br>alternatively, how large is the drawer along x <br>(leave zero to ignore) | ||
distancey | { n>0 \| n∈R } | minimum length of baseplate along y <br>alternatively, how large is the drawer along y <br>(leave zero to ignore) | ||
fitx | { -1<=n<=1 \| n∈R } | alignment factor for extra space along x axis | ||
fity | { -1<=n<=1 \| n∈R } | alignment factor for extra space along y axis | ||
style_plate | { 0, 1, 2 } | the style of baseplate <br> • (0) thin (minimum material, only outline) <br> • (1) weighted (thick with space for tire iron) <br> • (2) skeletonized (thick, center hollowed) | ||
enable_magnet | boolean | toggle hole for magnet on top | ||
style_hole | { 0, 1, 2 } | the style of holes underneath the baseplate, if applicable <br> • (0) none <br> • (1) countersink <br> • (2) counterbore |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
# gridfinity-rebuilt-bins | ||
|
||
Generates stock bins, with a great number of variations. | ||
|
||
 | ||
|
||
## Script Parameters | ||
|
||
Parameter | Range | Description | ||
--- | ----- | --- | ||
gridx | { n>0 \| n∈R } | number of bases along the x-axis | ||
gridy | { n>0 \| n∈R } | number of bases along the y-axis | ||
gridz | { n>0 \| n∈R } | bin height. See bin height information and "gridz_define" below. | ||
length | { n>0 \| n∈R } | length of one unit of the base. <br> default: 42 (The Answer to the Ultimate Question of Life, <br>the Universe, and Everything.) | ||
divx | { n>0 \| n∈Z } | number of compartments along X | ||
divy | { n>0 \| n∈Z } | number of compartments along Y | ||
scoop | n>0 \| n∈R | controls the fillet on the bottom of the compartment for easy <br> item removal. 0 is disabled, 1 is full, any other real number will <br> scale from full. | ||
enable_zsnap | boolean | automatically snap the bin size to the nearest 7mm increment. <br> default: true | ||
style_lip | {0, 1, 2} | if you are not stacking the bin, you can disable the top lip <br> to save space. <br> • (0) Regular lip <br> • (1) Subtract lip to save space <br> • (2) Disable lip while retaining height | ||
gridz_define | { n>0 \| n∈R } | determine what the variable "gridz" applies to based on <br> your use case. default: 0. <br> • (0) gridz is the height in # of 7mm increments (Zack) <br> • (1) gridz is the internal height in millimeters <br> • (2) gridz is the overall external height of the bin in millimeters | ||
height_internal | { n>0 \| n∈R } | height of the internal block. <br> Can be lower than bin height to save filament on custom bins. <br> default of 0 means use the calculated height. | ||
style_tab | { 0, 1, 2, 3, 4, 5 } | how the tabs for labels are generated. <br> • (0) Full tabs across the entire compartment <br> • (1) automatic tabs <br> - left aligned tabs on the left edge<br> - right aligned tabs on right edge<br> - center tabs otherwise <br> • (2) left aligned tabs <br> • (3) center aligned tabs <br> • (4) right aligned tabs <br> • (5) no tabs | ||
style_hole | { 0, 1, 2, 3 } | the style of holes in the bases <br> • (0) No holes <br> • (1) Magnet holes only <br> • (2) Magnet and screw holes - no printable slit <br> • (3) Magnet and screw holes - with printable slit | ||
div_base_x | { n>=0 \| n∈Z } | number of divisions per 1 unit of base along the X axis. <br>(default 1, only use integers. <br>0 means automatically guess the division) | ||
div_base_y | { n>=0 \| n∈Z } | number of divisions per 1 unit of base along the Y axis. <br>(default 1, only use integers. <br>0 means automatically guess the division) | ||
|
||
<br> | ||
|
||
## Modules | ||
|
||
--- | ||
|
||
### gridfinityInit | ||
|
||
Initializes the top part of the bin (walls and solid section). All bins have to use this module, and have the compartments cut out from it. | ||
|
||
** `gridfinityInit (gridx, gridy, height, height_internal, length)` ** | ||
|
||
Parameter | Range | Description | ||
--- | ----- | --- | ||
gridx | { n>0 \| n∈R } | number of bases along the x-axis | ||
gridy | { n>0 \| n∈R } | number of bases along the y-axis | ||
height | { n>0 \| n∈R } | height of the bin, in millimeters (but not exactly). <br> See the `height()` function for more info. | ||
height_internal | { n>0 \| n∈R } | height of the internal block. <br> Can be lower than bin height to save filament on custom bins. <br> default of 0 means use the calculated height. | ||
length | { n>0 \| n∈R } | length of one unit of the base. <br> default: 42 (The Answer to the Ultimate Question of Life, <br>the Universe, and Everything.) | ||
|
||
``` | ||
// Example: generate a 3x3x6 bin with a 42mm unit size | ||
gridfinityInit(3, 3, height(6), 0, 42) { | ||
cutEqual(n_divx = 3, n_divy = 3, style_tab = 0, scoop_weight = 1); | ||
} | ||
``` | ||
|
||
--- | ||
|
||
### height | ||
|
||
Calculates the proper height for bins. | ||
|
||
** `height (gridz, gridz_define, style_lip, enable_zsnap)` ** | ||
|
||
Parameter | Range | Description | ||
--- | ----- | --- | ||
gridz | { n>0 \| n∈R } | bin height. See bin height information and "gridz_define" below. | ||
gridz_define | { n>0 \| n∈R } | determine what the variable "gridz" applies to based on <br> your use case. default: 0. <br> • (0) gridz is the height in # of 7mm increments (Zack) <br> • (1) gridz is the internal height in millimeters <br> • (2) gridz is the overall external height of the bin in millimeters | ||
style_lip | {0, 1, 2} | if you are not stacking the bin, you can disable the top lip <br> to save space. <br> • (0) Regular lip <br> • (1) Subtract lip to save space <br> • (2) Disable lip while retaining height | ||
enable_zsnap | boolean | automatically snap the bin size to the nearest 7mm increment. <br> default: true | ||
|
||
``` | ||
// Example: height for a 6 unit high bin | ||
height(6); | ||
// Example: height for a bin that can fit (at maximum) a 30mm high object inside | ||
height(30, 1, 0, false); | ||
``` | ||
|
||
--- | ||
|
||
### gridfinityBase | ||
|
||
Generates the bases for bins. Has various different hole styles, and can be subdivided. | ||
|
||
** `gridfinityBase (gridx, gridy, length, div_base_x, div_base_y, style_hole)` ** | ||
|
||
Parameter | Range | Description | ||
--- | ----- | --- | ||
gridx | { n>0 \| n∈R } | number of bases along the x-axis | ||
gridy | { n>0 \| n∈R } | number of bases along the y-axis | ||
length | { n>0 \| n∈R } | length of one unit of the base. default: 42 | ||
div_base_x | { n>=0 \| n∈Z } | number of divisions per 1 unit of base along the X axis. <br>(default 1, only use integers. 0 means automatically guess the division) | ||
div_base_y | { n>=0 \| n∈Z } | number of divisions per 1 unit of base along the Y axis. <br>(default 1, only use integers. 0 means automatically guess the division) | ||
style_hole | { 0, 1, 2, 3 } | the style of holes in the bases <br> • (0) No holes <br> • (1) Magnet holes only <br> • (2) Magnet and screw holes - no printable slit <br> • (3) Magnet and screw holes - with printable slit | ||
|
||
``` | ||
// Example: generate a 3x3 base with a 42mm unit size and clean magnet holes | ||
gridfinityBase(3, 3, 42, 0, 0, 1); | ||
``` | ||
|
||
--- | ||
|
||
### cutEqual | ||
|
||
Generates the "traditional" bin cutters. It is a utility function that creates evenly distributed compartments. | ||
|
||
** `cutEqual (n_divx, n_divy, style_tab, scoop_weight)` ** | ||
|
||
Parameter | Range | Description | ||
--- | ----- | --- | ||
n_divx | { n>0 \| n∈Z } | number of compartments along X | ||
n_divy | { n>0 \| n∈Z } | number of compartments along Y | ||
style_tab | { 0, 1, 2, 3, 4, 5 } | how the tabs for labels are generated. <br> • (0) Full tabs across the entire compartment <br> • (1) automatic tabs <br> - left aligned tabs on the left edge<br> - right aligned tabs on right edge<br> - center tabs otherwise <br> • (2) left aligned tabs <br> • (3) center aligned tabs <br> • (4) right aligned tabs <br> • (5) no tabs | ||
scoop | n>0 \| n∈R | controls the fillet on the bottom of the compartment for easy <br> item removal. 0 is disabled, 1 is full, any other real number will <br> scale from full. | ||
|
||
``` | ||
// Example: this generates 9 compartments in a 3x3 grid, and all compartments have a full tab and a scoop | ||
gridfinityInit(3, 3, height(6), 0, 42) { | ||
cutEqual(n_divx = 3, n_divy = 3, style_tab = 0, scoop_weight = 1); | ||
} | ||
``` | ||
|
||
--- | ||
|
||
### cut | ||
|
||
Cuts a single compartment into the bin at the provided location with the provided attributes. The coordinate system for compartments originates (0,0) at the bottom left corner of the bin, where 1 unit is the length of 1 base. Positive X and positive Y are in the same direction as the global coordinate system. | ||
|
||
** `cut (x, y, w, h, t, s)` ** | ||
|
||
Parameter | Range | Description | ||
--- | ----- | --- | ||
x | { n>=0 \| n∈R } | X coordinate of the compartment <br>(position of left edge of compartment) | ||
y | { n>=0 \| n∈R } | Y coordinate of the compartment <br>(position of bottom edge of compartment) | ||
w | { n>0 \| n∈R } | Width of the compartment, in base units <br>(1 unit = 1 `length`) | ||
h | { n>0 \| n∈R } | Height of the compartment, in base units <br>(1 unit = 1 `length`) | ||
t | { 0, 1, 2, 3, 4, 5 } | how the tabs for labels are generated for this compartment. <br> • (0) Full tabs across the entire compartment <br> • (1) automatic tabs <br> - left aligned tabs on the left edge<br> - right aligned tabs on right edge<br> - center tabs otherwise <br> • (2) left aligned tabs <br> • (3) center aligned tabs <br> • (4) right aligned tabs <br> • (5) no tabs | ||
s | n>0 \| n∈R | controls the fillet on the bottom of the compartment for easy <br> item removal. 0 is disabled, 1 is full, any other real number will <br> scale from full, only for this specific compartment | ||
|
||
``` | ||
// Example: | ||
// this cuts two compartments that are both 1 wide and 2 high. | ||
// One is on the bottom left, and the other is at the top right. | ||
gridfinityInit(3, 3, height(6), 0, 42) { | ||
cut(0, 0, 1, 2, 0, 1); | ||
cut(2, 1, 1, 2, 0, 1); | ||
} | ||
``` | ||
|
||
--- | ||
|
||
### cut_move | ||
|
||
Moves all of its children from the global origin to the center of the area that a compartment would normally fill, and uses them to cut from the bin. This allows you to easily make custom cutouts in the bin. | ||
|
||
** `cut_move (x, y, w, h)` ** | ||
|
||
Parameter | Range | Description | ||
--- | ----- | --- | ||
x | { n>=0 \| n∈R } | X coordinate of the area (position of left edge) | ||
y | { n>=0 \| n∈R } | Y coordinate of the area (position of bottom edge) | ||
w | { n>0 \| n∈R } | Width of the area, in base units (1 unit = 1 `length`) | ||
h | { n>0 \| n∈R } | Height of the area, in base units (1 unit = 1 `length`) | ||
|
||
``` | ||
// Example: | ||
// cuts a cylindrical hole of radius 5 | ||
// hole center is located 1/2 units from the right edge of the bin, and 1 unit from the top | ||
gridfinityInit(3, 3, height(6), 0, 42) { | ||
cut_move(x=2, y=1, w=1, h=2) { | ||
cylinder(r=5, h=100, center=true); | ||
} | ||
} | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
# gridfinity-rebuilt-constants | ||
|
||
This file contains dimensions that are critical to the constructiuon of the other models, but are not values that often need to be changed. Thus, they were outsourced to this file such that the rest of the files would retain parity. All values here have the same range, this is positive real numbers. Some can be zero, but that may result in strange or invalid geometry, | ||
|
||
Parameter | Description | ||
--- | ------ | ||
h_base | height of the base | ||
r_base| outside rounded radius of bin | ||
r_c1 | lower base chamfer "radius" | ||
r_c2 | upper base chamfer "radius" | ||
h_bot| bottom thiccness of bin | ||
r_fo1| outside radii 1 | ||
r_fo2| outside radii 2 | ||
r_fo3 | outside radii 3 | ||
r_hole1| screw hole radius | ||
r_hole2| magnet hole radius | ||
d_hole| center-to-center distance between holes | ||
h_hole| magnet hole depth | ||
h_slit| slit depth (printer layer height) | ||
r_f1| top edge fillet radius | ||
r_f2 | internal fillet radius | ||
d_div | width of divider between compartments | ||
d_wall| minimum wall thickness | ||
d_clear| tolerance fit factor | ||
d_tabh| height of tab (yaxis, measured from inner wall) | ||
d_tabw| maximum width of tab | ||
a_tab| angle of tab | ||
bp_h_bot| Baseplate bottom part height (part added with weigthed=true) | ||
bp_cut_size| Baseplate bottom cutout rectangle size | ||
bp_cut_depth| Baseplate bottom cutout rectangle depth | ||
bp_rcut_width| Baseplate bottom cutout finger gap width | ||
bp_rcut_length| Baseplate bottom cutout finger gap left | ||
bp_rcut_depth| Baseplate bottom cutout finger gap depth | ||
d_cs | countersink diameter for baseplate | ||
r_skel| radius of cutout for skeletonized baseplate | ||
r_cb| baseplate counterbore radius | ||
h_cb| baseplate counterbore depth | ||
h_skel | minimum baseplate thickness (when skeletonized) |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
## Introduction | ||
Gridfinity rebuilt aims to remake the brilliant Gridfinity project from [Zack Freedman](https://www.youtube.com/c/ZackFreedman/about) in a more robust and open-source way than the original Fusion 360 files. Many major CAD suites struggle with making parametric models constructed from linear patterns, due to changing fillet edges and seams. Thus, a pure mathematical approach using OpenSCAD can allow a single solution for all possible bin variants. | ||
|
||
The project has expanded into more eccentric models that use modules from the original generator. This wiki aims to document these modules in great detail. | ||
|
||
Models are generated subtractively. First, the solid bin and bases are constructed, and then the compartments and holes are removed. This allows for internal fillets that nearly match the originals. However, they are not exactly perfect. There are some fillets that are too small and too difficult to be worth implementing, as most printers do not have a high enough resolution for it to matter. | ||
|
||
## Getting Started | ||
For best results, use a version of OpenSCAD with the fast-csg feature. As of writing, this feature is only implemented in the [development snapshots](https://openscad.org/downloads.html). To enable the feature, go to Edit > Preferences > Features > fast-csg. This can speed up rendering from 10 minutes down to a couple of seconds, even for comically large bins. It is not a requirement to use development versions of OpenSCAD. | ||
|
||
Most files will come ready-to-run, so parameters can be changed using OpenSCAD's built-in customizer window, and the bins will automatically generate. However, all modules are packed up nicely, so any module can be imported into other files or have more custom modifications beyond tweaking the parameters. | ||
|
||
## Script Structure | ||
* Information (Imports / Script Details) | ||
* Parameters (Shown in Customizer) | ||
* Implementation (Executing the Parameters) | ||
* Construction (Script-Specific Modules and Constants) | ||
* Examples | ||
|
||
The two files which do not follow these conventions are `gridfinity-rebuilt-utility` and `gridfinity-rebuilt-constants`. These files are not meant to be exposed to the user, except for special requirements that the normal parameters cannot handle. Their respective wiki pages go into more depth. | ||
|
||
**NOTE: This documentation is a work in progress, just like the rest of the repository, so parts may still be under construction.** |
Oops, something went wrong.