Compare commits
No commits in common. "main" and "gh-pages" have entirely different histories.
8
.gitignore
vendored
|
@ -1,8 +0,0 @@
|
||||||
|
|
||||||
ignore/
|
|
||||||
gridfinity-rebuilt.json
|
|
||||||
gridfinity-rebuilt-bins.json
|
|
||||||
stl/
|
|
||||||
batch/
|
|
||||||
site/
|
|
||||||
*.json
|
|
0
.nojekyll
Normal file
125
404.html
Executable file
|
@ -0,0 +1,125 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html class="writer-html5" lang="en" >
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<link rel="shortcut icon" href="/img/favicon.ico" />
|
||||||
|
<title>Gridfinity Rebuilt</title>
|
||||||
|
<link rel="stylesheet" href="/css/theme.css" />
|
||||||
|
<link rel="stylesheet" href="/css/theme_extra.css" />
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
|
||||||
|
|
||||||
|
<script src="/js/jquery-3.6.0.min.js" defer></script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="/js/html5shiv.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
|
||||||
|
<script>hljs.initHighlightingOnLoad();</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="wy-body-for-nav" role="document">
|
||||||
|
|
||||||
|
<div class="wy-grid-for-nav">
|
||||||
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
|
||||||
|
<div class="wy-side-scroll">
|
||||||
|
<div class="wy-side-nav-search">
|
||||||
|
<a href="/." class="icon icon-home"> Gridfinity Rebuilt
|
||||||
|
</a><div role="search">
|
||||||
|
<form id ="rtd-search-form" class="wy-form" action="//search.html" method="get">
|
||||||
|
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="/.">Home</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="/bins/">Bins</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="/baseplates/">Baseplates</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="/lite/">Lite</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="/vase/">Vase</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="/constants/">Constants</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||||
|
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
|
||||||
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||||
|
<a href="/.">Gridfinity Rebuilt</a>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<div class="wy-nav-content">
|
||||||
|
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
|
||||||
|
<ul class="wy-breadcrumbs">
|
||||||
|
<li><a href="/." class="icon icon-home" alt="Docs"></a> »</li>
|
||||||
|
<li class="wy-breadcrumbs-aside">
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||||
|
<div class="section" itemprop="articleBody">
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="404-page-not-found">404</h1>
|
||||||
|
|
||||||
|
<p><strong>Page not found</strong></p>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div><footer>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div role="contentinfo">
|
||||||
|
<!-- Copyright etc -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="rst-versions" role="note" aria-label="Versions">
|
||||||
|
<span class="rst-current-version" data-toggle="rst-current-version">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<script>var base_url = '/';</script>
|
||||||
|
<script src="/js/theme_extra.js" defer></script>
|
||||||
|
<script src="/js/theme.js" defer></script>
|
||||||
|
<script src="/search/main.js" defer></script>
|
||||||
|
<script defer>
|
||||||
|
window.onload = function () {
|
||||||
|
SphinxRtdTheme.Navigation.enable(true);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
46
LICENSE
|
@ -1,46 +0,0 @@
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2023 Kenneth Hodson
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
||||||
|
|
||||||
|
|
||||||
This repository is based on Gridfinity:
|
|
||||||
|
|
||||||
MIT License
|
|
||||||
|
|
||||||
Copyright (c) 2023 Zachary Freedman and Voidstar Lab LLC
|
|
||||||
|
|
||||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
|
||||||
in the Software without restriction, including without limitation the rights
|
|
||||||
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
||||||
copies of the Software, and to permit persons to whom the Software is
|
|
||||||
furnished to do so, subject to the following conditions:
|
|
||||||
|
|
||||||
The above copyright notice and this permission notice shall be included in all
|
|
||||||
copies or substantial portions of the Software.
|
|
||||||
|
|
||||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
||||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
||||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
||||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
||||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
||||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
||||||
SOFTWARE.
|
|
53
README.md
|
@ -1,53 +0,0 @@
|
||||||
# Gridfinity Rebuilt in OpenSCAD
|
|
||||||
|
|
||||||
[![CC BY-NC-SA 4.0][cc-by-nc-sa-shield]][cc-by-nc-sa]
|
|
||||||
|
|
||||||
A ground-up port (with a few extra features) of the stock [gridfinity](https://www.youtube.com/watch?v=ra_9zU-mnl8) bins in OpenSCAD. Open to feedback, because I could not feasibly test all combinations of bins. I tried my best to exactly match the original gridfinity dimensions, but some of the geometry is slightly incorrect (mainly fillets). However, I think they are negligible differences, and will not appear in the printed model.
|
|
||||||
|
|
||||||
Full documentation can be found at the project's [website](https://kennetek.github.io/gridfinity-rebuilt-openscad/).
|
|
||||||
|
|
||||||
The project can also be found on [Printables](https://www.printables.com/model/274917-gridfinity-rebuilt-in-openscad) if you want to support the project.
|
|
||||||
|
|
||||||
[<img src="./images/base_dimension.gif" width="320">]()
|
|
||||||
[<img src="./images/compartment_dimension.gif" width="320">]()
|
|
||||||
[<img src="./images/height_dimension.gif" width="320">]()
|
|
||||||
[<img src="./images/tab_dimension.gif" width="320">]()
|
|
||||||
[<img src="./images/holes_dimension.gif" width="320">]()
|
|
||||||
[<img src="./images/custom_dimension.gif" width="320">]()
|
|
||||||
|
|
||||||
## Features
|
|
||||||
- any size of bin (width/length/height)
|
|
||||||
- height by units, internal depth, or overall size
|
|
||||||
- any number of compartments (along both X and Y axis)
|
|
||||||
- togglable scoop
|
|
||||||
- togglable tabs, split tabs, and tab alignment
|
|
||||||
- togglable holes (with togglable supportless printing hole structures)
|
|
||||||
- manual compartment construction (make the most wacky bins imaginable)
|
|
||||||
- togglable lip (if you don't care for stackability)
|
|
||||||
- dividing bases (if you want a 1.5 unit long bin, for instance)
|
|
||||||
- removed material from bases to save filament
|
|
||||||
- vase mode bins
|
|
||||||
|
|
||||||
### Printable Holes
|
|
||||||
The printable holes allow your slicer to bridge the gap inside the countersunk magnet hole (using the technique shown [here](https://www.youtube.com/watch?v=W8FbHTcB05w)) so that supports are not needed.
|
|
||||||
|
|
||||||
[<img src="./images/slicer_holes.png" height="200">]()
|
|
||||||
[<img src="./images/slicer_holes_top.png" height="200">]()
|
|
||||||
|
|
||||||
## Recommendations
|
|
||||||
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. On my computer, this sped up rendering from 10 minutes down to a couple of seconds, even for comically large bins.
|
|
||||||
|
|
||||||
## Enjoy!
|
|
||||||
|
|
||||||
[<img src="./images/spin.gif" width="160">]()
|
|
||||||
|
|
||||||
[Gridfinity](https://www.youtube.com/watch?v=ra_9zU-mnl8) by [Zack Freedman](https://www.youtube.com/c/ZackFreedman/about)
|
|
||||||
|
|
||||||
This work is licensed under the same license as Gridfinity, being a
|
|
||||||
[Creative Commons Attribution-NonCommercial-ShareAlike 4.0 International License][cc-by-nc-sa].
|
|
||||||
|
|
||||||
[![CC BY-NC-SA 4.0][cc-by-nc-sa-image]][cc-by-nc-sa]
|
|
||||||
|
|
||||||
[cc-by-nc-sa]: http://creativecommons.org/licenses/by-nc-sa/4.0/
|
|
||||||
[cc-by-nc-sa-image]: https://licensebuttons.net/l/by-nc-sa/4.0/88x31.png
|
|
||||||
[cc-by-nc-sa-shield]: https://img.shields.io/badge/License-CC%20BY--NC--SA%204.0-lightgrey.svg
|
|
276
baseplates/index.html
Executable file
|
@ -0,0 +1,276 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html class="writer-html5" lang="en" >
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<link rel="shortcut icon" href="../img/favicon.ico" />
|
||||||
|
<title>Baseplates - Gridfinity Rebuilt</title>
|
||||||
|
<link rel="stylesheet" href="../css/theme.css" />
|
||||||
|
<link rel="stylesheet" href="../css/theme_extra.css" />
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Current page data
|
||||||
|
var mkdocs_page_name = "Baseplates";
|
||||||
|
var mkdocs_page_input_path = "baseplates.md";
|
||||||
|
var mkdocs_page_url = null;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="../js/jquery-3.6.0.min.js" defer></script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="../js/html5shiv.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
|
||||||
|
<script>hljs.initHighlightingOnLoad();</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="wy-body-for-nav" role="document">
|
||||||
|
|
||||||
|
<div class="wy-grid-for-nav">
|
||||||
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
|
||||||
|
<div class="wy-side-scroll">
|
||||||
|
<div class="wy-side-nav-search">
|
||||||
|
<a href=".." class="icon icon-home"> Gridfinity Rebuilt
|
||||||
|
</a><div role="search">
|
||||||
|
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||||
|
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="..">Home</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../bins/">Bins</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l1 current"><a class="reference internal current" href="./">Baseplates</a>
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#script-parameters">Script Parameters</a>
|
||||||
|
</li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#modules">Modules</a>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l3"><a class="reference internal" href="#gridfinitybaseplate">gridfinityBaseplate</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../lite/">Lite</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../vase/">Vase</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../constants/">Constants</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||||
|
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
|
||||||
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||||
|
<a href="..">Gridfinity Rebuilt</a>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<div class="wy-nav-content">
|
||||||
|
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
|
||||||
|
<ul class="wy-breadcrumbs">
|
||||||
|
<li><a href=".." class="icon icon-home" alt="Docs"></a> »</li>
|
||||||
|
<li>Baseplates</li>
|
||||||
|
<li class="wy-breadcrumbs-aside">
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||||
|
<div class="section" itemprop="articleBody">
|
||||||
|
|
||||||
|
<h1 id="gridfinity-rebuilt-baseplate">gridfinity-rebuilt-baseplate</h1>
|
||||||
|
<p>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.</p>
|
||||||
|
<p><img alt="Bin" src="../images/baseplate.gif" /></p>
|
||||||
|
<h2 id="script-parameters">Script Parameters</h2>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Parameter</th>
|
||||||
|
<th>Range</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>gridx</td>
|
||||||
|
<td>{ n>=0 | n∈R }</td>
|
||||||
|
<td>number of bases along the x-axis<br> If set to zero, will fill with as many <br>bases that fit within <code>distancex</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gridy</td>
|
||||||
|
<td>{ n>=0 | n∈R }</td>
|
||||||
|
<td>number of bases along the y-axis<br> If set to zero, will fill with as many <br>bases that fit within <code>distancey</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>length</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>length of one unit of the base. <br> default: 42 (The Answer to the Ultimate Question of Life, <br>the Universe, and Everything.)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>distancex</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>minimum length of baseplate along x <br>alternatively, how large is the drawer along x <br>(leave zero to ignore)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>distancey</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>minimum length of baseplate along y <br>alternatively, how large is the drawer along y <br>(leave zero to ignore)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>fitx</td>
|
||||||
|
<td>{ -1<=n<=1 | n∈R }</td>
|
||||||
|
<td>alignment factor for extra space along x axis</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>fity</td>
|
||||||
|
<td>{ -1<=n<=1 | n∈R }</td>
|
||||||
|
<td>alignment factor for extra space along y axis</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style_plate</td>
|
||||||
|
<td>{ 0, 1, 2 }</td>
|
||||||
|
<td>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)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>enable_magnet</td>
|
||||||
|
<td>boolean</td>
|
||||||
|
<td>toggle hole for magnet on top</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style_hole</td>
|
||||||
|
<td>{ 0, 1, 2 }</td>
|
||||||
|
<td>the style of holes underneath the baseplate, if applicable <br> • (0) none <br> • (1) countersink <br> • (2) counterbore</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<h2 id="modules">Modules</h2>
|
||||||
|
<h3 id="gridfinitybaseplate">gridfinityBaseplate</h3>
|
||||||
|
<p>Generates a baseplate to use with gridfinity bins. </p>
|
||||||
|
<p><strong> <code>gridfinityBaseplate(gridx, gridy, length, distancex, distancey, style_plate, enable_magnet, style_hole)</code> </strong></p>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Parameter</th>
|
||||||
|
<th>Range</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>gridx</td>
|
||||||
|
<td>{ n>=0 | n∈R }</td>
|
||||||
|
<td>number of bases along the x-axis<br> If set to zero, will fill with as many <br>bases that fit within <code>distancex</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gridy</td>
|
||||||
|
<td>{ n>=0 | n∈R }</td>
|
||||||
|
<td>number of bases along the y-axis<br> If set to zero, will fill with as many <br>bases that fit within <code>distancey</code></td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>length</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>length of one unit of the base. <br> default: 42 (The Answer to the Ultimate Question of Life, <br>the Universe, and Everything.)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>distancex</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>minimum length of baseplate along x <br>alternatively, how large is the drawer along x <br>(leave zero to ignore)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>distancey</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>minimum length of baseplate along y <br>alternatively, how large is the drawer along y <br>(leave zero to ignore)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>fitx</td>
|
||||||
|
<td>{ -1<=n<=1 | n∈R }</td>
|
||||||
|
<td>alignment factor for extra space along x axis</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>fity</td>
|
||||||
|
<td>{ -1<=n<=1 | n∈R }</td>
|
||||||
|
<td>alignment factor for extra space along y axis</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style_plate</td>
|
||||||
|
<td>{ 0, 1, 2 }</td>
|
||||||
|
<td>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)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>enable_magnet</td>
|
||||||
|
<td>boolean</td>
|
||||||
|
<td>toggle hole for magnet on top</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style_hole</td>
|
||||||
|
<td>{ 0, 1, 2 }</td>
|
||||||
|
<td>the style of holes underneath the baseplate, if applicable <br> • (0) none <br> • (1) countersink <br> • (2) counterbore</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div><footer>
|
||||||
|
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
|
||||||
|
<a href="../bins/" class="btn btn-neutral float-left" title="Bins"><span class="icon icon-circle-arrow-left"></span> Previous</a>
|
||||||
|
<a href="../lite/" class="btn btn-neutral float-right" title="Lite">Next <span class="icon icon-circle-arrow-right"></span></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div role="contentinfo">
|
||||||
|
<!-- Copyright etc -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="rst-versions" role="note" aria-label="Versions">
|
||||||
|
<span class="rst-current-version" data-toggle="rst-current-version">
|
||||||
|
|
||||||
|
|
||||||
|
<span><a href="../bins/" style="color: #fcfcfc">« Previous</a></span>
|
||||||
|
|
||||||
|
|
||||||
|
<span><a href="../lite/" style="color: #fcfcfc">Next »</a></span>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<script>var base_url = '..';</script>
|
||||||
|
<script src="../js/theme_extra.js" defer></script>
|
||||||
|
<script src="../js/theme.js" defer></script>
|
||||||
|
<script src="../search/main.js" defer></script>
|
||||||
|
<script defer>
|
||||||
|
window.onload = function () {
|
||||||
|
SphinxRtdTheme.Navigation.enable(true);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
519
bins/index.html
Executable file
|
@ -0,0 +1,519 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html class="writer-html5" lang="en" >
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<link rel="shortcut icon" href="../img/favicon.ico" />
|
||||||
|
<title>Bins - Gridfinity Rebuilt</title>
|
||||||
|
<link rel="stylesheet" href="../css/theme.css" />
|
||||||
|
<link rel="stylesheet" href="../css/theme_extra.css" />
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Current page data
|
||||||
|
var mkdocs_page_name = "Bins";
|
||||||
|
var mkdocs_page_input_path = "bins.md";
|
||||||
|
var mkdocs_page_url = null;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="../js/jquery-3.6.0.min.js" defer></script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="../js/html5shiv.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
|
||||||
|
<script>hljs.initHighlightingOnLoad();</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="wy-body-for-nav" role="document">
|
||||||
|
|
||||||
|
<div class="wy-grid-for-nav">
|
||||||
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
|
||||||
|
<div class="wy-side-scroll">
|
||||||
|
<div class="wy-side-nav-search">
|
||||||
|
<a href=".." class="icon icon-home"> Gridfinity Rebuilt
|
||||||
|
</a><div role="search">
|
||||||
|
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||||
|
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="..">Home</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l1 current"><a class="reference internal current" href="./">Bins</a>
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#script-parameters">Script Parameters</a>
|
||||||
|
</li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#modules">Modules</a>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l3"><a class="reference internal" href="#gridfinityinit">gridfinityInit</a>
|
||||||
|
</li>
|
||||||
|
<li class="toctree-l3"><a class="reference internal" href="#height">height</a>
|
||||||
|
</li>
|
||||||
|
<li class="toctree-l3"><a class="reference internal" href="#gridfinitybase">gridfinityBase</a>
|
||||||
|
</li>
|
||||||
|
<li class="toctree-l3"><a class="reference internal" href="#cutequal">cutEqual</a>
|
||||||
|
</li>
|
||||||
|
<li class="toctree-l3"><a class="reference internal" href="#cut">cut</a>
|
||||||
|
</li>
|
||||||
|
<li class="toctree-l3"><a class="reference internal" href="#cut_move">cut_move</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../baseplates/">Baseplates</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../lite/">Lite</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../vase/">Vase</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../constants/">Constants</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||||
|
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
|
||||||
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||||
|
<a href="..">Gridfinity Rebuilt</a>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<div class="wy-nav-content">
|
||||||
|
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
|
||||||
|
<ul class="wy-breadcrumbs">
|
||||||
|
<li><a href=".." class="icon icon-home" alt="Docs"></a> »</li>
|
||||||
|
<li>Bins</li>
|
||||||
|
<li class="wy-breadcrumbs-aside">
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||||
|
<div class="section" itemprop="articleBody">
|
||||||
|
|
||||||
|
<h1 id="gridfinity-rebuilt-bins">gridfinity-rebuilt-bins</h1>
|
||||||
|
<p>Generates stock bins, with a great number of variations. </p>
|
||||||
|
<p><img alt="Bin" src="../images/custom_dimension.gif" /></p>
|
||||||
|
<h2 id="script-parameters">Script Parameters</h2>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Parameter</th>
|
||||||
|
<th>Range</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>gridx</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>number of bases along the x-axis</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gridy</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>number of bases along the y-axis</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gridz</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>bin height. See bin height information and "gridz_define" below.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>length</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>length of one unit of the base. <br> default: 42 (The Answer to the Ultimate Question of Life, <br>the Universe, and Everything.)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>divx</td>
|
||||||
|
<td>{ n>0 | n∈Z }</td>
|
||||||
|
<td>number of compartments along X</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>divy</td>
|
||||||
|
<td>{ n>0 | n∈Z }</td>
|
||||||
|
<td>number of compartments along Y</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>scoop</td>
|
||||||
|
<td>n>0 | n∈R</td>
|
||||||
|
<td>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.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>enable_zsnap</td>
|
||||||
|
<td>boolean</td>
|
||||||
|
<td>automatically snap the bin size to the nearest 7mm increment. <br> default: true</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style_lip</td>
|
||||||
|
<td>{0, 1, 2}</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gridz_define</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>height_internal</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>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.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style_tab</td>
|
||||||
|
<td>{ 0, 1, 2, 3, 4, 5 }</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style_hole</td>
|
||||||
|
<td>{ 0, 1, 2, 3 }</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>div_base_x</td>
|
||||||
|
<td>{ n>=0 | n∈Z }</td>
|
||||||
|
<td>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)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>div_base_y</td>
|
||||||
|
<td>{ n>=0 | n∈Z }</td>
|
||||||
|
<td>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)</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<p><br></p>
|
||||||
|
<h2 id="modules">Modules</h2>
|
||||||
|
<hr />
|
||||||
|
<h3 id="gridfinityinit">gridfinityInit</h3>
|
||||||
|
<p>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. </p>
|
||||||
|
<p><strong> <code>gridfinityInit (gridx, gridy, height, height_internal, length)</code> </strong></p>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Parameter</th>
|
||||||
|
<th>Range</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>gridx</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>number of bases along the x-axis</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gridy</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>number of bases along the y-axis</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>height</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>height of the bin, in millimeters (but not exactly). <br> See the <code>height()</code> function for more info.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>height_internal</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>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.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>length</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>length of one unit of the base. <br> default: 42 (The Answer to the Ultimate Question of Life, <br>the Universe, and Everything.)</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<pre><code>// 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);
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
<hr />
|
||||||
|
<h3 id="height">height</h3>
|
||||||
|
<p>Calculates the proper height for bins. </p>
|
||||||
|
<p><strong> <code>height (gridz, gridz_define, style_lip, enable_zsnap)</code> </strong></p>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Parameter</th>
|
||||||
|
<th>Range</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>gridz</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>bin height. See bin height information and "gridz_define" below.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gridz_define</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style_lip</td>
|
||||||
|
<td>{0, 1, 2}</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>enable_zsnap</td>
|
||||||
|
<td>boolean</td>
|
||||||
|
<td>automatically snap the bin size to the nearest 7mm increment. <br> default: true</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<pre><code>// 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);
|
||||||
|
</code></pre>
|
||||||
|
<hr />
|
||||||
|
<h3 id="gridfinitybase">gridfinityBase</h3>
|
||||||
|
<p>Generates the bases for bins. Has various different hole styles, and can be subdivided.</p>
|
||||||
|
<p><strong> <code>gridfinityBase (gridx, gridy, length, div_base_x, div_base_y, style_hole)</code> </strong></p>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Parameter</th>
|
||||||
|
<th>Range</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>gridx</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>number of bases along the x-axis</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gridy</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>number of bases along the y-axis</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>length</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>length of one unit of the base. default: 42</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>div_base_x</td>
|
||||||
|
<td>{ n>=0 | n∈Z }</td>
|
||||||
|
<td>number of divisions per 1 unit of base along the X axis. <br>(default 1, only use integers. 0 means automatically guess the division)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>div_base_y</td>
|
||||||
|
<td>{ n>=0 | n∈Z }</td>
|
||||||
|
<td>number of divisions per 1 unit of base along the Y axis. <br>(default 1, only use integers. 0 means automatically guess the division)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style_hole</td>
|
||||||
|
<td>{ 0, 1, 2, 3 }</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<pre><code>// Example: generate a 3x3 base with a 42mm unit size and clean magnet holes
|
||||||
|
gridfinityBase(3, 3, 42, 0, 0, 1);
|
||||||
|
</code></pre>
|
||||||
|
<hr />
|
||||||
|
<h3 id="cutequal">cutEqual</h3>
|
||||||
|
<p>Generates the "traditional" bin cutters. It is a utility function that creates evenly distributed compartments. </p>
|
||||||
|
<p><strong> <code>cutEqual (n_divx, n_divy, style_tab, scoop_weight)</code> </strong></p>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Parameter</th>
|
||||||
|
<th>Range</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>n_divx</td>
|
||||||
|
<td>{ n>0 | n∈Z }</td>
|
||||||
|
<td>number of compartments along X</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>n_divy</td>
|
||||||
|
<td>{ n>0 | n∈Z }</td>
|
||||||
|
<td>number of compartments along Y</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style_tab</td>
|
||||||
|
<td>{ 0, 1, 2, 3, 4, 5 }</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>scoop</td>
|
||||||
|
<td>n>0 | n∈R</td>
|
||||||
|
<td>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.</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<pre><code>// 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);
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
<hr />
|
||||||
|
<h3 id="cut">cut</h3>
|
||||||
|
<p>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.</p>
|
||||||
|
<p><strong> <code>cut (x, y, w, h, t, s)</code> </strong></p>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Parameter</th>
|
||||||
|
<th>Range</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>x</td>
|
||||||
|
<td>{ n>=0 | n∈R }</td>
|
||||||
|
<td>X coordinate of the compartment <br>(position of left edge of compartment)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>y</td>
|
||||||
|
<td>{ n>=0 | n∈R }</td>
|
||||||
|
<td>Y coordinate of the compartment <br>(position of bottom edge of compartment)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>w</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>Width of the compartment, in base units <br>(1 unit = 1 <code>length</code>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>h</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>Height of the compartment, in base units <br>(1 unit = 1 <code>length</code>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>t</td>
|
||||||
|
<td>{ 0, 1, 2, 3, 4, 5 }</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>s</td>
|
||||||
|
<td>n>0 | n∈R</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<pre><code>// 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);
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
<hr />
|
||||||
|
<h3 id="cut_move">cut_move</h3>
|
||||||
|
<p>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.</p>
|
||||||
|
<p><strong> <code>cut_move (x, y, w, h)</code> </strong></p>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Parameter</th>
|
||||||
|
<th>Range</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>x</td>
|
||||||
|
<td>{ n>=0 | n∈R }</td>
|
||||||
|
<td>X coordinate of the area (position of left edge)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>y</td>
|
||||||
|
<td>{ n>=0 | n∈R }</td>
|
||||||
|
<td>Y coordinate of the area (position of bottom edge)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>w</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>Width of the area, in base units (1 unit = 1 <code>length</code>)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>h</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>Height of the area, in base units (1 unit = 1 <code>length</code>)</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<pre><code>// 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);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div><footer>
|
||||||
|
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
|
||||||
|
<a href=".." class="btn btn-neutral float-left" title="Home"><span class="icon icon-circle-arrow-left"></span> Previous</a>
|
||||||
|
<a href="../baseplates/" class="btn btn-neutral float-right" title="Baseplates">Next <span class="icon icon-circle-arrow-right"></span></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div role="contentinfo">
|
||||||
|
<!-- Copyright etc -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="rst-versions" role="note" aria-label="Versions">
|
||||||
|
<span class="rst-current-version" data-toggle="rst-current-version">
|
||||||
|
|
||||||
|
|
||||||
|
<span><a href=".." style="color: #fcfcfc">« Previous</a></span>
|
||||||
|
|
||||||
|
|
||||||
|
<span><a href="../baseplates/" style="color: #fcfcfc">Next »</a></span>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<script>var base_url = '..';</script>
|
||||||
|
<script src="../js/theme_extra.js" defer></script>
|
||||||
|
<script src="../js/theme.js" defer></script>
|
||||||
|
<script src="../search/main.js" defer></script>
|
||||||
|
<script defer>
|
||||||
|
window.onload = function () {
|
||||||
|
SphinxRtdTheme.Navigation.enable(true);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
275
constants/index.html
Executable file
|
@ -0,0 +1,275 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html class="writer-html5" lang="en" >
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<link rel="shortcut icon" href="../img/favicon.ico" />
|
||||||
|
<title>Constants - Gridfinity Rebuilt</title>
|
||||||
|
<link rel="stylesheet" href="../css/theme.css" />
|
||||||
|
<link rel="stylesheet" href="../css/theme_extra.css" />
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Current page data
|
||||||
|
var mkdocs_page_name = "Constants";
|
||||||
|
var mkdocs_page_input_path = "constants.md";
|
||||||
|
var mkdocs_page_url = null;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="../js/jquery-3.6.0.min.js" defer></script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="../js/html5shiv.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
|
||||||
|
<script>hljs.initHighlightingOnLoad();</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="wy-body-for-nav" role="document">
|
||||||
|
|
||||||
|
<div class="wy-grid-for-nav">
|
||||||
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
|
||||||
|
<div class="wy-side-scroll">
|
||||||
|
<div class="wy-side-nav-search">
|
||||||
|
<a href=".." class="icon icon-home"> Gridfinity Rebuilt
|
||||||
|
</a><div role="search">
|
||||||
|
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||||
|
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="..">Home</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../bins/">Bins</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../baseplates/">Baseplates</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../lite/">Lite</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../vase/">Vase</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l1 current"><a class="reference internal current" href="./">Constants</a>
|
||||||
|
<ul class="current">
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||||
|
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
|
||||||
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||||
|
<a href="..">Gridfinity Rebuilt</a>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<div class="wy-nav-content">
|
||||||
|
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
|
||||||
|
<ul class="wy-breadcrumbs">
|
||||||
|
<li><a href=".." class="icon icon-home" alt="Docs"></a> »</li>
|
||||||
|
<li>Constants</li>
|
||||||
|
<li class="wy-breadcrumbs-aside">
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||||
|
<div class="section" itemprop="articleBody">
|
||||||
|
|
||||||
|
<h1 id="gridfinity-rebuilt-constants">gridfinity-rebuilt-constants</h1>
|
||||||
|
<p>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, </p>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Parameter</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>h_base</td>
|
||||||
|
<td>height of the base</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>r_base</td>
|
||||||
|
<td>outside rounded radius of bin</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>r_c1</td>
|
||||||
|
<td>lower base chamfer "radius"</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>r_c2</td>
|
||||||
|
<td>upper base chamfer "radius"</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>h_bot</td>
|
||||||
|
<td>bottom thiccness of bin</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>r_fo1</td>
|
||||||
|
<td>outside radii 1</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>r_fo2</td>
|
||||||
|
<td>outside radii 2</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>r_fo3</td>
|
||||||
|
<td>outside radii 3</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>r_hole1</td>
|
||||||
|
<td>screw hole radius</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>r_hole2</td>
|
||||||
|
<td>magnet hole radius</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>d_hole</td>
|
||||||
|
<td>center-to-center distance between holes</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>h_hole</td>
|
||||||
|
<td>magnet hole depth</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>h_slit</td>
|
||||||
|
<td>slit depth (printer layer height)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>r_f1</td>
|
||||||
|
<td>top edge fillet radius</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>r_f2</td>
|
||||||
|
<td>internal fillet radius</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>d_div</td>
|
||||||
|
<td>width of divider between compartments</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>d_wall</td>
|
||||||
|
<td>minimum wall thickness</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>d_clear</td>
|
||||||
|
<td>tolerance fit factor</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>d_tabh</td>
|
||||||
|
<td>height of tab (yaxis, measured from inner wall)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>d_tabw</td>
|
||||||
|
<td>maximum width of tab</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>a_tab</td>
|
||||||
|
<td>angle of tab</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>bp_h_bot</td>
|
||||||
|
<td>Baseplate bottom part height (part added with weigthed=true)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>bp_cut_size</td>
|
||||||
|
<td>Baseplate bottom cutout rectangle size</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>bp_cut_depth</td>
|
||||||
|
<td>Baseplate bottom cutout rectangle depth</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>bp_rcut_width</td>
|
||||||
|
<td>Baseplate bottom cutout finger gap width</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>bp_rcut_length</td>
|
||||||
|
<td>Baseplate bottom cutout finger gap left</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>bp_rcut_depth</td>
|
||||||
|
<td>Baseplate bottom cutout finger gap depth</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>d_cs</td>
|
||||||
|
<td>countersink diameter for baseplate</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>r_skel</td>
|
||||||
|
<td>radius of cutout for skeletonized baseplate</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>r_cb</td>
|
||||||
|
<td>baseplate counterbore radius</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>h_cb</td>
|
||||||
|
<td>baseplate counterbore depth</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>h_skel</td>
|
||||||
|
<td>minimum baseplate thickness (when skeletonized)</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div><footer>
|
||||||
|
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
|
||||||
|
<a href="../vase/" class="btn btn-neutral float-left" title="Vase"><span class="icon icon-circle-arrow-left"></span> Previous</a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div role="contentinfo">
|
||||||
|
<!-- Copyright etc -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="rst-versions" role="note" aria-label="Versions">
|
||||||
|
<span class="rst-current-version" data-toggle="rst-current-version">
|
||||||
|
|
||||||
|
|
||||||
|
<span><a href="../vase/" style="color: #fcfcfc">« Previous</a></span>
|
||||||
|
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<script>var base_url = '..';</script>
|
||||||
|
<script src="../js/theme_extra.js" defer></script>
|
||||||
|
<script src="../js/theme.js" defer></script>
|
||||||
|
<script src="../search/main.js" defer></script>
|
||||||
|
<script defer>
|
||||||
|
window.onload = function () {
|
||||||
|
SphinxRtdTheme.Navigation.enable(true);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
BIN
css/fonts/Roboto-Slab-Bold.woff
Executable file
BIN
css/fonts/Roboto-Slab-Bold.woff2
Executable file
BIN
css/fonts/Roboto-Slab-Regular.woff
Executable file
BIN
css/fonts/Roboto-Slab-Regular.woff2
Executable file
BIN
css/fonts/fontawesome-webfont.eot
Executable file
2671
css/fonts/fontawesome-webfont.svg
Executable file
After Width: | Height: | Size: 434 KiB |
BIN
css/fonts/fontawesome-webfont.ttf
Executable file
BIN
css/fonts/fontawesome-webfont.woff
Executable file
BIN
css/fonts/fontawesome-webfont.woff2
Executable file
BIN
css/fonts/lato-bold-italic.woff
Executable file
BIN
css/fonts/lato-bold-italic.woff2
Executable file
BIN
css/fonts/lato-bold.woff
Executable file
BIN
css/fonts/lato-bold.woff2
Executable file
BIN
css/fonts/lato-normal-italic.woff
Executable file
BIN
css/fonts/lato-normal-italic.woff2
Executable file
BIN
css/fonts/lato-normal.woff
Executable file
BIN
css/fonts/lato-normal.woff2
Executable file
13
css/theme.css
Executable file
191
css/theme_extra.css
Executable file
|
@ -0,0 +1,191 @@
|
||||||
|
/*
|
||||||
|
* Wrap inline code samples otherwise they shoot of the side and
|
||||||
|
* can't be read at all.
|
||||||
|
*
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/313
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/233
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/834
|
||||||
|
*/
|
||||||
|
.rst-content code {
|
||||||
|
white-space: pre-wrap;
|
||||||
|
word-wrap: break-word;
|
||||||
|
padding: 2px 5px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Make code blocks display as blocks and give them the appropriate
|
||||||
|
* font size and padding.
|
||||||
|
*
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/855
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/834
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/233
|
||||||
|
*/
|
||||||
|
.rst-content pre code {
|
||||||
|
white-space: pre;
|
||||||
|
word-wrap: normal;
|
||||||
|
display: block;
|
||||||
|
padding: 12px;
|
||||||
|
font-size: 12px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Fix code colors
|
||||||
|
*
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/2027
|
||||||
|
*/
|
||||||
|
.rst-content code {
|
||||||
|
color: #E74C3C;
|
||||||
|
}
|
||||||
|
|
||||||
|
.rst-content pre code {
|
||||||
|
color: #000;
|
||||||
|
background: #f8f8f8;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fix link colors when the link text is inline code.
|
||||||
|
*
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/718
|
||||||
|
*/
|
||||||
|
a code {
|
||||||
|
color: #2980B9;
|
||||||
|
}
|
||||||
|
a:hover code {
|
||||||
|
color: #3091d1;
|
||||||
|
}
|
||||||
|
a:visited code {
|
||||||
|
color: #9B59B6;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The CSS classes from highlight.js seem to clash with the
|
||||||
|
* ReadTheDocs theme causing some code to be incorrectly made
|
||||||
|
* bold and italic.
|
||||||
|
*
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/411
|
||||||
|
*/
|
||||||
|
pre .cs, pre .c {
|
||||||
|
font-weight: inherit;
|
||||||
|
font-style: inherit;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Fix some issues with the theme and non-highlighted code
|
||||||
|
* samples. Without and highlighting styles attached the
|
||||||
|
* formatting is broken.
|
||||||
|
*
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/319
|
||||||
|
*/
|
||||||
|
.rst-content .no-highlight {
|
||||||
|
display: block;
|
||||||
|
padding: 0.5em;
|
||||||
|
color: #333;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Additions specific to the search functionality provided by MkDocs
|
||||||
|
*/
|
||||||
|
|
||||||
|
.search-results {
|
||||||
|
margin-top: 23px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-results article {
|
||||||
|
border-top: 1px solid #E1E4E5;
|
||||||
|
padding-top: 24px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.search-results article:first-child {
|
||||||
|
border-top: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
form .search-query {
|
||||||
|
width: 100%;
|
||||||
|
border-radius: 50px;
|
||||||
|
padding: 6px 12px; /* csslint allow: box-model */
|
||||||
|
border-color: #D1D4D5;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Improve inline code blocks within admonitions.
|
||||||
|
*
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/656
|
||||||
|
*/
|
||||||
|
.rst-content .admonition code {
|
||||||
|
color: #404040;
|
||||||
|
border: 1px solid #c7c9cb;
|
||||||
|
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||||
|
background: #f8fbfd;
|
||||||
|
background: rgba(255, 255, 255, 0.7);
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Account for wide tables which go off the side.
|
||||||
|
* Override borders to avoid weirdness on narrow tables.
|
||||||
|
*
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/834
|
||||||
|
* https://github.com/mkdocs/mkdocs/pull/1034
|
||||||
|
*/
|
||||||
|
.rst-content .section .docutils {
|
||||||
|
width: 100%;
|
||||||
|
overflow: auto;
|
||||||
|
display: block;
|
||||||
|
border: none;
|
||||||
|
}
|
||||||
|
|
||||||
|
td, th {
|
||||||
|
border: 1px solid #e1e4e5 !important; /* csslint allow: important */
|
||||||
|
border-collapse: collapse;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Without the following amendments, the navigation in the theme will be
|
||||||
|
* slightly cut off. This is due to the fact that the .wy-nav-side has a
|
||||||
|
* padding-bottom of 2em, which must not necessarily align with the font-size of
|
||||||
|
* 90 % on the .rst-current-version container, combined with the padding of 12px
|
||||||
|
* above and below. These amendments fix this in two steps: First, make sure the
|
||||||
|
* .rst-current-version container has a fixed height of 40px, achieved using
|
||||||
|
* line-height, and then applying a padding-bottom of 40px to this container. In
|
||||||
|
* a second step, the items within that container are re-aligned using flexbox.
|
||||||
|
*
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/2012
|
||||||
|
*/
|
||||||
|
.wy-nav-side {
|
||||||
|
padding-bottom: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* The second step of above amendment: Here we make sure the items are aligned
|
||||||
|
* correctly within the .rst-current-version container. Using flexbox, we
|
||||||
|
* achieve it in such a way that it will look like the following:
|
||||||
|
*
|
||||||
|
* [No repo_name]
|
||||||
|
* Next >> // On the first page
|
||||||
|
* << Previous Next >> // On all subsequent pages
|
||||||
|
*
|
||||||
|
* [With repo_name]
|
||||||
|
* <repo_name> Next >> // On the first page
|
||||||
|
* <repo_name> << Previous Next >> // On all subsequent pages
|
||||||
|
*
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/2012
|
||||||
|
*/
|
||||||
|
.rst-versions .rst-current-version {
|
||||||
|
padding: 0 12px;
|
||||||
|
display: flex;
|
||||||
|
font-size: initial;
|
||||||
|
justify-content: space-between;
|
||||||
|
align-items: center;
|
||||||
|
line-height: 40px;
|
||||||
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Please note that this amendment also involves removing certain inline-styles
|
||||||
|
* from the file ./mkdocs/themes/readthedocs/versions.html.
|
||||||
|
*
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/2012
|
||||||
|
*/
|
||||||
|
.rst-current-version span {
|
||||||
|
flex: 1;
|
||||||
|
text-align: center;
|
||||||
|
}
|
|
@ -1,41 +0,0 @@
|
||||||
# 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.
|
|
||||||
|
|
||||||
![Bin](images/baseplate.gif)
|
|
||||||
|
|
||||||
## 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
|
|
172
docs/bins.md
|
@ -1,172 +0,0 @@
|
||||||
# gridfinity-rebuilt-bins
|
|
||||||
|
|
||||||
Generates stock bins, with a great number of variations.
|
|
||||||
|
|
||||||
![Bin](images/custom_dimension.gif)
|
|
||||||
|
|
||||||
## 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);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
```
|
|
|
@ -1,38 +0,0 @@
|
||||||
# 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)
|
|
Before Width: | Height: | Size: 674 KiB |
Before Width: | Height: | Size: 121 KiB |
Before Width: | Height: | Size: 1.3 MiB |
Before Width: | Height: | Size: 166 KiB |
Before Width: | Height: | Size: 1,013 KiB |
Before Width: | Height: | Size: 295 KiB |
Before Width: | Height: | Size: 177 KiB |
Before Width: | Height: | Size: 205 KiB |
Before Width: | Height: | Size: 256 KiB |
Before Width: | Height: | Size: 367 KiB |
Before Width: | Height: | Size: 335 KiB |
Before Width: | Height: | Size: 460 KiB |
Before Width: | Height: | Size: 1.2 MiB |
Before Width: | Height: | Size: 16 KiB |
Before Width: | Height: | Size: 21 KiB |
Before Width: | Height: | Size: 118 KiB |
Before Width: | Height: | Size: 53 KiB |
Before Width: | Height: | Size: 43 KiB |
Before Width: | Height: | Size: 137 KiB |
|
@ -1,22 +0,0 @@
|
||||||
## 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.**
|
|
55
docs/lite.md
|
@ -1,55 +0,0 @@
|
||||||
# gridfinity-rebuilt-lite
|
|
||||||
|
|
||||||
Generates stock bins, but with a twist: the bases are hollow. This is unable to be implemented directly into `gridfinity-rebuilt-bins` due to its surprisingly complex construction. It couldn't be a toggle without causing the structure of the script to fundamentally change (and become more complex) so it was moved to a separate file. Notably, there are some parameters missing, as they are incompatible with the lite variation. Additionally, the complex geometry means rendering is fairly slow, and currently causes many CSG errors.
|
|
||||||
|
|
||||||
![Bin](images/lite.gif)
|
|
||||||
|
|
||||||
## 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
|
|
||||||
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
|
|
||||||
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
|
|
||||||
|
|
||||||
---
|
|
||||||
|
|
||||||
### gridfinityLite
|
|
||||||
|
|
||||||
Wrapper function that calls [`gridfinityInit`](bins.md#gridfinityInit) and [`gridfinityBase`](bins.md#gridfinityBase) functions (hence the sheer quantity of parameters). Like [`gridfinityInit`](bins.md#gridfinityInit), it uses its children as cutters for the compartments.
|
|
||||||
|
|
||||||
**`gridfinityLite(gridx, gridy, gridz, gridz_define, enable_lip, enable_zsnap, 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
|
|
||||||
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
|
|
||||||
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.)
|
|
||||||
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)
|
|
||||||
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 3x3x6 bin with 2x2 compartments, that is hollow
|
|
||||||
gridfinityLite(gridx=3, gridy=3, gridz=6, gridz_define=0, enable_lip=true, enable_zsnap=false, length=42, div_base_x=0, div_base_y=0, style_hole=1) {
|
|
||||||
cutEqual(n_divx=2, n_divy=2, style_tab=1, enable_scoop = false);
|
|
||||||
}
|
|
||||||
```
|
|
75
docs/vase.md
|
@ -1,75 +0,0 @@
|
||||||
# gridfinity-spiral-vase
|
|
||||||
|
|
||||||
Some assembly required!
|
|
||||||
Adaptation of Gridfinity bins to work with spiral vase mode, as to save filament and print time. A big drawback of using vase mode for Gridfinity bins was that they would be very flimsy, and would lack the features that make Gridfinity such a good organizational tool. The goal of this implementation was to maintain the design philosophy while working under the constraints of vase mode.
|
|
||||||
|
|
||||||
![Bin](images/vase_dividers.gif)
|
|
||||||
![Bin](images/vase_base.gif)
|
|
||||||
|
|
||||||
## Instructions
|
|
||||||
Normal Gridfinity is impossible to convert to vase mode due to the geometry of the bases, meaning most existing vase mode Gridfinity models are limited to 1x1 bins. How this script gets around the impossible is to use two separate pieces. **The bin and bases must be printed separately, and then glued together to form the final bin.** While this is slightly more work, there is an added bonus to this method, as for larger bins you may not need every single grid slot to have a base, you only really need them on the corners, or the edges, with some in the middle for support. Using less bases saves filament and print time.
|
|
||||||
|
|
||||||
All parameters are global. The customizer has descriptions for all parameters. It is **essential** that the section *Printer Settings* matches your preferred slicer's settings, otherwise the model will not slice correctly. Additionally, you have to turn on the spiral vase parameter in your slicer. If you do not know what vase mode is, [this](https://www.youtube.com/watch?v=HZSFoFYpBaA) is a helpful video.
|
|
||||||
|
|
||||||
1. Change the *Printer Settings* parameters to match your slicer and printer settings.
|
|
||||||
2. Run the `gridfinityVaseBase()` module. This will generate a single spiral-capable base. Export as an STL file. You will need to print multiple of these, so it recommended to fill a base plate with them using the "complete individual objects" option (or equivilant) in your slicer. You only need to do this step initially, and then each time your printer settings change afterwards.
|
|
||||||
3. Change the bin parameters and run `gridfinityVase()` module to generate the main bin.
|
|
||||||
4. Glue bases to the bottom of the bin. I recommend superglue on the corners and the top of the magnet holes.
|
|
||||||
|
|
||||||
How your sliced files should look (cross section shown for 1x1 bin):
|
|
||||||
|
|
||||||
![Bin](images/slicer_bin.png)
|
|
||||||
![Bin](images/slicer_base.png)
|
|
||||||
|
|
||||||
Example sliced files can be found on the [Printables](https://www.printables.com/model/284371-spiral-vase-gridfinity-in-openscad) page.
|
|
||||||
|
|
||||||
## Statistics
|
|
||||||
Given how it has become a bit of a [challenge](https://www.printables.com/model/265271-gridfinity-lite-economical-plain-storage-bins) to reduce the weight and print time for these bins, here is a comparison for a large bin:
|
|
||||||
|
|
||||||
| Type | Weight | Time |
|
|
||||||
|--------------|-----------|------------|
|
|
||||||
Plain 4x2x6 Bin | 114.66g | 3h58m
|
|
||||||
Vase 4x2x6 Bin with 8 Bases | 68.31g | 2h27m
|
|
||||||
Vase 4x2x6 Bin with 4 Bases (only corners) | 56.43g | 1h59m
|
|
||||||
|
|
||||||
Clearly, vase mode is very quick and quite lightweight. However, this fundamentally means the bins will be weaker, so keep that in mind.
|
|
||||||
|
|
||||||
## Script Parameters
|
|
||||||
|
|
||||||
Parameter | Range | Description
|
|
||||||
--- | ----- | ---
|
|
||||||
type | { 0 , 1 } | generate the bin (0) or base (1)
|
|
||||||
nozzle | { n>0 \| n∈R } | extrusion width in slicer
|
|
||||||
layer | { n>0 \| n∈R } | size of layers in slicer
|
|
||||||
bottom_layer | { n>0 \| n∈Z } | number of layers on the bottom of the print
|
|
||||||
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 <br> "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 <br>Life, the Universe, and Everything.)
|
|
||||||
n_divx | { n>0 \| n∈Z } | number of compartments along X
|
|
||||||
enable_holes | boolean | toggle holes inside the base
|
|
||||||
enable_zsnap | boolean | automatically snap the bin size to the nearest <br> 7mm increment. default: true
|
|
||||||
enable_lip | boolean | if you are not stacking the bin, you can disable the <br>top lip to save space. default: true
|
|
||||||
enable_scoop_chamfer | boolean | toggles the chamfer on bottom edge <br> for easy removal of items
|
|
||||||
enable_funnel | boolean | toggles funnel on back of tab. <br> acts as a finger grip and pour spout for small parts.
|
|
||||||
enable_inset | boolean | toggles an inset on the front of the bin. <br> adds strength when using scoop.
|
|
||||||
enable_pinch | boolean | toggles an outside pinch at the top lip of the bin. <br> adds strength.
|
|
||||||
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 mm <br> • (2) gridz is the overall external height of the bin in mm
|
|
||||||
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_base | { 0, 1, 2, 3, 4} | specifies the locations for the "X" cutouts for bases. <br> • (0) all <br> • (1) corners <br> • (2) edges <br> • (3) automatic <br> • (4) none
|
|
||||||
a_tab | { n>0 \| n∈R } | angle of the tab
|
|
||||||
|
|
||||||
## Modules
|
|
||||||
|
|
||||||
### gridfinityVase
|
|
||||||
|
|
||||||
Generates the compartment section of the bin. No parameters as it uses the global parameters for construction.
|
|
||||||
|
|
||||||
**`gridfinityVase()`**
|
|
||||||
|
|
||||||
|
|
||||||
### gridfinityVaseBase
|
|
||||||
|
|
||||||
Generates the base section of the bin. No parameters as it uses the global parameters for construction. It only generates a single base, as all of them are the same. Use your slicer with the "outpuit individual objects" option to print a full sheet of these, or as many as you need to fit your bins.
|
|
||||||
|
|
||||||
**`gridfinityVaseBase()`**
|
|
|
@ -1,80 +0,0 @@
|
||||||
|
|
||||||
// height of the base
|
|
||||||
h_base = 5;
|
|
||||||
// outside rounded radius of bin
|
|
||||||
r_base = 4;
|
|
||||||
// lower base chamfer "radius"
|
|
||||||
r_c1 = 0.8;
|
|
||||||
// upper base chamfer "radius"
|
|
||||||
r_c2 = 2.4;
|
|
||||||
// bottom thiccness of bin
|
|
||||||
h_bot = 2.2;
|
|
||||||
// outside radii 1
|
|
||||||
r_fo1 = 8.5;
|
|
||||||
// outside radii 2
|
|
||||||
r_fo2 = 3.2;
|
|
||||||
// outside radii 3
|
|
||||||
r_fo3 = 1.6;
|
|
||||||
|
|
||||||
// screw hole radius
|
|
||||||
r_hole1 = 1.5;
|
|
||||||
// magnet hole radius
|
|
||||||
r_hole2 = 3.25;
|
|
||||||
// center-to-center distance between holes
|
|
||||||
d_hole = 26;
|
|
||||||
// magnet hole depth
|
|
||||||
h_hole = 2.4;
|
|
||||||
// slit depth (printer layer height)
|
|
||||||
h_slit = 0.2;
|
|
||||||
|
|
||||||
// top edge fillet radius
|
|
||||||
r_f1 = 0.6;
|
|
||||||
// internal fillet radius
|
|
||||||
r_f2 = 2.8;
|
|
||||||
|
|
||||||
// width of divider between compartments
|
|
||||||
d_div = 1.2;
|
|
||||||
// minimum wall thickness
|
|
||||||
d_wall = 0.95;
|
|
||||||
// tolerance fit factor
|
|
||||||
d_clear = 0.25;
|
|
||||||
|
|
||||||
// height of tab (yaxis, measured from inner wall)
|
|
||||||
d_tabh = 15.85;
|
|
||||||
// maximum width of tab
|
|
||||||
d_tabw = 42;
|
|
||||||
// angle of tab
|
|
||||||
a_tab = 36;
|
|
||||||
// lip height
|
|
||||||
h_lip = 3.548;
|
|
||||||
|
|
||||||
d_wall2 = r_base-r_c1-d_clear*sqrt(2);
|
|
||||||
d_magic = -2*d_clear-2*d_wall+d_div;
|
|
||||||
|
|
||||||
// Baseplate constants
|
|
||||||
|
|
||||||
// Baseplate bottom part height (part added with weigthed=true)
|
|
||||||
bp_h_bot = 6.4;
|
|
||||||
// Baseplate bottom cutout rectangle size
|
|
||||||
bp_cut_size = 21.4;
|
|
||||||
// Baseplate bottom cutout rectangle depth
|
|
||||||
bp_cut_depth = 4;
|
|
||||||
// Baseplate bottom cutout rounded thingy width
|
|
||||||
bp_rcut_width = 8.5;
|
|
||||||
// Baseplate bottom cutout rounded thingy left
|
|
||||||
bp_rcut_length = 4.25;
|
|
||||||
// Baseplate bottom cutout rounded thingy depth
|
|
||||||
bp_rcut_depth = 2;
|
|
||||||
// countersink diameter for baseplate
|
|
||||||
d_cs = 2.5;
|
|
||||||
// radius of cutout for skeletonized baseplate
|
|
||||||
r_skel = 2;
|
|
||||||
// baseplate counterbore radius
|
|
||||||
r_cb = 2.75;
|
|
||||||
// baseplate counterbore depth
|
|
||||||
h_cb = 3;
|
|
||||||
// minimum baseplate thickness (when skeletonized)
|
|
||||||
h_skel = 1;
|
|
||||||
|
|
||||||
// Prime numbers
|
|
||||||
p_corn = 401;
|
|
|
@ -1,211 +0,0 @@
|
||||||
include <gridfinity-rebuilt-utility.scad>
|
|
||||||
|
|
||||||
// ===== INFORMATION ===== //
|
|
||||||
/*
|
|
||||||
IMPORTANT: rendering will be better for analyzing the model if fast-csg is enabled. As of writing, this feature is only available in the development builds and not the official release of OpenSCAD, but it makes rendering only take a couple seconds, even for comically large bins. Enable it in Edit > Preferences > Features > fast-csg
|
|
||||||
|
|
||||||
https://github.com/kennetek/gridfinity-rebuilt-openscad
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ===== PARAMETERS ===== //
|
|
||||||
|
|
||||||
/* [Setup Parameters] */
|
|
||||||
$fa = 8;
|
|
||||||
$fs = 0.25;
|
|
||||||
|
|
||||||
/* [General Settings] */
|
|
||||||
// number of bases along x-axis
|
|
||||||
gridx = 5;
|
|
||||||
// number of bases along y-axis
|
|
||||||
gridy = 5;
|
|
||||||
// base unit
|
|
||||||
length = 42;
|
|
||||||
|
|
||||||
/* [Screw Together Settings - Defaults work for M3 and 4-40] */
|
|
||||||
// screw diameter
|
|
||||||
d_screw = 3.35;
|
|
||||||
// screw head diameter
|
|
||||||
d_screw_head = 5;
|
|
||||||
// screw spacing distance
|
|
||||||
screw_spacing = .5;
|
|
||||||
// number of screws per grid block
|
|
||||||
n_screws = 1; // [1:3]
|
|
||||||
|
|
||||||
|
|
||||||
/* [Fit to Drawer] */
|
|
||||||
// minimum length of baseplate along x (leave zero to ignore, will automatically fill area if gridx is zero)
|
|
||||||
distancex = 0;
|
|
||||||
// minimum length of baseplate along y (leave zero to ignore, will automatically fill area if gridy is zero)
|
|
||||||
distancey = 0;
|
|
||||||
|
|
||||||
// where to align extra space along x
|
|
||||||
fitx = 0; // [-1:0.1:1]
|
|
||||||
// where to align extra space along y
|
|
||||||
fity = 0; // [-1:0.1:1]
|
|
||||||
|
|
||||||
|
|
||||||
/* [Styles] */
|
|
||||||
|
|
||||||
// baseplate styles
|
|
||||||
style_plate = 0; // [0: thin, 1:weighted, 2:skeletonized, 3: screw together, 4: screw together minimal]
|
|
||||||
|
|
||||||
// enable magnet hole
|
|
||||||
enable_magnet = true;
|
|
||||||
|
|
||||||
// hole styles
|
|
||||||
style_hole = 2; // [0:none, 1:contersink, 2:counterbore]
|
|
||||||
|
|
||||||
|
|
||||||
// ===== IMPLEMENTATION ===== //
|
|
||||||
screw_together = (style_plate == 3 || style_plate == 4);
|
|
||||||
|
|
||||||
color("tomato")
|
|
||||||
gridfinityBaseplate(gridx, gridy, length, distancex, distancey, style_plate, enable_magnet, style_hole, fitx, fity);
|
|
||||||
|
|
||||||
|
|
||||||
// ===== CONSTRUCTION ===== //
|
|
||||||
|
|
||||||
module gridfinityBaseplate(gridx, gridy, length, dix, diy, sp, sm, sh, fitx, fity) {
|
|
||||||
|
|
||||||
assert(gridx > 0 || dix > 0, "Must have positive x grid amount!");
|
|
||||||
assert(gridy > 0 || diy > 0, "Must have positive y grid amount!");
|
|
||||||
|
|
||||||
gx = gridx == 0 ? floor(dix/length) : gridx;
|
|
||||||
gy = gridy == 0 ? floor(diy/length) : gridy;
|
|
||||||
dx = max(gx*length-0.5, dix);
|
|
||||||
dy = max(gy*length-0.5, diy);
|
|
||||||
|
|
||||||
off = calculate_off(sp, sm, sh);
|
|
||||||
|
|
||||||
offsetx = dix < dx ? 0 : (gx*length-0.5-dix)/2*fitx*-1;
|
|
||||||
offsety = diy < dy ? 0 : (gy*length-0.5-diy)/2*fity*-1;
|
|
||||||
|
|
||||||
difference() {
|
|
||||||
translate([offsetx,offsety,h_base])
|
|
||||||
mirror([0,0,1])
|
|
||||||
rounded_rectangle(dx, dy, h_base+off, r_base);
|
|
||||||
|
|
||||||
gridfinityBase(gx, gy, length, 1, 1, 0, 0.5, false);
|
|
||||||
|
|
||||||
translate([offsetx,offsety,h_base-0.6])
|
|
||||||
rounded_rectangle(dx*2, dy*2, h_base*2, r_base);
|
|
||||||
|
|
||||||
pattern_linear(gx, gy, length) {
|
|
||||||
render(convexity = 6) {
|
|
||||||
if (sm) block_base_hole(1);
|
|
||||||
|
|
||||||
if (sp == 1)
|
|
||||||
translate([0,0,-off])
|
|
||||||
cutter_weight();
|
|
||||||
else if (sp == 2 || sp == 3)
|
|
||||||
linear_extrude(10*(h_base+off), center = true)
|
|
||||||
profile_skeleton();
|
|
||||||
else if (sp == 4)
|
|
||||||
translate([0,0,-5*(h_base+off)])
|
|
||||||
rounded_square(length-2*r_c2-2*r_c1, 10*(h_base+off), r_fo3);
|
|
||||||
|
|
||||||
|
|
||||||
hole_pattern(){
|
|
||||||
if (sm) block_base_hole(1);
|
|
||||||
|
|
||||||
translate([0,0,-off])
|
|
||||||
if (sh == 1) cutter_countersink();
|
|
||||||
else if (sh == 2) cutter_counterbore();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (sp == 3 || sp ==4) cutter_screw_together(gx, gy, off);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
function calculate_off(sp, sm, sh) =
|
|
||||||
screw_together
|
|
||||||
? 6.75
|
|
||||||
:sp==0
|
|
||||||
?0
|
|
||||||
: sp==1
|
|
||||||
?bp_h_bot
|
|
||||||
:h_skel + (sm
|
|
||||||
?h_hole
|
|
||||||
: 0)+(sh==0
|
|
||||||
? d_screw
|
|
||||||
: sh==1
|
|
||||||
?d_cs
|
|
||||||
:h_cb);
|
|
||||||
|
|
||||||
module cutter_weight() {
|
|
||||||
union() {
|
|
||||||
linear_extrude(bp_cut_depth*2,center=true)
|
|
||||||
square(bp_cut_size, center=true);
|
|
||||||
pattern_circular(4)
|
|
||||||
translate([0,10,0])
|
|
||||||
linear_extrude(bp_rcut_depth*2,center=true)
|
|
||||||
union() {
|
|
||||||
square([bp_rcut_width, bp_rcut_length], center=true);
|
|
||||||
translate([0,bp_rcut_length/2,0])
|
|
||||||
circle(d=bp_rcut_width);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
module hole_pattern(){
|
|
||||||
pattern_circular(4)
|
|
||||||
translate([d_hole/2, d_hole/2, 0]) {
|
|
||||||
render();
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module cutter_countersink(){
|
|
||||||
cylinder(r = r_hole1+d_clear, h = 100*h_base, center = true);
|
|
||||||
translate([0,0,d_cs])
|
|
||||||
mirror([0,0,1])
|
|
||||||
hull() {
|
|
||||||
cylinder(h = d_cs+10, r=r_hole1+d_clear);
|
|
||||||
translate([0,0,d_cs])
|
|
||||||
cylinder(h=d_cs+10, r=r_hole1+d_clear+d_cs);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module cutter_counterbore(){
|
|
||||||
cylinder(h=100*h_base, r=r_hole1+d_clear, center=true);
|
|
||||||
difference() {
|
|
||||||
cylinder(h = 2*(h_cb+0.2), r=r_cb, center=true);
|
|
||||||
copy_mirror([0,1,0])
|
|
||||||
translate([-1.5*r_cb,r_hole1+d_clear+0.1,h_cb-h_slit])
|
|
||||||
cube([r_cb*3,r_cb*3, 10]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module profile_skeleton() {
|
|
||||||
l = length-2*r_c2-2*r_c1;
|
|
||||||
minkowski() {
|
|
||||||
difference() {
|
|
||||||
square([l-2*r_skel+2*d_clear,l-2*r_skel+2*d_clear], center = true);
|
|
||||||
pattern_circular(4)
|
|
||||||
translate([d_hole/2,d_hole/2,0])
|
|
||||||
minkowski() {
|
|
||||||
square([l,l]);
|
|
||||||
circle(r_hole2+r_skel+2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
circle(r_skel);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module cutter_screw_together(gx, gy, off) {
|
|
||||||
|
|
||||||
screw(gx, gy);
|
|
||||||
rotate([0,0,90])
|
|
||||||
screw(gy, gx);
|
|
||||||
|
|
||||||
module screw(a, b) {
|
|
||||||
copy_mirror([1,0,0])
|
|
||||||
translate([a*length/2, 0, -off/2])
|
|
||||||
pattern_linear(1, b, 1, length)
|
|
||||||
pattern_linear(1, n_screws, 1, d_screw_head + screw_spacing)
|
|
||||||
rotate([0,90,0])
|
|
||||||
cylinder(h=length/2, d=d_screw, center = true);
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,160 +0,0 @@
|
||||||
include <gridfinity-rebuilt-utility.scad>
|
|
||||||
|
|
||||||
// ===== INFORMATION ===== //
|
|
||||||
/*
|
|
||||||
IMPORTANT: rendering will be better for analyzing the model if fast-csg is enabled. As of writing, this feature is only available in the development builds and not the official release of OpenSCAD, but it makes rendering only take a couple seconds, even for comically large bins. Enable it in Edit > Preferences > Features > fast-csg
|
|
||||||
the magnet holes can have an extra cut in them to make it easier to print without supports
|
|
||||||
tabs will automatically be disabled when gridz is less than 3, as the tabs take up too much space
|
|
||||||
base functions can be found in "gridfinity-rebuilt-utility.scad"
|
|
||||||
examples at end of file
|
|
||||||
|
|
||||||
BIN HEIGHT
|
|
||||||
the original gridfinity bins had the overall height defined by 7mm increments
|
|
||||||
a bin would be 7*u millimeters tall
|
|
||||||
the lip at the top of the bin (3.8mm) added onto this height
|
|
||||||
The stock bins have unit heights of 2, 3, and 6:
|
|
||||||
Z unit 2 -> 7*2 + 3.8 -> 17.8mm
|
|
||||||
Z unit 3 -> 7*3 + 3.8 -> 24.8mm
|
|
||||||
Z unit 6 -> 7*6 + 3.8 -> 45.8mm
|
|
||||||
|
|
||||||
https://github.com/kennetek/gridfinity-rebuilt-openscad
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ===== PARAMETERS ===== //
|
|
||||||
|
|
||||||
/* [Setup Parameters] */
|
|
||||||
$fa = 8;
|
|
||||||
$fs = 0.25;
|
|
||||||
|
|
||||||
/* [General Settings] */
|
|
||||||
// number of bases along x-axis
|
|
||||||
gridx = 5;
|
|
||||||
// number of bases along y-axis
|
|
||||||
gridy = 5;
|
|
||||||
// bin height. See bin height information and "gridz_define" below.
|
|
||||||
gridz = 6;
|
|
||||||
// base unit
|
|
||||||
length = 42;
|
|
||||||
|
|
||||||
/* [Compartments] */
|
|
||||||
// number of X Divisions (set to zero to have solid bin)
|
|
||||||
divx = 1;
|
|
||||||
// number of y Divisions (set to zero to have solid bin)
|
|
||||||
divy = 1;
|
|
||||||
|
|
||||||
/* [Height] */
|
|
||||||
// determine what the variable "gridz" applies to based on your use case
|
|
||||||
gridz_define = 0; // [0:gridz is the height of bins in units of 7mm increments - Zack's method,1:gridz is the internal height in millimeters, 2:gridz is the overall external height of the bin in millimeters]
|
|
||||||
// overrides internal block height of bin (for solid containers). Leave zero for default height. Units: mm
|
|
||||||
height_internal = 0;
|
|
||||||
// snap gridz height to nearest 7mm increment
|
|
||||||
enable_zsnap = false;
|
|
||||||
|
|
||||||
/* [Features] */
|
|
||||||
// the type of tabs
|
|
||||||
style_tab = 1; //[0:Full,1:Auto,2:Left,3:Center,4:Right,5:None]
|
|
||||||
// how should the top lip act
|
|
||||||
style_lip = 0; //[0: Regular lip, 1:remove lip subtractively, 2: remove lip and retain height]
|
|
||||||
// scoop weight percentage. 0 disables scoop, 1 is regular scoop. Any real number will scale the scoop.
|
|
||||||
scoop = 1; //[0:0.1:1]
|
|
||||||
// only cut magnet/screw holes at the corners of the bin to save uneccesary print time
|
|
||||||
style_corners = false;
|
|
||||||
|
|
||||||
/* [Base] */
|
|
||||||
style_hole = 3; // [0:no holes, 1:magnet holes only, 2: magnet and screw holes - no printable slit, 3: magnet and screw holes - printable slit]
|
|
||||||
// number of divisions per 1 unit of base along the X axis. (default 1, only use integers. 0 means automatically guess the right division)
|
|
||||||
div_base_x = 0;
|
|
||||||
// number of divisions per 1 unit of base along the Y axis. (default 1, only use integers. 0 means automatically guess the right division)
|
|
||||||
div_base_y = 0;
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
// ===== IMPLEMENTATION ===== //
|
|
||||||
|
|
||||||
color("tomato") {
|
|
||||||
gridfinityInit(gridx, gridy, height(gridz, gridz_define, style_lip, enable_zsnap), height_internal, length) {
|
|
||||||
|
|
||||||
if (divx > 0 && divy > 0)
|
|
||||||
cutEqual(n_divx = divx, n_divy = divy, style_tab = style_tab, scoop_weight = scoop);
|
|
||||||
}
|
|
||||||
gridfinityBase(gridx, gridy, length, div_base_x, div_base_y, style_hole*(style_corners?p_corn:1));
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
// ===== EXAMPLES ===== //
|
|
||||||
|
|
||||||
// 3x3 even spaced grid
|
|
||||||
/*
|
|
||||||
gridfinityInit(3, 3, height(6), 0, 42) {
|
|
||||||
cutEqual(n_divx = 3, n_divy = 3, style_tab = 0, scoop_weight = 0);
|
|
||||||
}
|
|
||||||
gridfinityBase(3, 3, 42, 0, 0, 1);
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Compartments can be placed anywhere (this includes non-integer positions like 1/2 or 1/3). The grid is defined as (0,0) being the bottom left corner of the bin, with each unit being 1 base long. Each cut() module is a compartment, with the first four values defining the area that should be made into a compartment (X coord, Y coord, width, and height). These values should all be positive. t is the tab style of the compartment (0:full, 1:auto, 2:left, 3:center, 4:right, 5:none). s is a toggle for the bottom scoop.
|
|
||||||
/*
|
|
||||||
gridfinityInit(3, 3, height(6), 0, 42) {
|
|
||||||
cut(x=0, y=0, w=1.5, h=0.5, t=5, s=0);
|
|
||||||
cut(0, 0.5, 1.5, 0.5, 5, 0);
|
|
||||||
cut(0, 1, 1.5, 0.5, 5, 0);
|
|
||||||
|
|
||||||
cut(0,1.5,0.5,1.5,5,0);
|
|
||||||
cut(0.5,1.5,0.5,1.5,5,0);
|
|
||||||
cut(1,1.5,0.5,1.5,5,0);
|
|
||||||
|
|
||||||
cut(1.5, 0, 1.5, 5/3, 2);
|
|
||||||
cut(1.5, 5/3, 1.5, 4/3, 4);
|
|
||||||
}
|
|
||||||
gridfinityBase(3, 3, 42, 0, 0, 1);
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Compartments can overlap! This allows for weirdly shaped compartments, such as this "2" bin.
|
|
||||||
/*
|
|
||||||
gridfinityInit(3, 3, height(6), 0, 42) {
|
|
||||||
cut(0,2,2,1,5,0);
|
|
||||||
cut(1,0,1,3,5);
|
|
||||||
cut(1,0,2,1,5);
|
|
||||||
cut(0,0,1,2);
|
|
||||||
cut(2,1,1,2);
|
|
||||||
}
|
|
||||||
gridfinityBase(3, 3, 42, 0, 0, 1);
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Areas without a compartment are solid material, where you can put your own cutout shapes. using the cut_move() function, you can select an area, and any child shapes will be moved from the origin to the center of that area, and subtracted from the block. For example, a pattern of three cylinderical holes.
|
|
||||||
/*
|
|
||||||
gridfinityInit(3, 3, height(6), 0, 42) {
|
|
||||||
cut(x=0, y=0, w=2, h=3);
|
|
||||||
cut(x=0, y=0, w=3, h=1, t=5);
|
|
||||||
cut_move(x=2, y=1, w=1, h=2)
|
|
||||||
pattern_linear(x=1, y=3, sx=42/2)
|
|
||||||
cylinder(r=5, h=1000, center=true);
|
|
||||||
}
|
|
||||||
gridfinityBase(3, 3, 42, 0, 0, 1);
|
|
||||||
*/
|
|
||||||
|
|
||||||
// You can use loops as well as the bin dimensions to make different parametric functions, such as this one, which divides the box into columns, with a small 1x1 top compartment and a long vertical compartment below
|
|
||||||
/*
|
|
||||||
gx = 3;
|
|
||||||
gy = 3;
|
|
||||||
gridfinityInit(gx, gy, height(6), 0, 42) {
|
|
||||||
for(i=[0:gx-1]) {
|
|
||||||
cut(i,0,1,gx-1);
|
|
||||||
cut(i,gx-1,1,1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
gridfinityBase(gx, gy, 42, 0, 0, 1);
|
|
||||||
*/
|
|
||||||
|
|
||||||
// Pyramid scheme bin
|
|
||||||
/*
|
|
||||||
gx = 4.5;
|
|
||||||
gy = 4;
|
|
||||||
gridfinityInit(gx, gy, height(6), 0, 42) {
|
|
||||||
for (i = [0:gx-1])
|
|
||||||
for (j = [0:i])
|
|
||||||
cut(j*gx/(i+1),gy-i-1,gx/(i+1),1,0);
|
|
||||||
}
|
|
||||||
gridfinityBase(gx, gy, 42, 0, 0, 1);
|
|
||||||
*/
|
|
|
@ -1,100 +0,0 @@
|
||||||
include <gridfinity-rebuilt-utility.scad>
|
|
||||||
|
|
||||||
// ===== INFORMATION ===== //
|
|
||||||
/*
|
|
||||||
IMPORTANT: rendering will be better for analyzing the model if fast-csg is enabled. As of writing, this feature is only available in the development builds and not the official release of OpenSCAD, but it makes rendering only take a couple seconds, even for comically large bins. Enable it in Edit > Preferences > Features > fast-csg
|
|
||||||
|
|
||||||
https://github.com/kennetek/gridfinity-rebuilt-openscad
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ===== PARAMETERS ===== //
|
|
||||||
|
|
||||||
/* [Setup Parameters] */
|
|
||||||
$fa = 8;
|
|
||||||
$fs = 0.25;
|
|
||||||
|
|
||||||
/* [General Settings] */
|
|
||||||
// number of bases along x-axis
|
|
||||||
gridx = 3;
|
|
||||||
// number of bases along y-axis
|
|
||||||
gridy = 3;
|
|
||||||
// bin height. See bin height information and "gridz_define" below.
|
|
||||||
gridz = 6;
|
|
||||||
// base unit
|
|
||||||
length = 42;
|
|
||||||
|
|
||||||
/* [Compartments] */
|
|
||||||
// number of X Divisions
|
|
||||||
divx = 2;
|
|
||||||
// number of y Divisions
|
|
||||||
divy = 2;
|
|
||||||
|
|
||||||
/* [Toggles] */
|
|
||||||
// snap gridz height to nearest 7mm increment
|
|
||||||
enable_zsnap = false;
|
|
||||||
// how should the top lip act
|
|
||||||
style_lip = 0; //[0: Regular lip, 1:remove lip subtractively, 2: remove lip and retain height]
|
|
||||||
|
|
||||||
/* [Other] */
|
|
||||||
// determine what the variable "gridz" applies to based on your use case
|
|
||||||
gridz_define = 0; // [0:gridz is the height of bins in units of 7mm increments - Zack's method,1:gridz is the internal height in millimeters, 2:gridz is the overall external height of the bin in millimeters]
|
|
||||||
// the type of tabs
|
|
||||||
style_tab = 1; //[0:Full,1:Auto,2:Left,3:Center,4:Right,5:None]
|
|
||||||
|
|
||||||
/* [Base] */
|
|
||||||
style_hole = 0; // [0:no holes, 1:magnet holes only, 2: magnet and screw holes - no printable slit, 3: magnet and screw holes - printable slit]
|
|
||||||
// only cut magnet/screw holes at the corners of the bin to save uneccesary print time
|
|
||||||
style_corners = false;
|
|
||||||
// number of divisions per 1 unit of base along the X axis. (default 1, only use integers. 0 means automatically guess the right division)
|
|
||||||
div_base_x = 0;
|
|
||||||
// number of divisions per 1 unit of base along the Y axis. (default 1, only use integers. 0 means automatically guess the right division)
|
|
||||||
div_base_y = 0;
|
|
||||||
// thickness of bottom layer
|
|
||||||
bottom_layer = 1;
|
|
||||||
|
|
||||||
|
|
||||||
// ===== IMPLEMENTATION ===== //
|
|
||||||
|
|
||||||
// Input all the cutter types in here
|
|
||||||
color("tomato")
|
|
||||||
gridfinityLite(gridx, gridy, gridz, gridz_define, style_lip, enable_zsnap, length, div_base_x, div_base_y, style_hole) {
|
|
||||||
cutEqual(n_divx = divx, n_divy = divy, style_tab = style_tab, scoop_weight = 0);
|
|
||||||
}
|
|
||||||
|
|
||||||
// ===== CONSTRUCTION ===== //
|
|
||||||
|
|
||||||
|
|
||||||
module gridfinityLite(gridx, gridy, gridz, gridz_define, style_lip, enable_zsnap, length, div_base_x, div_base_y, style_hole) {
|
|
||||||
sh = style_hole*(style_corners?p_corn:1);
|
|
||||||
difference() {
|
|
||||||
union() {
|
|
||||||
gridfinityInit(gridx, gridy, height(gridz, gridz_define, style_lip, enable_zsnap), 0, length)
|
|
||||||
children();
|
|
||||||
gridfinityBase(gridx, gridy, length, div_base_x, div_base_y, sh);
|
|
||||||
}
|
|
||||||
|
|
||||||
difference() {
|
|
||||||
union() {
|
|
||||||
intersection() {
|
|
||||||
difference() {
|
|
||||||
gridfinityBase(gridx, gridy, length, div_base_x, div_base_y, sh, -d_wall*2, false);
|
|
||||||
translate([-gridx*length/2,-gridy*length/2,2*h_base])
|
|
||||||
cube([gridx*length,gridy*length,1000]);
|
|
||||||
}
|
|
||||||
translate([0,0,-1])
|
|
||||||
rounded_rectangle(gridx*length-0.5005-d_wall*2, gridy*length-0.5005-d_wall*2, 1000, r_f2);
|
|
||||||
translate([0,0,bottom_layer])
|
|
||||||
rounded_rectangle(gridx*1000, gridy*1000, 1000, r_f2);
|
|
||||||
}
|
|
||||||
translate([0,0,h_base+d_clear])
|
|
||||||
rounded_rectangle(gridx*length-0.5005-d_wall*2, gridy*length-0.5005-d_wall*2, h_base, r_f2);
|
|
||||||
}
|
|
||||||
|
|
||||||
translate([0,0,-4*h_base])
|
|
||||||
gridfinityInit(gridx, gridy, height(20,0), 0, length)
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -1,454 +0,0 @@
|
||||||
// UTILITY FILE, DO NOT EDIT
|
|
||||||
// EDIT OTHER FILES IN REPO FOR RESULTS
|
|
||||||
|
|
||||||
include <gridfinity-constants.scad>
|
|
||||||
|
|
||||||
// ===== User Modules ===== //
|
|
||||||
|
|
||||||
// functions to convert gridz values to mm values
|
|
||||||
function hf (z, d, l) = ((d==0)?z*7:(d==1)?h_bot+z+h_base:z-((l==1)?h_lip:0))+(l==2?h_lip:0);
|
|
||||||
function height (z,d=0,l=0,s=true) = (s?((abs(hf(z,d,l))%7==0)?hf(z,d,l):hf(z,d,l)+7-abs(hf(z,d,l))%7):hf(z,d,l))-h_base;
|
|
||||||
|
|
||||||
// Creates equally divided cutters for the bin
|
|
||||||
//
|
|
||||||
// n_divx: number of x compartments (ideally, coprime w/ gridx)
|
|
||||||
// n_divy: number of y compartments (ideally, coprime w/ gridy)
|
|
||||||
// set n_div values to 0 for a solid bin
|
|
||||||
// style_tab: tab style for all compartments. see cut()
|
|
||||||
// scoop_weight: scoop toggle for all compartments. see cut()
|
|
||||||
module cutEqual(n_divx=1, n_divy=1, style_tab=1, scoop_weight=1) {
|
|
||||||
for (i = [1:n_divx])
|
|
||||||
for (j = [1:n_divy])
|
|
||||||
cut((i-1)*$gxx/n_divx,(j-1)*$gyy/n_divy, $gxx/n_divx, $gyy/n_divy, style_tab, scoop_weight);
|
|
||||||
}
|
|
||||||
|
|
||||||
// initialize gridfinity
|
|
||||||
module gridfinityInit(gx, gy, h, h0 = 0, l) {
|
|
||||||
$gxx = gx;
|
|
||||||
$gyy = gy;
|
|
||||||
$dh = h;
|
|
||||||
$dh0 = h0;
|
|
||||||
color("tomato") {
|
|
||||||
difference() {
|
|
||||||
color("firebrick")
|
|
||||||
block_bottom(h0==0?$dh-0.1:h0, gx, gy, l);
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
color("royalblue")
|
|
||||||
block_wall(gx, gy, l) {
|
|
||||||
if (style_lip == 0) profile_wall();
|
|
||||||
else profile_wall2();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Function to include in the custom() module to individually slice bins
|
|
||||||
// Will try to clamp values to fit inside the provided base size
|
|
||||||
//
|
|
||||||
// x: start coord. x=1 is the left side of the bin.
|
|
||||||
// y: start coord. y=1 is the bottom side of the bin.
|
|
||||||
// w: width of compartment, in # of bases covered
|
|
||||||
// h: height of compartment, in # of basese covered
|
|
||||||
// t: tab style of this specific compartment.
|
|
||||||
// alignment only matters if the compartment size is larger than d_tabw
|
|
||||||
// 0:full, 1:auto, 2:left, 3:center, 4:right, 5:none
|
|
||||||
// Automatic alignment will use left tabs for bins on the left edge, right tabs for bins on the right edge, and center tabs everywhere else.
|
|
||||||
// s: toggle the rounded back corner that allows for easy removal
|
|
||||||
module cut(x=0, y=0, w=1, h=1, t=1, s=1) {
|
|
||||||
translate([0,0,-$dh-h_base])
|
|
||||||
cut_move(x,y,w,h)
|
|
||||||
block_cutter(clp(x,0,$gxx), clp(y,0,$gyy), clp(w,0,$gxx-x), clp(h,0,$gyy-y), t, s);
|
|
||||||
}
|
|
||||||
|
|
||||||
// Translates an object from the origin point to the center of the requested compartment block, can be used to add custom cuts in the bin
|
|
||||||
// See cut() module for parameter descriptions
|
|
||||||
module cut_move(x, y, w, h) {
|
|
||||||
translate([0,0,$dh0==0?$dh+h_base:$dh0+h_base])
|
|
||||||
cut_move_unsafe(clp(x,0,$gxx), clp(y,0,$gyy), clp(w,0,$gxx-x), clp(h,0,$gyy-y))
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
|
|
||||||
// ===== Modules ===== //
|
|
||||||
|
|
||||||
module profile_base() {
|
|
||||||
polygon([
|
|
||||||
[0,0],
|
|
||||||
[0,h_base],
|
|
||||||
[r_base,h_base],
|
|
||||||
[r_base-r_c2,h_base-r_c2],
|
|
||||||
[r_base-r_c2,r_c1],
|
|
||||||
[r_base-r_c2-r_c1,0]
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
module gridfinityBase(gx, gy, l, dx, dy, style_hole, off=0, final_cut=true) {
|
|
||||||
dbnxt = [for (i=[1:5]) if (abs(gx*i)%1 < 0.001 || abs(gx*i)%1 > 0.999) i];
|
|
||||||
dbnyt = [for (i=[1:5]) if (abs(gy*i)%1 < 0.001 || abs(gy*i)%1 > 0.999) i];
|
|
||||||
dbnx = 1/(dx==0 ? len(dbnxt) > 0 ? dbnxt[0] : 1 : round(dx));
|
|
||||||
dbny = 1/(dy==0 ? len(dbnyt) > 0 ? dbnyt[0] : 1 : round(dy));
|
|
||||||
xx = gx*l-0.5;
|
|
||||||
yy = gy*l-0.5;
|
|
||||||
|
|
||||||
if (final_cut)
|
|
||||||
translate([0,0,h_base])
|
|
||||||
rounded_rectangle(xx+0.002, yy+0.002, h_bot/1.5, r_fo1/2+0.001);
|
|
||||||
|
|
||||||
intersection(){
|
|
||||||
if (final_cut)
|
|
||||||
translate([0,0,-1])
|
|
||||||
rounded_rectangle(xx+0.005, yy+0.005, h_base+h_bot/2*10, r_fo1/2+0.001);
|
|
||||||
|
|
||||||
pattern_linear(gx/dbnx, gy/dbny, dbnx*l, dbny*l)
|
|
||||||
block_base(gx, gy, l, dbnx, dbny, style_hole, off);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_base(gx, gy, l, dbnx, dbny, style_hole, off) {
|
|
||||||
render(convexity = 2)
|
|
||||||
difference() {
|
|
||||||
block_base_solid(dbnx, dbny, l, off);
|
|
||||||
|
|
||||||
if (style_hole > 0)
|
|
||||||
if (style_hole % p_corn < 0.001)
|
|
||||||
pattern_linear(2, 2, (gx-1)*length+d_hole, (gy-1)*length+d_hole)
|
|
||||||
block_base_hole(style_hole / p_corn, off);
|
|
||||||
else
|
|
||||||
pattern_circular(abs(d_hole)<0.001?1:4)
|
|
||||||
translate([d_hole/2, d_hole/2, 0])
|
|
||||||
block_base_hole(style_hole, off);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_base_solid(dbnx, dbny, l, o) {
|
|
||||||
xx = dbnx*l-0.05;
|
|
||||||
yy = dbny*l-0.05;
|
|
||||||
oo = (o/2)*(sqrt(2)-1);
|
|
||||||
translate([0,0,h_base])
|
|
||||||
mirror([0,0,1])
|
|
||||||
union() {
|
|
||||||
hull() {
|
|
||||||
rounded_rectangle(xx-2*r_c2-2*r_c1+o, yy-2*r_c2-2*r_c1+o, h_base+oo, r_fo3/2);
|
|
||||||
rounded_rectangle(xx-2*r_c2+o, yy-2*r_c2+o, h_base-r_c1+oo, r_fo2/2);
|
|
||||||
}
|
|
||||||
translate([0,0,oo])
|
|
||||||
hull() {
|
|
||||||
rounded_rectangle(xx-2*r_c2+o, yy-2*r_c2+o, r_c2, r_fo2/2);
|
|
||||||
mirror([0,0,1])
|
|
||||||
rounded_rectangle(xx+o, yy+o, h_bot/2+abs(10*o), r_fo1/2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_base_hole(style_hole, o=0) {
|
|
||||||
r1 = r_hole1-o/2;
|
|
||||||
r2 = r_hole2-o/2;
|
|
||||||
union() {
|
|
||||||
difference() {
|
|
||||||
cylinder(h = 2*(h_hole-o+(style_hole==3?h_slit:0)), r=r2, center=true);
|
|
||||||
|
|
||||||
if (style_hole==3)
|
|
||||||
copy_mirror([0,1,0])
|
|
||||||
translate([-1.5*r2,r1+0.1,h_hole-o])
|
|
||||||
cube([r2*3,r2*3, 10]);
|
|
||||||
}
|
|
||||||
if (style_hole > 1)
|
|
||||||
cylinder(h = 2*h_base-o, r = r1, center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module profile_wall_sub_sub() {
|
|
||||||
polygon([
|
|
||||||
[0,0],
|
|
||||||
[d_wall/2,0],
|
|
||||||
[d_wall/2,$dh-1.2-d_wall2+d_wall/2],
|
|
||||||
[d_wall2-d_clear,$dh-1.2],
|
|
||||||
[d_wall2-d_clear,$dh+h_base],
|
|
||||||
[0,$dh+h_base]
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
module profile_wall_sub() {
|
|
||||||
difference() {
|
|
||||||
profile_wall_sub_sub();
|
|
||||||
color("red")
|
|
||||||
offset(delta = d_clear)
|
|
||||||
translate([r_base-d_clear,$dh,0])
|
|
||||||
mirror([1,0,0])
|
|
||||||
profile_base();
|
|
||||||
square([d_wall,0]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module profile_wall() {
|
|
||||||
translate([r_base,0,0])
|
|
||||||
mirror([1,0,0])
|
|
||||||
difference() {
|
|
||||||
profile_wall_sub();
|
|
||||||
difference() {
|
|
||||||
translate([0, $dh+h_base-d_clear*sqrt(2), 0])
|
|
||||||
circle(r_base/2);
|
|
||||||
offset(r = r_f1)
|
|
||||||
offset(delta = -r_f1)
|
|
||||||
profile_wall_sub();
|
|
||||||
}
|
|
||||||
// remove any negtive geometry in edge cases
|
|
||||||
mirror([0,1,0])
|
|
||||||
square(100*length);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// lipless profile
|
|
||||||
module profile_wall2() {
|
|
||||||
translate([r_base,0,0])
|
|
||||||
mirror([1,0,0])
|
|
||||||
square([d_wall,$dh]);
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_wall(gx, gy, l) {
|
|
||||||
translate([0,0,h_base])
|
|
||||||
sweep_rounded(gx*l-2*r_base-0.5-0.001, gy*l-2*r_base-0.5-0.001)
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_bottom( h = 2.2, gx, gy, l ) {
|
|
||||||
translate([0,0,h_base+0.1])
|
|
||||||
rounded_rectangle(gx*l-0.5-d_wall/4, gy*l-0.5-d_wall/4, h, r_base+0.01);
|
|
||||||
}
|
|
||||||
|
|
||||||
module cut_move_unsafe(x, y, w, h) {
|
|
||||||
xx = ($gxx*length+d_magic);
|
|
||||||
yy = ($gyy*length+d_magic);
|
|
||||||
translate([(x)*xx/$gxx,(y)*yy/$gyy,0])
|
|
||||||
translate([(-xx+d_div)/2,(-yy+d_div)/2,0])
|
|
||||||
translate([(w*xx/$gxx-d_div)/2,(h*yy/$gyy-d_div)/2,0])
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_cutter(x,y,w,h,t,s) {
|
|
||||||
|
|
||||||
v_len_tab = d_tabh;
|
|
||||||
v_len_lip = d_wall2-d_wall+1.2;
|
|
||||||
v_cut_tab = d_tabh - (2*r_f1)/tan(a_tab);
|
|
||||||
v_cut_lip = d_wall2-d_wall-d_clear;
|
|
||||||
v_ang_tab = a_tab;
|
|
||||||
v_ang_lip = 45;
|
|
||||||
|
|
||||||
ycutfirst = y == 0 && style_lip == 0;
|
|
||||||
ycutlast = abs(y+h-$gyy)<0.001 && style_lip == 0;
|
|
||||||
xcutfirst = x == 0 && style_lip == 0;
|
|
||||||
xcutlast = abs(x+w-$gxx)<0.001 && style_lip == 0;
|
|
||||||
zsmall = ($dh+h_base)/7 < 3;
|
|
||||||
|
|
||||||
ylen = h*($gyy*length+d_magic)/$gyy-d_div;
|
|
||||||
xlen = w*($gxx*length+d_magic)/$gxx-d_div;
|
|
||||||
|
|
||||||
height = $dh;
|
|
||||||
extent = (abs(s) > 0 && ycutfirst ? d_wall2-d_wall-d_clear : 0);
|
|
||||||
tab = (zsmall || t == 5) ? (ycutlast?v_len_lip:0) : v_len_tab;
|
|
||||||
ang = (zsmall || t == 5) ? (ycutlast?v_ang_lip:0) : v_ang_tab;
|
|
||||||
cut = (zsmall || t == 5) ? (ycutlast?v_cut_lip:0) : v_cut_tab;
|
|
||||||
style = (t > 1 && t < 5) ? t-3 : (x == 0 ? -1 : xcutlast ? 1 : 0);
|
|
||||||
|
|
||||||
translate([0,ylen/2,h_base+h_bot])
|
|
||||||
rotate([90,0,-90]) {
|
|
||||||
|
|
||||||
if (!zsmall && xlen - d_tabw > 4*r_f2 && t != 0) {
|
|
||||||
fillet_cutter(3,"bisque")
|
|
||||||
difference() {
|
|
||||||
transform_tab(style, xlen, ((xcutfirst&&style==-1)||(xcutlast&&style==1))?v_cut_lip:0)
|
|
||||||
translate([ycutlast?v_cut_lip:0,0])
|
|
||||||
profile_cutter(height-h_bot, ylen/2, s);
|
|
||||||
|
|
||||||
if (xcutfirst)
|
|
||||||
translate([0,0,(xlen/2-r_f2)-v_cut_lip])
|
|
||||||
cube([ylen,height,v_cut_lip*2]);
|
|
||||||
|
|
||||||
if (xcutlast)
|
|
||||||
translate([0,0,-(xlen/2-r_f2)-v_cut_lip])
|
|
||||||
cube([ylen,height,v_cut_lip*2]);
|
|
||||||
}
|
|
||||||
if (t != 0 && t != 5)
|
|
||||||
fillet_cutter(2,"indigo")
|
|
||||||
difference() {
|
|
||||||
transform_tab(style, xlen, ((xcutfirst&&style==-1)||(xcutlast&&style==1))?v_cut_lip:0)
|
|
||||||
difference() {
|
|
||||||
intersection() {
|
|
||||||
profile_cutter(height-h_bot, ylen-extent, s);
|
|
||||||
profile_cutter_tab(height-h_bot, v_len_tab, v_ang_tab);
|
|
||||||
}
|
|
||||||
if (ycutlast) profile_cutter_tab(height-h_bot, v_len_lip, 45);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (xcutfirst)
|
|
||||||
translate([ylen/2,0,xlen/2])
|
|
||||||
rotate([0,90,0])
|
|
||||||
transform_main(2*ylen)
|
|
||||||
profile_cutter_tab(height-h_bot, v_len_lip, v_ang_lip);
|
|
||||||
|
|
||||||
if (xcutlast)
|
|
||||||
translate([ylen/2,0,-xlen/2])
|
|
||||||
rotate([0,-90,0])
|
|
||||||
transform_main(2*ylen)
|
|
||||||
profile_cutter_tab(height-h_bot, v_len_lip, v_ang_lip);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
fillet_cutter(1,"seagreen")
|
|
||||||
translate([0,0,xcutlast?v_cut_lip/2:0])
|
|
||||||
translate([0,0,xcutfirst?-v_cut_lip/2:0])
|
|
||||||
transform_main(xlen-(xcutfirst?v_cut_lip:0)-(xcutlast?v_cut_lip:0))
|
|
||||||
translate([cut,0])
|
|
||||||
profile_cutter(height-h_bot, ylen-extent-cut-(!s&&ycutfirst?v_cut_lip:0), s);
|
|
||||||
|
|
||||||
fillet_cutter(0,"hotpink")
|
|
||||||
difference() {
|
|
||||||
transform_main(xlen)
|
|
||||||
difference() {
|
|
||||||
profile_cutter(height-h_bot, ylen-extent, s);
|
|
||||||
|
|
||||||
if (!((zsmall || t == 5) && !ycutlast))
|
|
||||||
profile_cutter_tab(height-h_bot, tab, ang);
|
|
||||||
|
|
||||||
if (!(abs(s) > 0)&& y == 0)
|
|
||||||
translate([ylen-extent,0,0])
|
|
||||||
mirror([1,0,0])
|
|
||||||
profile_cutter_tab(height-h_bot, v_len_lip, v_ang_lip);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (xcutfirst)
|
|
||||||
color("indigo")
|
|
||||||
translate([ylen/2+0.001,0,xlen/2+0.001])
|
|
||||||
rotate([0,90,0])
|
|
||||||
transform_main(2*ylen)
|
|
||||||
profile_cutter_tab(height-h_bot, v_len_lip, v_ang_lip);
|
|
||||||
|
|
||||||
if (xcutlast)
|
|
||||||
color("indigo")
|
|
||||||
translate([ylen/2+0.001,0,-xlen/2+0.001])
|
|
||||||
rotate([0,-90,0])
|
|
||||||
transform_main(2*ylen)
|
|
||||||
profile_cutter_tab(height-h_bot, v_len_lip, v_ang_lip);
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module transform_main(xlen) {
|
|
||||||
translate([0,0,-(xlen-2*r_f2)/2])
|
|
||||||
linear_extrude(xlen-2*r_f2)
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
|
|
||||||
module transform_tab(type, xlen, cut) {
|
|
||||||
mirror([0,0,type==1?1:0])
|
|
||||||
copy_mirror([0,0,-(abs(type)-1)])
|
|
||||||
translate([0,0,-(xlen)/2])
|
|
||||||
translate([0,0,r_f2])
|
|
||||||
linear_extrude((xlen-d_tabw-abs(cut))/(1-(abs(type)-1))-2*r_f2)
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
|
|
||||||
module fillet_cutter(t = 0, c = "goldenrod") {
|
|
||||||
color(c)
|
|
||||||
minkowski() {
|
|
||||||
children();
|
|
||||||
sphere(r = r_f2-t/1000);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module profile_cutter(h, l, s) {
|
|
||||||
scoop = max(s*$dh/2-r_f2,0);
|
|
||||||
translate([r_f2,r_f2])
|
|
||||||
hull() {
|
|
||||||
if (l-scoop-2*r_f2 > 0)
|
|
||||||
square(0.1);
|
|
||||||
if (scoop < h) {
|
|
||||||
translate([l-2*r_f2,h-r_f2/2])
|
|
||||||
mirror([1,1])
|
|
||||||
square(0.1);
|
|
||||||
|
|
||||||
translate([0,h-r_f2/2])
|
|
||||||
mirror([0,1])
|
|
||||||
square(0.1);
|
|
||||||
}
|
|
||||||
difference() {
|
|
||||||
translate([l-scoop-2*r_f2, scoop])
|
|
||||||
if (scoop != 0) {
|
|
||||||
intersection() {
|
|
||||||
circle(scoop);
|
|
||||||
mirror([0,1]) square(2*scoop);
|
|
||||||
}
|
|
||||||
} else mirror([1,0]) square(0.1);
|
|
||||||
translate([l-scoop-2*r_f2,-1])
|
|
||||||
square([-(l-scoop-2*r_f2),2*h]);
|
|
||||||
|
|
||||||
translate([0,h])
|
|
||||||
square([2*l,scoop]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module profile_cutter_tab(h, tab, ang) {
|
|
||||||
if (tab > 0)
|
|
||||||
color("blue")
|
|
||||||
offset(delta = r_f2)
|
|
||||||
polygon([[0,h],[tab,h],[0,h-tab*tan(ang)]]);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// ==== Utilities =====
|
|
||||||
|
|
||||||
function clp(x,a,b) = min(max(x,a),b);
|
|
||||||
|
|
||||||
module rounded_rectangle(length, width, height, rad) {
|
|
||||||
linear_extrude(height)
|
|
||||||
offset(rad)
|
|
||||||
offset(-rad)
|
|
||||||
square([length,width], center = true);
|
|
||||||
}
|
|
||||||
|
|
||||||
module rounded_square(length, height, rad) {
|
|
||||||
rounded_rectangle(length, length, height, rad);
|
|
||||||
}
|
|
||||||
|
|
||||||
module copy_mirror(vec=[0,1,0]) {
|
|
||||||
children();
|
|
||||||
if (vec != [0,0,0])
|
|
||||||
mirror(vec)
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
|
|
||||||
module pattern_linear(x = 1, y = 1, sx = 0, sy = 0) {
|
|
||||||
yy = sy <= 0 ? sx : sy;
|
|
||||||
translate([-(x-1)*sx/2,-(y-1)*yy/2,0])
|
|
||||||
for (i = [1:ceil(x)])
|
|
||||||
for (j = [1:ceil(y)])
|
|
||||||
translate([(i-1)*sx,(j-1)*yy,0])
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
|
|
||||||
module pattern_circular(n=2) {
|
|
||||||
for (i = [1:n])
|
|
||||||
rotate(i*360/n)
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
|
|
||||||
module sweep_rounded(w=10, h=10) {
|
|
||||||
union() pattern_circular(2) {
|
|
||||||
copy_mirror([1,0,0])
|
|
||||||
translate([w/2,h/2,0])
|
|
||||||
rotate_extrude(angle = 90, convexity = 4)
|
|
||||||
children();
|
|
||||||
|
|
||||||
translate([w/2,0,0])
|
|
||||||
rotate([90,0,0])
|
|
||||||
linear_extrude(height = h, center = true)
|
|
||||||
children();
|
|
||||||
|
|
||||||
rotate([0,0,90])
|
|
||||||
translate([h/2,0,0])
|
|
||||||
rotate([90,0,0])
|
|
||||||
linear_extrude(height = w, center = true)
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
|
@ -1,556 +0,0 @@
|
||||||
include <gridfinity-rebuilt-utility.scad>
|
|
||||||
|
|
||||||
// ===== INFORMATION ===== //
|
|
||||||
/*
|
|
||||||
IMPORTANT: rendering will be better for analyzing the model if fast-csg is enabled. As of writing, this feature is only available in the development builds and not the official release of OpenSCAD, but it makes rendering only take a couple seconds, even for comically large bins. Enable it in Edit > Preferences > Features > fast-csg
|
|
||||||
|
|
||||||
https://github.com/kennetek/gridfinity-rebuilt-openscad
|
|
||||||
|
|
||||||
*/
|
|
||||||
|
|
||||||
// ===== PARAMETERS ===== //
|
|
||||||
|
|
||||||
/* [Special Variables] */
|
|
||||||
$fa = 8;
|
|
||||||
$fs = 0.25;
|
|
||||||
|
|
||||||
/* [Bin or Base] */
|
|
||||||
type = 0; // [0:bin, 1:base]
|
|
||||||
|
|
||||||
/* [Printer Settings] */
|
|
||||||
// extrusion width (walls will be twice this size)
|
|
||||||
nozzle = 0.6;
|
|
||||||
// slicer layer size
|
|
||||||
layer = 0.35;
|
|
||||||
// number of base layers on build plate
|
|
||||||
bottom_layer = 3;
|
|
||||||
|
|
||||||
/* [General Settings] */
|
|
||||||
// number of bases along x-axis
|
|
||||||
gridx = 1;
|
|
||||||
// number of bases along y-axis
|
|
||||||
gridy = 1;
|
|
||||||
// bin height. See bin height information and "gridz_define" below.
|
|
||||||
gridz = 6;
|
|
||||||
// base unit
|
|
||||||
length = 42;
|
|
||||||
// number of compartments along x-axis
|
|
||||||
n_divx = 2;
|
|
||||||
|
|
||||||
/* [Toggles] */
|
|
||||||
// toggle holes on the base for magnet
|
|
||||||
enable_holes = true;
|
|
||||||
// round up the bin height to match the closest 7mm unit
|
|
||||||
enable_zsnap = false;
|
|
||||||
// toggle the lip on the top of the bin that allows stacking
|
|
||||||
enable_lip = true;
|
|
||||||
// chamfer inside bin for easy part removal
|
|
||||||
enable_scoop_chamfer = true;
|
|
||||||
// funnel-like features on the back of tabs for fingers to grab
|
|
||||||
enable_funnel = true;
|
|
||||||
// front inset (added for strength when there is a scoop)
|
|
||||||
enable_inset = true;
|
|
||||||
// "pinches" the top lip of the bin, for added strength
|
|
||||||
enable_pinch = true;
|
|
||||||
|
|
||||||
/* [Styles] */
|
|
||||||
// determine what the variable "gridz" applies to based on your use case
|
|
||||||
gridz_define = 0; // [0:gridz is the height of bins in units of 7mm increments - Zack's method,1:gridz is the internal height in millimeters, 2:gridz is the overall external height of the bin in millimeters]
|
|
||||||
// how tabs are implemented
|
|
||||||
style_tab = 0; // [0:continuous, 1:broken, 2:auto, 3:right, 4:center, 5:left, 6:none]
|
|
||||||
// where to put X cutouts for attaching bases
|
|
||||||
// selecting none will also disable crosses on bases
|
|
||||||
style_base = 0; // [0:all, 1:corners, 2:edges, 3:auto, 4:none]
|
|
||||||
|
|
||||||
// tab angle
|
|
||||||
a_tab = 40;
|
|
||||||
|
|
||||||
|
|
||||||
// ===== IMPLEMENTATION ===== //
|
|
||||||
|
|
||||||
color("tomato")
|
|
||||||
if (type != 0) gridfinityBaseVase(); // Generate a single base
|
|
||||||
else gridfinityVase(); // Generate the bin
|
|
||||||
|
|
||||||
|
|
||||||
// ===== CONSTRUCTION ===== //
|
|
||||||
|
|
||||||
d_bottom = layer*(max(bottom_layer,1));
|
|
||||||
x_l = length/2;
|
|
||||||
|
|
||||||
dht = (gridz_define==0)?gridz*7 : (gridz_define==1)?h_bot+gridz+h_base : gridz-(enable_lip?3.8:0);
|
|
||||||
d_height = (enable_zsnap?((abs(dht)%7==0)?dht:dht+7-abs(dht)%7):dht)-h_base;
|
|
||||||
|
|
||||||
f2c = sqrt(2)*(sqrt(2)-1); // fillet to chamfer ratio
|
|
||||||
me = ((gridx*length-0.5)/n_divx)-nozzle*4-r_fo1-12.7-4;
|
|
||||||
m = min(d_tabw/1.8 + max(0,me), d_tabw/1.25);
|
|
||||||
d_ramp = f2c*(length*((d_height-2)/7+1)/12-r_f2)+d_wall2;
|
|
||||||
d_edge = ((gridx*length-0.5)/n_divx-d_tabw-r_fo1)/2;
|
|
||||||
n_st = gridz <= 3 ? 6 : d_edge < 2 && style_tab != 0 && style_tab != 6 ? 1 : style_tab == 1 && n_divx <= 1? 0 : style_tab;
|
|
||||||
|
|
||||||
n_x = (n_st==0?1:n_divx);
|
|
||||||
spacing = (gridx*length-0.5)/(n_divx);
|
|
||||||
shift = n_st==3?-1:n_st==5?1:0;
|
|
||||||
shiftauto = function (a,b) n_st!=2?0:a==1?-1:a==b?1:0;
|
|
||||||
|
|
||||||
xAll = function (a,b) true;
|
|
||||||
xCorner = function(a,b) (a==1||a==gridx)&&(b==1||b==gridy);
|
|
||||||
xEdge = function(a,b) (a==1)||(a==gridx)||(b==1)||(b==gridy);
|
|
||||||
xAuto = function(a,b) xCorner(a,b) || (a%2==1 && b%2 == 1);
|
|
||||||
xNone = function(a,b) false;
|
|
||||||
xFunc = [xAll, xCorner, xEdge, xAuto, xNone];
|
|
||||||
|
|
||||||
|
|
||||||
module gridfinityVase() {
|
|
||||||
$dh = d_height;
|
|
||||||
difference() {
|
|
||||||
union() {
|
|
||||||
difference() {
|
|
||||||
block_vase_base();
|
|
||||||
|
|
||||||
if (n_st != 6)
|
|
||||||
transform_style()
|
|
||||||
transform_vtab_base((n_st<2?gridx*length/n_x-0.5-r_fo1:d_tabw)-nozzle*4)
|
|
||||||
block_tab_base(-nozzle*sqrt(2));
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enable_scoop_chamfer)
|
|
||||||
intersection() {
|
|
||||||
block_vase();
|
|
||||||
translate([0,gridy*length/2-0.25-d_wall2/2,d_height/2+0.1])
|
|
||||||
cube([gridx*length,d_wall2,d_height-0.2],center=true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enable_funnel && gridz > 3)
|
|
||||||
pattern_linear((n_st==0?n_divx>1?n_divx:gridx:1), 1, (gridx*length-r_fo1)/(n_st==0?n_divx>1?n_divx:gridx:1))
|
|
||||||
transform_funnel()
|
|
||||||
block_funnel_outside();
|
|
||||||
|
|
||||||
if (n_divx > 1)
|
|
||||||
pattern_linear(n_divx-1,1,(gridx*length-0.5)/(n_divx))
|
|
||||||
block_divider();
|
|
||||||
|
|
||||||
if (n_divx < 1)
|
|
||||||
pattern_linear(n_st == 0 ? n_divx>1 ? n_divx-1 : gridx-1 : 1, 1, (gridx*length-r_fo1)/((n_divx>1 ? n_divx : gridx)))
|
|
||||||
block_tabsupport();
|
|
||||||
}
|
|
||||||
|
|
||||||
if (enable_funnel && gridz > 3)
|
|
||||||
pattern_linear((n_st==0?n_divx>1?n_divx:gridx:1), 1, (gridx*length-r_fo1)/(n_st==0?n_divx>1?n_divx:gridx:1))
|
|
||||||
transform_funnel()
|
|
||||||
block_funnel_inside();
|
|
||||||
|
|
||||||
if (!enable_lip)
|
|
||||||
translate([0,0,1.5*d_height])
|
|
||||||
cube([gridx*length,gridy*length,d_height], center=true);
|
|
||||||
|
|
||||||
block_x();
|
|
||||||
block_inset();
|
|
||||||
if (enable_pinch)
|
|
||||||
block_pinch();
|
|
||||||
|
|
||||||
if (bottom_layer <= 0)
|
|
||||||
translate([0,0,-50+layer+0.01])
|
|
||||||
cube([gridx*length*10,gridy*length*10,100], center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module gridfinityBaseVase() {
|
|
||||||
difference() {
|
|
||||||
union() {
|
|
||||||
difference() {
|
|
||||||
intersection() {
|
|
||||||
block_base_blank(0);
|
|
||||||
translate([0,0,-h_base-1])
|
|
||||||
rounded_rectangle(length-0.5-0.005, length-0.5-0.005, h_base*10, r_fo1/2+0.001);
|
|
||||||
}
|
|
||||||
translate([0,0,0.01])
|
|
||||||
difference() {
|
|
||||||
block_base_blank(nozzle*4);
|
|
||||||
translate([0,0,-h_base])
|
|
||||||
cube([length*2,length*2,d_bottom*2],center=true);
|
|
||||||
}
|
|
||||||
// magic slice
|
|
||||||
rotate([0,0,90])
|
|
||||||
translate([0,0,-h_base+d_bottom+0.01])
|
|
||||||
cube([0.001,length*gridx,d_height+d_bottom*2]);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
pattern_circular(4)
|
|
||||||
intersection() {
|
|
||||||
rotate([0,0,45])
|
|
||||||
translate([-nozzle,3,-h_base+d_bottom+0.01])
|
|
||||||
cube([nozzle*2,length*gridx,d_height+d_bottom*2]);
|
|
||||||
|
|
||||||
block_base_blank(nozzle*4-0.1);
|
|
||||||
}
|
|
||||||
if (enable_holes)
|
|
||||||
pattern_circular(4)
|
|
||||||
block_magnet_blank(nozzle);
|
|
||||||
}
|
|
||||||
if (enable_holes)
|
|
||||||
pattern_circular(4)
|
|
||||||
block_magnet_blank(0, false);
|
|
||||||
|
|
||||||
translate([0,0,h_base/2])
|
|
||||||
cube([length*2, length*2, h_base], center = true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (style_base != 4)
|
|
||||||
linear_extrude(d_bottom)
|
|
||||||
profile_x(0.1);
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_magnet_blank(o = 0, half = true) {
|
|
||||||
translate([d_hole/2,d_hole/2,-h_base+0.1])
|
|
||||||
difference() {
|
|
||||||
hull() {
|
|
||||||
cylinder(r = r_hole2+o, h = h_hole*2, center = true);
|
|
||||||
cylinder(r = (r_hole2+o)-(h_base+0.1-h_hole), h = (h_base+0.1)*2, center = true);
|
|
||||||
}
|
|
||||||
if (half)
|
|
||||||
mirror([0,0,1])
|
|
||||||
cylinder(r=(r_hole2+o)*2, h = (h_base+0.1)*4);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_base_blank(o = 0) {
|
|
||||||
mirror([0,0,1]) {
|
|
||||||
hull() {
|
|
||||||
rounded_square(length-o-0.05-2*r_c2-2*r_c1, h_base, r_fo3/2);
|
|
||||||
rounded_square(length-o-0.05-2*r_c2, h_base-r_c1, r_fo2/2);
|
|
||||||
}
|
|
||||||
hull() {
|
|
||||||
rounded_square(length-o-0.05-2*r_c2, r_c2, r_fo2/2);
|
|
||||||
mirror([0,0,1])
|
|
||||||
rounded_square(length-o-0.05, d_bottom, r_fo1/2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_pinch() {
|
|
||||||
sweep_rounded(gridx*length-2*r_base-0.5-0.001, gridy*length-2*r_base-0.5-0.001)
|
|
||||||
translate([r_base,0,0])
|
|
||||||
mirror([1,0,0])
|
|
||||||
translate([0,-(-d_height-h_base/2+r_c1),0])
|
|
||||||
copy_mirror([0,1,0])
|
|
||||||
difference() {
|
|
||||||
offset(delta = -nozzle*sqrt(2))
|
|
||||||
translate([0,-d_height-h_base/2+r_c1,0])
|
|
||||||
union() {
|
|
||||||
profile_wall_sub();
|
|
||||||
mirror([1,0,0])
|
|
||||||
square([10,d_height+h_base]);
|
|
||||||
}
|
|
||||||
|
|
||||||
translate([0,-50,0])
|
|
||||||
square([100,100], center = true);
|
|
||||||
|
|
||||||
translate([d_wall2-nozzle*2-d_clear*2,0,0])
|
|
||||||
square(r_c2*2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_tabsupport() {
|
|
||||||
intersection() {
|
|
||||||
translate([0,0,0.1])
|
|
||||||
block_vase(d_height*4);
|
|
||||||
|
|
||||||
cube([nozzle*2, gridy*length, d_height*3], center=true);
|
|
||||||
|
|
||||||
transform_vtab_base(gridx*length*2)
|
|
||||||
block_tab_base(-nozzle*sqrt(2));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_divider() {
|
|
||||||
difference() {
|
|
||||||
intersection() {
|
|
||||||
translate([0,0,0.1])
|
|
||||||
block_vase();
|
|
||||||
cube([nozzle*2, gridy*length, d_height*2], center=true);
|
|
||||||
}
|
|
||||||
|
|
||||||
if (n_st == 0) block_tab(0.1);
|
|
||||||
else block_divider_edgecut();
|
|
||||||
|
|
||||||
// cut divider clearance on negative Y side
|
|
||||||
translate([-gridx*length/2,-(gridy*length/2-0.25),0])
|
|
||||||
cube([gridx*length,nozzle*2+0.1,d_height*2]);
|
|
||||||
|
|
||||||
// cut divider clearance on positive Y side
|
|
||||||
mirror([0,1,0])
|
|
||||||
if (enable_scoop_chamfer)
|
|
||||||
translate([-gridx*length/2,-(gridy*length/2-0.25),0])
|
|
||||||
cube([gridx*length,d_wall2+0.1,d_height*2]);
|
|
||||||
else block_divider_edgecut();
|
|
||||||
|
|
||||||
// cut divider to have clearance with scoop
|
|
||||||
if (enable_scoop_chamfer)
|
|
||||||
transform_scoop()
|
|
||||||
offset(delta = 0.1)
|
|
||||||
polygon([
|
|
||||||
[0,0],
|
|
||||||
[d_ramp,d_ramp],
|
|
||||||
[d_ramp,d_ramp+nozzle/sqrt(2)],
|
|
||||||
[-nozzle/sqrt(2),0]
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// divider slices
|
|
||||||
difference() {
|
|
||||||
for (i = [0:(d_height-d_bottom)/(layer)]) {
|
|
||||||
|
|
||||||
if (2*i*layer < d_height-layer/2-d_bottom-0.1)
|
|
||||||
mirror([0,1,0])
|
|
||||||
translate([0,(gridy*length/2-0.25-nozzle)/2,layer/2+d_bottom+2*i*layer])
|
|
||||||
cube([nozzle*2-0.01,gridy*length/2-0.25-nozzle,layer],center=true);
|
|
||||||
|
|
||||||
if ((2*i+1)*layer < d_height-layer/2-d_bottom-0.1)
|
|
||||||
translate([0,(gridy*length/2-0.25-nozzle)/2,layer/2+d_bottom+(2*i+1)*layer])
|
|
||||||
cube([nozzle*2-0.01,gridy*length/2-0.25-nozzle,layer],center=true);
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
// divider slices cut to tabs
|
|
||||||
if (n_st == 0)
|
|
||||||
transform_style()
|
|
||||||
transform_vtab_base((n_st<2?gridx*length/n_x-0.5-r_fo1:d_tabw)-nozzle*4)
|
|
||||||
block_tab_base(-nozzle*sqrt(2));
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_divider_edgecut() {
|
|
||||||
translate([-50,-gridy*length/2+0.25,0])
|
|
||||||
rotate([90,0,90])
|
|
||||||
linear_extrude(100)
|
|
||||||
offset(delta = 0.1)
|
|
||||||
profile_wall_sub();
|
|
||||||
}
|
|
||||||
|
|
||||||
module transform_funnel() {
|
|
||||||
if (me > 6 && enable_funnel && gridz > 3 && n_st != 6)
|
|
||||||
transform_style()
|
|
||||||
render()
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_funnel_inside() {
|
|
||||||
intersection() {
|
|
||||||
block_tabscoop(m-nozzle*3*sqrt(2), 0.003, nozzle*2, 0.01);
|
|
||||||
block_tab(0.1);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_funnel_outside() {
|
|
||||||
intersection() {
|
|
||||||
difference() {
|
|
||||||
block_tabscoop(m, 0, 0, 0);
|
|
||||||
block_tabscoop(m-nozzle*4*sqrt(2), 0.003, nozzle*2, -1);
|
|
||||||
}
|
|
||||||
block_tab(-nozzle*sqrt(2)/2);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_vase_base() {
|
|
||||||
difference() {
|
|
||||||
// base
|
|
||||||
translate([0,0,-h_base]) {
|
|
||||||
translate([0,0,-0.1])
|
|
||||||
color("firebrick")
|
|
||||||
block_bottom(d_bottom, gridx, gridy, length);
|
|
||||||
color("royalblue")
|
|
||||||
block_wall(gridx, gridy, length) {
|
|
||||||
if (enable_lip) profile_wall();
|
|
||||||
else profile_wall2();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
// magic slice
|
|
||||||
rotate([0,0,90])
|
|
||||||
mirror([0,1,0])
|
|
||||||
translate([0,0,d_bottom+0.001])
|
|
||||||
cube([0.001,length*gridx,d_height+d_bottom*2]);
|
|
||||||
}
|
|
||||||
|
|
||||||
// scoop piece
|
|
||||||
if (enable_scoop_chamfer)
|
|
||||||
transform_scoop()
|
|
||||||
polygon([
|
|
||||||
[0,0],
|
|
||||||
[d_ramp,d_ramp],
|
|
||||||
[d_ramp,d_ramp+0.6/sqrt(2)],
|
|
||||||
[-0.6/sqrt(2),0]
|
|
||||||
]);
|
|
||||||
|
|
||||||
// outside tab cutter
|
|
||||||
if (n_st != 6)
|
|
||||||
translate([-(n_x-1)*spacing/2,0,0])
|
|
||||||
for (i = [1:n_x])
|
|
||||||
translate([(i-1)*spacing,0,0])
|
|
||||||
translate([shiftauto(i,n_x)*d_edge + shift*d_edge,0,0])
|
|
||||||
intersection() {
|
|
||||||
block_vase();
|
|
||||||
transform_vtab_base(n_st<2?gridx*length/n_x-0.5-r_fo1:d_tabw)
|
|
||||||
profile_tab();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module profile_wall_sub_sub() {
|
|
||||||
polygon([
|
|
||||||
[0,0],
|
|
||||||
[nozzle*2,0],
|
|
||||||
[nozzle*2,d_height-1.2-d_wall2+nozzle*2],
|
|
||||||
[d_wall2-d_clear,d_height-1.2],
|
|
||||||
[d_wall2-d_clear,d_height+h_base],
|
|
||||||
[0,d_height+h_base]
|
|
||||||
]);
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_inset() {
|
|
||||||
ixx = (gridx*length-0.5)/2;
|
|
||||||
iyy = d_height/1.875;
|
|
||||||
izz = sqrt(ixx^2+iyy^2)*tan(40);
|
|
||||||
if (enable_scoop_chamfer && enable_inset)
|
|
||||||
difference() {
|
|
||||||
intersection() {
|
|
||||||
rotate([0,90,0])
|
|
||||||
translate([-iyy,0,0])
|
|
||||||
block_inset_sub(iyy, gridx*length, 45);
|
|
||||||
|
|
||||||
rotate([0,90,0])
|
|
||||||
translate([-iyy,0,0])
|
|
||||||
rotate([0,90,0])
|
|
||||||
block_inset_sub(ixx, d_height*2, 45);
|
|
||||||
}
|
|
||||||
|
|
||||||
mirror([0,1,0])
|
|
||||||
translate([-gridx*length/2,-(gridy*length-0.5)/2+d_wall2-2*nozzle,0])
|
|
||||||
cube([gridx*length,izz,d_height*2]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_inset_sub(x, y, ang) {
|
|
||||||
translate([0,(gridy*length-0.5)/2+r_fo1/2,0])
|
|
||||||
mirror([0,1,0])
|
|
||||||
linear_extrude(y,center=true)
|
|
||||||
polygon([[-x,0],[x,0],[0,x*tan(ang)]]);
|
|
||||||
}
|
|
||||||
|
|
||||||
module transform_style() {
|
|
||||||
translate([-(n_x-1)*spacing/2,0,0])
|
|
||||||
for (i = [1:n_x])
|
|
||||||
translate([(i-1)*spacing,0,0])
|
|
||||||
translate([shiftauto(i,n_x)*d_edge + shift*d_edge,0,0])
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_flushscoop() {
|
|
||||||
translate([0,gridy*length/2-d_wall2-nozzle/2-1,d_height/2])
|
|
||||||
linear_extrude(d_height)
|
|
||||||
union() {
|
|
||||||
copy_mirror([1,0,0])
|
|
||||||
polygon([[0,0],[gridx*length/2-r_fo1/2,0],[gridx*length/2-r_fo1/2,1],[gridx*length/2-r_fo1/2-r_c1*5,d_wall2-nozzle*2+1],[0,d_wall2-nozzle*2+1]]);
|
|
||||||
}
|
|
||||||
|
|
||||||
transform_scoop()
|
|
||||||
polygon([[0,0],[d_ramp,0],[d_ramp,d_ramp]]);
|
|
||||||
}
|
|
||||||
|
|
||||||
module profile_tab() {
|
|
||||||
union() {
|
|
||||||
copy_mirror([0,1,0])
|
|
||||||
polygon([[0,0],[d_tabh*cos(a_tab),0],[d_tabh*cos(a_tab),d_tabh*sin(a_tab)]]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module profile_tabscoop(m) {
|
|
||||||
polyhedron([[m/2,0,0],[0,-m,0],[-m/2,0,0],[0,0,m]], [[0,2,1],[1,2,3],[0,1,3],[0,3,2]]);
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_tabscoop(a=m, b=0, c=0, d=-1) {
|
|
||||||
translate([0,d_tabh*cos(a_tab)-length*gridy/2+0.25+b,0])
|
|
||||||
difference() {
|
|
||||||
translate([0,0,-d_tabh*sin(a_tab)*2+d_height+2.1])
|
|
||||||
profile_tabscoop(a);
|
|
||||||
|
|
||||||
translate([-gridx*length/2,-m,-m])
|
|
||||||
cube([gridx*length,m-d_tabh*cos(a_tab)+0.005+c,d_height*20]);
|
|
||||||
|
|
||||||
if (d >= 0)
|
|
||||||
translate([0,0,-d_tabh*sin(a_tab)+d_height+m/2+d+2.1])
|
|
||||||
cube([gridx*length,gridy*length,m],center=true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module transform_vtab(a=0,b=1) {
|
|
||||||
transform_vtab_base(gridx*length/b-0.5-r_fo1+a)
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
|
|
||||||
module transform_vtab_base(a) {
|
|
||||||
translate([0,d_tabh*cos(a_tab)-length*gridy/2+0.25,-d_tabh*sin(a_tab)+d_height+2.1])
|
|
||||||
rotate([90,0,270])
|
|
||||||
linear_extrude(a, center=true)
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_tab(del, b=1) {
|
|
||||||
transform_vtab(-nozzle*4, b)
|
|
||||||
block_tab_base(del);
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_tab_base(del) {
|
|
||||||
offset(delta = del)
|
|
||||||
union() {
|
|
||||||
profile_tab();
|
|
||||||
translate([d_tabh*cos(a_tab),-d_tabh*sin(a_tab),0])
|
|
||||||
square([length,d_tabh*sin(a_tab)*2]);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module transform_scoop() {
|
|
||||||
intersection() {
|
|
||||||
block_vase();
|
|
||||||
translate([0,gridy*length/2-d_ramp,layer*max(bottom_layer*1)])
|
|
||||||
rotate([90,0,90])
|
|
||||||
linear_extrude(2*length*gridx,center=true)
|
|
||||||
children();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_vase(h = d_height*2) {
|
|
||||||
translate([0,0,-0.1])
|
|
||||||
rounded_rectangle(gridx*length-0.5-nozzle, gridy*length-0.5-nozzle, h, r_base+0.01-nozzle/2);
|
|
||||||
}
|
|
||||||
|
|
||||||
module profile_x(x_f = 3) {
|
|
||||||
difference() {
|
|
||||||
square([x_l,x_l],center=true);
|
|
||||||
|
|
||||||
pattern_circular(4)
|
|
||||||
translate([0,nozzle*sqrt(2),0])
|
|
||||||
rotate([0,0,45])
|
|
||||||
translate([x_f,x_f,0])
|
|
||||||
minkowski() {
|
|
||||||
square([x_l,x_l]);
|
|
||||||
circle(x_f);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_x() {
|
|
||||||
translate([-(gridx-1)*length/2,-(gridy-1)*length/2,0])
|
|
||||||
for (i = [1:gridx])
|
|
||||||
for (j = [1:gridy])
|
|
||||||
if (xFunc[style_base](i,j))
|
|
||||||
translate([(i-1)*length,(j-1)*length,0])
|
|
||||||
block_x_sub();
|
|
||||||
}
|
|
||||||
|
|
||||||
module block_x_sub() {
|
|
||||||
linear_extrude(d_bottom*2+0.01,center=true)
|
|
||||||
offset(0.05)
|
|
||||||
profile_x();
|
|
||||||
}
|
|
0
images/base_dimension.gif
Normal file → Executable file
Before Width: | Height: | Size: 674 KiB After Width: | Height: | Size: 674 KiB |
0
images/baseplate.gif
Normal file → Executable file
Before Width: | Height: | Size: 121 KiB After Width: | Height: | Size: 121 KiB |
0
images/compartment_dimension.gif
Normal file → Executable file
Before Width: | Height: | Size: 1.3 MiB After Width: | Height: | Size: 1.3 MiB |
0
images/custom_dimension.gif
Normal file → Executable file
Before Width: | Height: | Size: 166 KiB After Width: | Height: | Size: 166 KiB |
0
images/height_dimension.gif
Normal file → Executable file
Before Width: | Height: | Size: 1,013 KiB After Width: | Height: | Size: 1,013 KiB |
0
images/holes_dimension.gif
Normal file → Executable file
Before Width: | Height: | Size: 295 KiB After Width: | Height: | Size: 295 KiB |
0
images/lite.gif
Normal file → Executable file
Before Width: | Height: | Size: 177 KiB After Width: | Height: | Size: 177 KiB |
0
images/slicer_base.png
Normal file → Executable file
Before Width: | Height: | Size: 205 KiB After Width: | Height: | Size: 205 KiB |
0
images/slicer_bin.png
Normal file → Executable file
Before Width: | Height: | Size: 256 KiB After Width: | Height: | Size: 256 KiB |
0
images/slicer_holes.png
Normal file → Executable file
Before Width: | Height: | Size: 367 KiB After Width: | Height: | Size: 367 KiB |
0
images/slicer_holes_top.png
Normal file → Executable file
Before Width: | Height: | Size: 335 KiB After Width: | Height: | Size: 335 KiB |
0
images/spin.gif
Normal file → Executable file
Before Width: | Height: | Size: 460 KiB After Width: | Height: | Size: 460 KiB |
0
images/tab_dimension.gif
Normal file → Executable file
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.2 MiB |
0
images/vase_base.gif
Normal file → Executable file
Before Width: | Height: | Size: 16 KiB After Width: | Height: | Size: 16 KiB |
0
images/vase_bottom.gif
Normal file → Executable file
Before Width: | Height: | Size: 21 KiB After Width: | Height: | Size: 21 KiB |
0
images/vase_dividers.gif
Normal file → Executable file
Before Width: | Height: | Size: 118 KiB After Width: | Height: | Size: 118 KiB |
0
images/vase_features_back.gif
Normal file → Executable file
Before Width: | Height: | Size: 53 KiB After Width: | Height: | Size: 53 KiB |
0
images/vase_features_front.gif
Normal file → Executable file
Before Width: | Height: | Size: 43 KiB After Width: | Height: | Size: 43 KiB |
0
images/vase_tabs.gif
Normal file → Executable file
Before Width: | Height: | Size: 137 KiB After Width: | Height: | Size: 137 KiB |
BIN
img/favicon.ico
Executable file
After Width: | Height: | Size: 1.1 KiB |
157
index.html
Executable file
|
@ -0,0 +1,157 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html class="writer-html5" lang="en" >
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta name="description" content="None" />
|
||||||
|
<link rel="shortcut icon" href="img/favicon.ico" />
|
||||||
|
<title>Gridfinity Rebuilt</title>
|
||||||
|
<link rel="stylesheet" href="css/theme.css" />
|
||||||
|
<link rel="stylesheet" href="css/theme_extra.css" />
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Current page data
|
||||||
|
var mkdocs_page_name = "Home";
|
||||||
|
var mkdocs_page_input_path = "index.md";
|
||||||
|
var mkdocs_page_url = null;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="js/jquery-3.6.0.min.js" defer></script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="js/html5shiv.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
|
||||||
|
<script>hljs.initHighlightingOnLoad();</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="wy-body-for-nav" role="document">
|
||||||
|
|
||||||
|
<div class="wy-grid-for-nav">
|
||||||
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
|
||||||
|
<div class="wy-side-scroll">
|
||||||
|
<div class="wy-side-nav-search">
|
||||||
|
<a href="." class="icon icon-home"> Gridfinity Rebuilt
|
||||||
|
</a><div role="search">
|
||||||
|
<form id ="rtd-search-form" class="wy-form" action="./search.html" method="get">
|
||||||
|
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l1 current"><a class="reference internal current" href=".">Home</a>
|
||||||
|
<ul class="current">
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="bins/">Bins</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="baseplates/">Baseplates</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="lite/">Lite</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="vase/">Vase</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="constants/">Constants</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||||
|
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
|
||||||
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||||
|
<a href=".">Gridfinity Rebuilt</a>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<div class="wy-nav-content">
|
||||||
|
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
|
||||||
|
<ul class="wy-breadcrumbs">
|
||||||
|
<li><a href="." class="icon icon-home" alt="Docs"></a> »</li>
|
||||||
|
<li>Home</li>
|
||||||
|
<li class="wy-breadcrumbs-aside">
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||||
|
<div class="section" itemprop="articleBody">
|
||||||
|
|
||||||
|
<h2 id="introduction">Introduction</h2>
|
||||||
|
<p>Gridfinity rebuilt aims to remake the brilliant Gridfinity project from <a href="https://www.youtube.com/c/ZackFreedman/about">Zack Freedman</a> 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. </p>
|
||||||
|
<p>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. </p>
|
||||||
|
<p>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. </p>
|
||||||
|
<h2 id="getting-started">Getting Started</h2>
|
||||||
|
<p>For best results, use a version of OpenSCAD with the fast-csg feature. As of writing, this feature is only implemented in the <a href="https://openscad.org/downloads.html">development snapshots</a>. 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. </p>
|
||||||
|
<p>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. </p>
|
||||||
|
<h2 id="script-structure">Script Structure</h2>
|
||||||
|
<ul>
|
||||||
|
<li>Information (Imports / Script Details)</li>
|
||||||
|
<li>Parameters (Shown in Customizer)</li>
|
||||||
|
<li>Implementation (Executing the Parameters)</li>
|
||||||
|
<li>Construction (Script-Specific Modules and Constants)</li>
|
||||||
|
<li>Examples</li>
|
||||||
|
</ul>
|
||||||
|
<p>The two files which do not follow these conventions are <code>gridfinity-rebuilt-utility</code> and <code>gridfinity-rebuilt-constants</code>. 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. </p>
|
||||||
|
<p><strong>NOTE: This documentation is a work in progress, just like the rest of the repository, so parts may still be under construction.</strong></p>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div><footer>
|
||||||
|
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
|
||||||
|
<a href="bins/" class="btn btn-neutral float-right" title="Bins">Next <span class="icon icon-circle-arrow-right"></span></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div role="contentinfo">
|
||||||
|
<!-- Copyright etc -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="rst-versions" role="note" aria-label="Versions">
|
||||||
|
<span class="rst-current-version" data-toggle="rst-current-version">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
<span><a href="bins/" style="color: #fcfcfc">Next »</a></span>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<script>var base_url = '.';</script>
|
||||||
|
<script src="js/theme_extra.js" defer></script>
|
||||||
|
<script src="js/theme.js" defer></script>
|
||||||
|
<script src="search/main.js" defer></script>
|
||||||
|
<script defer>
|
||||||
|
window.onload = function () {
|
||||||
|
SphinxRtdTheme.Navigation.enable(true);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
||||||
|
|
||||||
|
<!--
|
||||||
|
MkDocs version : 1.4.2
|
||||||
|
Build Date UTC : 2023-02-14 23:59:29.811582+00:00
|
||||||
|
-->
|
4
js/html5shiv.min.js
vendored
Executable file
|
@ -0,0 +1,4 @@
|
||||||
|
/**
|
||||||
|
* @preserve HTML5 Shiv 3.7.3 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed
|
||||||
|
*/
|
||||||
|
!function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x<style>"+b+"</style>",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.3",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="<xyz></xyz>",k="hidden"in a,l=1==a.childNodes.length||function(){b.createElement("a");var a=b.createDocumentFragment();return"undefined"==typeof a.cloneNode||"undefined"==typeof a.createDocumentFragment||"undefined"==typeof a.createElement}()}catch(c){k=!0,l=!0}}();var t={elements:n.elements||"abbr article aside audio bdi canvas data datalist details dialog figcaption figure footer header hgroup main mark meter nav output picture progress section summary template time video",version:m,shivCSS:n.shivCSS!==!1,supportsUnknownElements:l,shivMethods:n.shivMethods!==!1,type:"default",shivDocument:j,createElement:g,createDocumentFragment:h,addElements:e};a.html5=t,j(b),"object"==typeof module&&module.exports&&(module.exports=t)}("undefined"!=typeof window?window:this,document);
|
2
js/jquery-3.6.0.min.js
vendored
Executable file
2
js/theme.js
Executable file
8
js/theme_extra.js
Executable file
|
@ -0,0 +1,8 @@
|
||||||
|
/*
|
||||||
|
* Assign 'docutils' class to tables so styling and
|
||||||
|
* JavaScript behavior is applied.
|
||||||
|
*
|
||||||
|
* https://github.com/mkdocs/mkdocs/issues/2028
|
||||||
|
*/
|
||||||
|
|
||||||
|
$('div.rst-content table').addClass('docutils');
|
298
lite/index.html
Executable file
|
@ -0,0 +1,298 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html class="writer-html5" lang="en" >
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<link rel="shortcut icon" href="../img/favicon.ico" />
|
||||||
|
<title>Lite - Gridfinity Rebuilt</title>
|
||||||
|
<link rel="stylesheet" href="../css/theme.css" />
|
||||||
|
<link rel="stylesheet" href="../css/theme_extra.css" />
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
|
||||||
|
|
||||||
|
<script>
|
||||||
|
// Current page data
|
||||||
|
var mkdocs_page_name = "Lite";
|
||||||
|
var mkdocs_page_input_path = "lite.md";
|
||||||
|
var mkdocs_page_url = null;
|
||||||
|
</script>
|
||||||
|
|
||||||
|
<script src="../js/jquery-3.6.0.min.js" defer></script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="../js/html5shiv.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
|
||||||
|
<script>hljs.initHighlightingOnLoad();</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="wy-body-for-nav" role="document">
|
||||||
|
|
||||||
|
<div class="wy-grid-for-nav">
|
||||||
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
|
||||||
|
<div class="wy-side-scroll">
|
||||||
|
<div class="wy-side-nav-search">
|
||||||
|
<a href=".." class="icon icon-home"> Gridfinity Rebuilt
|
||||||
|
</a><div role="search">
|
||||||
|
<form id ="rtd-search-form" class="wy-form" action="../search.html" method="get">
|
||||||
|
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="..">Home</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../bins/">Bins</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../baseplates/">Baseplates</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l1 current"><a class="reference internal current" href="./">Lite</a>
|
||||||
|
<ul class="current">
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#script-parameters">Script Parameters</a>
|
||||||
|
</li>
|
||||||
|
<li class="toctree-l2"><a class="reference internal" href="#modules">Modules</a>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l3"><a class="reference internal" href="#gridfinitylite">gridfinityLite</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../vase/">Vase</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="../constants/">Constants</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||||
|
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
|
||||||
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||||
|
<a href="..">Gridfinity Rebuilt</a>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<div class="wy-nav-content">
|
||||||
|
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
|
||||||
|
<ul class="wy-breadcrumbs">
|
||||||
|
<li><a href=".." class="icon icon-home" alt="Docs"></a> »</li>
|
||||||
|
<li>Lite</li>
|
||||||
|
<li class="wy-breadcrumbs-aside">
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||||
|
<div class="section" itemprop="articleBody">
|
||||||
|
|
||||||
|
<h1 id="gridfinity-rebuilt-lite">gridfinity-rebuilt-lite</h1>
|
||||||
|
<p>Generates stock bins, but with a twist: the bases are hollow. This is unable to be implemented directly into <code>gridfinity-rebuilt-bins</code> due to its surprisingly complex construction. It couldn't be a toggle without causing the structure of the script to fundamentally change (and become more complex) so it was moved to a separate file. Notably, there are some parameters missing, as they are incompatible with the lite variation. Additionally, the complex geometry means rendering is fairly slow, and currently causes many CSG errors. </p>
|
||||||
|
<p><img alt="Bin" src="../images/lite.gif" /></p>
|
||||||
|
<h2 id="script-parameters">Script Parameters</h2>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Parameter</th>
|
||||||
|
<th>Range</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>gridx</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>number of bases along the x-axis</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gridy</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>number of bases along the y-axis</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gridz</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>bin height. See bin height information and "gridz_define" below.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>length</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>length of one unit of the base. <br> default: 42 (The Answer to the Ultimate Question of Life, <br>the Universe, and Everything.)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>divx</td>
|
||||||
|
<td>{ n>0 | n∈Z }</td>
|
||||||
|
<td>number of compartments along X</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>divy</td>
|
||||||
|
<td>{ n>0 | n∈Z }</td>
|
||||||
|
<td>number of compartments along Y</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>enable_zsnap</td>
|
||||||
|
<td>boolean</td>
|
||||||
|
<td>automatically snap the bin size to the nearest 7mm increment. <br> default: true</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style_lip</td>
|
||||||
|
<td>{0, 1, 2}</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gridz_define</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style_tab</td>
|
||||||
|
<td>{ 0, 1, 2, 3, 4, 5 }</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style_hole</td>
|
||||||
|
<td>{ 0, 1, 2, 3 }</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>div_base_x</td>
|
||||||
|
<td>{ n>=0 | n∈Z }</td>
|
||||||
|
<td>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)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>div_base_y</td>
|
||||||
|
<td>{ n>=0 | n∈Z }</td>
|
||||||
|
<td>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)</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<p><br></p>
|
||||||
|
<h2 id="modules">Modules</h2>
|
||||||
|
<hr />
|
||||||
|
<h3 id="gridfinitylite">gridfinityLite</h3>
|
||||||
|
<p>Wrapper function that calls <a href="../bins/#gridfinityInit"><code>gridfinityInit</code></a> and <a href="../bins/#gridfinityBase"><code>gridfinityBase</code></a> functions (hence the sheer quantity of parameters). Like <a href="../bins/#gridfinityInit"><code>gridfinityInit</code></a>, it uses its children as cutters for the compartments. </p>
|
||||||
|
<p><strong><code>gridfinityLite(gridx, gridy, gridz, gridz_define, enable_lip, enable_zsnap, length, div_base_x, div_base_y, style_hole)</code></strong></p>
|
||||||
|
<table>
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th>Parameter</th>
|
||||||
|
<th>Range</th>
|
||||||
|
<th>Description</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>gridx</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>number of bases along the x-axis</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gridy</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>number of bases along the y-axis</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gridz</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>bin height. See bin height information and "gridz_define" below.</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>gridz_define</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style_lip</td>
|
||||||
|
<td>{0, 1, 2}</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>enable_zsnap</td>
|
||||||
|
<td>boolean</td>
|
||||||
|
<td>automatically snap the bin size to the nearest 7mm increment. <br> default: true</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>length</td>
|
||||||
|
<td>{ n>0 | n∈R }</td>
|
||||||
|
<td>length of one unit of the base. <br> default: 42 (The Answer to the Ultimate Question of Life, <br>the Universe, and Everything.)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>div_base_x</td>
|
||||||
|
<td>{ n>=0 | n∈Z }</td>
|
||||||
|
<td>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)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>div_base_y</td>
|
||||||
|
<td>{ n>=0 | n∈Z }</td>
|
||||||
|
<td>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)</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>style_hole</td>
|
||||||
|
<td>{ 0, 1, 2, 3 }</td>
|
||||||
|
<td>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</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<pre><code>// Example: generate a 3x3x6 bin with 2x2 compartments, that is hollow
|
||||||
|
gridfinityLite(gridx=3, gridy=3, gridz=6, gridz_define=0, enable_lip=true, enable_zsnap=false, length=42, div_base_x=0, div_base_y=0, style_hole=1) {
|
||||||
|
cutEqual(n_divx=2, n_divy=2, style_tab=1, enable_scoop = false);
|
||||||
|
}
|
||||||
|
</code></pre>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div><footer>
|
||||||
|
<div class="rst-footer-buttons" role="navigation" aria-label="Footer Navigation">
|
||||||
|
<a href="../baseplates/" class="btn btn-neutral float-left" title="Baseplates"><span class="icon icon-circle-arrow-left"></span> Previous</a>
|
||||||
|
<a href="../vase/" class="btn btn-neutral float-right" title="Vase">Next <span class="icon icon-circle-arrow-right"></span></a>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div role="contentinfo">
|
||||||
|
<!-- Copyright etc -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="rst-versions" role="note" aria-label="Versions">
|
||||||
|
<span class="rst-current-version" data-toggle="rst-current-version">
|
||||||
|
|
||||||
|
|
||||||
|
<span><a href="../baseplates/" style="color: #fcfcfc">« Previous</a></span>
|
||||||
|
|
||||||
|
|
||||||
|
<span><a href="../vase/" style="color: #fcfcfc">Next »</a></span>
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<script>var base_url = '..';</script>
|
||||||
|
<script src="../js/theme_extra.js" defer></script>
|
||||||
|
<script src="../js/theme.js" defer></script>
|
||||||
|
<script src="../search/main.js" defer></script>
|
||||||
|
<script defer>
|
||||||
|
window.onload = function () {
|
||||||
|
SphinxRtdTheme.Navigation.enable(true);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
12
mkdocs.yml
|
@ -1,12 +0,0 @@
|
||||||
site_name: Gridfinity Rebuilt
|
|
||||||
theme: readthedocs
|
|
||||||
nav:
|
|
||||||
- Home: index.md
|
|
||||||
- Bins: bins.md
|
|
||||||
- Baseplates: baseplates.md
|
|
||||||
- Lite: lite.md
|
|
||||||
- Vase: vase.md
|
|
||||||
- Constants: constants.md
|
|
||||||
plugins:
|
|
||||||
- search
|
|
||||||
- autorefs
|
|
132
search.html
Executable file
|
@ -0,0 +1,132 @@
|
||||||
|
<!DOCTYPE html>
|
||||||
|
<html class="writer-html5" lang="en" >
|
||||||
|
<head>
|
||||||
|
<meta charset="utf-8" />
|
||||||
|
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
|
||||||
|
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
|
||||||
|
<link rel="shortcut icon" href="./img/favicon.ico" />
|
||||||
|
<title>Gridfinity Rebuilt</title>
|
||||||
|
<link rel="stylesheet" href="./css/theme.css" />
|
||||||
|
<link rel="stylesheet" href="./css/theme_extra.css" />
|
||||||
|
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/styles/github.min.css" />
|
||||||
|
|
||||||
|
<script src="./js/jquery-3.6.0.min.js" defer></script>
|
||||||
|
<!--[if lt IE 9]>
|
||||||
|
<script src="./js/html5shiv.min.js"></script>
|
||||||
|
<![endif]-->
|
||||||
|
<script src="https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.5.0/highlight.min.js"></script>
|
||||||
|
<script>hljs.initHighlightingOnLoad();</script>
|
||||||
|
</head>
|
||||||
|
|
||||||
|
<body class="wy-body-for-nav" role="document">
|
||||||
|
|
||||||
|
<div class="wy-grid-for-nav">
|
||||||
|
<nav data-toggle="wy-nav-shift" class="wy-nav-side stickynav">
|
||||||
|
<div class="wy-side-scroll">
|
||||||
|
<div class="wy-side-nav-search">
|
||||||
|
<a href="./." class="icon icon-home"> Gridfinity Rebuilt
|
||||||
|
</a><div role="search">
|
||||||
|
<form id ="rtd-search-form" class="wy-form" action="./search.html" method="get">
|
||||||
|
<input type="text" name="q" placeholder="Search docs" title="Type search term here" />
|
||||||
|
</form>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="./.">Home</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="./bins/">Bins</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="./baseplates/">Baseplates</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="./lite/">Lite</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="./vase/">Vase</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<ul>
|
||||||
|
<li class="toctree-l1"><a class="reference internal" href="./constants/">Constants</a>
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</nav>
|
||||||
|
|
||||||
|
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap">
|
||||||
|
<nav class="wy-nav-top" role="navigation" aria-label="Mobile navigation menu">
|
||||||
|
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
|
||||||
|
<a href="./.">Gridfinity Rebuilt</a>
|
||||||
|
|
||||||
|
</nav>
|
||||||
|
<div class="wy-nav-content">
|
||||||
|
<div class="rst-content"><div role="navigation" aria-label="breadcrumbs navigation">
|
||||||
|
<ul class="wy-breadcrumbs">
|
||||||
|
<li><a href="./." class="icon icon-home" alt="Docs"></a> »</li>
|
||||||
|
<li class="wy-breadcrumbs-aside">
|
||||||
|
</li>
|
||||||
|
</ul>
|
||||||
|
<hr/>
|
||||||
|
</div>
|
||||||
|
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
|
||||||
|
<div class="section" itemprop="articleBody">
|
||||||
|
|
||||||
|
|
||||||
|
<h1 id="search">Search Results</h1>
|
||||||
|
|
||||||
|
<form id="content_search" action="search.html">
|
||||||
|
<span role="status" aria-live="polite" class="ui-helper-hidden-accessible"></span>
|
||||||
|
<input name="q" id="mkdocs-search-query" type="text" class="search_input search-query ui-autocomplete-input" placeholder="Search the Docs" autocomplete="off" autofocus title="Type search term here">
|
||||||
|
</form>
|
||||||
|
|
||||||
|
<div id="mkdocs-search-results" class="search-results" data-no-results-text="No results found">
|
||||||
|
Searching...
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div><footer>
|
||||||
|
|
||||||
|
<hr/>
|
||||||
|
|
||||||
|
<div role="contentinfo">
|
||||||
|
<!-- Copyright etc -->
|
||||||
|
</div>
|
||||||
|
|
||||||
|
Built with <a href="https://www.mkdocs.org/">MkDocs</a> using a <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a> provided by <a href="https://readthedocs.org">Read the Docs</a>.
|
||||||
|
</footer>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
</section>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<div class="rst-versions" role="note" aria-label="Versions">
|
||||||
|
<span class="rst-current-version" data-toggle="rst-current-version">
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
</span>
|
||||||
|
</div>
|
||||||
|
<script>var base_url = '.';</script>
|
||||||
|
<script src="./js/theme_extra.js" defer></script>
|
||||||
|
<script src="./js/theme.js" defer></script>
|
||||||
|
<script src="./search/main.js" defer></script>
|
||||||
|
<script defer>
|
||||||
|
window.onload = function () {
|
||||||
|
SphinxRtdTheme.Navigation.enable(true);
|
||||||
|
};
|
||||||
|
</script>
|
||||||
|
|
||||||
|
</body>
|
||||||
|
</html>
|
3475
search/lunr.js
Executable file
109
search/main.js
Executable file
|
@ -0,0 +1,109 @@
|
||||||
|
function getSearchTermFromLocation() {
|
||||||
|
var sPageURL = window.location.search.substring(1);
|
||||||
|
var sURLVariables = sPageURL.split('&');
|
||||||
|
for (var i = 0; i < sURLVariables.length; i++) {
|
||||||
|
var sParameterName = sURLVariables[i].split('=');
|
||||||
|
if (sParameterName[0] == 'q') {
|
||||||
|
return decodeURIComponent(sParameterName[1].replace(/\+/g, '%20'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function joinUrl (base, path) {
|
||||||
|
if (path.substring(0, 1) === "/") {
|
||||||
|
// path starts with `/`. Thus it is absolute.
|
||||||
|
return path;
|
||||||
|
}
|
||||||
|
if (base.substring(base.length-1) === "/") {
|
||||||
|
// base ends with `/`
|
||||||
|
return base + path;
|
||||||
|
}
|
||||||
|
return base + "/" + path;
|
||||||
|
}
|
||||||
|
|
||||||
|
function escapeHtml (value) {
|
||||||
|
return value.replace(/&/g, '&')
|
||||||
|
.replace(/"/g, '"')
|
||||||
|
.replace(/</g, '<')
|
||||||
|
.replace(/>/g, '>');
|
||||||
|
}
|
||||||
|
|
||||||
|
function formatResult (location, title, summary) {
|
||||||
|
return '<article><h3><a href="' + joinUrl(base_url, location) + '">'+ escapeHtml(title) + '</a></h3><p>' + escapeHtml(summary) +'</p></article>';
|
||||||
|
}
|
||||||
|
|
||||||
|
function displayResults (results) {
|
||||||
|
var search_results = document.getElementById("mkdocs-search-results");
|
||||||
|
while (search_results.firstChild) {
|
||||||
|
search_results.removeChild(search_results.firstChild);
|
||||||
|
}
|
||||||
|
if (results.length > 0){
|
||||||
|
for (var i=0; i < results.length; i++){
|
||||||
|
var result = results[i];
|
||||||
|
var html = formatResult(result.location, result.title, result.summary);
|
||||||
|
search_results.insertAdjacentHTML('beforeend', html);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
var noResultsText = search_results.getAttribute('data-no-results-text');
|
||||||
|
if (!noResultsText) {
|
||||||
|
noResultsText = "No results found";
|
||||||
|
}
|
||||||
|
search_results.insertAdjacentHTML('beforeend', '<p>' + noResultsText + '</p>');
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function doSearch () {
|
||||||
|
var query = document.getElementById('mkdocs-search-query').value;
|
||||||
|
if (query.length > min_search_length) {
|
||||||
|
if (!window.Worker) {
|
||||||
|
displayResults(search(query));
|
||||||
|
} else {
|
||||||
|
searchWorker.postMessage({query: query});
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
// Clear results for short queries
|
||||||
|
displayResults([]);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function initSearch () {
|
||||||
|
var search_input = document.getElementById('mkdocs-search-query');
|
||||||
|
if (search_input) {
|
||||||
|
search_input.addEventListener("keyup", doSearch);
|
||||||
|
}
|
||||||
|
var term = getSearchTermFromLocation();
|
||||||
|
if (term) {
|
||||||
|
search_input.value = term;
|
||||||
|
doSearch();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onWorkerMessage (e) {
|
||||||
|
if (e.data.allowSearch) {
|
||||||
|
initSearch();
|
||||||
|
} else if (e.data.results) {
|
||||||
|
var results = e.data.results;
|
||||||
|
displayResults(results);
|
||||||
|
} else if (e.data.config) {
|
||||||
|
min_search_length = e.data.config.min_search_length-1;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!window.Worker) {
|
||||||
|
console.log('Web Worker API not supported');
|
||||||
|
// load index in main thread
|
||||||
|
$.getScript(joinUrl(base_url, "search/worker.js")).done(function () {
|
||||||
|
console.log('Loaded worker');
|
||||||
|
init();
|
||||||
|
window.postMessage = function (msg) {
|
||||||
|
onWorkerMessage({data: msg});
|
||||||
|
};
|
||||||
|
}).fail(function (jqxhr, settings, exception) {
|
||||||
|
console.error('Could not load worker.js');
|
||||||
|
});
|
||||||
|
} else {
|
||||||
|
// Wrap search in a web worker
|
||||||
|
var searchWorker = new Worker(joinUrl(base_url, "search/worker.js"));
|
||||||
|
searchWorker.postMessage({init: true});
|
||||||
|
searchWorker.onmessage = onWorkerMessage;
|
||||||
|
}
|
1
search/search_index.json
Executable file
133
search/worker.js
Executable file
|
@ -0,0 +1,133 @@
|
||||||
|
var base_path = 'function' === typeof importScripts ? '.' : '/search/';
|
||||||
|
var allowSearch = false;
|
||||||
|
var index;
|
||||||
|
var documents = {};
|
||||||
|
var lang = ['en'];
|
||||||
|
var data;
|
||||||
|
|
||||||
|
function getScript(script, callback) {
|
||||||
|
console.log('Loading script: ' + script);
|
||||||
|
$.getScript(base_path + script).done(function () {
|
||||||
|
callback();
|
||||||
|
}).fail(function (jqxhr, settings, exception) {
|
||||||
|
console.log('Error: ' + exception);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function getScriptsInOrder(scripts, callback) {
|
||||||
|
if (scripts.length === 0) {
|
||||||
|
callback();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
getScript(scripts[0], function() {
|
||||||
|
getScriptsInOrder(scripts.slice(1), callback);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
function loadScripts(urls, callback) {
|
||||||
|
if( 'function' === typeof importScripts ) {
|
||||||
|
importScripts.apply(null, urls);
|
||||||
|
callback();
|
||||||
|
} else {
|
||||||
|
getScriptsInOrder(urls, callback);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
function onJSONLoaded () {
|
||||||
|
data = JSON.parse(this.responseText);
|
||||||
|
var scriptsToLoad = ['lunr.js'];
|
||||||
|
if (data.config && data.config.lang && data.config.lang.length) {
|
||||||
|
lang = data.config.lang;
|
||||||
|
}
|
||||||
|
if (lang.length > 1 || lang[0] !== "en") {
|
||||||
|
scriptsToLoad.push('lunr.stemmer.support.js');
|
||||||
|
if (lang.length > 1) {
|
||||||
|
scriptsToLoad.push('lunr.multi.js');
|
||||||
|
}
|
||||||
|
if (lang.includes("ja") || lang.includes("jp")) {
|
||||||
|
scriptsToLoad.push('tinyseg.js');
|
||||||
|
}
|
||||||
|
for (var i=0; i < lang.length; i++) {
|
||||||
|
if (lang[i] != 'en') {
|
||||||
|
scriptsToLoad.push(['lunr', lang[i], 'js'].join('.'));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
loadScripts(scriptsToLoad, onScriptsLoaded);
|
||||||
|
}
|
||||||
|
|
||||||
|
function onScriptsLoaded () {
|
||||||
|
console.log('All search scripts loaded, building Lunr index...');
|
||||||
|
if (data.config && data.config.separator && data.config.separator.length) {
|
||||||
|
lunr.tokenizer.separator = new RegExp(data.config.separator);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (data.index) {
|
||||||
|
index = lunr.Index.load(data.index);
|
||||||
|
data.docs.forEach(function (doc) {
|
||||||
|
documents[doc.location] = doc;
|
||||||
|
});
|
||||||
|
console.log('Lunr pre-built index loaded, search ready');
|
||||||
|
} else {
|
||||||
|
index = lunr(function () {
|
||||||
|
if (lang.length === 1 && lang[0] !== "en" && lunr[lang[0]]) {
|
||||||
|
this.use(lunr[lang[0]]);
|
||||||
|
} else if (lang.length > 1) {
|
||||||
|
this.use(lunr.multiLanguage.apply(null, lang)); // spread operator not supported in all browsers: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Spread_operator#Browser_compatibility
|
||||||
|
}
|
||||||
|
this.field('title');
|
||||||
|
this.field('text');
|
||||||
|
this.ref('location');
|
||||||
|
|
||||||
|
for (var i=0; i < data.docs.length; i++) {
|
||||||
|
var doc = data.docs[i];
|
||||||
|
this.add(doc);
|
||||||
|
documents[doc.location] = doc;
|
||||||
|
}
|
||||||
|
});
|
||||||
|
console.log('Lunr index built, search ready');
|
||||||
|
}
|
||||||
|
allowSearch = true;
|
||||||
|
postMessage({config: data.config});
|
||||||
|
postMessage({allowSearch: allowSearch});
|
||||||
|
}
|
||||||
|
|
||||||
|
function init () {
|
||||||
|
var oReq = new XMLHttpRequest();
|
||||||
|
oReq.addEventListener("load", onJSONLoaded);
|
||||||
|
var index_path = base_path + '/search_index.json';
|
||||||
|
if( 'function' === typeof importScripts ){
|
||||||
|
index_path = 'search_index.json';
|
||||||
|
}
|
||||||
|
oReq.open("GET", index_path);
|
||||||
|
oReq.send();
|
||||||
|
}
|
||||||
|
|
||||||
|
function search (query) {
|
||||||
|
if (!allowSearch) {
|
||||||
|
console.error('Assets for search still loading');
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
var resultDocuments = [];
|
||||||
|
var results = index.search(query);
|
||||||
|
for (var i=0; i < results.length; i++){
|
||||||
|
var result = results[i];
|
||||||
|
doc = documents[result.ref];
|
||||||
|
doc.summary = doc.text.substring(0, 200);
|
||||||
|
resultDocuments.push(doc);
|
||||||
|
}
|
||||||
|
return resultDocuments;
|
||||||
|
}
|
||||||
|
|
||||||
|
if( 'function' === typeof importScripts ) {
|
||||||
|
onmessage = function (e) {
|
||||||
|
if (e.data.init) {
|
||||||
|
init();
|
||||||
|
} else if (e.data.query) {
|
||||||
|
postMessage({ results: search(e.data.query) });
|
||||||
|
} else {
|
||||||
|
console.error("Worker - Unrecognized message: " + e);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
}
|
33
sitemap.xml
Executable file
|
@ -0,0 +1,33 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<urlset xmlns="http://www.sitemaps.org/schemas/sitemap/0.9">
|
||||||
|
<url>
|
||||||
|
<loc>None</loc>
|
||||||
|
<lastmod>2023-02-14</lastmod>
|
||||||
|
<changefreq>daily</changefreq>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>None</loc>
|
||||||
|
<lastmod>2023-02-14</lastmod>
|
||||||
|
<changefreq>daily</changefreq>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>None</loc>
|
||||||
|
<lastmod>2023-02-14</lastmod>
|
||||||
|
<changefreq>daily</changefreq>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>None</loc>
|
||||||
|
<lastmod>2023-02-14</lastmod>
|
||||||
|
<changefreq>daily</changefreq>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>None</loc>
|
||||||
|
<lastmod>2023-02-14</lastmod>
|
||||||
|
<changefreq>daily</changefreq>
|
||||||
|
</url>
|
||||||
|
<url>
|
||||||
|
<loc>None</loc>
|
||||||
|
<lastmod>2023-02-14</lastmod>
|
||||||
|
<changefreq>daily</changefreq>
|
||||||
|
</url>
|
||||||
|
</urlset>
|