{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://paramlet.com/tools/threaded-container/schema.json",
 "title": "Screw-top jar — parameters",
 "description": "Make screw-top jars and canisters with threads that fit your printer: set inside size and clearance, add a two-colour lid label, O-ring or keyring. 3MF/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": "threaded-container",
 "x-toolVersion": "1.1.0",
 "x-specVersion": "1.0",
 "x-apiVersion": "1",
 "x-groups": [
  {
   "id": "size",
   "title": "Size"
  },
  {
   "id": "thread",
   "title": "Thread and fit"
  },
  {
   "id": "surface",
   "title": "Body texture"
  },
  {
   "id": "lid",
   "title": "Lid"
  },
  {
   "id": "text",
   "title": "Lid label"
  },
  {
   "id": "colour",
   "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": "small-parts-jar-40mm",
    "title": "Small parts jar Ø40 × 40 mm (screws, beads)",
    "description": "Hexagonal workshop jar for screws, nuts and beads that does not roll, two-colour label on the lid.",
    "values": {
     "innerDiameter": 40,
     "innerHeight": 40,
     "shape": "hex",
     "threadPitch": 3,
     "threadTurns": 1.5,
     "labelMode": "inlay",
     "bodyColor": "#f2f2f2",
     "lidColor": "#e8742a",
     "labelColor": "#2b2f36"
    }
   },
   {
    "id": "spice-jar-50x80",
    "title": "Spice jar Ø50 × 80 mm with lid label",
    "description": "About 157 ml spice jar with a knurled lid and an O-ring groove to keep it fresh.",
    "values": {
     "innerDiameter": 50,
     "innerHeight": 80,
     "threadPitch": 3,
     "threadTurns": 1.25,
     "oRing": "2",
     "lidTop": 2.6,
     "labelMode": "inlay",
     "labelSize": 9,
     "bodyColor": "#f4efe6",
     "lidColor": "#2e7d4f",
     "labelColor": "#f4efe6"
    }
   },
   {
    "id": "pill-capsule-keyring",
    "title": "Pill and travel capsule Ø20 × 50 mm with keyring",
    "description": "Small screw capsule on your keys for pills, earplugs or a spare SIM.",
    "values": {
     "innerDiameter": 20,
     "innerHeight": 50,
     "wall": 1.6,
     "threadPitch": 2,
     "threadTurns": 2,
     "lidSide": 1.4,
     "lidTop": 1.6,
     "keyring": true,
     "labelMode": "none",
     "bodyColor": "#3a6fd8",
     "lidColor": "#3a6fd8"
    }
   },
   {
    "id": "coffee-canister-100x120",
    "title": "Coffee and tea canister Ø100 × 120 mm",
    "description": "About 0.94 l canister with a coarse quick thread and an O-ring groove for an airtight lid.",
    "values": {
     "innerDiameter": 100,
     "innerHeight": 120,
     "wall": 2.2,
     "floorThickness": 2,
     "threadPitch": 4,
     "threadTurns": 1.25,
     "lidSide": 2,
     "lidTop": 2.9,
     "oRing": "2.5",
     "labelMode": "inlay",
     "labelSize": 16,
     "bodyColor": "#2b2f36",
     "lidColor": "#8a5a3c",
     "labelColor": "#f2f2f2"
    }
   },
   {
    "id": "large-screw-container-80",
    "title": "Large screw-top container Ø80 × 80 mm",
    "description": "About 0.4 l storage jar for hardware, fishing tackle or craft supplies, quick 4 mm thread.",
    "values": {
     "innerDiameter": 80,
     "innerHeight": 80,
     "wall": 2,
     "threadPitch": 4,
     "threadTurns": 1.25,
     "lidSide": 1.8,
     "lidTop": 2.2,
     "labelMode": "inlay",
     "labelSize": 14,
     "bodyColor": "#f2f2f2",
     "lidColor": "#3a6fd8",
     "labelColor": "#f2f2f2"
    }
   },
   {
    "id": "sd-card-tin-30",
    "title": "SD and micro SD card tin Ø30 × 25 mm",
    "description": "Short screw tin for memory cards, guitar picks or coins, engraved lid in one colour.",
    "values": {
     "innerDiameter": 30,
     "innerHeight": 25,
     "wall": 1.6,
     "threadPitch": 2,
     "threadTurns": 1.5,
     "lidTop": 1.8,
     "labelMode": "engraved",
     "labelSize": 6,
     "bodyColor": "#2b2f36",
     "lidColor": "#2b2f36"
    }
   }
  ]
 },
 "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": {
  "innerDiameter": {
   "type": "number",
   "minimum": 15,
   "maximum": 150,
   "multipleOf": 1,
   "title": "Inside diameter",
   "description": "What fits through the opening: measure your largest item.",
   "x-group": "size",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Iekšējais diametrs",
   "default": 40,
   "x-resetOnPreset": true
  },
  "innerHeight": {
   "type": "number",
   "minimum": 10,
   "maximum": 200,
   "multipleOf": 1,
   "title": "Inside height",
   "description": "Usable depth from the floor to the rim.",
   "x-group": "size",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Iekšējais augstums",
   "default": 40,
   "x-resetOnPreset": true
  },
  "shape": {
   "type": "string",
   "enum": [
    "round",
    "hex"
   ],
   "x-enumTitles": {
    "round": "Round",
    "hex": "Hexagonal (does not roll, packs tight)"
   },
   "title": "Shape",
   "description": "The neck and thread are always round.",
   "x-group": "size",
   "x-agentSafe": true,
   "x-label-lv": "Forma",
   "default": "round",
   "x-resetOnPreset": true
  },
  "wall": {
   "type": "number",
   "minimum": 1.2,
   "maximum": 3,
   "x-step": 0.1,
   "title": "Wall",
   "description": "Jar wall under the thread. 1.6–2 mm is stiff and still light.",
   "x-group": "size",
   "x-unit": "mm",
   "x-role": "core.wallThickness",
   "x-agentSafe": true,
   "x-label-lv": "Siena",
   "default": 1.8,
   "x-resetOnPreset": true
  },
  "floorThickness": {
   "type": "number",
   "minimum": 1.2,
   "maximum": 3,
   "x-step": 0.1,
   "title": "Floor",
   "description": "Thickness of the jar bottom.",
   "x-group": "size",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Grīda",
   "default": 1.6,
   "x-resetOnPreset": true
  },
  "threadPitch": {
   "type": "number",
   "minimum": 2,
   "maximum": 5,
   "x-step": 0.5,
   "title": "Thread pitch",
   "description": "Height per turn. 2–3 mm for small jars, 4–5 mm for big canisters (faster to open).",
   "x-group": "thread",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Vītnes solis",
   "default": 3,
   "x-resetOnPreset": true
  },
  "threadTurns": {
   "type": "number",
   "minimum": 1,
   "maximum": 3,
   "x-step": 0.25,
   "title": "Thread turns",
   "description": "How far you turn the lid to close it. 1.5 is quick and holds well.",
   "x-group": "thread",
   "x-unit": "count",
   "x-agentSafe": true,
   "x-label-lv": "Vītnes apgriezieni",
   "default": 1.5,
   "x-resetOnPreset": true
  },
  "threadClearance": {
   "type": "number",
   "minimum": 0.1,
   "maximum": 0.6,
   "x-step": 0.05,
   "title": "Thread clearance",
   "description": "Gap between the threads. 0.3–0.4 mm for most FDM printers; print the fit coupon to be sure.",
   "x-group": "thread",
   "x-unit": "mm",
   "x-role": "core.clearance",
   "x-agentSafe": true,
   "x-label-lv": "Vītnes pielaide",
   "default": 0.35
  },
  "fitCoupon": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Print the thread fit coupon instead",
   "description": "A short neck ring and three lid rings at −0.1 / set / +0.1 mm clearance.",
   "x-group": "thread",
   "x-agentSafe": true,
   "x-label-lv": "Drukāt vītnes pielaikošanas detaļu",
   "default": 0
  },
  "bodyTexture": {
   "type": "string",
   "enum": [
    "none",
    "ribs",
    "knurl",
    "folk",
    "waves",
    "scales",
    "diamond",
    "hex",
    "wood",
    "stone",
    "basketweave",
    "hammered"
   ],
   "x-enumTitles": {
    "none": "None (smooth)",
    "ribs": "Vertical ribs",
    "knurl": "Diamond knurl",
    "folk": "Latvian folk",
    "waves": "Waves",
    "scales": "Scales",
    "diamond": "Diamond lattice",
    "hex": "Honeycomb relief",
    "wood": "Wood grain",
    "stone": "Organic stone",
    "basketweave": "Basketweave",
    "hammered": "Hammered"
   },
   "title": "Jar body texture",
   "description": "Decorative grip relief around the jar body below the lid skirt; threads and inside stay smooth.",
   "x-group": "surface",
   "x-visibleIf": {
    "shape": "round"
   },
   "x-agentSafe": true,
   "x-label-lv": "Burkas korpusa tekstūra",
   "default": "none",
   "x-resetOnPreset": true
  },
  "textureDepth": {
   "type": "number",
   "minimum": 0.3,
   "maximum": 1.1,
   "x-step": 0.1,
   "title": "Relief depth",
   "description": "Outward texture height around the jar body (clamped for support-free 45° printing).",
   "x-group": "surface",
   "x-unit": "mm",
   "x-visibleIf": {
    "all": [
     {
      "shape": "round"
     },
     {
      "bodyTexture": {
       "ne": "none"
      }
     }
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Reljefa dziļums",
   "default": 0.8,
   "x-resetOnPreset": true
  },
  "textureCount": {
   "type": "integer",
   "minimum": 8,
   "maximum": 32,
   "multipleOf": 2,
   "title": "Pattern density",
   "description": "Number of pattern repeats around the jar.",
   "x-group": "surface",
   "x-unit": "count",
   "x-visibleIf": {
    "all": [
     {
      "shape": "round"
     },
     {
      "bodyTexture": {
       "ne": "none"
      }
     }
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Raksta blīvums",
   "default": 16,
   "x-resetOnPreset": true
  },
  "textureSeed": {
   "type": "integer",
   "minimum": 1,
   "maximum": 99,
   "multipleOf": 1,
   "title": "Pattern seed",
   "description": "Deterministic seed for organic wood, stone or hammered textures.",
   "x-group": "surface",
   "x-unit": "count",
   "x-visibleIf": {
    "all": [
     {
      "shape": "round"
     },
     {
      "bodyTexture": [
       "wood",
       "stone",
       "hammered"
      ]
     }
    ]
   },
   "x-advanced": true,
   "x-agentSafe": true,
   "x-label-lv": "Raksta variants",
   "default": 1,
   "x-resetOnPreset": true
  },
  "lidGrip": {
   "type": "string",
   "enum": [
    "knurl",
    "smooth"
   ],
   "x-enumTitles": {
    "knurl": "Knurled",
    "smooth": "Smooth"
   },
   "title": "Lid grip",
   "description": "Knurls give a better grip with wet or oily hands.",
   "x-group": "lid",
   "x-visibleIf": {
    "shape": "round"
   },
   "x-agentSafe": true,
   "x-label-lv": "Vāka satvēriens",
   "default": "knurl",
   "x-resetOnPreset": true
  },
  "lidSide": {
   "type": "number",
   "minimum": 1.2,
   "maximum": 3,
   "x-step": 0.1,
   "title": "Lid wall",
   "description": "Thickness of the lid skirt outside the thread.",
   "x-group": "lid",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Vāka siena",
   "default": 1.6,
   "x-resetOnPreset": true
  },
  "lidTop": {
   "type": "number",
   "minimum": 1.2,
   "maximum": 4,
   "x-step": 0.1,
   "title": "Lid top",
   "description": "Thickness of the lid top.",
   "x-group": "lid",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Vāka augša",
   "default": 2,
   "x-resetOnPreset": true
  },
  "oRing": {
   "type": "string",
   "enum": [
    "none",
    "1.5",
    "2",
    "2.5"
   ],
   "x-enumTitles": {
    "2": "2 mm cord",
    "none": "None",
    "1.5": "1.5 mm cord",
    "2.5": "2.5 mm cord"
   },
   "title": "O-ring groove",
   "description": "A groove under the lid for a rubber O-ring: keeps coffee and spices fresh.",
   "x-group": "lid",
   "x-agentSafe": true,
   "x-label-lv": "Blīvgredzena rieva",
   "default": "none",
   "x-resetOnPreset": true
  },
  "keyring": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Keyring tab",
   "description": "A flat tab with a hole on the lid, for pill and travel capsules.",
   "x-group": "lid",
   "x-agentSafe": true,
   "x-label-lv": "Atslēgu piekariņa cilpa",
   "default": 0,
   "x-resetOnPreset": true
  },
  "label1": {
   "type": "string",
   "maxLength": 14,
   "title": "Label",
   "description": "Up to 14 characters on the lid. Leave empty for no label.",
   "x-group": "text",
   "x-agentSafe": true,
   "x-label-lv": "Uzraksts",
   "default": "SCREWS"
  },
  "label2": {
   "type": "string",
   "maxLength": 14,
   "title": "Second line (optional)",
   "description": "Size, date, contents …",
   "x-group": "text",
   "x-agentSafe": true,
   "x-label-lv": "Otrā rinda (nav obligāta)",
   "default": "",
   "x-resetOnPreset": true
  },
  "labelMode": {
   "type": "string",
   "enum": [
    "inlay",
    "engraved",
    "none"
   ],
   "x-enumTitles": {
    "inlay": "Two-colour, flush (AMS / MMU)",
    "engraved": "Engraved, one colour",
    "none": "No label"
   },
   "title": "Label style",
   "description": "The label is in the first layers of the lid, so it is crisp and smooth.",
   "x-group": "text",
   "x-agentSafe": true,
   "x-label-lv": "Uzraksta stils",
   "default": "inlay",
   "x-resetOnPreset": true
  },
  "labelSize": {
   "type": "number",
   "minimum": 4,
   "maximum": 30,
   "x-step": 0.5,
   "title": "Letter height",
   "description": "Made smaller automatically if the label does not fit the lid.",
   "x-group": "text",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Burtu augstums",
   "default": 10,
   "x-resetOnPreset": true
  },
  "bodyColor": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Jar colour",
   "description": "Preview and 3MF colour of the jar.",
   "x-group": "colour",
   "x-role": "core.previewColor",
   "x-agentSafe": true,
   "x-label-lv": "Burkas krāsa",
   "default": "#f2f2f2",
   "x-resetOnPreset": true
  },
  "lidColor": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Lid colour",
   "description": "Colour of the lid.",
   "x-group": "colour",
   "x-agentSafe": true,
   "x-label-lv": "Vāka krāsa",
   "default": "#e8742a",
   "x-resetOnPreset": true
  },
  "labelColor": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Label colour",
   "description": "Colour of the flush label.",
   "x-group": "colour",
   "x-visibleIf": {
    "labelMode": "inlay"
   },
   "x-agentSafe": true,
   "x-label-lv": "Uzraksta krāsa",
   "default": "#2b2f36",
   "x-resetOnPreset": true
  },
  "printMaterial": {
   "type": "string",
   "enum": [
    "pla",
    "petg"
   ],
   "x-enumTitles": {
    "pla": "PLA",
    "petg": "PETG (food contact, tougher)"
   },
   "title": "Print material",
   "description": "Only used for the mass and notes.",
   "x-group": "print",
   "x-role": "core.printMaterial",
   "x-agentSafe": true,
   "x-label-lv": "Drukas materiāls",
   "default": "pla"
  }
 },
 "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)"
  }
 ]
}