Grid storage

A parametric grid of plates and bins, with pitch, magnet pockets, mating clearances and manifold meshes checked in code, not on a printer.

This is a CAD spec on Spekkr, published by onyx. It is listed with the other specs. Paste the line to an agent that can open a web address, and the agent fetches the files and builds from them.

Spec
onyx/grid-storage
Version
0.2.0
Published by
onyx
Updated
14 Nov 2026

Build this spec

Build the spec at https://spekkr.com/onyx/grid-storage/start.md.

Paste this to your AI agent. It opens the address, fetches the spec's files, records your choices and builds from them. Nothing to install, no account.

Published by onyx.

What does the result look like?

Grid storage: heroGrid storage: detail

What can I customize?

Modelling tool CadQuery writes STEP and STL. OpenSCAD writes STL.

Your choices go into the line you copy. Anything else is yours to edit, but it leaves the tested path.

What do I get?

  • spec.md Requirements and acceptance checks.

    Grid storage

    What this builds

    A grid storage system: a base plate with a regular pitch, and bins that sit in the cells. The model is code, so pitch, walls, magnet pockets and stacking lips follow the inputs. A script measures the meshes against this spec. No physical print is required to accept the build.

    Read spekkr.inputs.json first. pitch, wall, bins_x and bins_y size the grid, all in millimetres except the counts. magnets and lips add features. tool is the modeller.

    Out of scope

    • A particular printer's profile or a slicer preset.
    • A branded storage ecosystem's exact parts, or its name in the id.
    • A physical print, or magnets actually inserted.

    Requirements

    Each requirement has an id. Checks name the id they cover.

    R1. Pitch and cells
    • The plate's cell centres are pitch apart in X and Y. A bins_x by bins_y plate's overall size matches the formula in design.md within 0.05 mm.
    • A 1 by 1 bin's outer footprint sits in a cell with the mating clearance in design.md (0.2 mm a side, unless the file says otherwise).
    • A value of pitch or wall outside the stated range is refused before modelling.

    Accept when: default and two other input sets match the formulas, a short-of-range input is refused, and the bin-to-cell clearance holds.

    R2. Pockets, lips, meshes
    • If magnets is on, each pocket is a cylinder of the diameter and depth in design.md, at the documented centres, and does not break through the plate.
    • If lips is on, the stacking clearance is the documented gap, and two plates stacked in code do not overlap.
    • Each exported part is a manifold, watertight mesh. Wall thickness is at least wall almost everywhere, with the check in design.md. Overhangs in the print position are not past 45 degrees.

    Accept when: pocket and lip measures match, stacked plates do not overlap, and the mesh checks pass.

    R3. Files and frames
    • Parts: plate and bin as STL (and STEP if CadQuery). A report lists bounding boxes, volumes, and pass or fail against design.md.
    • Renders: plate, bin, a mated assembly, and an exploded view.
    • One command builds from the inputs, measures, writes the report, and writes the renders. Running it twice writes the same mesh bytes. No physical print.

    Accept when: the command passes for both tools, the report fails a deliberately wrong pitch, and the four renders are written.

    R4. Inputs
    • Numeric inputs are read from spekkr.inputs.json and must stay inside the ranges in the Inputs table in design.md.
    • A value outside a range is refused before modelling, with a message that names the key.
    • Options add or remove the features in that table. The tool swap selects CadQuery or OpenSCAD; both must meet the same numbers.

    Accept when: default and one out-of-range value are handled as above, and a second legal input set still matches the formulas in design.md.

    Verification

    Generated plates and bins are measured for pitch, magnet-pocket dimensions, and stacking or mating clearances against a formula file. Meshes are manifold and checked for wall thickness and overhangs. Assembly and exploded renders are written. No physical print, and no magnets, are required.

    Definition of done

    • Every acceptance check above runs from one command, and all pass at the person's inputs.
    • A README says how to install the tool, how to make the parts, and that a print is optional and not part of the checks.
    # Grid storage
    
    ## What this builds
    
    A grid storage system: a base plate with a regular pitch, and bins that
    sit in the cells. The model is code, so pitch, walls, magnet pockets and
    stacking lips follow the inputs. A script measures the meshes against this
    spec. No physical print is required to accept the build.
    
    Read `spekkr.inputs.json` first. `pitch`, `wall`, `bins_x` and `bins_y`
    size the grid, all in millimetres except the counts. `magnets` and `lips`
    add features. `tool` is the modeller.
    
    ## Out of scope
    
    - A particular printer's profile or a slicer preset.
    - A branded storage ecosystem's exact parts, or its name in the id.
    - A physical print, or magnets actually inserted.
    
    ## Requirements
    
    Each requirement has an id. Checks name the id they cover.
    
    ### R1. Pitch and cells
    
    - The plate's cell centres are `pitch` apart in X and Y. A `bins_x` by
      `bins_y` plate's overall size matches the formula in `design.md` within
      0.05 mm.
    - A 1 by 1 bin's outer footprint sits in a cell with the mating clearance
      in `design.md` (0.2 mm a side, unless the file says otherwise).
    - A value of `pitch` or `wall` outside the stated range is refused before
      modelling.
    
    Accept when: default and two other input sets match the formulas, a
    short-of-range input is refused, and the bin-to-cell clearance holds.
    
    ### R2. Pockets, lips, meshes
    
    - If `magnets` is on, each pocket is a cylinder of the diameter and depth
      in `design.md`, at the documented centres, and does not break through
      the plate.
    - If `lips` is on, the stacking clearance is the documented gap, and two
      plates stacked in code do not overlap.
    - Each exported part is a manifold, watertight mesh. Wall thickness is at
      least `wall` almost everywhere, with the check in `design.md`. Overhangs
      in the print position are not past 45 degrees.
    
    Accept when: pocket and lip measures match, stacked plates do not overlap,
    and the mesh checks pass.
    
    ### R3. Files and frames
    
    - Parts: `plate` and `bin` as STL (and STEP if CadQuery). A report lists
      bounding boxes, volumes, and pass or fail against `design.md`.
    - Renders: plate, bin, a mated assembly, and an exploded view.
    - One command builds from the inputs, measures, writes the report, and
      writes the renders. Running it twice writes the same mesh bytes. No
      physical print.
    
    Accept when: the command passes for both tools, the report fails a
    deliberately wrong pitch, and the four renders are written.
    
    ### R4. Inputs
    
    - Numeric inputs are read from `spekkr.inputs.json` and must stay inside
      the ranges in the Inputs table in `design.md`.
    - A value outside a range is refused before modelling, with a message that
      names the key.
    - Options add or remove the features in that table. The `tool` swap
      selects CadQuery or OpenSCAD; both must meet the same numbers.
    
    Accept when: default and one out-of-range value are handled as above, and
    a second legal input set still matches the formulas in `design.md`.
    
    ## Verification
    
    Generated plates and bins are measured for pitch, magnet-pocket
    dimensions, and stacking or mating clearances against a formula file.
    Meshes are manifold and checked for wall thickness and overhangs. Assembly
    and exploded renders are written. No physical print, and no magnets, are
    required.
    
    ## Definition of done
    
    - Every acceptance check above runs from one command, and all pass at the
      person's inputs.
    - A README says how to install the tool, how to make the parts, and that a
      print is optional and not part of the checks.
    

    Open spec.md as plain text

  • design.md Pitch formulas, magnet pockets, stacking clearances and mesh checks.

    Design

    This file fixes the geometry. How the model's code is organised is up to you, as long as the numbers here hold.

    Formulas (millimetres)

    Plate overall X = bins_x * pitch + 2 * wall. Overall Y is the same with bins_y. Thickness of the plate is wall + 2.4 if magnets are on, else wall + 1.0.

    Magnet pocket: diameter 6.1, depth 2.1, centres inset pitch/2 from a cell centre along both axes, one per cell, opening on the underside. Lip height 1.6, radial clearance 0.2.

    The exact numbers, plus volumes for the default inputs, are fixtures/grid-measures.json.

    Mesh checks

    Watertight, no self-intersection, minimum wall wall except the magnet shell (allowed down to 0.8). Print position: plate pockets down, bin open up. Overhangs ≤ 45°.

    Inputs

    KeyLabelDefaultNotes
    pitchGrid pitch, mm42Centre to centre, from 30 to 60.
    wallWall thickness, mm2.0From 1.2 to 4.
    bins_xBins in X3From 1 to 8.
    bins_yBins in Y3From 1 to 8.
    magnetsMagnet pocketsonCylindrical pockets on the plate, sized in design.md.
    lipsStacking lipsonA lip so a plate or a bin stacks with the documented clearance.
    toolModelling toolcadqueryCadQuery writes STEP and STL. OpenSCAD writes STL.

    Acceptance at the defaults

    All sizes are in millimetres. pitch is 42, wall is 2.0, bins_x and bins_y are 3, and both options are on.

    QuantityValueToleranceSource
    Plate overall X and Y130.000.05bins * pitch + 2 * wall
    Plate thickness, magnets on4.400.05wall + 2.4
    Plate thickness, magnets off3.000.05wall + 1.0
    Bin 1×1 outer footprint41.600.05pitch - 2 * 0.20
    Mating clearance, a side0.200.02Bin to cell
    Magnet pocket diameter, depth6.10, 2.100.05Opens on the underside
    Lip height, radial clearance1.60, 0.200.05When lips is on

    Volumes of the default plate and a 1×1 bin are recorded by the check and must stay within 0.5% on a rebuild. A pitch or wall outside 30–60 or 1.2–4 is refused before modelling.

    Screenshots

    These pictures are headless OpenSCAD renders of the reference model in reference/model.scad, at the default inputs. They are not drawings of a product that has not been modelled. The first picture is the one Spekkr shows on the spec's card. A build may ship its own goldens; those goldens are of that build and do not have to match these frames pixel-for-pixel.

    FileWhat it shows
    shots/plate.pngPlate 130 × 130 × 4.4 mm
    shots/assembly.pngAssembly 3×3 bins on a 130 mm plate

    How to verify

    1. Build the model at the default inputs and at two other legal input sets.
    2. Measure every row of the acceptance table in this file; each must fall inside its tolerance. Use the solid itself or a mesh library on the exported STL, as design.md says for the chosen tool.
    3. Refuse at least one out-of-range input by name before modelling.
    4. Confirm each exported part is a manifold, watertight mesh, and that walls and print orientation hold where this file asks.
    5. Generated plates and bins are measured for pitch, magnet-pocket dimensions, and stacking or mating clearances against a formula file. Meshes are manifold and checked for wall thickness and overhangs. Assembly and exploded renders are written. No physical print, and no magnets, are required.
    # Design
    
    This file fixes the geometry. How the model's code is organised is up to
    you, as long as the numbers here hold.
    
    ## Formulas (millimetres)
    
    Plate overall X = `bins_x * pitch + 2 * wall`. Overall Y is the same with
    `bins_y`. Thickness of the plate is `wall + 2.4` if magnets are on, else
    `wall + 1.0`.
    
    Magnet pocket: diameter 6.1, depth 2.1, centres inset `pitch/2` from a
    cell centre along both axes, one per cell, opening on the underside. Lip
    height 1.6, radial clearance 0.2.
    
    The exact numbers, plus volumes for the default inputs, are
    `fixtures/grid-measures.json`.
    
    ## Mesh checks
    
    Watertight, no self-intersection, minimum wall `wall` except the magnet
    shell (allowed down to 0.8). Print position: plate pockets down, bin open
    up. Overhangs ≤ 45°.
    
    ## Inputs
    
    | Key | Label | Default | Notes |
    | --- | --- | --- | --- |
    | `pitch` | Grid pitch, mm | 42 | Centre to centre, from 30 to 60. |
    | `wall` | Wall thickness, mm | 2.0 | From 1.2 to 4. |
    | `bins_x` | Bins in X | 3 | From 1 to 8. |
    | `bins_y` | Bins in Y | 3 | From 1 to 8. |
    | `magnets` | Magnet pockets | on | Cylindrical pockets on the plate, sized in design.md. |
    | `lips` | Stacking lips | on | A lip so a plate or a bin stacks with the documented clearance. |
    | `tool` | Modelling tool | cadquery | CadQuery writes STEP and STL. OpenSCAD writes STL. |
    
    ## Acceptance at the defaults
    
    All sizes are in millimetres. `pitch` is 42, `wall` is 2.0, `bins_x` and
    `bins_y` are 3, and both options are on.
    
    | Quantity | Value | Tolerance | Source |
    | --- | --- | --- | --- |
    | Plate overall X and Y | 130.00 | 0.05 | `bins * pitch + 2 * wall` |
    | Plate thickness, magnets on | 4.40 | 0.05 | `wall + 2.4` |
    | Plate thickness, magnets off | 3.00 | 0.05 | `wall + 1.0` |
    | Bin 1×1 outer footprint | 41.60 | 0.05 | `pitch - 2 * 0.20` |
    | Mating clearance, a side | 0.20 | 0.02 | Bin to cell |
    | Magnet pocket diameter, depth | 6.10, 2.10 | 0.05 | Opens on the underside |
    | Lip height, radial clearance | 1.60, 0.20 | 0.05 | When `lips` is on |
    
    Volumes of the default plate and a 1×1 bin are recorded by the check and
    must stay within 0.5% on a rebuild. A pitch or wall outside 30–60 or 1.2–4
    is refused before modelling.
    
    ## Screenshots
    
    These pictures are headless OpenSCAD renders of the reference model in
    `reference/model.scad`, at the default inputs. They are not drawings of a
    product that has not been modelled. The first picture is the one Spekkr
    shows on the spec's card. A build may ship its own goldens; those goldens
    are of that build and do not have to match these frames pixel-for-pixel.
    
    | File | What it shows |
    | --- | --- |
    | `shots/plate.png` | Plate  130 × 130 × 4.4 mm |
    | `shots/assembly.png` | Assembly  3×3 bins on a 130 mm plate |
    
    
    ## How to verify
    
    1. Build the model at the default inputs and at two other legal input
    sets.
    
    2. Measure every row of the acceptance table in this file; each must fall
    inside its tolerance. Use the solid itself or a mesh library on the
    exported STL, as `design.md` says for the chosen tool.
    
    3. Refuse at least one out-of-range input by name before modelling.
    
    4. Confirm each exported part is a manifold, watertight mesh, and that
    walls and print orientation hold where this file asks.
    
    5. Generated plates and bins are measured for pitch, magnet-pocket
    dimensions, and stacking or mating clearances against a formula file.
    Meshes are manifold and checked for wall thickness and overhangs. Assembly
    and exploded renders are written. No physical print, and no magnets, are
    required.
    

    Open design.md as plain text

  • tasks.md Build tasks in order, each with a check.

    Tasks

    Work in order. Finish a task's check before starting the next.

    1. Set up. Install the tool in the tool input (CadQuery or OpenSCAD) and a mesh library for the checks. Read spekkr.inputs.json into one place at the top of the model. Check: an empty or trivial model is written and read back, and the inputs are visible in that source.
    2. Pitch and cells (R1). Build what R1. Pitch and cells asks for, to the numbers in design.md. In particular: The plate's cell centres are pitch apart in X and Y. A bins_x by bins_y plate's overall size matches the formula in design.md within 0.05 mm. Check: the R1. Pitch and cells acceptance checks pass.
    3. Pockets, lips, meshes (R2). Build what R2. Pockets, lips, meshes asks for, to the numbers in design.md. In particular: If magnets is on, each pocket is a cylinder of the diameter and depth in design.md, at the documented centres, and does not break through the plate. Check: the R2. Pockets, lips, meshes acceptance checks pass.
    4. Files and frames (R3). Build what R3. Files and frames asks for, to the numbers in design.md. In particular: Parts: plate and bin as STL (and STEP if CadQuery). A report lists bounding boxes, volumes, and pass or fail against design.md. Check: the R3. Files and frames acceptance checks pass.
    5. Inputs (R4). Build what R4. Inputs asks for, to the numbers in design.md. In particular: Numeric inputs are read from spekkr.inputs.json and must stay inside the ranges in the Inputs table in design.md. Check: the R4. Inputs acceptance checks pass.
    6. Goldens and the report. Render the documented views of the default model. Run the one-command report at the defaults, at the person's inputs, and at one more legal set. Check: the report says pass throughout, and the rendered views are written next to the model.
    7. Finish. Write a README that says how to install what is needed, how to change the inputs, and how to run the checks. Run the one command from a clean folder. Check: every item under Definition of done in spec.md is true.
    # Tasks
    
    Work in order. Finish a task's check before starting the next.
    
    1. **Set up.** Install the tool in the `tool` input (CadQuery or OpenSCAD)
    and a mesh library for the checks. Read `spekkr.inputs.json` into one
    place at the top of the model.
       Check: an empty or trivial model is written and read back, and the
    inputs are visible in that source.
    
    2. **Pitch and cells (R1).** Build what `R1. Pitch and cells` asks for, to
    the numbers in `design.md`. In particular: The plate's cell centres are
    `pitch` apart in X and Y. A `bins_x` by `bins_y` plate's overall size
    matches the formula in `design.md` within 0.05 mm.
       Check: the `R1. Pitch and cells` acceptance checks pass.
    
    3. **Pockets, lips, meshes (R2).** Build what `R2. Pockets, lips, meshes`
    asks for, to the numbers in `design.md`. In particular: If `magnets` is
    on, each pocket is a cylinder of the diameter and depth in `design.md`, at
    the documented centres, and does not break through the plate.
       Check: the `R2. Pockets, lips, meshes` acceptance checks pass.
    
    4. **Files and frames (R3).** Build what `R3. Files and frames` asks for,
    to the numbers in `design.md`. In particular: Parts: `plate` and `bin` as
    STL (and STEP if CadQuery). A report lists bounding boxes, volumes, and
    pass or fail against `design.md`.
       Check: the `R3. Files and frames` acceptance checks pass.
    
    5. **Inputs (R4).** Build what `R4. Inputs` asks for, to the numbers in
    `design.md`. In particular: Numeric inputs are read from
    `spekkr.inputs.json` and must stay inside the ranges in the Inputs table
    in `design.md`.
       Check: the `R4. Inputs` acceptance checks pass.
    
    6. **Goldens and the report.** Render the documented views of the default
    model. Run the one-command report at the defaults, at the person's inputs,
    and at one more legal set.
       Check: the report says pass throughout, and the rendered views are
    written next to the model.
    
    7. **Finish.** Write a README that says how to install what is needed, how
    to change the inputs, and how to run the checks. Run the one command from
    a clean folder.
       Check: every item under Definition of done in `spec.md` is true.
    

    Open tasks.md as plain text

  • reference/model.scad A parametric OpenSCAD reference of the default model, used to make the listing pictures. A build may use CadQuery or OpenSCAD and does not have to start from this file.
  • shots/hero.png Studio hero of the default model.
  • shots/detail.png Closer studio still of a joint, pocket, or surface.

Is it for me?

Kind
CAD
Tools
CadQuery, OpenSCAD

What does it need?

Agent permissions
shell
Commands it runs
install CadQuery or OpenSCAD, whichever the tool input names install a mesh library, such as trimesh

What changed?

  • 0.2.014 Nov 2026Studio product shots from a shared Cycles rig (cyclorama, PLA materials), including a short loop when present.
  • 0.1.014 Nov 2026First version.

For agents: start.md says how to build this spec, spec.json holds everything on this page, and bundle.tar.gz holds its files.