{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://paramlet.com/tools/spool-adapter/schema.json",
 "title": "Spool adapter — parameters",
 "description": "Make filament spool adapters from your measurements: edge rings for small or cardboard spools in AMS and CFS, hub bushings for AMS Lite and spool holders. 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": "spool-adapter",
 "x-toolVersion": "1.0.0",
 "x-specVersion": "1.0",
 "x-apiVersion": "1",
 "x-groups": [
  {
   "id": "system",
   "title": "Printer system"
  },
  {
   "id": "spool",
   "title": "Your spool (measure it)"
  },
  {
   "id": "fit",
   "title": "Fit and printing"
  },
  {
   "id": "colour",
   "title": "Colour"
  }
 ],
 "x-presets": {
  "note": "Choosing a preset resets every key marked x-resetOnPreset to its default and then applies the preset values.",
  "items": [
   {
    "id": "measure-your-own",
    "title": "Measure your own spool (AMS)",
    "description": "Enter your spool's outer Ø, width and flange thickness; get edge rings that bring it to Ø200 mm for the AMS.",
    "values": {
     "system": "ams",
     "adapter": "auto",
     "spoolDiameter": 140,
     "spoolWidth": 45,
     "flangeThickness": 2.5,
     "color": "#e85d22"
    }
   },
   {
    "id": "cardboard-spool-rings-ams",
    "title": "Cardboard spool edge rings for AMS (1 kg)",
    "description": "Thin caps over the edges of a 1 kg cardboard spool: no cardboard dust in the AMS and smooth rolling.",
    "values": {
     "system": "ams",
     "adapter": "auto",
     "spoolDiameter": 198,
     "spoolWidth": 64,
     "flangeThickness": 3,
     "grip": 3,
     "wall": 1.2,
     "color": "#2563eb"
    }
   },
   {
    "id": "small-250g-spool-ams",
    "title": "Small 250 g spool adapter for AMS",
    "description": "Rings that make a small Ø140 mm, 250 g spool roll in the AMS like a full-size one.",
    "values": {
     "system": "ams",
     "adapter": "auto",
     "spoolDiameter": 140,
     "spoolWidth": 50,
     "flangeThickness": 2,
     "grip": 4,
     "color": "#15803d"
    }
   },
   {
    "id": "ams-lite-500g-spool",
    "title": "500 g spool adapter for AMS Lite",
    "description": "Hub bushings that center a spool with a 74 mm bore on the AMS Lite hub (53–58 mm).",
    "values": {
     "system": "amsLite",
     "adapter": "auto",
     "spoolDiameter": 165,
     "spoolWidth": 55,
     "hubBore": 74,
     "hubLength": 15,
     "color": "#d97706"
    }
   },
   {
    "id": "hub-bore-reducer-holder",
    "title": "Hub bore reducer for a spool holder",
    "description": "Two flanged bushings so a large-bore spool turns on a thin holder spindle without wobbling.",
    "values": {
     "system": "holder",
     "adapter": "auto",
     "spindleDiameter": 32,
     "spoolDiameter": 200,
     "spoolWidth": 65,
     "hubBore": 56,
     "hubLength": 20,
     "color": "#0f766e"
    }
   },
   {
    "id": "small-spool-cfs",
    "title": "Small spool adapter for CFS",
    "description": "Edge rings that bring a Ø150 mm spool to Ø200 mm so it rolls in the Creality CFS.",
    "values": {
     "system": "cfs",
     "adapter": "auto",
     "spoolDiameter": 150,
     "spoolWidth": 52,
     "flangeThickness": 2.2,
     "grip": 4,
     "color": "#b91c1c"
    }
   }
  ]
 },
 "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": {
  "system": {
   "type": "string",
   "enum": [
    "ams",
    "cfs",
    "amsLite",
    "holder"
   ],
   "x-enumTitles": {
    "ams": "AMS (spool rolls on its rims)",
    "cfs": "CFS (spool rolls on its rims)",
    "amsLite": "AMS Lite (spool on a hub)",
    "holder": "Spool holder or spindle"
   },
   "title": "Where the spool goes",
   "description": "Rim systems need the spool at about Ø200 mm; hub systems need the right bore.",
   "x-group": "system",
   "x-agentSafe": true,
   "x-label-lv": "Kur liksi spoli",
   "default": "ams",
   "x-resetOnPreset": true
  },
  "adapter": {
   "type": "string",
   "enum": [
    "auto",
    "rims",
    "hub"
   ],
   "x-enumTitles": {
    "auto": "What the system needs",
    "rims": "Edge rings",
    "hub": "Hub bushings"
   },
   "title": "Adapter",
   "description": "Edge rings for AMS and CFS, hub bushings for AMS Lite and holders.",
   "x-group": "system",
   "x-agentSafe": true,
   "x-label-lv": "Adapteris",
   "default": "auto",
   "x-resetOnPreset": true
  },
  "targetDiameter": {
   "type": "number",
   "minimum": 197,
   "maximum": 202,
   "x-step": 0.5,
   "title": "Spool Ø with rings",
   "description": "The system takes 197–202 mm; 200 mm is the safe middle.",
   "x-group": "system",
   "x-unit": "mm",
   "x-visibleIf": {
    "system": [
     "ams",
     "cfs"
    ]
   },
   "x-agentSafe": true,
   "x-label-lv": "Spoles Ø ar gredzeniem",
   "default": 200,
   "x-resetOnPreset": true
  },
  "spindleDiameter": {
   "type": "number",
   "minimum": 10,
   "maximum": 80,
   "x-step": 0.5,
   "title": "Spindle Ø",
   "description": "Diameter of the holder's spindle or tube.",
   "x-group": "system",
   "x-unit": "mm",
   "x-visibleIf": {
    "system": "holder"
   },
   "x-agentSafe": true,
   "x-label-lv": "Ass Ø",
   "default": 32,
   "x-resetOnPreset": true
  },
  "spoolDiameter": {
   "type": "number",
   "minimum": 80,
   "maximum": 215,
   "x-step": 0.5,
   "title": "Spool outer Ø",
   "description": "Across the flanges (the side discs).",
   "x-group": "spool",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Spoles ārējais Ø",
   "default": 140,
   "x-resetOnPreset": true
  },
  "spoolWidth": {
   "type": "number",
   "minimum": 30,
   "maximum": 80,
   "x-step": 0.5,
   "title": "Spool width",
   "description": "Outside to outside of the two flanges.",
   "x-group": "spool",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Spoles platums",
   "default": 45,
   "x-resetOnPreset": true
  },
  "flangeThickness": {
   "type": "number",
   "minimum": 1,
   "maximum": 6,
   "x-step": 0.1,
   "title": "Flange thickness",
   "description": "Plastic spools about 2–2.5 mm, cardboard about 3 mm.",
   "x-group": "spool",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Atloka biezums",
   "default": 2.5,
   "x-resetOnPreset": true
  },
  "hubBore": {
   "type": "number",
   "minimum": 20,
   "maximum": 90,
   "x-step": 0.5,
   "title": "Hub bore Ø",
   "description": "The hole in the middle of the spool.",
   "x-group": "spool",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Rumbas cauruma Ø",
   "default": 54,
   "x-resetOnPreset": true
  },
  "clearance": {
   "type": "number",
   "minimum": 0.05,
   "maximum": 0.6,
   "x-step": 0.05,
   "title": "Clearance",
   "description": "Gap on the flange channel and on both sides of a bushing. 0.2–0.3 mm suits most printers.",
   "x-group": "fit",
   "x-unit": "mm",
   "x-role": "core.clearance",
   "x-agentSafe": true,
   "x-label-lv": "Pielaide",
   "default": 0.25
  },
  "grip": {
   "type": "number",
   "minimum": 2,
   "maximum": 10,
   "x-step": 0.5,
   "title": "Grip on the flange",
   "description": "How far the ring reaches over the flange. Keep it smaller than the gap between the filament and the rim.",
   "x-group": "fit",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Satvēriens uz atloka",
   "default": 4,
   "x-resetOnPreset": true
  },
  "wall": {
   "type": "number",
   "minimum": 1.2,
   "maximum": 4,
   "x-step": 0.1,
   "title": "Ring wall outside the flange",
   "description": "Raised automatically for narrow spools, lowered to stay under 68 mm.",
   "x-group": "fit",
   "x-unit": "mm",
   "x-role": "core.wallThickness",
   "x-agentSafe": true,
   "x-label-lv": "Gredzena siena ārpus atloka",
   "default": 1.6,
   "x-resetOnPreset": true
  },
  "hubLength": {
   "type": "number",
   "minimum": 5,
   "maximum": 40,
   "multipleOf": 1,
   "title": "Bushing sleeve length",
   "description": "How deep each bushing goes into the spool.",
   "x-group": "fit",
   "x-unit": "mm",
   "x-agentSafe": true,
   "x-label-lv": "Bukses uzmavas garums",
   "default": 15,
   "x-resetOnPreset": true
  },
  "bedSize": {
   "type": "string",
   "enum": [
    "180",
    "220",
    "256"
   ],
   "x-enumTitles": {
    "180": "180 × 180 mm (A1 mini, small beds)",
    "220": "220 × 220 mm",
    "256": "256 × 256 mm"
   },
   "title": "Printer bed",
   "description": "Ring segments are made as few as fit your bed.",
   "x-group": "fit",
   "x-agentSafe": true,
   "x-label-lv": "Drukas virsma",
   "default": "180"
  },
  "color": {
   "type": "string",
   "pattern": "^#[0-9a-fA-F]{6}$",
   "title": "Colour",
   "description": "Preview and 3MF colour.",
   "x-group": "colour",
   "x-role": "core.previewColor",
   "x-agentSafe": true,
   "x-label-lv": "Krāsa",
   "default": "#3a6fd8"
  },
  "printMaterial": {
   "type": "string",
   "enum": [
    "petg",
    "pla"
   ],
   "x-enumTitles": {
    "petg": "PETG (tough, recommended)",
    "pla": "PLA"
   },
   "title": "Print material",
   "description": "Only used for the mass.",
   "x-group": "colour",
   "x-role": "core.printMaterial",
   "x-agentSafe": true,
   "x-label-lv": "Drukas materiāls",
   "default": "petg"
  }
 },
 "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)"
  }
 ]
}