Skip to content

About

Gridfinity bins (hollow, solid for custom cutouts, half grid) and baseplates as a SolidCraft plugin. Parametric storage for 3D printing.

Topics

Resources

Stars

15 stars

Watchers

0 watching

Forks

Latest commit

 

History

17 Commits

Folders and files

Repository files navigation

Gridfinity for SolidCraft

A SolidCraft plugin that makes Gridfinity bins and baseplates, including baseplates that fill a drawer and are split to fit your printer. The result is ordinary SolidCraft features: one undo step, editable afterwards, and they keep working without the plugin.

A 3×2×6 bin with dividers

Underside: feet with magnet and screw holes 4×3 baseplate with magnet holes
Bin underside Baseplate
  • bin: width × depth cells, height in units (7 mm), Gridfinity feet, 0.95 mm walls, stacking lip, optional magnet holes (6.5 × 2.4 mm), screw holes (3 mm) and dividers. Full grid (42 mm cells) or half grid (21 mm cells: four feet fit one baseplate pocket; magnet holes sit on the same spots as a full-grid baseplate's magnets), or a custom cell size.
  • Custom grid (grid: "Custom (sizes below)"): your own cell size from 15 to 100 mm, set separately along X and Y (custom_size_x, custom_size_y), so bins and baseplates divide evenly into a drawer or organizer. Parts with the same custom size fit each other, but not standard Gridfinity. Magnet and screw holes sit 8 mm in from the cell edges, or one in the middle of cells under 29 mm.
  • Scoop and label tab: a rounded floor along the front wall of each compartment (inside_scoop, mm), so small parts slide out, and a 12 mm shelf along the back wall at the top (inside_label_tab) for a label. Both follow the dividers; with them a bin can have up to 36 compartments in one run.
  • Label text (inside_label_text): text on the label tabs, one label per compartment separated by ; (back row first, left to right; M3x6; M3x8;; Washers leaves the third one empty). It is a body of its own, so you can print it in another filament: in the slicer, give the label body its own filament. It either stands up from the tab or is sunk into it with its top flush with the tab, for a flat two-colour label (inside_label_text_style: "Raised" or "Flush (inlaid)"), by inside_label_text_height (0.4 mm by default, so one or two layers). The size (inside_label_text_size, capital height) is picked to fit the tab unless you set it, and inside_label_text_font takes any installed font (empty: SolidCraft's built-in one). Text adds a label tab by itself. Each label becomes a text parameter (Label_1, Label_2, …, Bin2_Label_1 for the next bin): change it in Parameters and the label follows, without running the plugin again. The size stays as it was fitted, so keep a new label about as long. The label's extrude shows a warning that its letters don't touch the label body: that is expected, they are kept as one body on purpose.
  • Height as a parameter: every bin gets a Height_units parameter (Bin2_Height_units for the next bin, and so on). Change it in Parameters and the bin grows or shrinks with its walls, lip, dividers, fill and labels, without running the plugin again. Scoops and label tabs keep the size they were made with, and the body keeps its name.
  • Solid bins (inside: "Solid (for custom cutouts)"): filled to the top of the walls with the stacking lip around, so you can sketch on the flat top and cut holders for your own tools (example). Set a fill height (inside_fill_height, mm from the bottom of the bin) to stop the fill lower: above it the bin is hollow with walls and lip, so a bin stacked on top clears what sits in your cutouts.
  • baseplate: width × depth pockets with the Gridfinity profile, full, half or custom grid, a solid bottom (optional magnet holes) or an open frame (no bottom). Add solid filler on any side (filler_left, filler_right, filler_front, filler_back, in mm) to fill out a drawer without the drawer settings.
  • drawer baseplate: enter the inside size of a drawer and the size of your printer's bed. It fits as many cells as the drawer takes, fills the space left over with solid filler (split evenly or all on one side), and cuts the plate along the grid lines into pieces that fit the printer, as evenly as it can. The pieces lock together with dovetail tabs (1.8 mm, 0.05 mm clearance), which sit low in the wall between pockets so they don't show; the piece with the sockets goes on from above. Big drawers are built one piece at a time (piece), see Limits below.

Solid bin with custom cutouts

Half-grid 2×2 bin, underside Open-frame baseplate
Half-grid bin Open baseplate
Custom 40 × 25 mm cells: 2×1 bin Custom 40 × 25 mm cells: 2×2 baseplate
Custom bin Custom baseplate
2×2×6 bin with dividers, 12 mm scoops and label tabs Cut through: scoop at the front, label tab at the back
Scoop and label tab Section
Label text, raised (the text is its own body, shown red) Label text, flush (inlaid)
Label text Flush label text
A 3-unit bin… …set to 6 units in Parameters
3 units 6 units
The labels in Parameters Label text in DejaVu Serif
Parameters Font

Label text fields

Solid 3×2×6 bin filled to 20 mm, with cutouts Cut through: solid fill below, open above
Fill height Section
4×3 baseplate with filler: 12 mm left and right, 25 mm at the back The baseplate form with the filler fields
Baseplate with filler Filler fields
A 400 × 300 mm drawer on a 256 mm printer: four pieces Dovetails between two pieces, from above and below
Drawer baseplate Tabs Sockets

Dimensions follow the Gridfinity spec as implemented in gridfinity-rebuilt-openscad (research/SPEC.md). Every shape was checked by exporting STL from SolidCraft and measuring its cross-sections. Not yet printed: please report how it fits.

Status: 1.0.0. Tested with SolidCraft 0.41.0 and 0.42.0, both through scripts/solidcraft-cli and in the desktop app's plugin dialog. SolidCraft's plugin runtime is itself experimental, so other versions may refuse the package.

Install

Download gridfinity-1.0.0.zip from the latest release, then in SolidCraft: Plugins › Install plugin… (or Preferences › Plugins) and pick the zip. From a script:

{"commands": [{"command": "plugin.install", "params": {"path": "gridfinity-1.0.0.zip"}}]}

Add "replace": true to update an installed version. You can also unpack the zip into ~/.local/share/solidcraft/plugins/ (Linux), %LOCALAPPDATA%/SolidCraft/plugins (Windows) or ~/Library/Application Support/SolidCraft/plugins (macOS).

Use it in SolidCraft

Open Plugins › Gridfinity › Gridfinity bin…, Gridfinity baseplate… or Gridfinity drawer baseplate…, fill in the form and press Run. Open a design first: from the start page the form opens behind it (press Esc to see it). The result is ordinary features in the History bar.

Plugins menu The bin form (here a custom 40 × 25 mm grid)
Plugins menu Bin dialog

The bin in SolidCraft after Run

The drawer baseplate form Its four pieces in SolidCraft
Drawer dialog Drawer pieces

Limits

SolidCraft gives a plugin run 256 commands and 30 seconds. The plugin makes one cell and copies it, so the number of commands stays small at any size; the time goes on joining the cells, about 0.15 s a cell on a 4-core desktop, more with magnet or screw holes. One run builds up to 100 cells (a 10 × 10 baseplate in about 16 s), 42 with magnet holes, fewer for bins with screw holes; past that the plugin says so before it starts. For a bigger baseplate use the drawer baseplate and build it a piece at a time: set Piece to 1, 2, … (numbered along X, then Y) and run once for each. Pieces built separately land where they would have with the others.

Label text is slow: the desktop app checks every letter, about half a second each, and each compartment with a label tab costs about as much. Letters and digits (spaces are free) plus compartments may add up to 50 in one run, so a bin with 6 compartments takes 44 letters of label text, and one with 36 compartments 14 (about 20 seconds either way). Flush text is cut out of the bin as well, so each letter counts twice: 22 letters with 6 compartments, 7 with 36.

Run from a script

SolidCraft runs plugin code only when you ask: inspect the package to get its approval hash, then run an entry with that hash (examples/).

{"commands": [{"command": "plugin.inspect", "params": {"path": "/path/to/plugins/gridfinity"}}]}
{"commands": [{"command": "plugin.run", "params": {
  "path": "/path/to/plugins/gridfinity", "approval": "<hash from plugin.inspect>", "entry": "bin",
  "params": {"width": 2, "depth": 1, "height": 3, "holes_magnet": true, "dividers_x": 1}}}]}

solidcraft-cli run bin.json --out bin.stl builds it and exports an STL.

Entry Parameters (default)
bin grid "42 mm (full)" / "21 mm (half)" / "Custom (sizes below)", custom_size_x, custom_size_y 15–100 mm (42, Custom only), width up to 504 mm and 24 cells (1), depth (1), height 2–20 units (3), inside "Hollow" / "Solid (for custom cutouts)", dividers_x 0–10 (0), dividers_y 0–10 (0), holes_magnet (false), holes_screw (false), inside_scoop 0–40 mm (0), inside_label_tab (false), inside_label_text (labels separated by ;), inside_label_text_size 0–20 mm (0: fit), inside_label_text_height 0.1–3 mm (0.4), inside_label_text_style "Raised" / "Flush (inlaid)", inside_label_text_font (installed font, empty: built-in), inside_fill_height mm (0: to the top; solid bins, from 6 mm to 1 mm under the inside top), position_x, position_y mm (0), stacking_lip (true), title (body name)
baseplate grid, custom_size_x, custom_size_y, width (3), depth (3), bottom "Solid" / "Open (frame only)", holes_magnet (false, solid only), filler_left, filler_right, filler_front, filler_back 0–200 mm (0), position_x, position_y mm (0, the corner of the plate with its filler), title
drawer drawer_width, drawer_depth 15–1000 mm (300), printer_x, printer_y 50–1000 mm (256), grid, custom_size_x, custom_size_y, bottom, holes_magnet, filler_x "Even (both sides)" / "Left" / "Right", filler_y "Even (both sides)" / "Front" / "Back", piece (0: all), position_x, position_y mm (0), title

Scripts may also say "full" / "half" / "custom" / "open" and use the older names magnets, screws, name and origin: [x, y].

Choices that differ slightly from the spec: the stacking lip has a 0.3 mm flat on top instead of a knife edge, the floor inside a bin is at 6 mm, and baseplate pockets keep a 0.05 mm rim between them (SolidCraft's kernel can't taper profiles that touch).

Build

./build.sh runs the tests, builds the wasm32-unknown-unknown module, wraps it as a component with wasm-tools component new and zips the package into package/. Needs Rust with the wasm32-unknown-unknown target and wasm-tools.

Layout

  • plugin/ the Rust plugin: src/geometry.rs bins and shared shapes, src/plate.rs baseplates (and why they are built row by row), src/drawer.rs splitting a drawer into pieces, src/lib.rs the entries and the runner; cargo run --example plan -- drawer '{...}' prints a plan's commands
  • gen/gridfinity.py the reference generator (writes SolidCraft command scripts; gen/reference/ holds its output); gen/volumes.json the volumes SolidCraft measured for the plugin's shapes, which match the generator's; gen/stlcheck.py measures an STL, gen/render.py makes the preview images
  • package/gridfinity/ the plugin package (plugin.json + plugin.wasm)
  • research/SPEC.md the dimensions and where they come from

Licence

MIT, see LICENSE. plugin/wit/plugin.wit is SolidCraft's plugin interface (Apache-2.0); see NOTICE.

About

Gridfinity bins (hollow, solid for custom cutouts, half grid) and baseplates as a SolidCraft plugin. Parametric storage for 3D printing.

Topics

Resources

Stars

15 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages