{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.8/roofFalls/edges.schema.json",
  "$comment": "OpenEik 0.8: folded by tools/fold-schemas-0.8.mjs from the proposal roofFalls, which 0.8 makes a rule (open questions, 186). Written by hand, not generated.",
  "title": "A roof's edges",
  "description": "The rule of each edge of a roof's outline, by its id (Part II, 6.3): whether it defines a slope, its slope, from −75 to 75 degrees, below 0 falling inward from it (Part II, 6.3.8, rule 1), its overhang, and its rise, its end over its start along it (rule 3).",
  "type": "array",
  "items": {
    "type": "object",
    "properties": {
      "edgeId": {
        "type": "string"
      },
      "definesSlope": {
        "type": "boolean"
      },
      "slope": {
        "description": "Degrees, from −75 to 75: from 0 the edge's face rises inward from it, as 0.7's roof edge does (Part IV, 4.4, rule 1); below 0, on an edge that defines a slope, it falls inward from it at that slope's size (Part II, 6.3.8, rule 1). A roof MUST NOT have edges that define slopes both below 0 and above 0 (roof-falls-mixed), which a validator checks.",
        "type": "number",
        "minimum": -75,
        "maximum": 75
      },
      "overhang": {
        "type": "number",
        "minimum": 0,
        "maximum": 3000
      },
      "rise": {
        "description": "The height of the edge's end over its start along its line, in mm, which tilts its face along it (Part II, 6.3.8, rule 3; Part IV, 4.4.1, rule 1). Only an edge that defines a slope gives one, and its face's slope and rise together, √(tan² slope + (rise / its length in plan)²), are no steeper than tan 75° (roof-rise), which a validator checks.",
        "type": "number",
        "minimum": -100000,
        "maximum": 100000
      },
      "gutter": {
        "type": "boolean"
      },
      "cut": {
        "type": "string",
        "enum": [
          "plumb",
          "square"
        ]
      },
      "extents": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "layerId": {
              "type": "string",
              "minLength": 1
            },
            "extent": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "toEave",
                    "toWallCore"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "offset": {
                      "type": "number",
                      "minimum": 0,
                      "maximum": 6000
                    }
                  },
                  "required": [
                    "offset"
                  ],
                  "x-eik-closed": true
                }
              ]
            }
          },
          "required": [
            "layerId",
            "extent"
          ],
          "x-eik-closed": true
        },
        "maxItems": 32
      }
    },
    "required": [
      "edgeId",
      "definesSlope",
      "slope",
      "overhang"
    ],
    "x-eik-closed": true
  },
  "maxItems": 100
}
