{
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "$id": "https://usebldg.com/schemas/PlanEdit.schema.json",
 "$defs": {
  "Acoustic": {
   "additionalProperties": false,
   "description": "A sound rating: its metric, value and what it rests on.",
   "properties": {
    "metric": {
     "enum": [
      "stc",
      "iic",
      "rw",
      "rw_c",
      "ln_w",
      "l_nt_w",
      "dn_t_w"
     ],
     "title": "Metric",
     "type": "string"
    },
    "v": {
     "maximum": 200,
     "minimum": -200,
     "title": "V",
     "type": "number"
    },
    "basis": {
     "anyOf": [
      {
       "maxLength": 64,
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Basis"
    }
   },
   "required": [
    "metric",
    "v"
   ],
   "title": "Acoustic",
   "type": "object"
  },
  "CeilingPatch": {
   "additionalProperties": false,
   "description": "A ceiling patch of a space: the rest of the space (no placement: its ceiling, z required) or a part of its ceiling placed by one of ring, near, edges, divide, with its own name, finish and height (missing: the ceiling it lies under), slope and form.",
   "properties": {
    "id": {
     "description": "Identifier of this ceiling patch, unique across the whole plan.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Id",
     "type": "string"
    },
    "name": {
     "anyOf": [
      {
       "maxLength": 100,
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "A short label people use (\"tray\", \"kitchen\").",
     "title": "Name"
    },
    "ring": {
     "description": "Placement (d), a free shape: [[x, y], ...] counter-clockwise; [] with no other placement = the rest of the space.",
     "items": {
      "items": {
       "type": "number"
      },
      "type": "array"
     },
     "title": "Ring",
     "type": "array"
    },
    "holes": {
     "description": "Holes of the free shape, each clockwise.",
     "items": {
      "items": {
       "items": {
        "type": "number"
       },
       "type": "array"
      },
      "type": "array"
     },
     "maxItems": 64,
     "title": "Holes",
     "type": "array"
    },
    "on": {
     "description": "The points of the free shape on wall faces toward the room: they follow those walls.",
     "items": {
      "$ref": "#/$defs/OnWall"
     },
     "maxItems": 256,
     "title": "On",
     "type": "array"
    },
    "near": {
     "anyOf": [
      {
       "$ref": "#/$defs/Near"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Placement (a): around or in front of things (above them)."
    },
    "edges": {
     "anyOf": [
      {
       "$ref": "#/$defs/Edges"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Placement (b): a band in from the walls (a tray)."
    },
    "divide": {
     "anyOf": [
      {
       "$ref": "#/$defs/Divide"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Placement (c): one side of a dividing line."
    },
    "finish": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The part's finish; null = the finish of the ceiling it lies under. Not on the rest patch.",
     "title": "Finish"
    },
    "z": {
     "anyOf": [
      {
       "exclusiveMinimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Ceiling height above the level datum at at; required on the rest patch; null on a part = the ceiling it lies under.",
     "title": "Z"
    },
    "at": {
     "anyOf": [
      {
       "items": {
        "type": "number"
       },
       "maxItems": 2,
       "minItems": 2,
       "type": "array"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The point [x, y] where z holds; required with slope, absent without.",
     "title": "At"
    },
    "slope": {
     "anyOf": [
      {
       "$ref": "#/$defs/Slope"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The plane's slope; null = horizontal."
    },
    "form": {
     "anyOf": [
      {
       "enum": [
        "main",
        "furred",
        "dropped",
        "sloped"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "main | furred | dropped | sloped: what kind of area the patch is; null = unknown.",
     "title": "Form"
    }
   },
   "required": [
    "id"
   ],
   "title": "CeilingPatch",
   "type": "object"
  },
  "Clear": {
   "additionalProperties": false,
   "description": "A stated clear opening (measured, or where parts are missing): its width, height and net area, and what\nit was taken from.",
   "properties": {
    "w": {
     "anyOf": [
      {
       "exclusiveMinimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Clear width.",
     "title": "W"
    },
    "h": {
     "anyOf": [
      {
       "exclusiveMinimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Clear height.",
     "title": "H"
    },
    "area": {
     "anyOf": [
      {
       "exclusiveMinimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Net clear area (an opening that is no rectangle); null = width x height.",
     "title": "Area"
    },
    "basis": {
     "description": "What it was taken from: clear_at_90 (the leaf open at 90 degrees) | frame_clear | rough | measured.",
     "enum": [
      "clear_at_90",
      "frame_clear",
      "rough",
      "measured"
     ],
     "title": "Basis",
     "type": "string"
    }
   },
   "required": [
    "basis"
   ],
   "title": "Clear",
   "type": "object"
  },
  "Component": {
   "additionalProperties": false,
   "description": "Placed object (furniture, sanitary ware, appliances, plants, lifts, columns, stairs ...) of its component\ntype, an oriented body at (x, y).",
   "properties": {
    "id": {
     "description": "Identifier of this element, unique across the whole plan.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Id",
     "type": "string"
    },
    "type": {
     "description": "Id of its component type.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Type",
     "type": "string"
    },
    "x": {
     "description": "Centre x.",
     "title": "X",
     "type": "number"
    },
    "y": {
     "description": "Centre y.",
     "title": "Y",
     "type": "number"
    },
    "dir": {
     "default": [
      1,
      0
     ],
     "description": "The image of its local +x axis [dx, dy] (integers in lowest terms, |dx| and |dy| at most 1000), dy up the drawing as it is seen (in an image frame too: against the pixel y): at [1, 0] the front faces visually down, a stair climbs along local +x.",
     "items": {
      "maximum": 1000,
      "minimum": -1000,
      "type": "integer"
     },
     "maxItems": 2,
     "minItems": 2,
     "title": "Dir",
     "type": "array"
    },
    "mirrored": {
     "default": false,
     "description": "Mirror the model along its local x axis (handed models, e.g. a corner sofa with the chaise on the right).",
     "title": "Mirrored",
     "type": "boolean",
     "x-bldg-scope": "document"
    },
    "finishes": {
     "description": "Bands of finish on the wall faces it stands against (a backsplash, a shower surround).",
     "items": {
      "$ref": "#/$defs/ComponentFinish"
     },
     "maxItems": 16,
     "title": "Finishes",
     "type": "array",
     "x-bldg-scope": "document"
    },
    "slots": {
     "description": "This object's own materials, by slot (upholstery, legs, cabinets ...).",
     "items": {
      "$ref": "#/$defs/SlotRow"
     },
     "maxItems": 16,
     "title": "Slots",
     "type": "array",
     "x-bldg-scope": "document"
    }
   },
   "required": [
    "id",
    "type",
    "x",
    "y"
   ],
   "title": "Component",
   "type": "object"
  },
  "ComponentFinish": {
   "additionalProperties": false,
   "description": "A band of finish on the wall faces a fixture stands against (at behind: its back; around: its back and both sides), from from to to above the finished floor at the faces (to null: the ceiling there).",
   "properties": {
    "id": {
     "description": "Identifier of this band, unique across the whole plan.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Id",
     "type": "string"
    },
    "at": {
     "description": "behind (the wall faces its back stands against) | around (its back and both sides).",
     "enum": [
      "behind",
      "around"
     ],
     "title": "At",
     "type": "string"
    },
    "from": {
     "default": 0.0,
     "description": "The band's bottom above the finished floor at the faces.",
     "minimum": 0,
     "title": "From",
     "type": "number"
    },
    "to": {
     "anyOf": [
      {
       "exclusiveMinimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Its top; null = the ceiling there.",
     "title": "To"
    },
    "to_underside": {
     "default": false,
     "description": "true: where an upper cabinet or a range hood hangs over the band's stretch of face, the band ends at its underside (a backsplash up to the cabinets); elsewhere at to.",
     "title": "To Underside",
     "type": "boolean"
    },
    "finish": {
     "description": "The band's finish: a finish row id or a library finish id.",
     "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
     "title": "Finish",
     "type": "string"
    }
   },
   "required": [
    "id",
    "at",
    "finish"
   ],
   "title": "ComponentFinish",
   "type": "object"
  },
  "ComponentParam": {
   "additionalProperties": false,
   "description": "One catalog family parameter other than the size, e.g. {\"name\": \"seats\", \"value\": 6}: a length (document\nunits), a count, a switch (true / false) or an option (\"round\"), as the family defines it.",
   "properties": {
    "name": {
     "description": "Family parameter name (a parameter of the component's catalog family).",
     "pattern": "^[A-Za-z][A-Za-z0-9_]{0,23}$",
     "title": "Name",
     "type": "string"
    },
    "value": {
     "anyOf": [
      {
       "type": "boolean"
      },
      {
       "type": "number"
      },
      {
       "type": "string"
      }
     ],
     "description": "Length, count, true / false, or an option string.",
     "title": "Value"
    }
   },
   "required": [
    "name",
    "value"
   ],
   "title": "ComponentParam",
   "type": "object"
  },
  "ComponentType": {
   "additionalProperties": false,
   "description": "A component type, shared by the components that name it: one per distinct catalog model and spec (a BIM\nfamily type).",
   "properties": {
    "id": {
     "description": "Type id, e.g. bed_1800x2000mm.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Id",
     "type": "string"
    },
    "model": {
     "description": "Catalog family id (bed, wardrobe, dining_table ...), a plugin item id (acme:piano) or generic.",
     "maxLength": 97,
     "pattern": "^([a-z][a-z0-9_]{0,31}:)?[a-z0-9][a-z0-9_.\\-]{0,63}$",
     "title": "Model",
     "type": "string"
    },
    "width": {
     "description": "Body size along its local x axis (a dining table: the table).",
     "exclusiveMinimum": 0,
     "title": "Width",
     "type": "number"
    },
    "depth": {
     "description": "Body size along its local y axis.",
     "exclusiveMinimum": 0,
     "title": "Depth",
     "type": "number"
    },
    "height": {
     "default": 0.0,
     "description": "Body height; 0 = the family default (stairs, columns: the level height).",
     "minimum": 0,
     "title": "Height",
     "type": "number",
     "x-bldg-scope": "detail"
    },
    "params": {
     "description": "Family parameters other than the size, where they differ from the family default (e.g. seats, shape round, doors).",
     "items": {
      "$ref": "#/$defs/ComponentParam"
     },
     "maxItems": 16,
     "title": "Params",
     "type": "array"
    },
    "category": {
     "default": "",
     "description": "Only for model generic: its semantic category; \"\" for a catalog family (the family's).",
     "enum": [
      "furniture",
      "casework",
      "sanitary",
      "appliance",
      "equipment",
      "planting",
      "transport",
      "structure",
      "circulation",
      "other",
      ""
     ],
     "title": "Category",
     "type": "string"
    },
    "mount": {
     "anyOf": [
      {
       "enum": [
        "floor",
        "wall",
        "ceiling",
        "counter",
        "recessed",
        "pendant",
        "inline"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "floor | wall | ceiling | counter | recessed | pendant | inline: how its components are mounted (a reflected ceiling plan shows the ceiling, pendant and recessed ones); null = the family's (the floor for generic types and plugin items).",
     "title": "Mount"
    },
    "name": {
     "default": "",
     "description": "A readable name (e.g. piano for a generic box).",
     "maxLength": 100,
     "title": "Name",
     "type": "string",
     "x-bldg-scope": "document"
    },
    "key": {
     "default": "",
     "description": "Internal identity (IFC type GlobalIds), written once by the editing engine when the type's first element would change; kept by renames and resizes. \"\" = the first element that uses it.",
     "maxLength": 100,
     "title": "Key",
     "type": "string",
     "x-bldg-scope": "document"
    },
    "slots": {
     "description": "The materials of every object of this type, by slot (part of the type's identity when an object changes type).",
     "items": {
      "$ref": "#/$defs/SlotRow"
     },
     "maxItems": 16,
     "title": "Slots",
     "type": "array",
     "x-bldg-scope": "document"
    }
   },
   "required": [
    "id",
    "model",
    "width",
    "depth"
   ],
   "title": "ComponentType",
   "type": "object"
  },
  "Dimension": {
   "additionalProperties": false,
   "description": "A dimension line: the two points its extension lines touch (x0, y0)-(x1, y1); text is exactly as printed on\nthe drawing, \"\" if none is printed.",
   "properties": {
    "id": {
     "description": "Identifier of this element, unique across the whole plan.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Id",
     "type": "string"
    },
    "x0": {
     "title": "X0",
     "type": "number"
    },
    "y0": {
     "title": "Y0",
     "type": "number"
    },
    "x1": {
     "title": "X1",
     "type": "number"
    },
    "y1": {
     "title": "Y1",
     "type": "number"
    },
    "text": {
     "default": "",
     "description": "As printed, e.g. \"4600\", \"4.60\", \"12'-6\"\"; \"\" = drawn, not printed (its value is the measured distance).",
     "maxLength": 40,
     "title": "Text",
     "type": "string"
    },
    "basis": {
     "default": "unknown",
     "description": "What the extension lines touch: wall centerlines, wall faces, or overall outer faces.",
     "enum": [
      "centerline",
      "face",
      "overall",
      "unknown"
     ],
     "title": "Basis",
     "type": "string"
    },
    "offset": {
     "default": 0.0,
     "description": "Signed distance of the dimension line from the measured points along the positive normal of (x0, y0) -> (x1, y1) (the visual left, as for walls); 0 = the points lie on the line (a printed dimension as traced). Extension lines run from the points to the line.",
     "title": "Offset",
     "type": "number",
     "x-bldg-scope": "document"
    },
    "host0": {
     "anyOf": [
      {
       "$ref": "#/$defs/DimensionHost"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "What (x0, y0) is attached to (a node, a wall face / centerline); null = a free point.",
     "x-bldg-scope": "document"
    },
    "host1": {
     "anyOf": [
      {
       "$ref": "#/$defs/DimensionHost"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "What (x1, y1) is attached to; null = a free point.",
     "x-bldg-scope": "document"
    }
   },
   "required": [
    "id",
    "x0",
    "y0",
    "x1",
    "y1"
   ],
   "title": "Dimension",
   "type": "object"
  },
  "DimensionHost": {
   "additionalProperties": false,
   "description": "What one end of a drawn dimension is attached to (a BIM dimension reference): a node, a wall's face\n(A / B: the visual left / right of its start -> end) or its centerline (center), or a door /\nwindow: its jamb (start / end: the jamb nearer the wall's start / end) or its centre, on its wall's face or\ncenterline (side), or a structural grid line (BIM convention: grids are dimension references). Edits that move the host (a\nwall, a moved / resized / retyped opening, a grid line moved or re-ended) move the end with it, along the dimension;\na lost host leaves a free point.",
   "properties": {
    "node": {
     "default": "",
     "description": "Node id (\"\" = not a node).",
     "maxLength": 64,
     "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63})?$",
     "title": "Node",
     "type": "string"
    },
    "wall": {
     "default": "",
     "description": "Wall id (\"\" = not a wall).",
     "maxLength": 64,
     "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63})?$",
     "title": "Wall",
     "type": "string"
    },
    "opening": {
     "default": "",
     "description": "Opening id (\"\" = not an opening).",
     "maxLength": 64,
     "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63})?$",
     "title": "Opening",
     "type": "string"
    },
    "grid": {
     "default": "",
     "description": "Grid line id (\"\" = not a grid line): the end lies on that axis.",
     "maxLength": 64,
     "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63})?$",
     "title": "Grid",
     "type": "string"
    },
    "jamb": {
     "default": "center",
     "description": "An opening host's point: its start / end jamb, or its centre.",
     "enum": [
      "start",
      "end",
      "center"
     ],
     "title": "Jamb",
     "type": "string"
    },
    "side": {
     "default": "center",
     "description": "The wall's (an opening's wall's) face: A | B (as door swings: A = the visual left of its start -> end), or its centerline.",
     "enum": [
      "A",
      "B",
      "center"
     ],
     "title": "Side",
     "type": "string"
    }
   },
   "title": "DimensionHost",
   "type": "object"
  },
  "Divide": {
   "additionalProperties": false,
   "description": "A part on one side of a dividing line across the room: from ends[0] (through a square bend, or straight) to ends[1]; the part lies on side (left or right of the line walked from the first end).",
   "properties": {
    "ends": {
     "description": "The line's two ends, each on a wall.",
     "items": {
      "$ref": "#/$defs/DivideEnd"
     },
     "maxItems": 2,
     "minItems": 2,
     "title": "Ends",
     "type": "array"
    },
    "bend": {
     "anyOf": [
      {
       "enum": [
        "square"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "square = the line turns square between its ends; null = straight.",
     "title": "Bend"
    },
    "side": {
     "description": "The side of the line the part lies on, walking it from its first end: left | right.",
     "enum": [
      "left",
      "right"
     ],
     "title": "Side",
     "type": "string"
    }
   },
   "required": [
    "ends",
    "side"
   ],
   "title": "Divide",
   "type": "object"
  },
  "DivideEnd": {
   "additionalProperties": false,
   "description": "An end of a dividing line: the point on a wall's node line pos from its anchor node.",
   "properties": {
    "wall": {
     "description": "The wall the end lies on.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Wall",
     "type": "string"
    },
    "anchor": {
     "default": "start",
     "description": "The wall node pos is measured from: start | end.",
     "enum": [
      "start",
      "end"
     ],
     "title": "Anchor",
     "type": "string"
    },
    "pos": {
     "description": "Distance along the wall's node line from the anchor node.",
     "minimum": 0,
     "title": "Pos",
     "type": "number"
    }
   },
   "required": [
    "wall",
    "pos"
   ],
   "title": "DivideEnd",
   "type": "object"
  },
  "Edges": {
   "additionalProperties": false,
   "description": "A part placed as a band in from the room's walls, from to to (to null: everything inside from); along the open (virtual) edges too when open_edges.",
   "properties": {
    "from": {
     "description": "The band's outer edge, in from the walls.",
     "minimum": 0,
     "title": "From",
     "type": "number"
    },
    "to": {
     "anyOf": [
      {
       "exclusiveMinimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Its inner edge; null = everything inside from.",
     "title": "To"
    },
    "open_edges": {
     "default": false,
     "description": "Run the band along the open (virtual) edges of the room too.",
     "title": "Open Edges",
     "type": "boolean"
    }
   },
   "required": [
    "from"
   ],
   "title": "Edges",
   "type": "object"
  },
  "FinishBand": {
   "additionalProperties": false,
   "description": "A band of finish from the bottom of a face up to h: a wainscot (from the finished floor), the outside base band (from the bottom of the outside face). h 0 = none.",
   "properties": {
    "finish": {
     "description": "The band's finish: a finish row id or a library finish id.",
     "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
     "title": "Finish",
     "type": "string"
    },
    "h": {
     "description": "Its height above the bottom of the face; 0 = none.",
     "minimum": 0,
     "title": "H",
     "type": "number"
    }
   },
   "required": [
    "finish",
    "h"
   ],
   "title": "FinishBand",
   "type": "object"
  },
  "Fire": {
   "additionalProperties": false,
   "description": "An unlisted fire-resistance rating in minutes: the side it holds from, its EN 13501-2 criteria (none for ASTM E119), standard and method.",
   "properties": {
    "min": {
     "exclusiveMinimum": 0,
     "maximum": 1440,
     "title": "Min",
     "type": "number"
    },
    "side": {
     "anyOf": [
      {
       "enum": [
        "A",
        "B",
        "both"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Side"
    },
    "crit": {
     "items": {
      "enum": [
       "R",
       "E",
       "I",
       "I1",
       "I2",
       "W",
       "M",
       "S",
       "C"
      ],
      "type": "string"
     },
     "maxItems": 9,
     "title": "Crit",
     "type": "array"
    },
    "std": {
     "anyOf": [
      {
       "maxLength": 64,
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Std"
    },
    "method": {
     "anyOf": [
      {
       "maxLength": 64,
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Method"
    }
   },
   "required": [
    "min"
   ],
   "title": "Fire",
   "type": "object"
  },
  "FloorPatch": {
   "additionalProperties": false,
   "description": "A floor patch of a space: the rest of the space (no placement: the space's own floor height and slope) or a part of its floor placed by one of ring, near, edges, divide, with its own name, finish, the finish of the wall faces along it and its height (missing: the height of what it lies on).",
   "properties": {
    "id": {
     "description": "Identifier of this floor patch, unique across the whole plan.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Id",
     "type": "string"
    },
    "name": {
     "anyOf": [
      {
       "maxLength": 100,
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "A short label people use (\"kitchen\", \"hearth\").",
     "title": "Name"
    },
    "ring": {
     "description": "Placement (d), a free shape: [[x, y], ...] counter-clockwise; [] with no other placement = the rest of the space.",
     "items": {
      "items": {
       "type": "number"
      },
      "type": "array"
     },
     "title": "Ring",
     "type": "array"
    },
    "holes": {
     "description": "Holes of the free shape, each clockwise.",
     "items": {
      "items": {
       "items": {
        "type": "number"
       },
       "type": "array"
      },
      "type": "array"
     },
     "maxItems": 64,
     "title": "Holes",
     "type": "array"
    },
    "on": {
     "description": "The points of the free shape on wall faces toward the room: they follow those walls.",
     "items": {
      "$ref": "#/$defs/OnWall"
     },
     "maxItems": 256,
     "title": "On",
     "type": "array"
    },
    "near": {
     "anyOf": [
      {
       "$ref": "#/$defs/Near"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Placement (a): in front of or around things."
    },
    "edges": {
     "anyOf": [
      {
       "$ref": "#/$defs/Edges"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Placement (b): a band in from the walls."
    },
    "divide": {
     "anyOf": [
      {
       "$ref": "#/$defs/Divide"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Placement (c): one side of a dividing line."
    },
    "finish": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The part's finish; null = the finish of what it lies on shows. Not on the rest patch.",
     "title": "Finish"
    },
    "walls": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The finish of the room's wall faces along the part; null = the room's. Not on the rest patch.",
     "title": "Walls"
    },
    "z": {
     "anyOf": [
      {
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Finished floor height above the level datum at at (a horizontal patch: everywhere); null = a part keeps the height of what it lies on, the rest patch is at the level's floor.",
     "title": "Z"
    },
    "from": {
     "anyOf": [
      {
       "enum": [
        "datum",
        "ground"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "What z is measured from: datum (the level datum) | ground (the ground outside: 0 = level with it; on an at-grade level only); null = datum.",
     "title": "From",
     "x-bldg-scope": "document"
    },
    "at": {
     "anyOf": [
      {
       "items": {
        "type": "number"
       },
       "maxItems": 2,
       "minItems": 2,
       "type": "array"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The point [x, y] where z holds; required with slope, absent without.",
     "title": "At"
    },
    "slope": {
     "anyOf": [
      {
       "$ref": "#/$defs/Slope"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The plane's slope; null = horizontal."
    }
   },
   "required": [
    "id"
   ],
   "title": "FloorPatch",
   "type": "object"
  },
  "Frame": {
   "additionalProperties": false,
   "description": "The frame of an opening type: its width at each jamb and at the head (in the wall plane, from the rough edge inwards),\nhow far each stop projects into the frame opening, its depth across the wall and where it sits in the wall.",
   "properties": {
    "jamb": {
     "anyOf": [
      {
       "minimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Frame width at each jamb (shims included); 0 = no frame.",
     "title": "Jamb"
    },
    "head": {
     "anyOf": [
      {
       "minimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Frame width at the head.",
     "title": "Head"
    },
    "sill": {
     "anyOf": [
      {
       "minimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Frame width at the sill (a window's: from the rough opening's bottom up); null = unknown.",
     "title": "Sill"
    },
    "stop": {
     "anyOf": [
      {
       "items": {
        "minimum": 0,
        "type": "number"
       },
       "maxItems": 2,
       "minItems": 2,
       "type": "array"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "How far each stop projects into the frame opening: [hinge side, latch side].",
     "title": "Stop"
    },
    "depth": {
     "anyOf": [
      {
       "exclusiveMinimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Frame depth across the wall; null = the wall's thickness.",
     "title": "Depth"
    },
    "align": {
     "default": "center",
     "description": "The plane offset is measured from: center = the wall's centre plane, A / B = that face (the frame's face flush with it).",
     "enum": [
      "A",
      "B",
      "center"
     ],
     "title": "Align",
     "type": "string"
    },
    "offset": {
     "default": 0.0,
     "description": "From that plane, + towards side A.",
     "title": "Offset",
     "type": "number"
    }
   },
   "title": "Frame",
   "type": "object"
  },
  "GridLine": {
   "additionalProperties": false,
   "description": "A structural grid line (axis) with its label as drawn, e.g. A or 3.",
   "properties": {
    "id": {
     "description": "Identifier of this element, unique across the whole plan.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Id",
     "type": "string"
    },
    "label": {
     "maxLength": 8,
     "minLength": 1,
     "title": "Label",
     "type": "string"
    },
    "x0": {
     "title": "X0",
     "type": "number"
    },
    "y0": {
     "title": "Y0",
     "type": "number"
    },
    "x1": {
     "title": "X1",
     "type": "number"
    },
    "y1": {
     "title": "Y1",
     "type": "number"
    },
    "bubbles": {
     "default": "both",
     "description": "The ends that show the labelled bubble (the BIM per-end bubble toggle): both | start (the (x0, y0) end) | end (the (x1, y1) end) | none.",
     "enum": [
      "both",
      "start",
      "end",
      "none"
     ],
     "title": "Bubbles",
     "type": "string",
     "x-bldg-scope": "document"
    }
   },
   "required": [
    "id",
    "label",
    "x0",
    "y0",
    "x1",
    "y1"
   ],
   "title": "GridLine",
   "type": "object"
  },
  "Layer": {
   "additionalProperties": false,
   "description": "One layer of a construction: its function, thickness and material, the framing as thick as the layer.",
   "properties": {
    "fn": {
     "description": "Its function: structure, core, insulation, sheathing, cladding, render, finish, membrane ...",
     "enum": [
      "structure",
      "core",
      "insulation",
      "air_barrier",
      "vapour_retarder",
      "waterproofing",
      "breather_membrane",
      "sheathing",
      "cavity",
      "cladding",
      "render",
      "substrate",
      "furring",
      "channel",
      "finish",
      "bedding",
      "adhesive",
      "membrane",
      "screed",
      "underlay",
      "backer",
      "void",
      "root_barrier",
      "drainage",
      "filter",
      "growing_medium",
      "vegetation",
      "protection",
      "ballast",
      "gravel",
      "separation",
      "pedestal"
     ],
     "title": "Fn",
     "type": "string"
    },
    "t": {
     "description": "Thickness; 0 for a membrane.",
     "minimum": 0,
     "title": "T",
     "type": "number"
    },
    "mat": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Id of its material (a materials row or bldg:material.*); null = unknown.",
     "title": "Mat",
     "x-bldg-scope": "document"
    },
    "finish": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "What the layer looks like where it is exposed: the outermost layer's finish is the wall type's own look on that side.",
     "title": "Finish",
     "x-bldg-scope": "document"
    },
    "frame": {
     "anyOf": [
      {
       "$ref": "#/$defs/LayerFrame"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Studs or joists as thick as the layer.",
     "title": "Frame",
     "x-bldg-scope": "document"
    },
    "taper": {
     "default": false,
     "description": "The falls-forming layer that absorbs a given surface z.",
     "title": "Taper",
     "type": "boolean",
     "x-bldg-scope": "document"
    },
    "plenum": {
     "anyOf": [
      {
       "$ref": "#/$defs/Plenum"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The layer is a return-air plenum.",
     "title": "Plenum",
     "x-bldg-scope": "document"
    },
    "reaction": {
     "anyOf": [
      {
       "items": {
        "$ref": "#/$defs/Reaction"
       },
       "maxItems": 8,
       "type": "array"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Its own reaction to fire (a cored panel); null = its material's.",
     "title": "Reaction",
     "x-bldg-scope": "document"
    }
   },
   "required": [
    "fn",
    "t"
   ],
   "title": "Layer",
   "type": "object"
  },
  "LayerFrame": {
   "additionalProperties": false,
   "description": "Studs or joists as thick as their layer: section, material, spacing, where the spacing starts, plates, cavity material.",
   "properties": {
    "section": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Section"
    },
    "mat": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Mat"
    },
    "spacing": {
     "anyOf": [
      {
       "exclusiveMinimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Spacing"
    },
    "origin": {
     "default": "start",
     "enum": [
      "start",
      "end",
      "center"
     ],
     "title": "Origin",
     "type": "string"
    },
    "justify": {
     "anyOf": [
      {
       "enum": [
        "start",
        "end",
        "center"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Justify"
    },
    "plates": {
     "anyOf": [
      {
       "items": {
        "maximum": 8,
        "minimum": 0,
        "type": "integer"
       },
       "maxItems": 2,
       "minItems": 2,
       "type": "array"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Plates"
    },
    "cavity_mat": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Cavity Mat"
    },
    "staggered": {
     "anyOf": [
      {
       "type": "boolean"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Staggered"
    }
   },
   "title": "LayerFrame",
   "type": "object"
  },
  "Layout": {
   "additionalProperties": false,
   "description": "How an opening type's rough opening is divided.",
   "properties": {
    "split": {
     "description": "v: vertical split lines (mullions), at from the start-side edge; h: horizontal ones (transoms), from the bottom edge.",
     "enum": [
      "v",
      "h"
     ],
     "title": "Split",
     "type": "string"
    },
    "at": {
     "description": "The distances of the split lines from that edge, increasing: lengths in the document unit (v: along the rough width; h: heights, like rough.h).",
     "items": {
      "exclusiveMinimum": 0,
      "type": "number"
     },
     "maxItems": 8,
     "minItems": 1,
     "title": "At",
     "type": "array"
    }
   },
   "required": [
    "split",
    "at"
   ],
   "title": "Layout",
   "type": "object"
  },
  "Leaf": {
   "additionalProperties": false,
   "description": "One leaf of an opening type (a door leaf, a window sash).",
   "properties": {
    "w": {
     "anyOf": [
      {
       "exclusiveMinimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Leaf width.",
     "title": "W"
    },
    "h": {
     "anyOf": [
      {
       "exclusiveMinimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Leaf height.",
     "title": "H"
    },
    "t": {
     "anyOf": [
      {
       "exclusiveMinimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Leaf thickness.",
     "title": "T"
    },
    "op": {
     "anyOf": [
      {
       "enum": [
        "swing",
        "slide",
        "hung",
        "tilt",
        "tilt_turn",
        "awning",
        "hopper",
        "pivot",
        "fold",
        "fixed",
        "coil",
        "lift"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "How it operates: swing | slide | hung | tilt | tilt_turn | awning | hopper | pivot | fold | fixed | coil | lift.",
     "title": "Op"
    },
    "active": {
     "anyOf": [
      {
       "type": "boolean"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "An active leaf (of a pair: the one that opens first); null = unknown.",
     "title": "Active"
    },
    "sash": {
     "anyOf": [
      {
       "minimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Sash face width (windows).",
     "title": "Sash"
    }
   },
   "title": "Leaf",
   "type": "object"
  },
  "LevelEdit": {
   "additionalProperties": false,
   "description": "Elements to add or replace on one level, matched by id (an existing id replaces that element, a new id adds\none; new ids are short: n7, w12, o3 ...), and ids to delete. Elements not listed stay as they are.",
   "properties": {
    "level": {
     "description": "Id of the level to edit.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Level",
     "type": "string"
    },
    "nodes": {
     "items": {
      "$ref": "#/$defs/Node"
     },
     "title": "Nodes",
     "type": "array"
    },
    "walls": {
     "items": {
      "$ref": "#/$defs/Wall"
     },
     "title": "Walls",
     "type": "array"
    },
    "spaces": {
     "items": {
      "$ref": "#/$defs/Space"
     },
     "title": "Spaces",
     "type": "array"
    },
    "openings": {
     "items": {
      "$ref": "#/$defs/Opening"
     },
     "title": "Openings",
     "type": "array"
    },
    "components": {
     "items": {
      "$ref": "#/$defs/Component"
     },
     "title": "Components",
     "type": "array"
    },
    "dimensions": {
     "items": {
      "$ref": "#/$defs/Dimension"
     },
     "title": "Dimensions",
     "type": "array"
    },
    "grid": {
     "items": {
      "$ref": "#/$defs/GridLine"
     },
     "title": "Grid",
     "type": "array"
    },
    "texts": {
     "items": {
      "$ref": "#/$defs/Text"
     },
     "title": "Texts",
     "type": "array"
    },
    "delete": {
     "description": "Ids of elements to delete.",
     "items": {
      "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
      "type": "string"
     },
     "title": "Delete",
     "type": "array"
    }
   },
   "required": [
    "level"
   ],
   "title": "LevelEdit",
   "type": "object"
  },
  "Near": {
   "additionalProperties": false,
   "description": "A part placed in front of one opening or component (at front: d out from it, beyond past each side) or around one or several components (at around: their footprints grown by out). It follows them when they move.",
   "properties": {
    "of": {
     "description": "The opening or component it is in front of (front: exactly one), or the components it is around (one or more).",
     "items": {
      "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
      "type": "string"
     },
     "maxItems": 64,
     "minItems": 1,
     "title": "Of",
     "type": "array"
    },
    "at": {
     "description": "front | around.",
     "enum": [
      "front",
      "around"
     ],
     "title": "At",
     "type": "string"
    },
    "d": {
     "anyOf": [
      {
       "exclusiveMinimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "front: how far out from the thing (from the wall face toward the room for an opening).",
     "title": "D"
    },
    "beyond": {
     "default": 0.0,
     "description": "front: how far past each side of the thing.",
     "title": "Beyond",
     "type": "number"
    },
    "out": {
     "default": 0.0,
     "description": "around: how far beyond the things' footprints.",
     "minimum": 0,
     "title": "Out",
     "type": "number"
    }
   },
   "required": [
    "of",
    "at"
   ],
   "title": "Near",
   "type": "object"
  },
  "Node": {
   "additionalProperties": false,
   "description": "Wall junction / corner. Shared by every wall and space that meets here.",
   "properties": {
    "id": {
     "description": "Identifier of this element, unique across the whole plan.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Id",
     "type": "string"
    },
    "x": {
     "title": "X",
     "type": "number"
    },
    "y": {
     "title": "Y",
     "type": "number"
    }
   },
   "required": [
    "id",
    "x",
    "y"
   ],
   "title": "Node",
   "type": "object"
  },
  "OnWall": {
   "additionalProperties": false,
   "description": "A point of a part's free shape that lies on a wall face toward its room: point i of the ring lies on the wall's face, pos along the wall's node line from its anchor node. The ring's coordinates are a cache every edit refreshes.",
   "properties": {
    "i": {
     "description": "The index of the ring point.",
     "maximum": 1000,
     "minimum": 0,
     "title": "I",
     "type": "integer"
    },
    "wall": {
     "description": "The wall whose face toward the room the point lies on.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Wall",
     "type": "string"
    },
    "anchor": {
     "default": "start",
     "description": "The wall node pos is measured from: start | end.",
     "enum": [
      "start",
      "end"
     ],
     "title": "Anchor",
     "type": "string"
    },
    "pos": {
     "description": "Distance along the wall's node line from the anchor node.",
     "minimum": 0,
     "title": "Pos",
     "type": "number"
    }
   },
   "required": [
    "i",
    "wall",
    "pos"
   ],
   "title": "OnWall",
   "type": "object"
  },
  "Opening": {
   "additionalProperties": false,
   "description": "Door / window / opening of its type (a door without a type: the typical door), placed on its host wall at\npos along the host's node line from its anchor node.",
   "properties": {
    "id": {
     "description": "Identifier of this element, unique across the whole plan.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Id",
     "type": "string"
    },
    "type": {
     "anyOf": [
      {
       "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Id of its opening type (category, operation, rough opening, parts); null = the typical single-swing door.",
     "title": "Type"
    },
    "host": {
     "description": "Id of the wall it is in.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Host",
     "type": "string"
    },
    "anchor": {
     "default": "start",
     "description": "The end node of the host its pos is measured from: start (the default) or end.",
     "enum": [
      "start",
      "end"
     ],
     "title": "Anchor",
     "type": "string"
    },
    "pos": {
     "description": "Along the host's node line from the anchor node to the rough opening's edge nearer it (from the node, not from the face of a wall met there).",
     "minimum": 0,
     "title": "Pos",
     "type": "number"
    },
    "sill": {
     "anyOf": [
      {
       "minimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Rough-opening bottom above the finished floor where it differs from the type's; null = the type's (else doors 0, windows the typical set's sill).",
     "title": "Sill",
     "x-bldg-scope": "detail"
    },
    "hinge": {
     "anyOf": [
      {
       "enum": [
        "start",
        "end"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The jamb the hinges are on: start = towards the host's start node, end; null = unknown. A pair's leaves are listed from it.",
     "title": "Hinge"
    },
    "swing": {
     "anyOf": [
      {
       "enum": [
        "A",
        "B",
        "both"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The host side the leaf opens into: A = left of start -> end as drawn, B = right, both = double-acting; null = unknown (drawn without a swing).",
     "title": "Swing"
    },
    "egress": {
     "anyOf": [
      {
       "enum": [
        "A",
        "B"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The host side egress travel through it leads to: A | B; null = unknown.",
     "title": "Egress",
     "x-bldg-scope": "detail"
    },
    "roles": {
     "description": "Its roles in egress, entry and rescue: egress | exit | exit_discharge | entrance.public | entrance.unit_primary | entrance.service | accessible_entrance | fire_rescue_window | eero; empty = none declared.",
     "items": {
      "enum": [
       "egress",
       "exit",
       "exit_discharge",
       "entrance.public",
       "entrance.unit_primary",
       "entrance.service",
       "accessible_entrance",
       "fire_rescue_window",
       "eero"
      ],
      "type": "string"
     },
     "maxItems": 9,
     "title": "Roles",
     "type": "array",
     "x-bldg-scope": "document"
    },
    "clear": {
     "anyOf": [
      {
       "$ref": "#/$defs/Clear"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "A stated clear opening (measured, or where parts are missing) with its basis; null = the type's, else derived from the parts.",
     "x-bldg-scope": "document"
    },
    "mark": {
     "default": "",
     "description": "Instance number as on drawings (e.g. D-101), apart from the type mark.",
     "maxLength": 32,
     "title": "Mark",
     "type": "string",
     "x-bldg-scope": "document"
    },
    "finish": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The finish of a door's leaves or a window's frame and sash; null = the house's.",
     "title": "Finish",
     "x-bldg-scope": "document"
    },
    "glass": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The glass of a window, a glazed door or a glazed leaf (every pane); null = clear glass.",
     "title": "Glass",
     "x-bldg-scope": "document"
    }
   },
   "required": [
    "id",
    "host",
    "pos"
   ],
   "title": "Opening",
   "type": "object"
  },
  "OpeningType": {
   "additionalProperties": false,
   "description": "A door / window / opening type, shared by the openings that name it: its rough opening and, as far as they are\nknown, its sill, frame, leaves, layout, the largest opening angle of its leaves, a stated clear opening and its\nthreshold.",
   "properties": {
    "id": {
     "description": "Type mark, e.g. D1 / W1 (international), M0921 / C1515 (China) or D3068 (US).",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Id",
     "type": "string"
    },
    "category": {
     "description": "door | window | opening (a void without a fill).",
     "enum": [
      "door",
      "window",
      "opening"
     ],
     "title": "Category",
     "type": "string"
    },
    "operation": {
     "anyOf": [
      {
       "enum": [
        "single_swing",
        "double_leaf_swing",
        "sliding",
        "pocket",
        "bifold",
        "folding",
        "overhead",
        "revolving",
        "pivot",
        "fixed",
        "casement",
        "hung",
        "awning",
        "hopper",
        "tilt_turn",
        "removable",
        "other"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "How it opens: door single_swing | double_leaf_swing | sliding | pocket | bifold | folding | overhead | revolving | pivot; window fixed | casement | sliding | hung | awning | hopper | tilt_turn | pivot | removable | folding; other (operation_label names it); null = unknown; an opening (a void) has none.",
     "title": "Operation"
    },
    "operation_label": {
     "default": "",
     "description": "The operation as written when it is other (IFC USERDEFINED ObjectType).",
     "maxLength": 60,
     "title": "Operation Label",
     "type": "string",
     "x-bldg-scope": "document"
    },
    "rough": {
     "$ref": "#/$defs/Rough",
     "description": "The rough opening: the hole in the host.",
     "title": "Rough"
    },
    "sill": {
     "anyOf": [
      {
       "minimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The type's typical rough-opening bottom above the finished floor; null = doors 0, windows the typical set's sill.",
     "title": "Sill",
     "x-bldg-scope": "detail"
    },
    "frame": {
     "anyOf": [
      {
       "$ref": "#/$defs/Frame"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Its frame; null = unknown (drawings take the typical set's sizes).",
     "title": "Frame",
     "x-bldg-scope": "document"
    },
    "leaves": {
     "description": "Its leaves (door leaves, window sashes), listed from the jamb the opening's hinge names; [] = unknown.",
     "items": {
      "$ref": "#/$defs/Leaf"
     },
     "maxItems": 8,
     "title": "Leaves",
     "type": "array",
     "x-bldg-scope": "document"
    },
    "layout": {
     "anyOf": [
      {
       "$ref": "#/$defs/Layout"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "How the rough opening is divided; null = one cell.",
     "title": "Layout",
     "x-bldg-scope": "document"
    },
    "hinge_gap": {
     "anyOf": [
      {
       "minimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Between the hinge-side frame face and the leaf opened to 90 degrees.",
     "title": "Hinge Gap",
     "x-bldg-scope": "document"
    },
    "max_open": {
     "anyOf": [
      {
       "exclusiveMinimum": 0,
       "maximum": 180,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The largest opening angle of its swing leaves (degrees); null = unknown.",
     "title": "Max Open",
     "x-bldg-scope": "document"
    },
    "clear": {
     "anyOf": [
      {
       "$ref": "#/$defs/Clear"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "A stated clear opening, only where parts are missing or it was measured, with its basis.",
     "title": "Clear",
     "x-bldg-scope": "document"
    },
    "threshold": {
     "anyOf": [
      {
       "$ref": "#/$defs/Threshold"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Its threshold ({\"h\": 0} = none); null = unknown.",
     "title": "Threshold",
     "x-bldg-scope": "document"
    },
    "glazed": {
     "anyOf": [
      {
       "type": "boolean"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "A door's leaves are glazed: each a frame of stiles and rails round one pane of glass (a patio or French door); null = solid leaves.",
     "title": "Glazed",
     "x-bldg-scope": "document"
    },
    "fall_device": {
     "anyOf": [
      {
       "enum": [
        "none",
        "limiter",
        "guard"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "none | limiter | guard: what keeps a window from being a fall (IBC 1015.8): nothing, a limiter of its opening, a guard device; null = unknown.",
     "title": "Fall Device",
     "x-bldg-scope": "document"
    },
    "fire": {
     "anyOf": [
      {
       "items": {
        "$ref": "#/$defs/Fire"
       },
       "maxItems": 16,
       "type": "array"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Unlisted fire ratings; [] = not rated; null = unknown.",
     "title": "Fire",
     "x-bldg-scope": "document"
    },
    "note": {
     "anyOf": [
      {
       "maxLength": 500,
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Free description.",
     "title": "Note",
     "x-bldg-scope": "document"
    },
    "key": {
     "default": "",
     "description": "Internal identity (IFC type GlobalIds), written once by the editing engine when the type's first element would change; kept by renames and resizes. \"\" = the first element that uses it.",
     "maxLength": 100,
     "title": "Key",
     "type": "string",
     "x-bldg-scope": "document"
    }
   },
   "required": [
    "id",
    "category",
    "rough"
   ],
   "title": "OpeningType",
   "type": "object"
  },
  "Plenum": {
   "additionalProperties": false,
   "description": "The return-air plenum a layer is: the system it serves.",
   "properties": {
    "system": {
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "System",
     "type": "string"
    }
   },
   "required": [
    "system"
   ],
   "title": "Plenum",
   "type": "object"
  },
  "Reaction": {
   "additionalProperties": false,
   "description": "A reaction-to-fire class: standard, class, flame spread and smoke developed indices.",
   "properties": {
    "std": {
     "anyOf": [
      {
       "maxLength": 64,
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Std"
    },
    "class": {
     "anyOf": [
      {
       "maxLength": 16,
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Class"
    },
    "fsi": {
     "anyOf": [
      {
       "minimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Fsi"
    },
    "sdi": {
     "anyOf": [
      {
       "minimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Sdi"
    }
   },
   "title": "Reaction",
   "type": "object"
  },
  "RoomFinish": {
   "additionalProperties": false,
   "description": "A room's own finishes, each a finish row id or a library finish id (bldg:finish_type....); a missing one is the next tier's (the look's row for the room's use, then the default).",
   "properties": {
    "floor": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The whole floor (and the treads of a flight standing in the room).",
     "title": "Floor"
    },
    "walls": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Every wall face toward the room.",
     "title": "Walls"
    },
    "wainscot": {
     "anyOf": [
      {
       "$ref": "#/$defs/FinishBand"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "A band from the floor to h on every wall face toward the room."
    },
    "baseboard": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Along the walls at the floor (bldg:finish_type.none = no baseboard).",
     "title": "Baseboard"
    },
    "ceiling": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The whole ceiling (or the roof underside the room is open to).",
     "title": "Ceiling"
    },
    "objects": {
     "description": "The materials of every object of a class standing in the room (cabinets, counters, appliances, faucets, furniture, upholstery).",
     "items": {
      "$ref": "#/$defs/ClassRow"
     },
     "maxItems": 16,
     "title": "Objects",
     "type": "array"
    }
   },
   "title": "RoomFinish",
   "type": "object"
  },
  "Rough": {
   "additionalProperties": false,
   "description": "A rough opening: the hole in the host, w along it and h up.",
   "properties": {
    "w": {
     "description": "Width along the host: the hole in the wall, frame included (not the clear passage width).",
     "exclusiveMinimum": 0,
     "title": "W",
     "type": "number"
    },
    "h": {
     "description": "Height of the hole (head - sill).",
     "exclusiveMinimum": 0,
     "title": "H",
     "type": "number"
    }
   },
   "required": [
    "w",
    "h"
   ],
   "title": "Rough",
   "type": "object"
  },
  "Semi": {
   "additionalProperties": false,
   "description": "What makes a space semi-outdoor; whether it is covered is derived.",
   "properties": {
    "kind": {
     "description": "balcony | loggia (a recessed balcony) | terrace | porch | arcade | carport.",
     "enum": [
      "balcony",
      "loggia",
      "terrace",
      "porch",
      "arcade",
      "carport",
      "deck"
     ],
     "title": "Kind",
     "type": "string"
    }
   },
   "required": [
    "kind"
   ],
   "title": "Semi",
   "type": "object"
  },
  "Slope": {
   "additionalProperties": false,
   "description": "A plane's steepest rise: its up-slope direction dir and rise over run (a 1:12 ramp rising to +x: {dir: [1, 0], rise: 1, run: 12}).",
   "properties": {
    "dir": {
     "description": "The up-slope direction [dx, dy]: integers, not both 0, in lowest terms.",
     "items": {
      "maximum": 1000,
      "minimum": -1000,
      "type": "integer"
     },
     "maxItems": 2,
     "minItems": 2,
     "title": "Dir",
     "type": "array"
    },
    "rise": {
     "description": "The height the plane gains over run (>= 0).",
     "minimum": 0,
     "title": "Rise",
     "type": "number"
    },
    "run": {
     "description": "The plan distance over which it gains rise (> 0).",
     "exclusiveMinimum": 0,
     "title": "Run",
     "type": "number"
    }
   },
   "required": [
    "dir",
    "rise",
    "run"
   ],
   "title": "Slope",
   "type": "object"
  },
  "Space": {
   "additionalProperties": false,
   "description": "A space (IfcSpace): a room or an area. Its bound is a ring of the level's nodes along walls (virtual walls\nfor open edges), so it follows the walls when they move; its holes are inner rings; within names the space it lies in.",
   "properties": {
    "id": {
     "description": "Identifier of this element, unique across the whole plan.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Id",
     "type": "string"
    },
    "name": {
     "default": "",
     "description": "Label as printed on the plan, e.g. LAUNDRY (drawn at the space's label spot).",
     "title": "Name",
     "type": "string"
    },
    "use": {
     "anyOf": [
      {
       "enum": [
        "living",
        "bedroom",
        "kitchen",
        "dining",
        "bathroom",
        "half_bath",
        "laundry",
        "closet",
        "corridor",
        "entry",
        "garage",
        "storage",
        "utility",
        "office",
        "stair",
        "other",
        "drive",
        "walk",
        "yard"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Its activity; null = unknown (inferred from the name and components, not stored). A semi-outdoor space says so with semi, an open-air one with kind exterior.",
     "title": "Use"
    },
    "habitability": {
     "anyOf": [
      {
       "enum": [
        "habitable",
        "occupiable",
        "unoccupied"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "habitable (lived in) | occupiable (used otherwise) | unoccupied; null = derived from use.",
     "title": "Habitability",
     "x-bldg-scope": "document"
    },
    "sleeping": {
     "anyOf": [
      {
       "type": "boolean"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Used for sleeping; null = unknown.",
     "title": "Sleeping",
     "x-bldg-scope": "document"
    },
    "class": {
     "anyOf": [
      {
       "$ref": "#/$defs/SpaceClass"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Its classification by system (the IBC function of its floor area); null = unknown.",
     "x-bldg-scope": "document"
    },
    "egress": {
     "anyOf": [
      {
       "enum": [
        "exit_access",
        "exit",
        "exit_stair",
        "exit_passageway",
        "exit_discharge",
        "refuge"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "What it is in the means of egress: exit_access | exit | exit_stair | exit_passageway | exit_discharge | refuge; null = unknown.",
     "title": "Egress",
     "x-bldg-scope": "document"
    },
    "load": {
     "anyOf": [
      {
       "$ref": "#/$defs/SpaceLoad"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Its declared occupant data (posted load, fixed seats, bench length); null = none declared.",
     "x-bldg-scope": "document"
    },
    "bound": {
     "description": "The space's outer ring: node ids counter-clockwise (+y up), the first not repeated; each node and the next (the last and the first) are joined by a wall, virtual walls (room separation lines) included.",
     "items": {
      "description": "Id of an existing node (reuse it, do not invent a new one).",
      "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
      "type": "string"
     },
     "minItems": 3,
     "title": "Bound",
     "type": "array"
    },
    "holes": {
     "description": "Its inner rings (a courtyard, an island of walls its area leaves out): node ids clockwise (+y up), each node and the next joined by a wall.",
     "items": {
      "items": {
       "description": "Id of an existing node (reuse it, do not invent a new one).",
       "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
       "type": "string"
      },
      "type": "array"
     },
     "title": "Holes",
     "type": "array"
    },
    "within": {
     "default": "",
     "description": "The space it lies in (a stall in a toilet room, an alcove); \"\" = none.",
     "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63})?$",
     "title": "Within",
     "type": "string",
     "x-bldg-scope": "document"
    },
    "kind": {
     "default": "interior",
     "description": "interior | exterior (outside the building) | plenum | lot (a lot of the site).",
     "enum": [
      "interior",
      "exterior",
      "plenum",
      "lot"
     ],
     "title": "Kind",
     "type": "string",
     "x-bldg-scope": "document"
    },
    "semi": {
     "anyOf": [
      {
       "$ref": "#/$defs/Semi"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "What makes it semi-outdoor (a balcony, a terrace ...); null = not semi-outdoor.",
     "x-bldg-scope": "document"
    },
    "number": {
     "default": "",
     "description": "Space number as on drawings (e.g. 2.01), apart from the stable id and the name.",
     "maxLength": 32,
     "title": "Number",
     "type": "string",
     "x-bldg-scope": "document"
    },
    "finish": {
     "anyOf": [
      {
       "$ref": "#/$defs/RoomFinish"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The room's own finishes (floor, walls, wainscot, baseboard, ceiling); null = none chosen.",
     "x-bldg-scope": "document"
    },
    "floor": {
     "description": "The rest patch (no placement: the space's floor height and slope, at most one) and the parts of its floor (each placed by ring, near, edges or divide), the first listed showing where parts overlap; none = the level's floor. A ramp's surface is its run space's floor.",
     "items": {
      "$ref": "#/$defs/FloorPatch"
     },
     "maxItems": 64,
     "title": "Floor",
     "type": "array",
     "x-bldg-scope": "document"
    },
    "ceiling": {
     "description": "The rest patch (no placement: the space's ceiling, at most one) and the parts of its ceiling (each placed by ring, near, edges or divide), the first listed showing where parts overlap; none = the level's ceiling.",
     "items": {
      "$ref": "#/$defs/CeilingPatch"
     },
     "maxItems": 64,
     "title": "Ceiling",
     "type": "array",
     "x-bldg-scope": "document"
    },
    "label_offset": {
     "description": "[] or [dx, dy]: moves the name from its automatic spot (inside, clear of components and door swings; the compiler's SpaceGeom.label_auto).",
     "items": {
      "type": "number"
     },
     "maxItems": 2,
     "title": "Label Offset",
     "type": "array",
     "x-bldg-scope": "document"
    }
   },
   "required": [
    "id",
    "bound"
   ],
   "title": "Space",
   "type": "object"
  },
  "SpaceClass": {
   "additionalProperties": false,
   "description": "The classification of a space, keyed by classification system; null = unknown.",
   "properties": {
    "ibc_fn": {
     "anyOf": [
      {
       "enum": [
        "accessory_storage_mechanical",
        "agricultural",
        "aircraft_hangar",
        "airport_control_cab",
        "airport_baggage_claim",
        "airport_baggage_handling",
        "airport_concourse",
        "airport_waiting",
        "gaming_floor",
        "exhibit_gallery",
        "assembly_fixed_seats",
        "assembly_concentrated",
        "assembly_standing",
        "assembly_unconcentrated",
        "bowling_center",
        "business",
        "business_concentrated",
        "courtroom",
        "day_care",
        "dormitory",
        "classroom",
        "vocational_shop",
        "exercise",
        "h5_fabrication",
        "industrial",
        "it_equipment",
        "inpatient_treatment",
        "outpatient",
        "institutional_sleeping",
        "kitchen_commercial",
        "library_reading",
        "library_stack",
        "locker_room",
        "mall",
        "mercantile",
        "vehicle_repair_cmv",
        "vehicle_repair",
        "storage_stock",
        "self_storage",
        "parking_garage",
        "residential",
        "skating_rink",
        "skating_rink_deck",
        "stage_platform",
        "pool_deep",
        "spa",
        "catch_pool",
        "pool_other",
        "warehouse"
       ],
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The function of IBC Table 1004.4 its floor area serves (residential, business, classroom ...); null = the one its use implies (a premise), else unknown.",
     "title": "Ibc Fn"
    }
   },
   "title": "SpaceClass",
   "type": "object"
  },
  "SpaceLoad": {
   "additionalProperties": false,
   "description": "The occupant data a space declares: an approved (posted) occupant load, its fixed seats and the length of its\nbenches.",
   "properties": {
    "posted": {
     "anyOf": [
      {
       "minimum": 0,
       "type": "integer"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The approved number of occupants posted for it; null = not declared.",
     "title": "Posted"
    },
    "seats": {
     "anyOf": [
      {
       "minimum": 0,
       "type": "integer"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Its number of fixed seats; null = not declared.",
     "title": "Seats"
    },
    "bench": {
     "anyOf": [
      {
       "minimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The total length of its benches; null = not declared.",
     "title": "Bench"
    }
   },
   "title": "SpaceLoad",
   "type": "object"
  },
  "Text": {
   "additionalProperties": false,
   "description": "Text printed on the plan: space numbers, printed areas, door / window marks, notes (a space's name is the space's\nname field, drawn at the space's label spot).",
   "properties": {
    "id": {
     "description": "Identifier of this element, unique across the whole plan.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Id",
     "type": "string"
    },
    "role": {
     "default": "other",
     "enum": [
      "room_number",
      "area",
      "mark",
      "level",
      "note",
      "other"
     ],
     "title": "Role",
     "type": "string"
    },
    "ref": {
     "default": "",
     "description": "Id of the element the text labels (a space for room_number / area, a wall, opening or component for mark); \"\" = none.",
     "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63})?$",
     "title": "Ref",
     "type": "string"
    },
    "text": {
     "description": "Exactly as printed.",
     "maxLength": 200,
     "minLength": 1,
     "title": "Text",
     "type": "string"
    },
    "x": {
     "description": "Anchor x (centre of the text).",
     "title": "X",
     "type": "number"
    },
    "y": {
     "description": "Anchor y.",
     "title": "Y",
     "type": "number"
    }
   },
   "required": [
    "id",
    "text",
    "x",
    "y"
   ],
   "title": "Text",
   "type": "object"
  },
  "Threshold": {
   "additionalProperties": false,
   "description": "A threshold of an opening type.",
   "properties": {
    "h": {
     "description": "Height above the higher adjacent finished floor; 0 = no threshold.",
     "minimum": 0,
     "title": "H",
     "type": "number"
    },
    "depth": {
     "anyOf": [
      {
       "exclusiveMinimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Depth across the wall; null = the wall's thickness.",
     "title": "Depth"
    }
   },
   "required": [
    "h"
   ],
   "title": "Threshold",
   "type": "object"
  },
  "UValue": {
   "additionalProperties": false,
   "description": "A U-value and what it rests on.",
   "properties": {
    "v": {
     "exclusiveMinimum": 0,
     "title": "V",
     "type": "number"
    },
    "basis": {
     "anyOf": [
      {
       "maxLength": 64,
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "title": "Basis"
    }
   },
   "required": [
    "v"
   ],
   "title": "UValue",
   "type": "object"
  },
  "Wall": {
   "additionalProperties": false,
   "description": "Directed wall node line start -> end (node ids) of its type, or of the types stacked over its height: the type's layers run from face A (the left of start -> end) to face B, the node line through their middle.",
   "properties": {
    "id": {
     "description": "Identifier of this element, unique across the whole plan.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Id",
     "type": "string"
    },
    "start": {
     "description": "Id of an existing node (reuse it, do not invent a new one).",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Start",
     "type": "string"
    },
    "end": {
     "description": "Id of an existing node (reuse it, do not invent a new one).",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "End",
     "type": "string"
    },
    "type": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Id of its wall type (a wall_types row or a library entry bldg:wall_type.*); none with a stack.",
     "title": "Type"
    },
    "stack": {
     "description": "Different constructions stacked over its height, from its base up, covering it without gaps; then it names no type.",
     "items": {
      "$ref": "#/$defs/WallStack"
     },
     "maxItems": 16,
     "title": "Stack",
     "type": "array",
     "x-bldg-scope": "document"
    },
    "flip": {
     "default": false,
     "description": "true: its type's layers run from face B to face A.",
     "title": "Flip",
     "type": "boolean",
     "x-bldg-scope": "document"
    },
    "base": {
     "default": 0.0,
     "description": "Its bottom above the level datum.",
     "title": "Base",
     "type": "number",
     "x-bldg-scope": "document"
    },
    "top": {
     "anyOf": [
      {
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Its top above the level datum; null = up to the slab above, or the storey height.",
     "title": "Top",
     "x-bldg-scope": "document"
    },
    "top_to": {
     "description": "Ceiling patch or level ceiling ids it rises to instead (a partition up to the ceiling); not with top.",
     "items": {
      "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
      "type": "string"
     },
     "maxItems": 16,
     "title": "Top To",
     "type": "array",
     "x-bldg-scope": "document"
    },
    "top_over": {
     "default": 0.0,
     "description": "How far above its top_to ceilings it stops.",
     "title": "Top Over",
     "type": "number",
     "x-bldg-scope": "document"
    },
    "assembly": {
     "anyOf": [
      {
       "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The listed assembly it claims (an assemblies row or bldg:assembly.*); it applies only when the assembly covers its type.",
     "title": "Assembly",
     "x-bldg-scope": "document"
    },
    "fn": {
     "description": "Its functional roles: fire_wall, fire_barrier, party, corridor, bearing, parapet, lot lines ...",
     "items": {
      "enum": [
       "fire_wall",
       "fire_barrier",
       "fire_partition",
       "smoke_barrier",
       "smoke_partition",
       "corridor",
       "exit_enclosure",
       "shaft_enclosure",
       "dwelling_separation",
       "garage_separation",
       "atrium_separation",
       "party",
       "parapet",
       "bearing",
       "foundation_wall",
       "retaining",
       "stem_wall",
       "lot_line.front",
       "lot_line.side",
       "lot_line.rear",
       "row_line",
       "street_centerline",
       "imaginary_lot_line",
       "zoning_district_line"
      ],
      "type": "string"
     },
     "maxItems": 24,
     "title": "Fn",
     "type": "array",
     "x-bldg-scope": "document"
    },
    "finishes": {
     "description": "Finish exceptions on its faces.",
     "items": {
      "$ref": "#/$defs/WallFinish"
     },
     "maxItems": 64,
     "title": "Finishes",
     "type": "array",
     "x-bldg-scope": "document"
    }
   },
   "required": [
    "id",
    "start",
    "end"
   ],
   "title": "Wall",
   "type": "object"
  },
  "WallFinish": {
   "additionalProperties": false,
   "description": "A finish exception on a face of a wall: the room whose face it covers (null: the faces toward outside), its range along the node line and in height, and its finish.",
   "properties": {
    "id": {
     "description": "Identifier of this entry, unique across the whole plan.",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Id",
     "type": "string"
    },
    "space": {
     "anyOf": [
      {
       "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The room whose face of the wall it covers; null = the wall's face(s) toward outside.",
     "title": "Space"
    },
    "s": {
     "anyOf": [
      {
       "items": {
        "type": "number"
       },
       "maxItems": 2,
       "minItems": 2,
       "type": "array"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "[s0, s1] along the node line from the start node; null = the whole length.",
     "title": "S"
    },
    "from": {
     "default": 0.0,
     "description": "The bottom above the finished floor of the room at the face (outside: above the bottom of the outside face).",
     "minimum": 0,
     "title": "From",
     "type": "number"
    },
    "to": {
     "anyOf": [
      {
       "exclusiveMinimum": 0,
       "type": "number"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "The top, same reference; null = the ceiling at the face (or the wall top).",
     "title": "To"
    },
    "finish": {
     "description": "The finish: a finish row id or a library finish id.",
     "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
     "title": "Finish",
     "type": "string"
    }
   },
   "required": [
    "id",
    "finish"
   ],
   "title": "WallFinish",
   "type": "object"
  },
  "WallStack": {
   "additionalProperties": false,
   "description": "One construction of a stacked wall: its type over a z range above the level datum.",
   "properties": {
    "z": {
     "description": "[z0, z1]: the range above the level datum.",
     "items": {
      "type": "number"
     },
     "maxItems": 2,
     "minItems": 2,
     "title": "Z",
     "type": "array"
    },
    "type": {
     "description": "Id of its wall type (a wall_types row or bldg:wall_type.*).",
     "pattern": "^([A-Za-z_][A-Za-z0-9_.\\-]{0,63}|bldg:[a-z0-9][a-z0-9_.\\-]{0,63})$",
     "title": "Type",
     "type": "string"
    }
   },
   "required": [
    "z",
    "type"
   ],
   "title": "WallStack",
   "type": "object"
  },
  "WallType": {
   "additionalProperties": false,
   "description": "A wall type: its kind and its layers from face A to face B (their total is the wall's thickness), whether it bears load, its unlisted fire ratings, reaction to fire, sound ratings and U-value.",
   "properties": {
    "id": {
     "description": "Type mark, e.g. WT1 (international), Q240 (China) or WT4.5 (US).",
     "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
     "title": "Id",
     "type": "string"
    },
    "kind": {
     "description": "solid | partition | curtain | glazed | demountable | operable | toilet_partition | frame | virtual (no body) | line (zero thickness) | marking | curb | fence.",
     "enum": [
      "solid",
      "partition",
      "curtain",
      "glazed",
      "demountable",
      "operable",
      "toilet_partition",
      "frame",
      "virtual",
      "line",
      "marking",
      "curb",
      "fence"
     ],
     "title": "Kind",
     "type": "string"
    },
    "layers": {
     "description": "From face A to face B; their total is the wall's thickness (a single thickness: one core layer). None for virtual, line, marking and frame.",
     "items": {
      "$ref": "#/$defs/Layer"
     },
     "maxItems": 32,
     "title": "Layers",
     "type": "array"
    },
    "load_bearing": {
     "anyOf": [
      {
       "type": "boolean"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "true = it can bear load; null = unknown.",
     "title": "Load Bearing",
     "x-bldg-scope": "document"
    },
    "fire": {
     "anyOf": [
      {
       "items": {
        "$ref": "#/$defs/Fire"
       },
       "maxItems": 16,
       "type": "array"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Unlisted fire ratings (listed ones are assemblies); [] = not rated; null = unknown.",
     "title": "Fire",
     "x-bldg-scope": "document"
    },
    "reaction": {
     "anyOf": [
      {
       "items": {
        "$ref": "#/$defs/Reaction"
       },
       "maxItems": 8,
       "type": "array"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Reaction to fire of its exposed faces; null = from the layers' materials.",
     "title": "Reaction",
     "x-bldg-scope": "document"
    },
    "acoustic": {
     "anyOf": [
      {
       "items": {
        "$ref": "#/$defs/Acoustic"
       },
       "maxItems": 16,
       "type": "array"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Sound ratings; null = unknown.",
     "title": "Acoustic",
     "x-bldg-scope": "document"
    },
    "u": {
     "anyOf": [
      {
       "$ref": "#/$defs/UValue"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "U-value; null = derived from the layers.",
     "title": "U",
     "x-bldg-scope": "document"
    },
    "name": {
     "anyOf": [
      {
       "maxLength": 100,
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "A readable name.",
     "title": "Name",
     "x-bldg-scope": "document"
    },
    "note": {
     "anyOf": [
      {
       "maxLength": 500,
       "type": "string"
      },
      {
       "type": "null"
      }
     ],
     "default": null,
     "description": "Free description: construction notes not yet expressed as fields.",
     "title": "Note",
     "x-bldg-scope": "document"
    },
    "key": {
     "default": "",
     "description": "Internal identity (IFC type GlobalIds), written once by the editing engine when the type's first element would change; kept by renames and resizes. \"\" = the first element that uses it.",
     "maxLength": 100,
     "title": "Key",
     "type": "string",
     "x-bldg-scope": "document"
    }
   },
   "required": [
    "id",
    "kind"
   ],
   "title": "WallType",
   "type": "object"
  }
 },
 "additionalProperties": false,
 "description": "An edit of the stored plan by id: only what changes, in the plan frame and the document unit. Types first: a\nlisted type replaces the one with its id (every instance follows) or adds a new one.",
 "properties": {
  "wall_types": {
   "description": "Wall types to add or change (by id).",
   "items": {
    "$ref": "#/$defs/WallType"
   },
   "title": "Wall Types",
   "type": "array"
  },
  "opening_types": {
   "description": "Opening types to add or change (by id).",
   "items": {
    "$ref": "#/$defs/OpeningType"
   },
   "title": "Opening Types",
   "type": "array"
  },
  "component_types": {
   "description": "Component types to add or change (by id).",
   "items": {
    "$ref": "#/$defs/ComponentType"
   },
   "title": "Component Types",
   "type": "array"
  },
  "delete_types": {
   "description": "Ids of types no element uses any more.",
   "items": {
    "pattern": "^[A-Za-z_][A-Za-z0-9_.\\-]{0,63}$",
    "type": "string"
   },
   "title": "Delete Types",
   "type": "array"
  },
  "edits": {
   "items": {
    "$ref": "#/$defs/LevelEdit"
   },
   "title": "Edits",
   "type": "array"
  }
 },
 "title": "PlanEdit",
 "type": "object"
}
