{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://paramlet.com/tools/desk-grommet/schema.json",
 "title": "Desk grommet — parameters",
 "description": "Make cable grommets that fit the hole you have: set hole size, desk thickness and lid (closed, cable slot, split, brush or rotating), with a fit ring. 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": "desk-grommet",
 "x-toolVersion": "1.2.0",
 "x-specVersion": "1.0",
 "x-apiVersion": "1",
 "x-groups": [
  {
   "id": "hole",
   "title": "Hole and desk top"
  },
  {
   "id": "lid",
   "title": "Lid"
  },
  {
   "id": "fit",
   "title": "Fit"
  },
  {
   "id": "look",
   "title": "Texture & colour"
  },
  {
   "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": "desk-grommet-60mm-cable-slot",
    "title": "60 mm desk grommet with a cable slot",
    "description": "For the usual 60 mm desk hole in a 19 mm top. The lid takes three cables of about 6 mm.",
    "values": {
     "holeDia": 60,
     "boardThickness": 19,
     "flangeDiameter": 74,
     "lidStyle": "slot",
     "cableDia": 6,
     "cableCount": 3,
     "color": "#c85a32",
     "lidColor": "#f3efe6"
    }
   },
   {
    "id": "closed-desk-hole-cover-60mm",
    "title": "60 mm desk hole cover (closed lid)",
    "description": "Closes a 60 mm desk hole that is not used. Lift the lid by the notch when you need the hole again.",
    "values": {
     "holeDia": 60,
     "boardThickness": 19,
     "flangeDiameter": 74,
     "lidStyle": "solid",
     "color": "#2a7f76",
     "lidColor": "#e7e2d6"
    }
   },
   {
    "id": "desk-grommet-80mm-split-lid",
    "title": "80 mm desk grommet with a split lid",
    "description": "For an 80 mm hole in a 25 mm top. The lid is in two halves: lift one out to thread through a cable that already has a plug attached.",
    "values": {
     "holeDia": 80,
     "boardThickness": 25,
     "flangeDiameter": 96,
     "lidStyle": "split",
     "cableDia": 6,
     "color": "#d4a024",
     "lidColor": "#1f2a37"
    }
   },
   {
    "id": "us-2-inch-desk-hole-grommet",
    "title": "2 inch (51 mm) desk hole grommet",
    "description": "For the 2 inch desk holes common in the US: 51 mm. Measure yours, they vary.",
    "values": {
     "holeDia": 51,
     "boardThickness": 19,
     "flangeDiameter": 64,
     "lidStyle": "slot",
     "cableDia": 6,
     "cableCount": 2,
     "color": "#3b5b8c",
     "lidColor": "#dfe3e8"
    }
   },
   {
    "id": "ethernet-wall-grommet",
    "title": "Wall grommet for an Ethernet cable",
    "description": "For an Ethernet cable through 13 mm drywall: a 40 mm hole and a lid with an opening that the plug itself passes through.",
    "values": {
     "holeDia": 40,
     "boardThickness": 13,
     "flangeDiameter": 52,
     "lidStyle": "slot",
     "portType": "ethernet",
     "cableDia": 6,
     "cableCount": 1,
     "color": "#5b7f4b",
     "lidColor": "#f3efe6"
    }
   },
   {
    "id": "desk-grommet-60mm-rotating-lid",
    "title": "60 mm desk grommet with a rotating lid",
    "description": "The lid turns on a pin: turn it to line up the slots and pass cables, turn it back to cover them.",
    "values": {
     "holeDia": 60,
     "boardThickness": 19,
     "flangeDiameter": 74,
     "lidStyle": "rotating",
     "cableDia": 6,
     "cableCount": 3,
     "color": "#8c3b5c",
     "lidColor": "#e8d9d3"
    }
   },
   {
    "id": "desk-grommet-80mm-worktop-38mm",
    "title": "80 mm grommet for a 38 mm worktop",
    "description": "For a thick worktop or a butcher-block top: the tube is 38 mm long. Bristles on the lid close round the cables.",
    "values": {
     "holeDia": 80,
     "boardThickness": 38,
     "flangeDiameter": 96,
     "lidStyle": "brush",
     "cableDia": 6,
     "color": "#d97742",
     "lidColor": "#f4efe6"
    }
   }
  ]
 },
 "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"
  },
  "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": {
  "holeDia": {
   "type": "number",
   "minimum": 20,
   "maximum": 100,
   "x-step": 0.5,
   "title": "Desk hole diameter (measure)",
   "description": "Across the drilled hole, at its narrowest. 60 and 80 mm are the usual desk sizes; a 2 inch hole is 51 mm.",
   "x-group": "hole",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Galda cauruma diametrs (izmēri)",
   "default": 60,
   "x-resetOnPreset": true
  },
  "boardThickness": {
   "type": "number",
   "minimum": 8,
   "maximum": 50,
   "multipleOf": 1,
   "title": "Desk top thickness (measure)",
   "description": "Thickness of the desk top, shelf or wall the hole is in. The tube reaches through it.",
   "x-group": "hole",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Galdvirsmas biezums (izmēri)",
   "default": 19,
   "x-resetOnPreset": true
  },
  "flangeDiameter": {
   "type": "number",
   "minimum": 24,
   "maximum": 140,
   "multipleOf": 1,
   "title": "Flange diameter",
   "description": "Width of the ring that lies on top and hides the edge of the hole. It has to be larger than the hole.",
   "x-group": "hole",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Atloka diametrs",
   "default": 74,
   "x-resetOnPreset": true
  },
  "flangeHeight": {
   "type": "number",
   "minimum": 1.6,
   "maximum": 4,
   "x-step": 0.2,
   "title": "Flange thickness",
   "description": "Thickness of the ring on top of the desk.",
   "x-group": "hole",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Atloka biezums",
   "default": 2.4,
   "x-resetOnPreset": true
  },
  "lidStyle": {
   "type": "string",
   "enum": [
    "solid",
    "slot",
    "split",
    "brush",
    "rotating"
   ],
   "x-enumTitles": {
    "solid": "Closed lid",
    "slot": "Lid with a cable slot",
    "split": "Split lid (two halves)",
    "brush": "Brush lid (bristles)",
    "rotating": "Rotating lid"
   },
   "title": "Lid",
   "description": "Closed covers the hole. Slot has an opening for cables. Split is two halves with a gap. Brush has bristles that close round the cables. Rotating turns on a pin.",
   "x-group": "lid",
   "x-agentSafe": true,
   "x-label-lv": "Vāks",
   "default": "slot",
   "x-resetOnPreset": true
  },
  "lidTurned": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Lid turned over the slot",
   "description": "Shows the rotating lid turned, so that it covers the slot. The printed parts are the same; you turn it by hand.",
   "x-group": "lid",
   "x-visibleIf": {
    "lidStyle": "rotating"
   },
   "x-agentSafe": true,
   "x-label-lv": "Vāks pagriezts pāri spraugai",
   "default": 0,
   "x-resetOnPreset": true
  },
  "portType": {
   "type": "string",
   "enum": [
    "none",
    "usbA",
    "ethernet"
   ],
   "x-enumTitles": {
    "none": "Round cables",
    "usbA": "USB-A plug passes",
    "ethernet": "Ethernet plug passes"
   },
   "title": "Opening for",
   "description": "A shaped opening in the lid that a USB-A or an Ethernet plug passes through, so that a cable with its plug on can go through the desk.",
   "x-group": "lid",
   "x-visibleIf": {
    "lidStyle": [
     "slot",
     "rotating"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Atvere priekš",
   "default": "none",
   "x-resetOnPreset": true
  },
  "cableDia": {
   "type": "number",
   "minimum": 2,
   "maximum": 15,
   "x-step": 0.5,
   "title": "Cable diameter (measure)",
   "description": "Of the cables that go through. The slot is made a little larger.",
   "x-group": "lid",
   "x-unit": "mm",
   "x-visibleIf": {
    "lidStyle": [
     "slot",
     "split",
     "brush",
     "rotating"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Kabeļa diametrs (izmēri)",
   "default": 6,
   "x-resetOnPreset": true
  },
  "cableCount": {
   "type": "integer",
   "minimum": 1,
   "maximum": 6,
   "multipleOf": 1,
   "title": "Cables",
   "description": "How many cables go through the slot side by side. The page warns you if the lid is too small for them.",
   "x-group": "lid",
   "x-unit": "count",
   "x-visibleIf": {
    "lidStyle": [
     "slot",
     "rotating"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Kabeļi",
   "default": 3,
   "x-resetOnPreset": true
  },
  "wall": {
   "type": "number",
   "minimum": 1.6,
   "maximum": 4,
   "x-step": 0.2,
   "title": "Tube wall thickness",
   "description": "Of the tube that sits in the hole.",
   "x-group": "fit",
   "x-unit": "mm",
   "x-role": "core.wallThickness",
   "x-agentSafe": true,
   "x-label-lv": "Caurules sienas biezums",
   "default": 2.4,
   "x-resetOnPreset": true
  },
  "clearance": {
   "type": "number",
   "minimum": 0,
   "maximum": 1,
   "x-step": 0.05,
   "title": "Fit clearance",
   "description": "Room between the grommet and the wall of the hole, on each side. Less holds tighter. Find it with the fit ring.",
   "x-group": "fit",
   "x-unit": "mm",
   "x-role": "core.clearance",
   "x-agentSafe": true,
   "x-label-lv": "Pielaides atstarpe",
   "default": 0.25,
   "x-resetOnPreset": true
  },
  "pressRibs": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Press-fit ribs",
   "description": "Four raised strips on the tube that press against the wall of the hole, so that the grommet stays put.",
   "x-group": "fit",
   "x-agentSafe": true,
   "x-label-lv": "Spiedes ribas",
   "default": 1,
   "x-resetOnPreset": true
  },
  "includeFitRing": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Include fit ring",
   "description": "A short ring of the same outside size beside the part. Press it into the hole: it should go in with force and stay.",
   "x-group": "fit",
   "x-agentSafe": true,
   "x-label-lv": "Iekļaut pielaides gredzenu",
   "default": 1,
   "x-resetOnPreset": true
  },
  "lidTexture": {
   "type": "string",
   "enum": [
    "none",
    "waves",
    "diamond",
    "hex",
    "wood",
    "hammered",
    "basketweave",
    "folk",
    "dots"
   ],
   "x-enumTitles": {
    "none": "Smooth (none)",
    "waves": "Waves",
    "diamond": "Diamond",
    "hex": "Hexagon",
    "wood": "Wood grain",
    "hammered": "Hammered",
    "basketweave": "Basketweave",
    "folk": "Folk diamond",
    "dots": "Dots"
   },
   "title": "Lid surface texture",
   "description": "Carved decorative relief on the visible top face of the lid (prints flat without supports across all 5 lid styles).",
   "x-group": "look",
   "x-agentSafe": true,
   "x-label-lv": "Vāka virsmas tekstūra",
   "default": "none",
   "x-resetOnPreset": true
  },
  "textureDepth": {
   "type": "number",
   "minimum": 0.3,
   "maximum": 0.6,
   "x-step": 0.05,
   "title": "Texture depth",
   "description": "Carved depth into the lid top face (0.3–0.6 mm).",
   "x-group": "look",
   "x-unit": "mm",
   "x-visibleIf": {
    "lidTexture": {
     "ne": "none"
    }
   },
   "x-advanced": true,
   "x-agentSafe": true,
   "x-label-lv": "Tekstūras dziļums",
   "default": 0.4,
   "x-resetOnPreset": true
  },
  "textureScale": {
   "type": "number",
   "minimum": 4,
   "maximum": 14,
   "multipleOf": 1,
   "title": "Texture scale",
   "description": "Pattern repeat pitch in millimetres.",
   "x-group": "look",
   "x-unit": "mm",
   "x-visibleIf": {
    "lidTexture": {
     "ne": "none"
    }
   },
   "x-advanced": true,
   "x-agentSafe": true,
   "x-label-lv": "Tekstūras mērogs",
   "default": 7,
   "x-resetOnPreset": true
  },
  "color": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Colour",
   "description": "Take the colour of the desk top: black for a dark top, white for a light one.",
   "x-group": "look",
   "x-role": "core.previewColor",
   "x-agentSafe": true,
   "x-label-lv": "Krāsa",
   "default": "#23252b"
  },
  "lidColor": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Lid colour",
   "description": "The lid follows the main colour until you pick another one here: then a two-colour grommet from two filaments, with no nozzle change.",
   "x-group": "look",
   "x-agentSafe": true,
   "x-label-lv": "Vāka krāsa",
   "default": "#23252b"
  },
  "material": {
   "type": "string",
   "enum": [
    "pla",
    "petg"
   ],
   "x-enumTitles": {
    "pla": "PLA (indoors)",
    "petg": "PETG (warm room)"
   },
   "title": "Filament",
   "description": "PLA is enough on a desk. PETG where it gets warm, or for the brush lid, which bends.",
   "x-group": "print",
   "x-role": "core.printMaterial",
   "x-agentSafe": true,
   "x-label-lv": "Filaments",
   "default": "pla"
  },
  "wallCount": {
   "type": "integer",
   "minimum": 2,
   "maximum": 6,
   "multipleOf": 1,
   "title": "Perimeter walls",
   "description": "Perimeter lines. Four make the tube and the ribs solid.",
   "x-group": "print",
   "x-unit": "count",
   "x-role": "print.wallCount",
   "x-agentSafe": true,
   "x-label-lv": "Sienu skaits",
   "default": 3
  },
  "infill": {
   "type": "integer",
   "minimum": 5,
   "maximum": 100,
   "multipleOf": 5,
   "title": "Infill",
   "description": "15 to 25 % is enough: the flange and the lids are solid from their walls.",
   "x-group": "print",
   "x-unit": "pct",
   "x-role": "print.infill",
   "x-agentSafe": true,
   "x-label-lv": "Aizpildījums",
   "default": 20
  }
 },
 "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)"
  }
 ]
}