{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://paramlet.com/tools/bag-clip/schema.json",
 "title": "Bag clip — parameters",
 "description": "Bag clips with a print-in-place hinge and a snap latch, 40 to 220 mm long, with a jaw gap for the folded bag and a label on the lid. 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": "bag-clip",
 "x-toolVersion": "1.0.0",
 "x-specVersion": "1.0",
 "x-apiVersion": "1",
 "x-groups": [
  {
   "id": "clip",
   "title": "Clip"
  },
  {
   "id": "label",
   "title": "Label"
  },
  {
   "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": "chip-bag-clip",
    "title": "Chip bag clip, 120 mm",
    "description": "A 120 mm clip with CHIPS on the lid: a folded bag of chips, crisps or crackers, day after day.",
    "values": {
     "length": 120,
     "depth": 16,
     "jawGap": 0.6,
     "jointGap": 0.3,
     "ridges": true,
     "label": "CHIPS",
     "font": "lilita",
     "raised": false,
     "mount": "none",
     "colorMode": "multi",
     "baseColor": "#0e7490",
     "letterColor": "#fef9c3",
     "material": "pla",
     "layerHeight": 0.16,
     "wallCount": 4,
     "infill": 100
    }
   },
   {
    "id": "coffee-bag-clip",
    "title": "Coffee bag clip with a magnet",
    "description": "A 100 mm clip for a bag of coffee beans, with a 1 mm gap for the folded valve bag and a magnet pocket in the lid.",
    "values": {
     "length": 100,
     "depth": 20,
     "jawGap": 1,
     "jointGap": 0.3,
     "ridges": true,
     "label": "COFFEE",
     "font": "lilita",
     "raised": false,
     "mount": "magnet",
     "colorMode": "multi",
     "baseColor": "#b45309",
     "letterColor": "#fef9c3",
     "material": "pla",
     "layerHeight": 0.16,
     "wallCount": 4,
     "infill": 100
    }
   },
   {
    "id": "mini-bag-clip",
    "title": "Mini bag clip, 50 mm",
    "description": "A 50 mm clip with a hanging hole: the small corner of a bag, a pouch of spices or a bag of treats.",
    "values": {
     "length": 50,
     "depth": 12,
     "jawGap": 0.6,
     "jointGap": 0.3,
     "ridges": true,
     "label": "",
     "font": "lilita",
     "raised": false,
     "mount": "hole",
     "colorMode": "multi",
     "baseColor": "#a21caf",
     "letterColor": "#fef9c3",
     "material": "pla",
     "layerHeight": 0.16,
     "wallCount": 4,
     "infill": 100
    }
   },
   {
    "id": "bread-bag-clip",
    "title": "Bread bag clip, 160 mm",
    "description": "A 160 mm clip with a 1.2 mm gap: a loaf bag folded twice over, kept on the counter or in the bread bin.",
    "values": {
     "length": 160,
     "depth": 22,
     "jawGap": 1.2,
     "jointGap": 0.3,
     "ridges": true,
     "label": "BREAD",
     "font": "lilita",
     "raised": false,
     "mount": "none",
     "colorMode": "multi",
     "baseColor": "#15803d",
     "letterColor": "#fef9c3",
     "material": "pla",
     "layerHeight": 0.16,
     "wallCount": 4,
     "infill": 100
    }
   },
   {
    "id": "freezer-bag-clip",
    "title": "Freezer bag clip, 80 mm",
    "description": "An 80 mm clip with a hole to hang a freezer bag from a rail, in PETG for the cold.",
    "values": {
     "length": 80,
     "depth": 14,
     "jawGap": 0.6,
     "jointGap": 0.3,
     "ridges": true,
     "label": "FREEZER",
     "font": "lilita",
     "raised": false,
     "mount": "hole",
     "colorMode": "multi",
     "baseColor": "#1d4ed8",
     "letterColor": "#fef9c3",
     "material": "petg",
     "layerHeight": 0.16,
     "wallCount": 4,
     "infill": 100
    }
   },
   {
    "id": "pet-food-bag-clip",
    "title": "Pet food bag clip, 200 mm",
    "description": "A 200 mm clip with a 2 mm gap and deep jaws: a big bag of pet food or flour, folded thick.",
    "values": {
     "length": 200,
     "depth": 25,
     "jawGap": 2,
     "jointGap": 0.3,
     "ridges": true,
     "label": "PET FOOD",
     "font": "lilita",
     "raised": false,
     "mount": "none",
     "colorMode": "multi",
     "baseColor": "#0f766e",
     "letterColor": "#fef9c3",
     "material": "pla",
     "layerHeight": 0.16,
     "wallCount": 4,
     "infill": 100
    }
   },
   {
    "id": "gift-bag-clip",
    "title": "Gift bag clip: for you",
    "description": "A 90 mm clip with FOR YOU standing on the lid in a second colour: a bag of cookies or sweets as a gift.",
    "values": {
     "length": 90,
     "depth": 16,
     "jawGap": 0.8,
     "jointGap": 0.3,
     "ridges": true,
     "label": "FOR YOU",
     "font": "lilita",
     "raised": true,
     "mount": "none",
     "colorMode": "multi",
     "baseColor": "#be123c",
     "letterColor": "#fef9c3",
     "material": "pla",
     "layerHeight": 0.16,
     "wallCount": 4,
     "infill": 100
    }
   },
   {
    "id": "plain-bag-clip",
    "title": "Plain bag clip, 70 mm",
    "description": "A 70 mm clip in one colour with nothing on the lid: a handful of them for every bag in the kitchen.",
    "values": {
     "length": 70,
     "depth": 12,
     "jawGap": 0.4,
     "jointGap": 0.3,
     "ridges": false,
     "label": "",
     "font": "lilita",
     "raised": false,
     "mount": "none",
     "colorMode": "single",
     "baseColor": "#f4efe6",
     "letterColor": "#fef9c3",
     "material": "pla",
     "layerHeight": 0.16,
     "wallCount": 4,
     "infill": 100
    }
   }
  ]
 },
 "x-coreParams": {
  "exportFormat": {
   "type": "string",
   "title": "File format",
   "description": "3mf = 3MF (mm); stl = STL files in a zip (mm)",
   "x-group": "download",
   "x-role": "core.exportFormat",
   "x-unit": "none",
   "x-agentSafe": true,
   "enum": [
    "3mf",
    "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": {
  "length": {
   "type": "number",
   "minimum": 40,
   "maximum": 220,
   "multipleOf": 1,
   "title": "Length",
   "description": "Along the bag's edge. A clip holds best a little shorter than the bag is wide.",
   "x-group": "clip",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Garums",
   "default": 120,
   "x-resetOnPreset": true
  },
  "depth": {
   "type": "number",
   "minimum": 10,
   "maximum": 30,
   "multipleOf": 1,
   "title": "Jaw depth",
   "description": "How far the bag goes into the jaws. Deep jaws grip a full bag better; shallow ones fit a small corner.",
   "x-group": "clip",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Žokļa dziļums",
   "default": 16,
   "x-resetOnPreset": true
  },
  "jawGap": {
   "type": "number",
   "minimum": 0.3,
   "maximum": 2,
   "x-step": 0.1,
   "title": "Jaw gap",
   "description": "How thick the folded edge of the bag is, or a little less, so that the jaws squeeze it. Grip ribs need 0.6 mm or more.",
   "x-group": "clip",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Atstarpe starp žokļiem",
   "default": 0.6,
   "x-resetOnPreset": true
  },
  "jointGap": {
   "type": "number",
   "minimum": 0.2,
   "maximum": 0.5,
   "x-step": 0.05,
   "title": "Joint clearance",
   "description": "The gap between the hinge, the latch and the lower jaw as printed. 0.3 mm frees on a tuned printer; 0.4 if the lid sticks.",
   "x-group": "clip",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Savienojuma sprauga",
   "default": 0.3,
   "x-resetOnPreset": true
  },
  "ridges": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Grip ribs",
   "description": "Ribs along the lower jaw that bite into the bag. They need a jaw gap of 0.6 mm or more.",
   "x-group": "clip",
   "x-agentSafe": true,
   "x-label-lv": "Riba satveršanai",
   "default": 1,
   "x-resetOnPreset": true
  },
  "label": {
   "type": "string",
   "maxLength": 16,
   "title": "Label",
   "description": "On top of the lid, up to 16 characters. Empty: nothing. The letters shrink to fit.",
   "x-group": "label",
   "x-agentSafe": true,
   "x-label-lv": "Uzraksts",
   "default": "CHIPS",
   "x-resetOnPreset": true
  },
  "font": {
   "type": "string",
   "enum": [
    "lilita",
    "pacifico",
    "varela",
    "barlow"
   ],
   "x-enumTitles": {
    "lilita": "Bold rounded (Lilita One)",
    "pacifico": "Script, joined letters (Pacifico)",
    "varela": "Clean rounded (Varela Round)",
    "barlow": "Narrow, for long text (Barlow Condensed)"
   },
   "title": "Letter style",
   "description": "The bold style reads from across the kitchen; the narrow one fits a longer word.",
   "x-group": "label",
   "x-agentSafe": true,
   "x-label-lv": "Burtu stils",
   "default": "lilita",
   "x-resetOnPreset": true
  },
  "raised": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Raised letters",
   "description": "Off: the letters are cut into the lid. On: they stand on it, 0.6 mm proud, and can be felt.",
   "x-group": "label",
   "x-agentSafe": true,
   "x-label-lv": "Izcelti burti",
   "default": 0,
   "x-resetOnPreset": true
  },
  "mount": {
   "type": "string",
   "enum": [
    "none",
    "hole",
    "magnet"
   ],
   "x-enumTitles": {
    "none": "None",
    "hole": "Hanging hole",
    "magnet": "Magnet pocket"
   },
   "title": "Hanger",
   "description": "A 4 mm hole through both jaws near one end, or a pocket in the lid for a 6 x 2 mm magnet, to park the clip on the fridge.",
   "x-group": "clip",
   "x-agentSafe": true,
   "x-label-lv": "Turētājs",
   "default": "none",
   "x-resetOnPreset": true
  },
  "colorMode": {
   "type": "string",
   "enum": [
    "single",
    "multi"
   ],
   "x-enumTitles": {
    "single": "One colour",
    "multi": "Two colours: clip and label"
   },
   "title": "Colours",
   "description": "Two colours fills an engraving flush, or prints raised letters in a second colour, in a 3MF for a multi-material printer.",
   "x-group": "look",
   "x-agentSafe": true,
   "x-label-lv": "Krāsas",
   "default": "multi",
   "x-resetOnPreset": true
  },
  "baseColor": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Clip colour",
   "description": "Both jaws.",
   "x-group": "look",
   "x-role": "core.previewColor",
   "x-agentSafe": true,
   "x-label-lv": "Klipa krāsa",
   "default": "#0e7490",
   "x-resetOnPreset": true
  },
  "letterColor": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Label colour",
   "description": "The letters.",
   "x-group": "look",
   "x-visibleIf": {
    "colorMode": "multi"
   },
   "x-agentSafe": true,
   "x-label-lv": "Uzraksta krāsa",
   "default": "#fef9c3",
   "x-resetOnPreset": true
  },
  "material": {
   "type": "string",
   "enum": [
    "pla",
    "petg",
    "asa"
   ],
   "x-enumTitles": {
    "pla": "PLA",
    "petg": "PETG",
    "asa": "ASA"
   },
   "title": "Filament",
   "description": "PLA is stiff and snaps sharply. PETG bends further before it breaks: better for a clip that is opened many times a day, or left in the sun.",
   "x-group": "print",
   "x-role": "core.printMaterial",
   "x-agentSafe": true,
   "x-label-lv": "Filaments",
   "default": "pla",
   "x-resetOnPreset": true
  },
  "layerHeight": {
   "type": "number",
   "minimum": 0.12,
   "maximum": 0.3,
   "x-step": 0.02,
   "title": "Layer height",
   "description": "0.16 mm or less: the joint clearance is a layer and a half, and thinner layers bridge the lid better.",
   "x-group": "print",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Slāņa augstums",
   "default": 0.16,
   "x-resetOnPreset": true
  },
  "wallCount": {
   "type": "integer",
   "minimum": 3,
   "maximum": 8,
   "multipleOf": 1,
   "title": "Perimeter walls",
   "description": "Four lines: the tongues of the latch and the arches of the hinge are all walls.",
   "x-group": "print",
   "x-unit": "count",
   "x-role": "print.wallCount",
   "x-agentSafe": true,
   "x-label-lv": "Sienu skaits",
   "default": 4,
   "x-resetOnPreset": true
  },
  "infill": {
   "type": "integer",
   "minimum": 10,
   "maximum": 100,
   "multipleOf": 5,
   "title": "Infill",
   "description": "100 %: a clip is small, and solid jaws do not creep.",
   "x-group": "print",
   "x-unit": "pct",
   "x-role": "print.infill",
   "x-agentSafe": true,
   "x-label-lv": "Aizpildījums",
   "default": 100,
   "x-resetOnPreset": true
  }
 },
 "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)"
  }
 ]
}