{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.5/pieces/area.schema.json",
  "$comment": "OpenEik 0.5: folded by tools/fold-schemas-0.5.mjs from the proposal pieces, which 0.5 makes a rule (open questions, 124). Written by hand, not generated.",
  "title": "A piece rule over an area",
  "description": "A layer's piece rule (Part XX, 2.2): a board's width and length, the direction its length runs, the bond of its rows, the least width of a row, a zone of a stronger grade, the clearance round a hole, its marks, and its maker's data.",
  "type": "object",
  "properties": {
    "width": {
      "type": "number",
      "description": "A board's width, mm.",
      "minimum": 100,
      "maximum": 10000
    },
    "length": {
      "type": "number",
      "description": "A board's length, mm, at least its width.",
      "minimum": 100,
      "maximum": 20000
    },
    "direction": {
      "type": "number",
      "description": "The direction its length runs in plan, degrees counter-clockwise from the model's x axis.",
      "minimum": 0,
      "exclusiveMaximum": 180
    },
    "bond": {
      "type": "string",
      "enum": [
        "half",
        "third",
        "stacked"
      ],
      "description": "How its rows are staggered (Part XX, 5.2, rule 4); \"half\" where it gives none."
    },
    "minCut": {
      "type": "number",
      "description": "The least width of a row, mm, at most half of width (Part XX, 5.3, rule 1).",
      "minimum": 0,
      "maximum": 5000
    },
    "zone": {
      "type": "object",
      "description": "A zone of the layer laid in a stronger grade under the walls that bear load and the columns (Part XX, 5.6).",
      "properties": {
        "material": {
          "type": "string",
          "description": "The zone's grade, its boards' material.",
          "minLength": 1,
          "maxLength": 60
        },
        "width": {
          "type": "number",
          "description": "How far the zone reaches past a footprint on every side, mm; where it gives none, a load spread at 45° down through the layers below the structure (Part XX, 5.6, rule 3).",
          "minimum": 0,
          "maximum": 2000
        },
        "mark": {
          "type": "string",
          "description": "The start of its boards' marks; the rule's mark and -Z where it gives none (Part XX, 6, rule 8).",
          "minLength": 1,
          "maxLength": 20,
          "pattern": "^\\S+$"
        },
        "materialId": {
          "$ref": "../materialId/material-id.schema.json"
        }
      },
      "required": [],
      "x-eik-closed": true,
      "anyOf": [
        {
          "required": [
            "material"
          ]
        },
        {
          "required": [
            "materialId"
          ]
        }
      ]
    },
    "clearance": {
      "type": "number",
      "description": "The clearance all round a hole for a pipe or a duct, mm; 10 where it gives none (Part XX, 4.7, rule 1; 5.7).",
      "minimum": 0,
      "maximum": 100
    },
    "mark": {
      "type": "string",
      "description": "The start of its pieces' marks (Part XX, 6, rule 5).",
      "minLength": 1,
      "maxLength": 20,
      "pattern": "^\\S+$"
    },
    "maker": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "description": "Its maker's name, data (Part XX, 11)."
    },
    "article": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80,
      "description": "The boards' article number, data (Part XX, 11)."
    }
  },
  "required": [
    "width",
    "length"
  ],
  "x-eik-closed": true
}
