{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://paramlet.com/tools/gridfinity-bin/schema.json",
 "title": "Gridfinity bin & baseplate — parameters",
 "description": "Generate Gridfinity-compatible bins, dividers, battery trays, hex bit holders, SD card organizers and custom-padded drawer baseplates in 3MF and STL. All lengths are millimetres. Unknown keys are rejected; out-of-range values are rejected by the URL and API and clamped when a project file is opened.",
 "x-tool": "gridfinity-bin",
 "x-toolVersion": "1.0.0",
 "x-specVersion": "1.0",
 "x-apiVersion": "1",
 "x-groups": [
  {
   "id": "mode",
   "title": "What to generate"
  },
  {
   "id": "bin",
   "title": "Bin size & style"
  },
  {
   "id": "features",
   "title": "Dividers, scoop & label tab"
  },
  {
   "id": "drawer",
   "title": "Drawer & baseplate"
  },
  {
   "id": "magnets",
   "title": "Magnets & screws"
  },
  {
   "id": "print",
   "title": "Colours & printing"
  }
 ],
 "x-presets": {
  "note": "Choosing a preset resets every key marked x-resetOnPreset to its default and then applies the preset values.",
  "items": [
   {
    "id": "screws-2x1-dividers",
    "title": "Screws & small parts (2×1, 4U)",
    "description": "2×1 Gridfinity bin (83.5 × 41.5 mm, 4U) with two compartments, finger scoop, full two-colour label tab and 6×2 mm magnet holes.",
    "values": {
     "partMode": "bin",
     "gridX": 2,
     "gridY": 1,
     "heightU": 4,
     "binStyle": "open",
     "dividersX": 1,
     "dividersY": 0,
     "scoop": true,
     "labelTab": "full",
     "labelAccent": true,
     "stackingLip": true,
     "magnetHoles": true,
     "color": "#2563eb",
     "labelColor": "#f59e0b"
    }
   },
   {
    "id": "battery-tray-aa-aaa",
    "title": "AA & AAA battery tray (2×2)",
    "description": "2×2 Gridfinity battery organizer holding AA and AAA cells upright with easy finger access and magnet base.",
    "values": {
     "partMode": "bin",
     "gridX": 2,
     "gridY": 2,
     "heightU": 4,
     "binStyle": "batteries",
     "stackingLip": true,
     "magnetHoles": true,
     "color": "#059669"
    }
   },
   {
    "id": "deep-drawer-bin-2x3",
    "title": "Deep drawer bin (2×3, 6U)",
    "description": "Spacious 83.5 × 125.5 mm deep storage bin (6U = 42 mm) with finger scoop and full contrasting label ledge for tools or cables.",
    "values": {
     "partMode": "bin",
     "gridX": 2,
     "gridY": 3,
     "heightU": 6,
     "binStyle": "open",
     "dividersX": 0,
     "dividersY": 1,
     "scoop": true,
     "labelTab": "full",
     "labelAccent": true,
     "stackingLip": true,
     "magnetHoles": true,
     "color": "#475569",
     "labelColor": "#38bdf8"
    }
   },
   {
    "id": "hex-bit-holder-1x2",
    "title": "1/4\" hex bit holder (2×1)",
    "description": "Compact 2×1 Gridfinity tray with vertical 1/4\" (6.35 mm) hex bit sockets — keeps screwdriver bits upright and sorted.",
    "values": {
     "partMode": "bin",
     "gridX": 2,
     "gridY": 1,
     "heightU": 3,
     "binStyle": "hex-bits",
     "stackingLip": true,
     "magnetHoles": true,
     "color": "#dc2626"
    }
   },
   {
    "id": "sd-card-holder-1x2",
    "title": "SD & microSD card holder (2×1)",
    "description": "2×1 Gridfinity organizer with neat rows of SD and microSD card slots for cameras, 3D printers and Raspberry Pi cards.",
    "values": {
     "partMode": "bin",
     "gridX": 2,
     "gridY": 1,
     "heightU": 3,
     "binStyle": "sd-cards",
     "stackingLip": true,
     "magnetHoles": true,
     "color": "#7c3aed"
    }
   },
   {
    "id": "long-pens-tools-1x4",
    "title": "Long pens & tools tray (4×1, 4U)",
    "description": "167.5 mm long 4×1 Gridfinity tray for pens, markers, calipers and screwdrivers with scoop and left label tab.",
    "values": {
     "partMode": "bin",
     "gridX": 4,
     "gridY": 1,
     "heightU": 4,
     "binStyle": "open",
     "dividersX": 0,
     "dividersY": 0,
     "scoop": true,
     "labelTab": "left",
     "labelAccent": true,
     "stackingLip": true,
     "magnetHoles": true,
     "color": "#0d9488",
     "labelColor": "#fbbf24"
    }
   },
   {
    "id": "drawer-baseplate",
    "title": "Drawer baseplate (auto-fit mm)",
    "description": "Enter your drawer inner width × depth (default 220 × 180 mm) to get a Gridfinity baseplate with exact border padding.",
    "values": {
     "partMode": "drawer-baseplate",
     "drawerWidth": 220,
     "drawerDepth": 180,
     "baseplateStyle": "lite",
     "color": "#334155"
    }
   }
  ]
 },
 "x-coreParams": {
  "exportFormat": {
   "type": "string",
   "title": "File format",
   "description": "3mf = 3MF (mm); 3mf_prusa = 3MF for PrusaSlicer (mm, colour parts as volumes); stl = STL files in a zip (mm)",
   "x-group": "download",
   "x-role": "core.exportFormat",
   "x-unit": "none",
   "x-agentSafe": true,
   "enum": [
    "3mf",
    "3mf_prusa",
    "stl"
   ],
   "default": "3mf"
  },
  "exportTol": {
   "type": "number",
   "title": "Mesh precision",
   "description": "Simplification tolerance in mm (0 = original mesh).",
   "x-group": "download",
   "x-role": "core.exportTolerance",
   "x-unit": "mm",
   "x-agentSafe": true,
   "enum": [
    0,
    0.01,
    0.02
   ],
   "default": 0.02
  },
  "units": {
   "type": "string",
   "title": "Units shown",
   "description": "Display only: mm or inches (1 in = 25.4 mm). Stored values, the API and exports are always mm.",
   "x-group": "view",
   "x-role": "core.displayUnits",
   "x-unit": "none",
   "x-agentSafe": true,
   "enum": [
    "mm",
    "in"
   ],
   "x-enumTitles": {
    "mm": "Millimetres",
    "in": "Inches"
   },
   "default": "mm"
  }
 },
 "type": "object",
 "properties": {
  "partMode": {
   "type": "string",
   "enum": [
    "bin",
    "baseplate",
    "both",
    "drawer-baseplate"
   ],
   "x-enumTitles": {
    "bin": "Bin only",
    "baseplate": "Baseplate only",
    "both": "Bin + baseplate",
    "drawer-baseplate": "Drawer baseplate (from mm)"
   },
   "title": "Part mode",
   "description": "Choose a bin, a grid baseplate, both, or a drawer-sized baseplate with automatic grid count and padding.",
   "x-group": "mode",
   "x-agentSafe": true,
   "x-label-lv": "Daļu režīms",
   "default": "bin",
   "x-resetOnPreset": true
  },
  "gridX": {
   "type": "integer",
   "minimum": 1,
   "maximum": 8,
   "multipleOf": 1,
   "title": "Grid width (X units)",
   "description": "42 mm per unit (1U = 41.5 mm bin, 6U = 251.5 mm). Above 6 units is clamped to fit a 256 mm bed.",
   "x-group": "bin",
   "x-unit": "count",
   "x-visibleIf": {
    "partMode": [
     "bin",
     "baseplate",
     "both"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Tīkla platums (X vienības)",
   "default": 2,
   "x-resetOnPreset": true
  },
  "gridY": {
   "type": "integer",
   "minimum": 1,
   "maximum": 8,
   "multipleOf": 1,
   "title": "Grid depth (Y units)",
   "description": "42 mm per unit along Y; every cell gets its own Gridfinity foot underneath.",
   "x-group": "bin",
   "x-unit": "count",
   "x-visibleIf": {
    "partMode": [
     "bin",
     "baseplate",
     "both"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Tīkla dziļums (Y vienības)",
   "default": 1,
   "x-resetOnPreset": true
  },
  "heightU": {
   "type": "integer",
   "minimum": 2,
   "maximum": 12,
   "multipleOf": 1,
   "title": "Bin height (U × 7 mm)",
   "description": "Standard Gridfinity height units: 3U = 21 mm, 4U = 28 mm, 6U = 42 mm (stacking lip adds 4.4 mm).",
   "x-group": "bin",
   "x-unit": "count",
   "x-visibleIf": {
    "partMode": [
     "bin",
     "both"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Kastes augstums (U × 7 mm)",
   "default": 4,
   "x-resetOnPreset": true
  },
  "binStyle": {
   "type": "string",
   "enum": [
    "open",
    "hex-bits",
    "batteries",
    "sd-cards"
   ],
   "x-enumTitles": {
    "open": "Open storage bin",
    "hex-bits": "1/4\" hex bit holder",
    "batteries": "AA / AAA battery tray",
    "sd-cards": "SD / microSD card holder"
   },
   "title": "Bin interior style",
   "description": "Open compartment bin, or a fitted tray for 1/4\" hex bits, AA/AAA batteries or SD/microSD cards.",
   "x-group": "bin",
   "x-visibleIf": {
    "partMode": [
     "bin",
     "both"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Kastes iekšējais tips",
   "default": "open",
   "x-resetOnPreset": true
  },
  "wallThickness": {
   "type": "number",
   "minimum": 0.8,
   "maximum": 2,
   "x-step": 0.2,
   "title": "Wall thickness",
   "description": "1.2 mm (3 perimeters on a 0.4 mm nozzle) is fast and sturdy; 1.6–2.0 mm for heavy hardware.",
   "x-group": "bin",
   "x-unit": "mm",
   "x-role": "core.wallThickness",
   "x-visibleIf": {
    "partMode": [
     "bin",
     "both"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Sienas biezums",
   "default": 1.2,
   "x-resetOnPreset": true
  },
  "stackingLip": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Stacking lip",
   "description": "Standard 4.4 mm top rim so another Gridfinity bin stacks securely on top, support-free.",
   "x-group": "bin",
   "x-visibleIf": {
    "partMode": [
     "bin",
     "both"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Stāvināšanas lūpa",
   "default": 1,
   "x-resetOnPreset": true
  },
  "dividersX": {
   "type": "integer",
   "minimum": 0,
   "maximum": 6,
   "multipleOf": 1,
   "title": "Dividers along X",
   "description": "Internal walls splitting the bin width into equal compartments.",
   "x-group": "features",
   "x-unit": "count",
   "x-visibleIf": {
    "all": [
     {
      "partMode": [
       "bin",
       "both"
      ]
     },
     {
      "binStyle": "open"
     }
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Starpsienas gar X",
   "default": 1,
   "x-resetOnPreset": true
  },
  "dividersY": {
   "type": "integer",
   "minimum": 0,
   "maximum": 6,
   "multipleOf": 1,
   "title": "Dividers along Y",
   "description": "Internal walls splitting the bin depth into equal rows.",
   "x-group": "features",
   "x-unit": "count",
   "x-visibleIf": {
    "all": [
     {
      "partMode": [
       "bin",
       "both"
      ]
     },
     {
      "binStyle": "open"
     }
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Starpsienas gar Y",
   "default": 0,
   "x-resetOnPreset": true
  },
  "scoop": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Finger scoop",
   "description": "Sloped front inner bottom edge so small screws, washers and parts slide out easily.",
   "x-group": "features",
   "x-visibleIf": {
    "all": [
     {
      "partMode": [
       "bin",
       "both"
      ]
     },
     {
      "binStyle": "open"
     }
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Pirksta slīpums (scoop)",
   "default": 1,
   "x-resetOnPreset": true
  },
  "labelTab": {
   "type": "string",
   "enum": [
    "none",
    "left",
    "full"
   ],
   "x-enumTitles": {
    "none": "None",
    "left": "Left corner tab",
    "full": "Full width tab"
   },
   "title": "Label tab",
   "description": "45° support-free inner top ledge for 12 mm label tape or a contrasting two-colour strip.",
   "x-group": "features",
   "x-visibleIf": {
    "all": [
     {
      "partMode": [
       "bin",
       "both"
      ]
     },
     {
      "binStyle": "open"
     }
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Etiķetes lapiņa",
   "default": "full",
   "x-resetOnPreset": true
  },
  "labelAccent": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Two-colour label strip",
   "description": "Adds a contrasting second-filament top strip on the label tab (3MF multi-material / filament swap).",
   "x-group": "features",
   "x-visibleIf": {
    "all": [
     {
      "partMode": [
       "bin",
       "both"
      ]
     },
     {
      "binStyle": "open"
     },
     {
      "labelTab": [
       "left",
       "full"
      ]
     }
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Divkrāsu etiķetes josla",
   "default": 1,
   "x-resetOnPreset": true
  },
  "drawerWidth": {
   "type": "number",
   "minimum": 50,
   "maximum": 600,
   "multipleOf": 1,
   "title": "Drawer inner width",
   "description": "Measure the narrowest inside width of your drawer; the plate auto-fits 42 mm cells plus side padding.",
   "x-group": "drawer",
   "x-unit": "mm",
   "x-visibleIf": {
    "partMode": "drawer-baseplate"
   },
   "x-agentSafe": true,
   "x-label-lv": "Atvilktnes iekšējais platums",
   "default": 220,
   "x-resetOnPreset": true
  },
  "drawerDepth": {
   "type": "number",
   "minimum": 50,
   "maximum": 600,
   "multipleOf": 1,
   "title": "Drawer inner depth",
   "description": "Measure front-to-back inside depth; dimensions above 256 mm are split into a printable tile with a tiling readout.",
   "x-group": "drawer",
   "x-unit": "mm",
   "x-visibleIf": {
    "partMode": "drawer-baseplate"
   },
   "x-agentSafe": true,
   "x-label-lv": "Atvilktnes iekšējais dziļums",
   "default": 180,
   "x-resetOnPreset": true
  },
  "baseplateStyle": {
   "type": "string",
   "enum": [
    "lite",
    "solid",
    "magnet"
   ],
   "x-enumTitles": {
    "lite": "Lightweight grid (fast print)",
    "solid": "Solid floor",
    "magnet": "Magnet baseplate (6 × 2 mm)"
   },
   "title": "Baseplate style",
   "description": "Lightweight is open underneath (uses least filament); Magnet adds 6 × 2 mm magnet pockets under every cell.",
   "x-group": "drawer",
   "x-visibleIf": {
    "partMode": [
     "baseplate",
     "both",
     "drawer-baseplate"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Pamatplāksnes stils",
   "default": "lite",
   "x-resetOnPreset": true
  },
  "magnetHoles": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "6 × 2 mm magnet holes",
   "description": "Four Ø 6.5 × 2.4 mm pockets per 42 mm grid cell (26 mm spacing) for standard 6 × 2 mm neodymium discs.",
   "x-group": "magnets",
   "x-visibleIf": {
    "partMode": [
     "bin",
     "both"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "6 × 2 mm magnētu caurumi",
   "default": 1,
   "x-resetOnPreset": true
  },
  "screwHoles": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "M3 screw holes",
   "description": "Adds M3 clearance holes through the bin foot at each magnet position.",
   "x-group": "magnets",
   "x-visibleIf": {
    "partMode": [
     "bin",
     "both"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "M3 skrūvju caurumi",
   "default": 0,
   "x-resetOnPreset": true
  },
  "fitClearance": {
   "type": "number",
   "minimum": 0.1,
   "maximum": 0.5,
   "x-step": 0.05,
   "title": "Fit clearance",
   "description": "Extra radial clearance for magnets, screws, hex bits and batteries; raise if holes print tight.",
   "x-group": "magnets",
   "x-unit": "mm",
   "x-role": "core.clearance",
   "x-advanced": true,
   "x-agentSafe": true,
   "x-label-lv": "Ietilpes atstarpe",
   "default": 0.2
  },
  "color": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Main colour",
   "description": "Main bin or baseplate filament colour.",
   "x-group": "print",
   "x-role": "core.previewColor",
   "x-agentSafe": true,
   "x-label-lv": "Galvenā krāsa",
   "default": "#2563eb"
  },
  "labelColor": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Label strip colour",
   "description": "Contrasting second colour for the label tab top strip (exported as filament 2 in 3MF).",
   "x-group": "print",
   "x-visibleIf": {
    "all": [
     {
      "partMode": [
       "bin",
       "both"
      ]
     },
     {
      "binStyle": "open"
     },
     {
      "labelTab": [
       "left",
       "full"
      ]
     },
     {
      "labelAccent": true
     }
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Etiķetes joslas krāsa",
   "default": "#f59e0b"
  },
  "printMaterial": {
   "type": "string",
   "enum": [
    "pla",
    "petg",
    "asa"
   ],
   "x-enumTitles": {
    "pla": "PLA (recommended)",
    "petg": "PETG (workshop heat)",
    "asa": "ASA (hot garage)"
   },
   "title": "Print material",
   "description": "PLA prints crisp and flat for drawers; PETG or ASA for warm workshops.",
   "x-group": "print",
   "x-role": "core.printMaterial",
   "x-agentSafe": true,
   "x-label-lv": "Drukas materiāls",
   "default": "pla"
  }
 },
 "additionalProperties": false,
 "recommended_materials": [
  {
   "id": "pla-matte-filament",
   "title": "Matte PLA Filament 1.75 mm (1 kg) — smooth surface finish",
   "why": "Clean matte finish for decorative vases, ornaments and candle holders.",
   "url": "https://paramlet.com/go/pla-matte-filament?src=agent",
   "relation": "material",
   "disclosure": "Affiliate link (Amazon Associates, tag paramlet-21)"
  },
  {
   "id": "petg-filament-1kg",
   "title": "PETG Filament 1.75 mm (1 kg) — heat-resistant & durable",
   "why": "Stronger and more heat-resistant than PLA for molds, jigs and outdoor parts.",
   "url": "https://paramlet.com/go/petg-filament-1kg?src=agent",
   "relation": "material",
   "disclosure": "Affiliate link (Amazon Associates, tag paramlet-21)"
  }
 ]
}