{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://paramlet.com/tools/seed-spacing-template/schema.json",
 "title": "Seed spacing template — parameters",
 "description": "Generate a sowing template for any bed: 1, 4, 9 or 16 plants per square or packet spacing, a mixed planting plan, puzzle tiles for your bed and a depth dibber. 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": "seed-spacing-template",
 "x-toolVersion": "1.1.0",
 "x-specVersion": "1.0",
 "x-apiVersion": "1",
 "x-groups": [
  {
   "id": "grid",
   "title": "Squares and spacing"
  },
  {
   "id": "template",
   "title": "Template"
  },
  {
   "id": "dibber",
   "title": "Dibber"
  },
  {
   "id": "look",
   "title": "Colours"
  },
  {
   "id": "print",
   "title": "Printing"
  }
 ],
 "x-presets": {
  "note": "Choosing a preset resets every key marked x-resetOnPreset to its default and then applies the preset values.",
  "items": [
   {
    "id": "metric-30cm-9",
    "title": "30 cm square, 9 plants",
    "description": "One 300 mm square with 9 holes at 100 mm pitch (beans, spinach, beets); split into puzzle tiles for a 256 mm bed.",
    "values": {
     "squareSize": 300,
     "squaresX": 1,
     "squaresY": 1,
     "spacingMode": "perSquare",
     "plantsPerSquare": 9,
     "plantingPlan": "",
     "depthMarkStep": 10,
     "mainColor": "#c85a32",
     "accentColor": "#f4efe6"
    }
   },
   {
    "id": "metric-30cm-16",
    "title": "30 cm square, 16 plants",
    "description": "One 300 mm square with 16 holes at 75 mm pitch for carrots, radishes and other small plants.",
    "values": {
     "squareSize": 300,
     "squaresX": 1,
     "squaresY": 1,
     "spacingMode": "perSquare",
     "plantsPerSquare": 16,
     "plantingPlan": "",
     "depthMarkStep": 10,
     "mainColor": "#2a7f76",
     "accentColor": "#f2c14e"
    }
   },
   {
    "id": "one-foot-1",
    "title": "One-foot square, 1 plant",
    "description": "One 304.8 mm (12 in) square with a single centre hole for large plants such as tomatoes or peppers.",
    "values": {
     "squareSize": 304.8,
     "squaresX": 1,
     "squaresY": 1,
     "spacingMode": "perSquare",
     "plantsPerSquare": 1,
     "plantingPlan": "",
     "depthMarkStep": 6.35,
     "mainColor": "#d4a024",
     "accentColor": "#ffffff"
    }
   },
   {
    "id": "one-foot-4",
    "title": "One-foot square, 4 plants",
    "description": "One 12 in square with 4 holes at 6 in spacing (lettuce, chard).",
    "values": {
     "squareSize": 304.8,
     "squaresX": 1,
     "squaresY": 1,
     "spacingMode": "perSquare",
     "plantsPerSquare": 4,
     "plantingPlan": "",
     "depthMarkStep": 6.35,
     "mainColor": "#3b5b8c",
     "accentColor": "#fbbf24"
    }
   },
   {
    "id": "one-foot-9",
    "title": "One-foot square, 9 plants",
    "description": "One 12 in square with 9 holes at 4 in spacing (spinach, bush beans, beets).",
    "values": {
     "squareSize": 304.8,
     "squaresX": 1,
     "squaresY": 1,
     "spacingMode": "perSquare",
     "plantsPerSquare": 9,
     "plantingPlan": "",
     "depthMarkStep": 6.35,
     "mainColor": "#5b7f4b",
     "accentColor": "#bae6fd"
    }
   },
   {
    "id": "one-foot-16",
    "title": "One-foot square, 16 plants",
    "description": "One 12 in square with 16 holes at 3 in spacing (carrots, radishes).",
    "values": {
     "squareSize": 304.8,
     "squaresX": 1,
     "squaresY": 1,
     "spacingMode": "perSquare",
     "plantsPerSquare": 16,
     "plantingPlan": "",
     "depthMarkStep": 6.35,
     "mainColor": "#8c3b5c",
     "accentColor": "#fde68a"
    }
   },
   {
    "id": "mixed-plan-2x2",
    "title": "Mixed plan, 2 x 2 squares",
    "description": "Four 300 mm squares planted 16, 9, 4 and 1 (row by row), cut into puzzle tiles between the holes.",
    "values": {
     "squareSize": 300,
     "squaresX": 2,
     "squaresY": 2,
     "spacingMode": "perSquare",
     "plantsPerSquare": 9,
     "plantingPlan": "16,9,4,1",
     "depthMarkStep": 10,
     "mainColor": "#d97742",
     "accentColor": "#fed7aa"
    }
   },
   {
    "id": "packet-spacing-row",
    "title": "Packet spacing strip (5 cm)",
    "description": "A 300 mm square with holes every 50 mm in rows 50 mm apart, for packets that say \"thin to 5 cm\".",
    "values": {
     "squareSize": 300,
     "squaresX": 1,
     "squaresY": 1,
     "spacingMode": "spacing",
     "plantSpacing": 50,
     "rowSpacing": 50,
     "holeDiameter": 12,
     "depthMarkStep": 10,
     "mainColor": "#1f6f8b",
     "accentColor": "#d9f99d"
    }
   },
   {
    "id": "bright-ribs-one-nozzle",
    "title": "30 cm square, bright ribs (one nozzle)",
    "description": "Nine plants in a 300 mm square with the ribs in an accent colour after one filament change at the plate top.",
    "values": {
     "squareSize": 300,
     "squaresX": 1,
     "squaresY": 1,
     "spacingMode": "perSquare",
     "plantsPerSquare": 9,
     "plantingPlan": "",
     "colorMode": "layer-change",
     "plateThickness": 3,
     "mainColor": "#7c5cbf",
     "accentColor": "#fecdd3"
    }
   }
  ]
 },
 "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); 2d_template = 2D template: SVG + DXF + PDF (1:1 mm, zip)",
   "x-group": "download",
   "x-role": "core.exportFormat",
   "x-unit": "none",
   "x-agentSafe": true,
   "enum": [
    "3mf",
    "3mf_prusa",
    "stl",
    "2d_template"
   ],
   "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"
  },
  "massUnits": {
   "type": "string",
   "title": "Weight shown in",
   "description": "Display only: grams or ounces (1 oz = 28.3495 g). Stored values, the API and exports are always grams.",
   "x-group": "view",
   "x-role": "core.displayMassUnits",
   "x-unit": "none",
   "x-agentSafe": true,
   "enum": [
    "g",
    "oz"
   ],
   "x-enumTitles": {
    "g": "Grams",
    "oz": "Ounces"
   },
   "default": "g"
  }
 },
 "type": "object",
 "properties": {
  "squareSize": {
   "type": "number",
   "minimum": 150,
   "maximum": 400,
   "x-step": 0.1,
   "title": "Square size",
   "description": "Side of one planting square: 300 mm for a metric bed, 304.8 mm for one foot.",
   "x-group": "grid",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Kvadrāta izmērs",
   "default": 300
  },
  "squaresX": {
   "type": "integer",
   "minimum": 1,
   "maximum": 4,
   "multipleOf": 1,
   "title": "Squares along the length",
   "description": "How many squares the template covers along its length.",
   "x-group": "grid",
   "x-unit": "count",
   "x-agentSafe": true,
   "x-label-lv": "Kvadrāti garumā",
   "default": 1
  },
  "squaresY": {
   "type": "integer",
   "minimum": 1,
   "maximum": 4,
   "multipleOf": 1,
   "title": "Squares along the width",
   "description": "How many squares the template covers across.",
   "x-group": "grid",
   "x-unit": "count",
   "x-agentSafe": true,
   "x-label-lv": "Kvadrāti platumā",
   "default": 1
  },
  "spacingMode": {
   "type": "string",
   "enum": [
    "perSquare",
    "spacing"
   ],
   "x-enumTitles": {
    "perSquare": "Plants per square (1, 4, 9, 16 ...)",
    "spacing": "Spacing from the seed packet"
   },
   "title": "Spacing mode",
   "description": "Square-foot style counts per square, or an even grid from the plant and row spacing on the packet.",
   "x-group": "grid",
   "x-agentSafe": true,
   "x-label-lv": "Izvietojuma veids",
   "default": "perSquare",
   "x-resetOnPreset": true
  },
  "plantsPerSquare": {
   "type": "integer",
   "enum": [
    1,
    4,
    9,
    16,
    25,
    36
   ],
   "x-enumTitles": {
    "1": "1 per square",
    "4": "4 per square",
    "9": "9 per square",
    "16": "16 per square",
    "25": "25 per square",
    "36": "36 per square"
   },
   "title": "Plants per square",
   "description": "1 for large plants, 4 for lettuce-size, 9 for medium, 16 for carrots and radishes; holes sit on a k x k grid.",
   "x-group": "grid",
   "x-visibleIf": {
    "spacingMode": "perSquare"
   },
   "x-agentSafe": true,
   "x-label-lv": "Augi kvadrātā",
   "default": 9,
   "x-resetOnPreset": true
  },
  "plantingPlan": {
   "type": "string",
   "maxLength": 64,
   "pattern": "^[0-9, ]*$",
   "title": "Planting plan (optional)",
   "description": "Plants per square, row by row, for example 16,9,4,1; empty squares use the value above.",
   "x-group": "grid",
   "x-visibleIf": {
    "spacingMode": "perSquare"
   },
   "x-agentSafe": true,
   "x-label-lv": "Stādīšanas plāns (neobligāts)",
   "default": "",
   "x-resetOnPreset": true
  },
  "plantSpacing": {
   "type": "number",
   "minimum": 20,
   "maximum": 300,
   "multipleOf": 1,
   "title": "Plant spacing",
   "description": "Distance between plants in a row, from the seed packet (\"thin to\").",
   "x-group": "grid",
   "x-unit": "mm",
   "x-visibleIf": {
    "spacingMode": "spacing"
   },
   "x-agentSafe": true,
   "x-label-lv": "Augu atstatums",
   "default": 50,
   "x-resetOnPreset": true
  },
  "rowSpacing": {
   "type": "number",
   "minimum": 0,
   "maximum": 300,
   "multipleOf": 1,
   "title": "Row spacing",
   "description": "Distance between rows; 0 uses the plant spacing.",
   "x-group": "grid",
   "x-unit": "mm",
   "x-visibleIf": {
    "spacingMode": "spacing"
   },
   "x-agentSafe": true,
   "x-label-lv": "Rindu atstatums",
   "default": 0,
   "x-resetOnPreset": true
  },
  "holeDiameter": {
   "type": "number",
   "minimum": 6,
   "maximum": 40,
   "x-step": 0.5,
   "title": "Hole diameter",
   "description": "Big enough for a finger or the dibber; it is reduced automatically if holes would merge.",
   "x-group": "template",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Cauruma diametrs",
   "default": 16
  },
  "plateThickness": {
   "type": "number",
   "minimum": 2,
   "maximum": 6,
   "x-step": 0.2,
   "title": "Plate thickness",
   "description": "Thickness of the flat template; 3 mm stays flat and light.",
   "x-group": "template",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Plāksnes biezums",
   "default": 3
  },
  "ribHeight": {
   "type": "number",
   "minimum": 0,
   "maximum": 8,
   "x-step": 0.5,
   "title": "Rib height",
   "description": "Raised ribs on the edge and on the square boundaries; they stiffen the plate and show the squares.",
   "x-group": "template",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Ribu augstums",
   "default": 3
  },
  "ribWidth": {
   "type": "number",
   "minimum": 1.2,
   "maximum": 8,
   "x-step": 0.2,
   "title": "Rib width",
   "description": "Width of the ribs; never less than two nozzle widths.",
   "x-group": "template",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Ribu platums",
   "default": 4
  },
  "dibber": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Add a depth dibber",
   "description": "A dibber sized to the holes, with grooves every depth step from the tip; sow about 2 to 3 times the seed diameter deep.",
   "x-group": "dibber",
   "x-agentSafe": true,
   "x-label-lv": "Pievienot dziļuma dūrienu",
   "default": 1
  },
  "dibberLength": {
   "type": "number",
   "minimum": 50,
   "maximum": 150,
   "multipleOf": 1,
   "title": "Dibber length",
   "description": "Length of the rod below the handle.",
   "x-group": "dibber",
   "x-unit": "mm",
   "x-visibleIf": {
    "dibber": true
   },
   "x-agentSafe": true,
   "x-label-lv": "Dūriena garums",
   "default": 100
  },
  "depthMarkStep": {
   "type": "number",
   "minimum": 5,
   "maximum": 25,
   "x-step": 0.05,
   "title": "Depth mark step",
   "description": "Distance between the depth grooves: 10 mm, or 6.35 mm for quarter inches.",
   "x-group": "dibber",
   "x-unit": "mm",
   "x-visibleIf": {
    "dibber": true
   },
   "x-agentSafe": true,
   "x-label-lv": "Dziļuma iezīmju solis",
   "default": 10,
   "x-resetOnPreset": true
  },
  "jointClearance": {
   "type": "number",
   "minimum": 0.1,
   "maximum": 0.6,
   "x-step": 0.05,
   "title": "Puzzle joint clearance",
   "description": "Gap around the puzzle knobs that join split tiles; print the joint test first.",
   "x-group": "print",
   "x-unit": "mm",
   "x-role": "core.clearance",
   "x-agentSafe": true,
   "x-label-lv": "Puzles savienojuma sprauga",
   "default": 0.3
  },
  "nozzle": {
   "type": "number",
   "minimum": 0.2,
   "maximum": 1,
   "x-step": 0.05,
   "title": "Nozzle diameter",
   "description": "Ribs thinner than two nozzle widths are raised automatically; also used for the weight estimate.",
   "x-group": "print",
   "x-unit": "mm",
   "x-role": "print.nozzle",
   "x-agentSafe": true,
   "x-label-lv": "Sprauslas diametrs",
   "default": 0.4
  },
  "wallCount": {
   "type": "integer",
   "minimum": 1,
   "maximum": 8,
   "multipleOf": 1,
   "title": "Perimeters",
   "description": "Perimeters you will slice with; only changes the weight estimate.",
   "x-group": "print",
   "x-unit": "count",
   "x-role": "print.wallCount",
   "x-agentSafe": true,
   "x-label-lv": "Perimetri",
   "default": 3
  },
  "infill": {
   "type": "number",
   "minimum": 0,
   "maximum": 100,
   "multipleOf": 5,
   "title": "Infill",
   "description": "Infill you will slice with; only changes the weight estimate.",
   "x-group": "print",
   "x-unit": "pct",
   "x-role": "print.infill",
   "x-agentSafe": true,
   "x-label-lv": "Aizpildījums",
   "default": 25
  },
  "printMaterial": {
   "type": "string",
   "enum": [
    "petg",
    "asa",
    "pla"
   ],
   "x-enumTitles": {
    "petg": "PETG (recommended outdoors)",
    "asa": "ASA (strong sun)",
    "pla": "PLA (short use only)"
   },
   "title": "Print material",
   "description": "PETG (heat deflection 68 C) suits a template that lies on a sunny bed; ASA (93 C) for strong sun; PLA (55 C) can soften in the sun.",
   "x-group": "print",
   "x-role": "core.printMaterial",
   "x-agentSafe": true,
   "x-label-lv": "Drukas materiāls",
   "default": "petg"
  },
  "bedSize": {
   "type": "number",
   "minimum": 100,
   "maximum": 400,
   "multipleOf": 1,
   "title": "Printer bed size",
   "description": "Largest square your printer can print; bigger templates are cut into tiles between the holes.",
   "x-group": "print",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Printera galda izmērs",
   "default": 256
  },
  "splitParts": {
   "type": "integer",
   "minimum": 1,
   "maximum": 9,
   "multipleOf": 1,
   "title": "Max tiles",
   "description": "How many puzzle tiles the template may be cut into; 1 never cuts and only warns.",
   "x-group": "print",
   "x-unit": "count",
   "x-role": "core.splitParts",
   "x-agentSafe": true,
   "x-label-lv": "Maks. daļas",
   "default": 9
  },
  "resolution": {
   "type": "integer",
   "minimum": 16,
   "maximum": 96,
   "multipleOf": 4,
   "title": "Curve resolution",
   "description": "Segments on holes, knobs and the dibber.",
   "x-group": "print",
   "x-unit": "count",
   "x-role": "core.resolution",
   "x-advanced": true,
   "x-agentSafe": true,
   "x-label-lv": "Līkņu izšķirtspēja",
   "default": 48
  },
  "fitTest": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Add a joint test pair",
   "description": "Two small coupons with one puzzle joint, to check the clearance before printing all the tiles.",
   "x-group": "print",
   "x-agentSafe": true,
   "x-label-lv": "Pievienot savienojuma testa pāri",
   "default": 0
  },
  "colorMode": {
   "type": "string",
   "enum": [
    "single",
    "layer-change",
    "multi-material"
   ],
   "x-enumTitles": {
    "single": "One colour",
    "layer-change": "Accent ribs, one nozzle (filament change)",
    "multi-material": "Accent ribs, multi-material printer"
   },
   "title": "Colours",
   "description": "One nozzle: one filament change at the top of the plate prints the ribs and rim in the accent colour. Multi-material: the ribs are a separate part with filament 2 already set.",
   "x-group": "look",
   "x-agentSafe": true,
   "x-label-lv": "Krāsas",
   "default": "single"
  },
  "mainColor": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Plate colour",
   "description": "Colour of the plate; also written into the slicer colour-change marker.",
   "x-group": "look",
   "x-role": "core.previewColor",
   "x-agentSafe": true,
   "x-label-lv": "Plāksnes krāsa",
   "default": "#3f6b35"
  },
  "accentColor": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Rib colour",
   "description": "A bright colour shows the squares best on soil.",
   "x-group": "look",
   "x-visibleIf": {
    "colorMode": {
     "ne": "single"
    }
   },
   "x-agentSafe": true,
   "x-label-lv": "Ribu krāsa",
   "default": "#f2c14e"
  },
  "layerHeight": {
   "type": "number",
   "minimum": 0.08,
   "maximum": 0.4,
   "x-step": 0.02,
   "title": "Layer height",
   "description": "The layer height you will slice with; the colour change is placed on this layer grid.",
   "x-group": "print",
   "x-unit": "mm",
   "x-role": "print.layerHeight",
   "x-visibleIf": {
    "colorMode": "layer-change"
   },
   "x-agentSafe": true,
   "x-label-lv": "Slāņa augstums",
   "default": 0.2
  },
  "firstLayerHeight": {
   "type": "number",
   "minimum": 0.1,
   "maximum": 0.4,
   "x-step": 0.02,
   "title": "First layer height",
   "description": "First layer height in your slicer profile.",
   "x-group": "print",
   "x-unit": "mm",
   "x-role": "print.firstLayerHeight",
   "x-visibleIf": {
    "colorMode": "layer-change"
   },
   "x-agentSafe": true,
   "x-label-lv": "Pirmā slāņa augstums",
   "default": 0.2
  }
 },
 "additionalProperties": false,
 "recommended_materials": [
  {
   "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)"
  },
  {
   "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)"
  }
 ]
}