{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://paramlet.com/tools/christmas-ornament/schema.json",
 "title": "Christmas ornament generator — parameters",
 "description": "Design personalised 3D-printable Christmas tree ornaments—balls, stars, snowflakes, hearts, bells, medallions and trees—with custom text and patterns. 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": "christmas-ornament",
 "x-toolVersion": "0.1.0",
 "x-specVersion": "1.0",
 "x-apiVersion": "1",
 "x-groups": [
  {
   "id": "shape",
   "title": "Shape & size"
  },
  {
   "id": "text",
   "title": "Personalisation"
  },
  {
   "id": "pattern",
   "title": "Surface pattern"
  },
  {
   "id": "hanger",
   "title": "Hanger & light"
  },
  {
   "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": "classic-ball",
    "title": "Classic ball with name",
    "description": "Two snap-fit ribbed halves with raised name text — prints without supports.",
    "values": {
     "shape": "ball",
     "size": 70,
     "wallThickness": 1.6,
     "ballMode": "two-half-snap",
     "textMode": "emboss",
     "line1": "NOEL",
     "line2": "2026",
     "textDepth": 1,
     "twoColorText": false,
     "pattern": "ribs",
     "patternCount": 16,
     "patternDepth": 1.2,
     "hangerType": "loop",
     "hangerHoleDia": 4,
     "lightPocket": false
    }
   },
   {
    "id": "snowflake-6",
    "title": "6-arm snowflake",
    "description": "Procedural 6-arm snowflake from a deterministic seed.",
    "values": {
     "shape": "snowflake",
     "size": 80,
     "wallThickness": 2,
     "flakeSeed": 2026,
     "flakeArms": 6,
     "flakeDepth": 2,
     "flakeAngle": 55,
     "textMode": "none",
     "pattern": "none",
     "hangerType": "loop",
     "hangerHoleDia": 3.5,
     "lightPocket": false
    }
   },
   {
    "id": "faceted-star",
    "title": "Faceted star",
    "description": "3D faceted 5-point star with integrated top loop.",
    "values": {
     "shape": "star",
     "size": 75,
     "wallThickness": 1.8,
     "starStyle": "faceted",
     "starPoints": 5,
     "textMode": "none",
     "pattern": "none",
     "hangerType": "loop",
     "hangerHoleDia": 4,
     "lightPocket": false
    }
   },
   {
    "id": "heart-date",
    "title": "Heart with date",
    "description": "Beveled heart ornament with two-line embossed date and ribbon hole.",
    "values": {
     "shape": "heart",
     "size": 65,
     "wallThickness": 2,
     "textMode": "emboss",
     "line1": "2026",
     "line2": "LOVE",
     "textDepth": 1,
     "twoColorText": false,
     "pattern": "none",
     "hangerType": "hole",
     "hangerHoleDia": 4.5,
     "lightPocket": false
    }
   },
   {
    "id": "tea-light-lantern",
    "title": "LED tea-light lantern ball",
    "description": "Hollow vase-friendly lantern ball with Voronoi light holes and 38.5 mm LED tea-light pocket.",
    "values": {
     "shape": "ball",
     "size": 85,
     "wallThickness": 1.8,
     "ballMode": "vase-shell",
     "textMode": "none",
     "pattern": "voronoi",
     "patternCount": 14,
     "hangerType": "cap",
     "hangerHoleDia": 4,
     "lightPocket": true,
     "lightDiameter": 38.5
    }
   },
   {
    "id": "kids-medallion",
    "title": "Kids' flat medallion",
    "description": "Sturdy flat disc medallion with raised rim and two-colour text for filament swap or AMS.",
    "values": {
     "shape": "medallion",
     "size": 65,
     "wallThickness": 2.4,
     "textMode": "emboss",
     "line1": "SANTA",
     "line2": "2026",
     "textDepth": 1.2,
     "twoColorText": true,
     "pattern": "none",
     "hangerType": "hole",
     "hangerHoleDia": 5,
     "lightPocket": false
    }
   }
  ]
 },
 "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": {
  "shape": {
   "type": "string",
   "enum": [
    "ball",
    "star",
    "snowflake",
    "heart",
    "bell",
    "medallion",
    "tree"
   ],
   "x-enumTitles": {
    "ball": "Ball (bauble)",
    "star": "Star",
    "snowflake": "Snowflake",
    "heart": "Heart",
    "bell": "Bell",
    "medallion": "Flat medallion",
    "tree": "Christmas tree"
   },
   "title": "Ornament shape",
   "description": "Choose the base ornament geometry; all shapes orient flat on the print bed.",
   "x-group": "shape",
   "x-agentSafe": true,
   "x-label-lv": "Rotājuma forma",
   "default": "ball",
   "x-resetOnPreset": true
  },
  "size": {
   "type": "number",
   "minimum": 30,
   "maximum": 120,
   "multipleOf": 1,
   "title": "Size (diameter / width)",
   "description": "Overall outer diameter or width of the ornament in millimetres.",
   "x-group": "shape",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Izmērs (diametrs / platums)",
   "default": 70
  },
  "wallThickness": {
   "type": "number",
   "minimum": 0.8,
   "maximum": 5,
   "x-step": 0.2,
   "title": "Wall thickness",
   "description": "Shell wall thickness for hollow balls/bells or minimum thickness for flat ornaments.",
   "x-group": "shape",
   "x-unit": "mm",
   "x-role": "core.wallThickness",
   "x-agentSafe": true,
   "x-label-lv": "Sienas biezums",
   "default": 1.6
  },
  "ballMode": {
   "type": "string",
   "enum": [
    "two-half-snap",
    "two-half-glue",
    "vase-shell"
   ],
   "x-enumTitles": {
    "two-half-snap": "Two halves (snap-fit)",
    "two-half-glue": "Two halves (glue lip)",
    "vase-shell": "Single vase-mode shell"
   },
   "title": "Ball construction",
   "description": "Two halves print flat with zero supports; vase-shell prints as one hollow piece.",
   "x-group": "shape",
   "x-visibleIf": {
    "shape": "ball"
   },
   "x-agentSafe": true,
   "x-label-lv": "Bumbas konstrukcija",
   "default": "two-half-snap",
   "x-resetOnPreset": true
  },
  "starStyle": {
   "type": "string",
   "enum": [
    "faceted",
    "flat"
   ],
   "x-enumTitles": {
    "faceted": "3D faceted",
    "flat": "Flat extruded"
   },
   "title": "Star style",
   "description": "Faceted stars have raised 3D ridges; flat stars print fast and crisp.",
   "x-group": "shape",
   "x-visibleIf": {
    "shape": "star"
   },
   "x-agentSafe": true,
   "x-label-lv": "Zvaigznes stils",
   "default": "faceted",
   "x-resetOnPreset": true
  },
  "starPoints": {
   "type": "integer",
   "minimum": 5,
   "maximum": 8,
   "multipleOf": 1,
   "title": "Star points",
   "description": "Number of outer points around the star.",
   "x-group": "shape",
   "x-unit": "count",
   "x-visibleIf": {
    "shape": "star"
   },
   "x-agentSafe": true,
   "x-label-lv": "Zvaigznes stari",
   "default": 5,
   "x-resetOnPreset": true
  },
  "flakeSeed": {
   "type": "integer",
   "minimum": 1,
   "maximum": 9999,
   "multipleOf": 1,
   "title": "Snowflake seed",
   "description": "Deterministic random seed; the same seed always produces the exact same snowflake.",
   "x-group": "shape",
   "x-unit": "count",
   "x-visibleIf": {
    "shape": "snowflake"
   },
   "x-agentSafe": true,
   "x-label-lv": "Sniegpārsliņas sēkla",
   "default": 2026,
   "x-resetOnPreset": true
  },
  "flakeArms": {
   "type": "integer",
   "minimum": 6,
   "maximum": 8,
   "multipleOf": 1,
   "title": "Snowflake arms",
   "description": "Number of symmetric radial arms (natural snowflakes have 6).",
   "x-group": "shape",
   "x-unit": "count",
   "x-visibleIf": {
    "shape": "snowflake"
   },
   "x-agentSafe": true,
   "x-label-lv": "Sniegpārsliņas stari",
   "default": 6,
   "x-resetOnPreset": true
  },
  "flakeDepth": {
   "type": "integer",
   "minimum": 1,
   "maximum": 3,
   "multipleOf": 1,
   "title": "Branch depth",
   "description": "How many levels of side branches grow along each arm.",
   "x-group": "shape",
   "x-unit": "count",
   "x-visibleIf": {
    "shape": "snowflake"
   },
   "x-agentSafe": true,
   "x-label-lv": "Zaru dziļums",
   "default": 2,
   "x-resetOnPreset": true
  },
  "flakeAngle": {
   "type": "number",
   "minimum": 30,
   "maximum": 75,
   "multipleOf": 5,
   "title": "Branch angle",
   "description": "Angle of side branches relative to the main snowflake arm.",
   "x-group": "shape",
   "x-unit": "deg",
   "x-visibleIf": {
    "shape": "snowflake"
   },
   "x-agentSafe": true,
   "x-label-lv": "Zaru leņķis",
   "default": 55,
   "x-resetOnPreset": true
  },
  "textMode": {
   "type": "string",
   "enum": [
    "none",
    "emboss",
    "deboss",
    "cutout"
   ],
   "x-enumTitles": {
    "none": "No text",
    "emboss": "Embossed (raised)",
    "deboss": "Debossed (engraved)",
    "cutout": "Cut-through"
   },
   "title": "Text style",
   "description": "Raised, recessed, or cut-through lettering automatically scaled to fit the face.",
   "x-group": "text",
   "x-agentSafe": true,
   "x-label-lv": "Teksta stils",
   "default": "emboss",
   "x-resetOnPreset": true
  },
  "line1": {
   "type": "string",
   "maxLength": 14,
   "title": "Line 1 (name / year)",
   "description": "Primary text line (up to 14 ASCII characters; auto-fits the ornament face).",
   "x-group": "text",
   "x-visibleIf": {
    "textMode": {
     "ne": "none"
    }
   },
   "x-agentSafe": true,
   "x-label-lv": "1. rinda (vārds / gads)",
   "default": "NOEL",
   "x-resetOnPreset": true
  },
  "line2": {
   "type": "string",
   "maxLength": 14,
   "title": "Line 2 (optional)",
   "description": "Optional second line such as a year or short greeting (up to 14 characters).",
   "x-group": "text",
   "x-visibleIf": {
    "textMode": {
     "ne": "none"
    }
   },
   "x-agentSafe": true,
   "x-label-lv": "2. rinda (neobligāta)",
   "default": "",
   "x-resetOnPreset": true
  },
  "textDepth": {
   "type": "number",
   "minimum": 0.4,
   "maximum": 3,
   "x-step": 0.2,
   "title": "Text relief depth",
   "description": "Height of raised letters or depth of engraved letters.",
   "x-group": "text",
   "x-unit": "mm",
   "x-visibleIf": {
    "textMode": [
     "emboss",
     "deboss"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Teksta dziļums",
   "default": 1
  },
  "twoColorText": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "Separate two-colour text part",
   "description": "Exports text as its own part for AMS/MMU multi-colour printing or a glued inlay.",
   "x-group": "text",
   "x-visibleIf": {
    "textMode": [
     "emboss",
     "deboss"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Atsevišķa divkrāsu teksta daļa",
   "default": 0,
   "x-resetOnPreset": true
  },
  "pattern": {
   "type": "string",
   "enum": [
    "none",
    "ribs",
    "twist",
    "voronoi",
    "knurl"
   ],
   "x-enumTitles": {
    "none": "None (smooth)",
    "ribs": "Vertical ribs",
    "twist": "Twisted flutes",
    "voronoi": "Voronoi-like holes",
    "knurl": "Diamond knurl"
   },
   "title": "Surface pattern",
   "description": "Decorative texture or light-passing holes applied to the ornament body.",
   "x-group": "pattern",
   "x-agentSafe": true,
   "x-label-lv": "Virsmas raksts",
   "default": "ribs",
   "x-resetOnPreset": true
  },
  "patternCount": {
   "type": "integer",
   "minimum": 6,
   "maximum": 32,
   "multipleOf": 2,
   "title": "Pattern density",
   "description": "Number of ribs, flutes, knurl columns or Voronoi cells around the ornament.",
   "x-group": "pattern",
   "x-unit": "count",
   "x-visibleIf": {
    "pattern": {
     "ne": "none"
    }
   },
   "x-agentSafe": true,
   "x-label-lv": "Raksta blīvums",
   "default": 16
  },
  "patternDepth": {
   "type": "number",
   "minimum": 0.4,
   "maximum": 3,
   "x-step": 0.2,
   "title": "Pattern depth",
   "description": "Radial protrusion or groove depth of the surface texture.",
   "x-group": "pattern",
   "x-unit": "mm",
   "x-visibleIf": {
    "pattern": [
     "ribs",
     "twist",
     "knurl"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Raksta dziļums",
   "default": 1.2
  },
  "hangerType": {
   "type": "string",
   "enum": [
    "loop",
    "hole",
    "cap"
   ],
   "x-enumTitles": {
    "loop": "Integrated top loop",
    "hole": "Ribbon / wire hole",
    "cap": "Cap with hook pocket"
   },
   "title": "Hanger style",
   "description": "Loop or hole prints in one piece; cap adds a classic bauble collar with hook pocket.",
   "x-group": "hanger",
   "x-agentSafe": true,
   "x-label-lv": "Pakarināmā veids",
   "default": "loop",
   "x-resetOnPreset": true
  },
  "hangerHoleDia": {
   "type": "number",
   "minimum": 2,
   "maximum": 10,
   "x-step": 0.5,
   "title": "Hanger hole diameter",
   "description": "Inner diameter for wire hooks (2–3 mm) or satin ribbon (4–8 mm).",
   "x-group": "hanger",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Pakarināmā cauruma diametrs",
   "default": 4
  },
  "lightPocket": {
   "type": "integer",
   "enum": [
    0,
    1
   ],
   "title": "LED tea-light pocket",
   "description": "Hollows the ornament with a bottom pocket for a battery LED tea-light or fairy lights.",
   "x-group": "hanger",
   "x-visibleIf": {
    "shape": [
     "ball",
     "bell",
     "tree"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "LED tējas sveces ligzda",
   "default": 0,
   "x-resetOnPreset": true
  },
  "lightDiameter": {
   "type": "number",
   "minimum": 18,
   "maximum": 45,
   "x-step": 0.5,
   "title": "Tea-light diameter",
   "description": "Standard LED tea-lights are ~38 mm; add 0.5 mm for an easy press fit.",
   "x-group": "hanger",
   "x-unit": "mm",
   "x-visibleIf": {
    "all": [
     {
      "shape": [
       "ball",
       "bell",
       "tree"
      ]
     },
     {
      "lightPocket": true
     }
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Tējas sveces diametrs",
   "default": 38.5
  },
  "clearance": {
   "type": "number",
   "minimum": 0.1,
   "maximum": 0.8,
   "x-step": 0.05,
   "title": "Fit clearance",
   "description": "Clearance for snap-fit ball halves, hanger cap and two-colour text inlay.",
   "x-group": "print",
   "x-unit": "mm",
   "x-role": "core.clearance",
   "x-agentSafe": true,
   "x-label-lv": "Pielaide",
   "default": 0.25
  },
  "printMaterial": {
   "type": "string",
   "enum": [
    "pla",
    "petg"
   ],
   "x-enumTitles": {
    "pla": "PLA (recommended)",
    "petg": "PETG (translucent / durable)"
   },
   "title": "Print material",
   "description": "Used for print mass estimation and README recommendations.",
   "x-group": "print",
   "x-role": "core.printMaterial",
   "x-agentSafe": true,
   "x-label-lv": "Drukas materiāls",
   "default": "pla"
  },
  "resolution": {
   "type": "integer",
   "minimum": 16,
   "maximum": 64,
   "multipleOf": 4,
   "title": "Mesh resolution",
   "description": "Radial segments; higher values are smoother but slower to build.",
   "x-group": "print",
   "x-unit": "count",
   "x-role": "core.resolution",
   "x-advanced": true,
   "x-agentSafe": true,
   "x-label-lv": "Tīkla izšķirtspēja",
   "default": 36
  },
  "color": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Preview colour",
   "description": "Changes the 3D preview colour only.",
   "x-group": "print",
   "x-role": "core.previewColor",
   "x-agentSafe": true,
   "x-label-lv": "Priekšskata krāsa",
   "default": "#c81e1e"
  }
 },
 "additionalProperties": false
}