{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "slow_bloom_loads.schema.json",
  "title": "slow_bloom_loads",
  "description": "Roll up the masses, positions and wind-catch areas of the Slow Bloom design as drawn, as INPUT to a licensed structural engineer's check. Returns per-group masses, the centre of gravity, the dead-load imbalance about the boom pivot, the counterweight's trim authority, the wind-catch area with its horizontal and vertical lever arms, and the bare code velocity pressure. It performs no structural analysis and returns no design value.",
  "type": "object",
  "properties": {
    "design": { "type": "string", "description": "Name of the design." },
    "effective": { "type": "string", "description": "Date the dimensions and weights were read (ISO date)." },
    "datum": {
      "type": "object",
      "description": "Where x and z are measured from. Carried through to the output so a reader cannot misread the arms.",
      "properties": {
        "x_ft": { "type": "string" },
        "z_ft": { "type": "string" },
        "note": { "type": "string" }
      },
      "additionalProperties": true
    },
    "cf_bracket": {
      "type": "array",
      "description": "Shape factors to bracket the indicative force with. Default [1.0, 2.0]. These are NOT design shape factors.",
      "items": { "type": "number" }
    },
    "components": {
      "type": "array",
      "minItems": 1,
      "description": "One entry per piece of the sculpture. Each must be in group 'rotating' (carried through the main ring) or 'fixed' (carried straight down the mast), and must declare exactly one mass specification.",
      "items": {
        "type": "object",
        "properties": {
          "id": { "type": "string", "description": "Short unique key, e.g. 'boom-tube'." },
          "group": { "type": "string", "enum": ["rotating", "fixed"] },
          "item": { "type": "string", "description": "What the piece is, in words." },
          "x_ft": { "type": "number", "description": "Distance along the boom from the yaw axis; + is outboard." },
          "z_ft": { "type": "number", "description": "Height above finished grade." },
          "source": { "type": "string", "description": "Which BOM line or section formula the mass came from." },
          "mass_lb": { "type": "number", "description": "Mass directly, when the piece is not a simple section." },
          "tube": {
            "type": "object",
            "description": "Hollow round section, mass computed from the dimensions.",
            "properties": {
              "od_in": { "type": "number" },
              "wall_in": { "type": "number" },
              "length_ft": { "type": "number" },
              "material": { "type": "string", "enum": ["steel", "stainless316"], "default": "steel" }
            },
            "required": ["od_in", "wall_in", "length_ft"],
            "additionalProperties": true
          },
          "plate": {
            "type": "object",
            "description": "Flat plate, mass computed from face area and thickness.",
            "properties": {
              "area_sqin": { "type": "number" },
              "thickness_in": { "type": "number" },
              "material": { "type": "string", "enum": ["steel", "stainless316"], "default": "steel" }
            },
            "required": ["area_sqin", "thickness_in"],
            "additionalProperties": true
          },
          "solid_bar": {
            "type": "object",
            "description": "Solid round bar, mass computed from diameter and length.",
            "properties": {
              "diameter_in": { "type": "number" },
              "length_ft": { "type": "number" },
              "material": { "type": "string", "enum": ["steel", "stainless316"], "default": "steel" }
            },
            "required": ["diameter_in", "length_ft"],
            "additionalProperties": true
          }
        },
        "required": ["id", "group", "item", "x_ft"],
        "additionalProperties": true
      }
    },
    "wind_areas": {
      "type": "array",
      "minItems": 1,
      "description": "Every surface the wind can push on, with the arm it pushes at.",
      "items": {
        "type": "object",
        "properties": {
          "id": { "type": "string" },
          "item": { "type": "string" },
          "area_sqft": { "type": "number", "exclusiveMinimum": 0, "description": "Projected frontal area." },
          "x_ft": { "type": "number", "description": "Horizontal arm from the mast axis." },
          "z_ft": { "type": "number", "description": "Height above grade - the arm that overturns the base." },
          "role": {
            "type": "string",
            "description": "'load' counts toward the rotating total, 'fixed' is the mast itself (carried straight down), 'summary' is a statement of a group already listed and is excluded from every total.",
            "enum": ["load", "fixed", "summary"],
            "default": "load"
          },
          "note": { "type": "string" }
        },
        "required": ["id", "area_sqft", "x_ft", "z_ft"],
        "additionalProperties": true
      }
    },
    "wind": {
      "type": "object",
      "description": "The design wind the county adopts, plus the velocity pressure exposure coefficient. Only used to print qz = 0.00256 V^2 Kz.",
      "properties": {
        "speed_mph": { "type": "number", "description": "3-second gust design wind speed." },
        "kz": { "type": "number", "description": "Velocity pressure exposure coefficient at the piece's height band." },
        "basis": { "type": "string", "description": "Where the speed comes from." },
        "source": { "type": "string" },
        "factors_left_to_the_engineer": { "type": "array", "items": { "type": "string" } }
      },
      "required": ["speed_mph"],
      "additionalProperties": true
    },
    "known_unknowns_left_to_the_engineer": {
      "type": "array",
      "description": "The site and code questions that no amount of drawing will answer - carried through to the output verbatim.",
      "items": { "type": "string" }
    }
  },
  "required": ["components", "wind_areas", "wind"],
  "additionalProperties": true
}
