{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "https://openeik.org/schemas/0.3/elements/element.schema.json",
  "title": "Element",
  "description": "An element record. The category-specific schemas in this folder add the rules of each category.",
  "type": "object",
  "properties": {
    "id": {
      "type": "string",
      "minLength": 1
    },
    "ifcSource": {
      "type": "object",
      "properties": {
        "globalId": {
          "type": "string",
          "pattern": "^[0-3][0-9A-Za-z_$]{21}$"
        },
        "entity": {
          "type": "string",
          "pattern": "^Ifc[A-Za-z0-9]+$"
        },
        "properties": {
          "type": "object",
          "additionalProperties": {
            "type": "object",
            "additionalProperties": {
              "anyOf": [
                {
                  "type": "string"
                },
                {
                  "type": "number"
                },
                {
                  "type": "boolean"
                }
              ]
            }
          }
        },
        "units": {
          "type": "string",
          "const": "specification"
        },
        "predefinedType": {
          "$ref": "../ifc-read/predefined-type.schema.json"
        },
        "objectType": {
          "$ref": "../ifc-read/object-type.schema.json"
        }
      },
      "required": [
        "globalId",
        "entity"
      ],
      "x-eik-closed": true
    },
    "category": {
      "type": "string",
      "maxLength": 32,
      "pattern": "^[a-z][A-Za-z0-9]*$",
      "not": {
        "anyOf": [
          {
            "pattern": "[^A-Za-z0-9]"
          },
          {
            "pattern": "^([Cc][Oo][Nn]|[Pp][Rr][Nn]|[Aa][Uu][Xx]|[Nn][Uu][Ll]|[Cc][Oo][Mm][0-9]|[Ll][Pp][Tt][0-9])$"
          }
        ]
      }
    },
    "name": {
      "type": "string",
      "minLength": 1
    },
    "mark": {
      "type": "string",
      "minLength": 1,
      "maxLength": 40
    },
    "typeId": {
      "type": "string",
      "x-eik-ref": "type"
    },
    "levelId": {
      "type": "string",
      "x-eik-ref": "level"
    },
    "offset": {
      "type": "number"
    },
    "endRise": {
      "type": "number",
      "minimum": -100000,
      "maximum": 100000
    },
    "turn": {
      "type": "number",
      "minimum": -360,
      "maximum": 360
    },
    "roll": {
      "type": "number",
      "minimum": -360,
      "maximum": 360
    },
    "framingParameters": {
      "type": "object",
      "additionalProperties": {
        "type": "number"
      }
    },
    "height": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "width": {
      "type": "number",
      "exclusiveMinimum": 0,
      "maximum": 100000
    },
    "profile": {
      "type": "array",
      "items": {
        "type": "array",
        "minItems": 2,
        "maxItems": 2,
        "prefixItems": [
          {
            "type": "number"
          },
          {
            "type": "number"
          }
        ]
      },
      "minItems": 1,
      "maxItems": 500
    },
    "voids": {
      "type": "array",
      "items": {
        "type": "array",
        "items": {
          "type": "array",
          "minItems": 2,
          "maxItems": 2,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ]
        },
        "minItems": 3,
        "maxItems": 500
      },
      "maxItems": 100
    },
    "joints": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1,
            "maxLength": 80
          },
          "kind": {
            "type": "string",
            "enum": [
              "movement",
              "sound",
              "fire",
              "element"
            ]
          },
          "a": {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ]
          },
          "b": {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ]
          },
          "width": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 300
          },
          "fill": {
            "type": "string",
            "maxLength": 60
          },
          "label": {
            "type": "string",
            "maxLength": 40
          },
          "layers": {
            "type": "array",
            "items": {
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "minItems": 1,
            "maxItems": 12
          }
        },
        "required": [
          "id",
          "kind",
          "a",
          "b",
          "width"
        ],
        "x-eik-closed": true
      },
      "maxItems": 200
    },
    "panels": {
      "type": "object",
      "properties": {
        "width": {
          "type": "number",
          "minimum": 100,
          "maximum": 10000
        },
        "direction": {
          "type": "number"
        },
        "start": {
          "type": "number"
        },
        "prefix": {
          "type": "string",
          "maxLength": 10
        }
      },
      "required": [
        "width"
      ],
      "x-eik-closed": true
    },
    "edges": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "edge": {
            "anyOf": [
              {
                "type": "string",
                "enum": [
                  "start",
                  "end",
                  "top",
                  "bottom"
                ]
              },
              {
                "type": "object",
                "properties": {
                  "opening": {
                    "type": "string",
                    "minLength": 1
                  },
                  "side": {
                    "type": "string",
                    "enum": [
                      "left",
                      "right",
                      "head",
                      "sill"
                    ]
                  }
                },
                "required": [
                  "opening",
                  "side"
                ],
                "x-eik-closed": true
              }
            ]
          },
          "typeId": {
            "type": "string",
            "minLength": 1,
            "x-eik-ref": "type"
          },
          "from": {
            "type": "number",
            "minimum": 0
          },
          "to": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "why": {
            "type": "string",
            "minLength": 1,
            "maxLength": 300
          }
        },
        "required": [
          "edge",
          "typeId"
        ],
        "x-eik-closed": true
      },
      "maxItems": 64
    },
    "insertAt": {
      "type": "object",
      "properties": {
        "face": {
          "type": "string",
          "enum": [
            "exterior",
            "interior",
            "top",
            "bottom",
            "start",
            "end"
          ]
        },
        "along": {
          "type": "number"
        },
        "up": {
          "type": "number"
        },
        "across": {
          "type": "number"
        },
        "turn": {
          "type": "number",
          "enum": [
            0,
            90
          ]
        },
        "tilt": {
          "type": "number",
          "minimum": -80,
          "maximum": 80
        },
        "count": {
          "type": "integer",
          "minimum": 1,
          "maximum": 500
        },
        "spacing": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 50000
        },
        "direction": {
          "type": "string",
          "enum": [
            "along",
            "up"
          ]
        },
        "path": {
          "type": "array",
          "items": {
            "type": "array",
            "minItems": 3,
            "maxItems": 3,
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ]
          },
          "minItems": 1,
          "maxItems": 60
        }
      },
      "required": [
        "face"
      ],
      "x-eik-closed": true
    },
    "recesses": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "typeId": {
            "type": "string",
            "minLength": 1,
            "x-eik-ref": "type"
          },
          "profile": {
            "type": "array",
            "items": {
              "type": "array",
              "minItems": 2,
              "maxItems": 2,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ]
            },
            "minItems": 3,
            "maxItems": 500
          },
          "depth": {
            "type": "number",
            "exclusiveMinimum": 0
          },
          "frame": {
            "type": "object",
            "properties": {
              "origin": {
                "type": "array",
                "minItems": 3,
                "maxItems": 3,
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              "u": {
                "type": "array",
                "minItems": 3,
                "maxItems": 3,
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              "v": {
                "type": "array",
                "minItems": 3,
                "maxItems": 3,
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              "w": {
                "type": "array",
                "minItems": 3,
                "maxItems": 3,
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ]
              }
            },
            "required": [
              "origin",
              "u",
              "v",
              "w"
            ],
            "x-eik-closed": true
          }
        },
        "required": [
          "id",
          "typeId",
          "profile",
          "frame"
        ],
        "x-eik-closed": true
      },
      "maxItems": 100
    },
    "roof": {
      "type": "object",
      "properties": {
        "joinGroup": {
          "type": "string",
          "minLength": 1
        },
        "edges": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "edgeId": {
                "type": "string"
              },
              "definesSlope": {
                "type": "boolean"
              },
              "slope": {
                "type": "number",
                "minimum": 0,
                "maximum": 75
              },
              "overhang": {
                "type": "number",
                "minimum": 0,
                "maximum": 3000
              },
              "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
        },
        "windows": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string"
              },
              "openingOnly": {
                "type": "boolean"
              },
              "edgeId": {
                "type": "string"
              },
              "center": {
                "type": "array",
                "minItems": 2,
                "maxItems": 2,
                "prefixItems": [
                  {
                    "type": "number"
                  },
                  {
                    "type": "number"
                  }
                ]
              },
              "width": {
                "type": "number",
                "minimum": 300,
                "maximum": 30000
              },
              "length": {
                "type": "number",
                "minimum": 300,
                "maximum": 30000
              },
              "reveal": {
                "type": "string",
                "enum": [
                  "plumb",
                  "square",
                  "lightShaft"
                ]
              },
              "typeId": {
                "type": "string",
                "minLength": 1,
                "x-eik-ref": "type"
              }
            },
            "required": [
              "id",
              "edgeId",
              "center",
              "width",
              "length"
            ],
            "x-eik-closed": true
          },
          "maxItems": 100,
          "default": []
        },
        "vault": {
          "type": "object",
          "properties": {
            "shape": {
              "type": "string",
              "enum": [
                "segment",
                "semicircle"
              ]
            },
            "rise": {
              "type": "number",
              "exclusiveMinimum": 0,
              "maximum": 20000
            },
            "edgeId": {
              "type": "string",
              "minLength": 1
            },
            "hostId": {
              "type": "string",
              "minLength": 1
            }
          },
          "required": [
            "shape"
          ],
          "x-eik-closed": true
        }
      },
      "required": [
        "edges"
      ],
      "x-eik-closed": true
    },
    "room": {
      "type": "object",
      "properties": {
        "number": {
          "type": "string",
          "minLength": 1,
          "maxLength": 20
        },
        "name": {
          "type": "string",
          "maxLength": 80
        },
        "department": {
          "type": "string",
          "maxLength": 80
        },
        "unit": {
          "type": "string",
          "maxLength": 40
        },
        "notes": {
          "type": "string",
          "maxLength": 500
        },
        "height": {
          "type": "number",
          "minimum": 100,
          "maximum": 30000
        },
        "finishes": {
          "type": "object",
          "properties": {
            "floor": {
              "type": "object",
              "properties": {
                "material": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "code": {
                  "type": "string",
                  "maxLength": 40
                },
                "color": {
                  "type": "string",
                  "maxLength": 60
                },
                "gloss": {
                  "type": "string",
                  "maxLength": 40
                },
                "note": {
                  "type": "string",
                  "maxLength": 200
                },
                "classifications": {
                  "$ref": "../classifications/classifications.schema.json"
                }
              },
              "required": [
                "material"
              ],
              "x-eik-closed": true
            },
            "skirting": {
              "type": "object",
              "properties": {
                "material": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "code": {
                  "type": "string",
                  "maxLength": 40
                },
                "color": {
                  "type": "string",
                  "maxLength": 60
                },
                "gloss": {
                  "type": "string",
                  "maxLength": 40
                },
                "note": {
                  "type": "string",
                  "maxLength": 200
                },
                "classifications": {
                  "$ref": "../classifications/classifications.schema.json"
                }
              },
              "required": [
                "material"
              ],
              "x-eik-closed": true
            },
            "wall": {
              "type": "object",
              "properties": {
                "material": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "code": {
                  "type": "string",
                  "maxLength": 40
                },
                "color": {
                  "type": "string",
                  "maxLength": 60
                },
                "gloss": {
                  "type": "string",
                  "maxLength": 40
                },
                "note": {
                  "type": "string",
                  "maxLength": 200
                },
                "classifications": {
                  "$ref": "../classifications/classifications.schema.json"
                }
              },
              "required": [
                "material"
              ],
              "x-eik-closed": true
            },
            "ceiling": {
              "type": "object",
              "properties": {
                "material": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "code": {
                  "type": "string",
                  "maxLength": 40
                },
                "color": {
                  "type": "string",
                  "maxLength": 60
                },
                "gloss": {
                  "type": "string",
                  "maxLength": 40
                },
                "note": {
                  "type": "string",
                  "maxLength": 200
                },
                "classifications": {
                  "$ref": "../classifications/classifications.schema.json"
                }
              },
              "required": [
                "material"
              ],
              "x-eik-closed": true
            },
            "other": {
              "type": "object",
              "properties": {
                "material": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 120
                },
                "code": {
                  "type": "string",
                  "maxLength": 40
                },
                "color": {
                  "type": "string",
                  "maxLength": 60
                },
                "gloss": {
                  "type": "string",
                  "maxLength": 40
                },
                "note": {
                  "type": "string",
                  "maxLength": 200
                },
                "classifications": {
                  "$ref": "../classifications/classifications.schema.json"
                }
              },
              "required": [
                "material"
              ],
              "x-eik-closed": true
            }
          },
          "x-eik-closed": true
        },
        "escapeRoute": {
          "type": "boolean"
        }
      },
      "required": [
        "number"
      ],
      "x-eik-closed": true
    },
    "roomBounding": {
      "type": "boolean"
    },
    "stair": {
      "type": "object",
      "properties": {
        "shape": {
          "type": "string",
          "enum": [
            "straight",
            "L",
            "U",
            "spiral",
            "helical"
          ]
        },
        "turn": {
          "type": "string",
          "enum": [
            "left",
            "right"
          ]
        },
        "locationLine": {
          "type": "string",
          "enum": [
            "left",
            "centre",
            "right"
          ]
        },
        "risers": {
          "type": "integer",
          "minimum": 2,
          "maximum": 80
        },
        "going": {
          "type": "number",
          "minimum": 100,
          "maximum": 450
        },
        "firstRunRisers": {
          "type": "integer",
          "minimum": 1,
          "maximum": 79
        },
        "landingDepth": {
          "type": "number",
          "minimum": 300,
          "maximum": 6000
        },
        "gap": {
          "type": "number",
          "minimum": 0,
          "maximum": 3000
        },
        "winders": {
          "anyOf": [
            {
              "type": "integer",
              "minimum": 2,
              "maximum": 4
            },
            {
              "type": "string",
              "const": "balanced"
            }
          ]
        },
        "repeatOf": {
          "type": "string",
          "minLength": 1
        }
      },
      "required": [
        "shape"
      ],
      "x-eik-closed": true
    },
    "railing": {
      "type": "object",
      "properties": {
        "side": {
          "type": "string",
          "enum": [
            "left",
            "right"
          ]
        },
        "edges": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "minItems": 1,
          "maxItems": 64
        },
        "inset": {
          "type": "number",
          "minimum": -1000,
          "maximum": 1000
        },
        "insets": {
          "type": "object",
          "additionalProperties": {
            "type": "number",
            "minimum": -1000,
            "maximum": 1000
          },
          "propertyNames": {
            "minLength": 1
          },
          "maxProperties": 64
        },
        "posts": {
          "type": "object",
          "properties": {
            "at": {
              "type": "array",
              "items": {
                "type": "number",
                "minimum": 0,
                "maximum": 1000000
              },
              "minItems": 1,
              "maxItems": 500
            },
            "omit": {
              "type": "array",
              "items": {
                "type": "string",
                "enum": [
                  "start",
                  "end"
                ]
              },
              "minItems": 1,
              "maxItems": 2,
              "uniqueItems": true
            }
          },
          "x-eik-closed": true
        }
      },
      "x-eik-closed": true
    },
    "declaredGeometry": {
      "type": "object",
      "properties": {
        "level": {
          "type": "string",
          "enum": [
            "interface",
            "assembly",
            "fabrication"
          ]
        },
        "authoritativeFor": {
          "type": "array",
          "items": {
            "type": "string",
            "enum": [
              "envelope",
              "fixings",
              "clearances",
              "positions",
              "loads",
              "parts",
              "fabrication"
            ]
          },
          "minItems": 1,
          "maxItems": 7,
          "uniqueItems": true,
          "contains": {
            "const": "envelope"
          }
        },
        "tolerances": {
          "type": "object",
          "additionalProperties": {
            "type": "number",
            "minimum": 0,
            "maximum": 1000
          },
          "propertyNames": {
            "enum": [
              "default",
              "envelope",
              "fixings",
              "clearances",
              "positions",
              "loads",
              "parts",
              "fabrication"
            ]
          }
        },
        "frame": {
          "type": "string",
          "enum": [
            "world",
            "line"
          ]
        },
        "envelope": {
          "type": "array",
          "items": {
            "anyOf": [
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "prism"
                  },
                  "profile": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "minItems": 2,
                      "maxItems": 2,
                      "prefixItems": [
                        {
                          "type": "number",
                          "minimum": -10000000,
                          "maximum": 10000000
                        },
                        {
                          "type": "number",
                          "minimum": -10000000,
                          "maximum": 10000000
                        }
                      ]
                    },
                    "minItems": 3,
                    "maxItems": 512
                  },
                  "bottom": {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  },
                  "top": {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  }
                },
                "required": [
                  "kind",
                  "profile",
                  "bottom",
                  "top"
                ],
                "x-eik-closed": true
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "polyhedron"
                  },
                  "vertices": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "minItems": 3,
                      "maxItems": 3,
                      "prefixItems": [
                        {
                          "type": "number",
                          "minimum": -10000000,
                          "maximum": 10000000
                        },
                        {
                          "type": "number",
                          "minimum": -10000000,
                          "maximum": 10000000
                        },
                        {
                          "type": "number",
                          "minimum": -10000000,
                          "maximum": 10000000
                        }
                      ]
                    },
                    "minItems": 4,
                    "maxItems": 4096
                  },
                  "faces": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "minItems": 3,
                      "maxItems": 64
                    },
                    "minItems": 4,
                    "maxItems": 8192
                  }
                },
                "required": [
                  "kind",
                  "vertices",
                  "faces"
                ],
                "x-eik-closed": true
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "mesh"
                  },
                  "vertices": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "minItems": 3,
                      "maxItems": 3,
                      "prefixItems": [
                        {
                          "type": "number",
                          "minimum": -10000000,
                          "maximum": 10000000
                        },
                        {
                          "type": "number",
                          "minimum": -10000000,
                          "maximum": 10000000
                        },
                        {
                          "type": "number",
                          "minimum": -10000000,
                          "maximum": 10000000
                        }
                      ]
                    },
                    "minItems": 4,
                    "maxItems": 65536
                  },
                  "faces": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "items": {
                        "type": "integer",
                        "minimum": 0
                      },
                      "minItems": 3,
                      "maxItems": 64
                    },
                    "minItems": 4,
                    "maxItems": 131072
                  }
                },
                "required": [
                  "kind",
                  "vertices",
                  "faces"
                ],
                "x-eik-closed": true
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "cylinder"
                  },
                  "centre": {
                    "type": "array",
                    "minItems": 2,
                    "maxItems": 2,
                    "prefixItems": [
                      {
                        "type": "number",
                        "minimum": -10000000,
                        "maximum": 10000000
                      },
                      {
                        "type": "number",
                        "minimum": -10000000,
                        "maximum": 10000000
                      }
                    ]
                  },
                  "radius": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 100000
                  },
                  "bottom": {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  },
                  "top": {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  }
                },
                "required": [
                  "kind",
                  "centre",
                  "radius",
                  "bottom",
                  "top"
                ],
                "x-eik-closed": true
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "rod"
                  },
                  "from": {
                    "type": "array",
                    "minItems": 3,
                    "maxItems": 3,
                    "prefixItems": [
                      {
                        "type": "number",
                        "minimum": -10000000,
                        "maximum": 10000000
                      },
                      {
                        "type": "number",
                        "minimum": -10000000,
                        "maximum": 10000000
                      },
                      {
                        "type": "number",
                        "minimum": -10000000,
                        "maximum": 10000000
                      }
                    ]
                  },
                  "to": {
                    "type": "array",
                    "minItems": 3,
                    "maxItems": 3,
                    "prefixItems": [
                      {
                        "type": "number",
                        "minimum": -10000000,
                        "maximum": 10000000
                      },
                      {
                        "type": "number",
                        "minimum": -10000000,
                        "maximum": 10000000
                      },
                      {
                        "type": "number",
                        "minimum": -10000000,
                        "maximum": 10000000
                      }
                    ]
                  },
                  "diameter": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "maximum": 100000
                  }
                },
                "required": [
                  "kind",
                  "from",
                  "to",
                  "diameter"
                ],
                "x-eik-closed": true
              },
              {
                "type": "object",
                "properties": {
                  "kind": {
                    "type": "string",
                    "const": "swept"
                  },
                  "section": {
                    "type": "array",
                    "items": {
                      "type": "array",
                      "minItems": 2,
                      "maxItems": 2,
                      "prefixItems": [
                        {
                          "type": "number",
                          "minimum": -10000000,
                          "maximum": 10000000
                        },
                        {
                          "type": "number",
                          "minimum": -10000000,
                          "maximum": 10000000
                        }
                      ]
                    },
                    "minItems": 3,
                    "maxItems": 512
                  }
                },
                "required": [
                  "kind",
                  "section"
                ],
                "x-eik-closed": true
              }
            ]
          },
          "minItems": 1,
          "maxItems": 256
        },
        "fixings": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "at": {
                "type": "array",
                "minItems": 3,
                "maxItems": 3,
                "prefixItems": [
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  },
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  },
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  }
                ]
              },
              "direction": {
                "type": "array",
                "minItems": 3,
                "maxItems": 3,
                "prefixItems": [
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  },
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  },
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  }
                ]
              },
              "bearsOn": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "kind": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "size": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 10000
              }
            },
            "required": [
              "id",
              "at",
              "direction"
            ],
            "x-eik-closed": true
          },
          "minItems": 1,
          "maxItems": 2000
        },
        "clearances": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "purpose": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "body": {
                "anyOf": [
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "prism"
                      },
                      "profile": {
                        "type": "array",
                        "items": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 2,
                          "prefixItems": [
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            },
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            }
                          ]
                        },
                        "minItems": 3,
                        "maxItems": 512
                      },
                      "bottom": {
                        "type": "number",
                        "minimum": -10000000,
                        "maximum": 10000000
                      },
                      "top": {
                        "type": "number",
                        "minimum": -10000000,
                        "maximum": 10000000
                      }
                    },
                    "required": [
                      "kind",
                      "profile",
                      "bottom",
                      "top"
                    ],
                    "x-eik-closed": true
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "polyhedron"
                      },
                      "vertices": {
                        "type": "array",
                        "items": {
                          "type": "array",
                          "minItems": 3,
                          "maxItems": 3,
                          "prefixItems": [
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            },
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            },
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            }
                          ]
                        },
                        "minItems": 4,
                        "maxItems": 4096
                      },
                      "faces": {
                        "type": "array",
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "minItems": 3,
                          "maxItems": 64
                        },
                        "minItems": 4,
                        "maxItems": 8192
                      }
                    },
                    "required": [
                      "kind",
                      "vertices",
                      "faces"
                    ],
                    "x-eik-closed": true
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "mesh"
                      },
                      "vertices": {
                        "type": "array",
                        "items": {
                          "type": "array",
                          "minItems": 3,
                          "maxItems": 3,
                          "prefixItems": [
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            },
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            },
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            }
                          ]
                        },
                        "minItems": 4,
                        "maxItems": 65536
                      },
                      "faces": {
                        "type": "array",
                        "items": {
                          "type": "array",
                          "items": {
                            "type": "integer",
                            "minimum": 0
                          },
                          "minItems": 3,
                          "maxItems": 64
                        },
                        "minItems": 4,
                        "maxItems": 131072
                      }
                    },
                    "required": [
                      "kind",
                      "vertices",
                      "faces"
                    ],
                    "x-eik-closed": true
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "cylinder"
                      },
                      "centre": {
                        "type": "array",
                        "minItems": 2,
                        "maxItems": 2,
                        "prefixItems": [
                          {
                            "type": "number",
                            "minimum": -10000000,
                            "maximum": 10000000
                          },
                          {
                            "type": "number",
                            "minimum": -10000000,
                            "maximum": 10000000
                          }
                        ]
                      },
                      "radius": {
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 100000
                      },
                      "bottom": {
                        "type": "number",
                        "minimum": -10000000,
                        "maximum": 10000000
                      },
                      "top": {
                        "type": "number",
                        "minimum": -10000000,
                        "maximum": 10000000
                      }
                    },
                    "required": [
                      "kind",
                      "centre",
                      "radius",
                      "bottom",
                      "top"
                    ],
                    "x-eik-closed": true
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "rod"
                      },
                      "from": {
                        "type": "array",
                        "minItems": 3,
                        "maxItems": 3,
                        "prefixItems": [
                          {
                            "type": "number",
                            "minimum": -10000000,
                            "maximum": 10000000
                          },
                          {
                            "type": "number",
                            "minimum": -10000000,
                            "maximum": 10000000
                          },
                          {
                            "type": "number",
                            "minimum": -10000000,
                            "maximum": 10000000
                          }
                        ]
                      },
                      "to": {
                        "type": "array",
                        "minItems": 3,
                        "maxItems": 3,
                        "prefixItems": [
                          {
                            "type": "number",
                            "minimum": -10000000,
                            "maximum": 10000000
                          },
                          {
                            "type": "number",
                            "minimum": -10000000,
                            "maximum": 10000000
                          },
                          {
                            "type": "number",
                            "minimum": -10000000,
                            "maximum": 10000000
                          }
                        ]
                      },
                      "diameter": {
                        "type": "number",
                        "exclusiveMinimum": 0,
                        "maximum": 100000
                      }
                    },
                    "required": [
                      "kind",
                      "from",
                      "to",
                      "diameter"
                    ],
                    "x-eik-closed": true
                  },
                  {
                    "type": "object",
                    "properties": {
                      "kind": {
                        "type": "string",
                        "const": "swept"
                      },
                      "section": {
                        "type": "array",
                        "items": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 2,
                          "prefixItems": [
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            },
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            }
                          ]
                        },
                        "minItems": 3,
                        "maxItems": 512
                      }
                    },
                    "required": [
                      "kind",
                      "section"
                    ],
                    "x-eik-closed": true
                  }
                ]
              }
            },
            "required": [
              "id",
              "purpose",
              "body"
            ],
            "x-eik-closed": true
          },
          "minItems": 1,
          "maxItems": 256
        },
        "positions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "member": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "at": {
                "type": "array",
                "minItems": 3,
                "maxItems": 3,
                "prefixItems": [
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  },
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  },
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  }
                ]
              },
              "to": {
                "type": "array",
                "minItems": 3,
                "maxItems": 3,
                "prefixItems": [
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  },
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  },
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  }
                ]
              }
            },
            "required": [
              "id",
              "at"
            ],
            "x-eik-closed": true
          },
          "minItems": 1,
          "maxItems": 2000
        },
        "loads": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "fixing": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "case": {
                "type": "string",
                "minLength": 1,
                "maxLength": 60
              },
              "force": {
                "type": "array",
                "minItems": 3,
                "maxItems": 3,
                "prefixItems": [
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  },
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  },
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  }
                ]
              },
              "moment": {
                "type": "array",
                "minItems": 3,
                "maxItems": 3,
                "prefixItems": [
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  },
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  },
                  {
                    "type": "number",
                    "minimum": -10000000,
                    "maximum": 10000000
                  }
                ]
              }
            },
            "required": [
              "fixing",
              "case",
              "force"
            ],
            "x-eik-closed": true
          },
          "minItems": 1,
          "maxItems": 4000
        },
        "parts": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1,
                "maxLength": 80
              },
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 120
              },
              "bodies": {
                "type": "array",
                "items": {
                  "anyOf": [
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "prism"
                        },
                        "profile": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "minItems": 2,
                            "maxItems": 2,
                            "prefixItems": [
                              {
                                "type": "number",
                                "minimum": -10000000,
                                "maximum": 10000000
                              },
                              {
                                "type": "number",
                                "minimum": -10000000,
                                "maximum": 10000000
                              }
                            ]
                          },
                          "minItems": 3,
                          "maxItems": 512
                        },
                        "bottom": {
                          "type": "number",
                          "minimum": -10000000,
                          "maximum": 10000000
                        },
                        "top": {
                          "type": "number",
                          "minimum": -10000000,
                          "maximum": 10000000
                        }
                      },
                      "required": [
                        "kind",
                        "profile",
                        "bottom",
                        "top"
                      ],
                      "x-eik-closed": true
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "polyhedron"
                        },
                        "vertices": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "minItems": 3,
                            "maxItems": 3,
                            "prefixItems": [
                              {
                                "type": "number",
                                "minimum": -10000000,
                                "maximum": 10000000
                              },
                              {
                                "type": "number",
                                "minimum": -10000000,
                                "maximum": 10000000
                              },
                              {
                                "type": "number",
                                "minimum": -10000000,
                                "maximum": 10000000
                              }
                            ]
                          },
                          "minItems": 4,
                          "maxItems": 4096
                        },
                        "faces": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "minItems": 3,
                            "maxItems": 64
                          },
                          "minItems": 4,
                          "maxItems": 8192
                        }
                      },
                      "required": [
                        "kind",
                        "vertices",
                        "faces"
                      ],
                      "x-eik-closed": true
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "mesh"
                        },
                        "vertices": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "minItems": 3,
                            "maxItems": 3,
                            "prefixItems": [
                              {
                                "type": "number",
                                "minimum": -10000000,
                                "maximum": 10000000
                              },
                              {
                                "type": "number",
                                "minimum": -10000000,
                                "maximum": 10000000
                              },
                              {
                                "type": "number",
                                "minimum": -10000000,
                                "maximum": 10000000
                              }
                            ]
                          },
                          "minItems": 4,
                          "maxItems": 65536
                        },
                        "faces": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "items": {
                              "type": "integer",
                              "minimum": 0
                            },
                            "minItems": 3,
                            "maxItems": 64
                          },
                          "minItems": 4,
                          "maxItems": 131072
                        }
                      },
                      "required": [
                        "kind",
                        "vertices",
                        "faces"
                      ],
                      "x-eik-closed": true
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "cylinder"
                        },
                        "centre": {
                          "type": "array",
                          "minItems": 2,
                          "maxItems": 2,
                          "prefixItems": [
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            },
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            }
                          ]
                        },
                        "radius": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "maximum": 100000
                        },
                        "bottom": {
                          "type": "number",
                          "minimum": -10000000,
                          "maximum": 10000000
                        },
                        "top": {
                          "type": "number",
                          "minimum": -10000000,
                          "maximum": 10000000
                        }
                      },
                      "required": [
                        "kind",
                        "centre",
                        "radius",
                        "bottom",
                        "top"
                      ],
                      "x-eik-closed": true
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "rod"
                        },
                        "from": {
                          "type": "array",
                          "minItems": 3,
                          "maxItems": 3,
                          "prefixItems": [
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            },
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            },
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            }
                          ]
                        },
                        "to": {
                          "type": "array",
                          "minItems": 3,
                          "maxItems": 3,
                          "prefixItems": [
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            },
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            },
                            {
                              "type": "number",
                              "minimum": -10000000,
                              "maximum": 10000000
                            }
                          ]
                        },
                        "diameter": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "maximum": 100000
                        }
                      },
                      "required": [
                        "kind",
                        "from",
                        "to",
                        "diameter"
                      ],
                      "x-eik-closed": true
                    },
                    {
                      "type": "object",
                      "properties": {
                        "kind": {
                          "type": "string",
                          "const": "swept"
                        },
                        "section": {
                          "type": "array",
                          "items": {
                            "type": "array",
                            "minItems": 2,
                            "maxItems": 2,
                            "prefixItems": [
                              {
                                "type": "number",
                                "minimum": -10000000,
                                "maximum": 10000000
                              },
                              {
                                "type": "number",
                                "minimum": -10000000,
                                "maximum": 10000000
                              }
                            ]
                          },
                          "minItems": 3,
                          "maxItems": 512
                        }
                      },
                      "required": [
                        "kind",
                        "section"
                      ],
                      "x-eik-closed": true
                    }
                  ]
                },
                "minItems": 1,
                "maxItems": 64
              }
            },
            "required": [
              "id",
              "name",
              "bodies"
            ],
            "x-eik-closed": true
          },
          "minItems": 1,
          "maxItems": 2000
        },
        "fabrication": {
          "x-eik-application": true
        },
        "basis": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "id": {
                "type": "string",
                "minLength": 1
              },
              "hash": {
                "type": "string",
                "pattern": "^[0-9a-f]{64}$"
              }
            },
            "required": [
              "id",
              "hash"
            ],
            "x-eik-closed": true
          },
          "maxItems": 64
        },
        "source": {
          "type": "object",
          "properties": {
            "by": {
              "type": "string",
              "maxLength": 120
            },
            "tool": {
              "type": "string",
              "maxLength": 120
            },
            "version": {
              "type": "string",
              "maxLength": 60
            }
          },
          "x-eik-closed": true
        }
      },
      "required": [
        "level",
        "authoritativeFor",
        "tolerances"
      ],
      "x-eik-closed": true,
      "allOf": [
        {
          "if": {
            "required": [
              "level"
            ],
            "properties": {
              "level": {
                "const": "interface"
              }
            }
          },
          "then": {
            "properties": {
              "authoritativeFor": {
                "items": {
                  "enum": [
                    "envelope",
                    "fixings",
                    "clearances",
                    "positions",
                    "loads"
                  ]
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "level"
            ],
            "properties": {
              "level": {
                "const": "assembly"
              }
            }
          },
          "then": {
            "properties": {
              "authoritativeFor": {
                "items": {
                  "enum": [
                    "envelope",
                    "fixings",
                    "clearances",
                    "positions",
                    "loads",
                    "parts"
                  ]
                }
              }
            }
          }
        },
        {
          "if": {
            "required": [
              "authoritativeFor"
            ],
            "properties": {
              "authoritativeFor": {
                "contains": {
                  "const": "envelope"
                }
              }
            }
          },
          "then": {
            "required": [
              "envelope"
            ]
          },
          "else": {
            "properties": {
              "envelope": false
            }
          }
        },
        {
          "if": {
            "required": [
              "authoritativeFor"
            ],
            "properties": {
              "authoritativeFor": {
                "contains": {
                  "const": "fixings"
                }
              }
            }
          },
          "then": {
            "required": [
              "fixings"
            ]
          },
          "else": {
            "properties": {
              "fixings": false
            }
          }
        },
        {
          "if": {
            "required": [
              "authoritativeFor"
            ],
            "properties": {
              "authoritativeFor": {
                "contains": {
                  "const": "clearances"
                }
              }
            }
          },
          "then": {
            "required": [
              "clearances"
            ]
          },
          "else": {
            "properties": {
              "clearances": false
            }
          }
        },
        {
          "if": {
            "required": [
              "authoritativeFor"
            ],
            "properties": {
              "authoritativeFor": {
                "contains": {
                  "const": "positions"
                }
              }
            }
          },
          "then": {
            "required": [
              "positions"
            ]
          },
          "else": {
            "properties": {
              "positions": false
            }
          }
        },
        {
          "if": {
            "required": [
              "authoritativeFor"
            ],
            "properties": {
              "authoritativeFor": {
                "contains": {
                  "const": "loads"
                }
              }
            }
          },
          "then": {
            "required": [
              "loads"
            ]
          },
          "else": {
            "properties": {
              "loads": false
            }
          }
        },
        {
          "if": {
            "required": [
              "authoritativeFor"
            ],
            "properties": {
              "authoritativeFor": {
                "contains": {
                  "const": "parts"
                }
              }
            }
          },
          "then": {
            "required": [
              "parts"
            ]
          },
          "else": {
            "properties": {
              "parts": false
            }
          }
        },
        {
          "if": {
            "required": [
              "authoritativeFor"
            ],
            "properties": {
              "authoritativeFor": {
                "contains": {
                  "const": "fabrication"
                }
              }
            }
          },
          "then": {
            "required": [
              "fabrication"
            ]
          },
          "else": {
            "properties": {
              "fabrication": false
            }
          }
        },
        {
          "anyOf": [
            {
              "properties": {
                "tolerances": {
                  "required": [
                    "default"
                  ]
                }
              }
            },
            {
              "allOf": [
                {
                  "if": {
                    "required": [
                      "authoritativeFor"
                    ],
                    "properties": {
                      "authoritativeFor": {
                        "contains": {
                          "const": "envelope"
                        }
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "tolerances": {
                        "required": [
                          "envelope"
                        ]
                      }
                    }
                  }
                },
                {
                  "if": {
                    "required": [
                      "authoritativeFor"
                    ],
                    "properties": {
                      "authoritativeFor": {
                        "contains": {
                          "const": "fixings"
                        }
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "tolerances": {
                        "required": [
                          "fixings"
                        ]
                      }
                    }
                  }
                },
                {
                  "if": {
                    "required": [
                      "authoritativeFor"
                    ],
                    "properties": {
                      "authoritativeFor": {
                        "contains": {
                          "const": "clearances"
                        }
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "tolerances": {
                        "required": [
                          "clearances"
                        ]
                      }
                    }
                  }
                },
                {
                  "if": {
                    "required": [
                      "authoritativeFor"
                    ],
                    "properties": {
                      "authoritativeFor": {
                        "contains": {
                          "const": "positions"
                        }
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "tolerances": {
                        "required": [
                          "positions"
                        ]
                      }
                    }
                  }
                },
                {
                  "if": {
                    "required": [
                      "authoritativeFor"
                    ],
                    "properties": {
                      "authoritativeFor": {
                        "contains": {
                          "const": "parts"
                        }
                      }
                    }
                  },
                  "then": {
                    "properties": {
                      "tolerances": {
                        "required": [
                          "parts"
                        ]
                      }
                    }
                  }
                }
              ]
            }
          ]
        }
      ]
    },
    "kitchen": {
      "type": "object",
      "properties": {
        "modules": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "kind": {
                "type": "string",
                "enum": [
                  "doors",
                  "drawers",
                  "open",
                  "sink",
                  "hob",
                  "hobOven",
                  "dishwasher",
                  "fridge",
                  "tall"
                ]
              },
              "width": {
                "type": "number",
                "minimum": 150,
                "maximum": 1200
              }
            },
            "required": [
              "kind",
              "width"
            ],
            "x-eik-closed": true
          },
          "minItems": 1,
          "maxItems": 40
        },
        "upper": {
          "type": "string",
          "enum": [
            "cabinets",
            "shelves",
            "none"
          ]
        }
      },
      "required": [
        "modules",
        "upper"
      ],
      "x-eik-closed": true
    },
    "planting": {
      "type": "object",
      "properties": {
        "height": {
          "type": "number",
          "minimum": 100,
          "maximum": 60000
        },
        "crown": {
          "type": "number",
          "minimum": 100,
          "maximum": 40000
        }
      },
      "x-eik-closed": true
    },
    "fire": {
      "type": "object",
      "properties": {
        "arrow": {
          "type": "string",
          "enum": [
            "down",
            "left",
            "right",
            "up"
          ]
        },
        "stacked": {
          "type": "boolean"
        }
      },
      "x-eik-closed": true
    },
    "fireClass": {
      "type": "string",
      "maxLength": 24
    },
    "road": {
      "type": "object",
      "properties": {
        "width": {
          "type": "number",
          "minimum": 500,
          "maximum": 40000
        }
      },
      "x-eik-closed": true
    },
    "parking": {
      "type": "object",
      "properties": {
        "side": {
          "type": "string",
          "enum": [
            "left",
            "right"
          ]
        }
      },
      "required": [
        "side"
      ],
      "x-eik-closed": true
    },
    "terrain": {
      "type": "object",
      "properties": {
        "points": {
          "type": "array",
          "items": {
            "type": "array",
            "minItems": 3,
            "maxItems": 3,
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ]
          },
          "minItems": 3,
          "maxItems": 50000
        },
        "source": {
          "type": "object",
          "properties": {
            "kind": {
              "type": "string",
              "enum": [
                "map",
                "survey",
                "contours",
                "grid",
                "sketch"
              ]
            },
            "name": {
              "type": "string",
              "maxLength": 200
            },
            "accuracy": {
              "type": "number",
              "minimum": 0,
              "maximum": 100000
            },
            "date": {
              "type": "string",
              "maxLength": 40
            }
          },
          "required": [
            "kind"
          ],
          "x-eik-closed": true
        },
        "contours": {
          "type": "object",
          "properties": {
            "interval": {
              "type": "number",
              "minimum": 10,
              "maximum": 100000
            },
            "index": {
              "type": "integer",
              "minimum": 0,
              "maximum": 100
            }
          },
          "required": [
            "interval",
            "index"
          ],
          "x-eik-closed": true
        }
      },
      "required": [
        "points"
      ],
      "x-eik-closed": true
    },
    "grading": {
      "type": "object",
      "properties": {
        "slope": {
          "type": "number",
          "minimum": 0.2,
          "maximum": 100
        },
        "fall": {
          "type": "object",
          "properties": {
            "permille": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000
            },
            "toward": {
              "type": "array",
              "minItems": 2,
              "maxItems": 2,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ]
            },
            "at": {
              "type": "string",
              "enum": [
                "first",
                "high"
              ]
            }
          },
          "required": [
            "permille",
            "toward"
          ],
          "x-eik-closed": true
        },
        "order": {
          "type": "integer",
          "minimum": -1000,
          "maximum": 1000
        },
        "ring": {
          "type": "object",
          "properties": {
            "width": {
              "type": "number",
              "minimum": 100,
              "maximum": 50000
            },
            "ratio": {
              "type": "number",
              "minimum": 1,
              "maximum": 1000
            }
          },
          "required": [
            "width",
            "ratio"
          ],
          "x-eik-closed": true
        },
        "retained": {
          "type": "boolean"
        }
      },
      "x-eik-closed": true
    },
    "propertyLine": {
      "type": "object",
      "properties": {
        "setback": {
          "type": "number",
          "minimum": 0,
          "maximum": 50000
        }
      },
      "x-eik-closed": true
    },
    "mep": {
      "type": "object",
      "properties": {
        "z": {
          "type": "array",
          "items": {
            "type": "number",
            "minimum": -100000,
            "maximum": 100000
          },
          "minItems": 2,
          "maxItems": 500
        },
        "size": {
          "type": "number",
          "minimum": 6,
          "maximum": 3000
        },
        "height": {
          "type": "number",
          "minimum": 20,
          "maximum": 3000
        },
        "system": {
          "type": "string",
          "enum": [
            "sewage",
            "storm",
            "coldWater",
            "hotWater",
            "hotWaterCirculation",
            "heating",
            "brine",
            "compressedAir",
            "districtHeating",
            "greaseWaste",
            "oilWaste",
            "gas",
            "supplyAir",
            "extractAir",
            "outdoorAir",
            "exhaustAir",
            "kitchenExhaust"
          ]
        },
        "number": {
          "type": "integer",
          "minimum": 1,
          "maximum": 99
        },
        "insulation": {
          "type": "object",
          "properties": {
            "code": {
              "type": "string",
              "minLength": 1,
              "maxLength": 12,
              "x-eik-values": "national"
            },
            "thickness": {
              "type": "number",
              "minimum": 0,
              "maximum": 200
            },
            "none": {
              "type": "boolean",
              "const": true
            },
            "bti": {
              "type": "object",
              "properties": {
                "class": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 8,
                  "x-eik-values": "national"
                },
                "hanging": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 8,
                  "x-eik-values": "national"
                },
                "material": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 8,
                  "x-eik-values": "national"
                },
                "thickness": {
                  "type": "number",
                  "minimum": 1,
                  "maximum": 200
                },
                "surface": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 8,
                  "x-eik-values": "national"
                }
              },
              "required": [
                "class",
                "hanging",
                "material",
                "thickness"
              ],
              "x-eik-closed": true,
              "deprecated": true
            }
          },
          "x-eik-closed": true
        },
        "joins": {
          "type": "object",
          "properties": {
            "start": {
              "type": "object",
              "properties": {
                "terminalId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "x-eik-ref": "element"
                },
                "connection": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 63
                }
              },
              "required": [
                "terminalId",
                "connection"
              ],
              "x-eik-closed": true
            },
            "end": {
              "type": "object",
              "properties": {
                "terminalId": {
                  "type": "string",
                  "minLength": 1,
                  "maxLength": 200,
                  "x-eik-ref": "element"
                },
                "connection": {
                  "type": "integer",
                  "minimum": 0,
                  "maximum": 63
                }
              },
              "required": [
                "terminalId",
                "connection"
              ],
              "x-eik-closed": true
            }
          },
          "x-eik-closed": true
        },
        "downpipe": {
          "type": "object",
          "properties": {
            "end": {
              "type": "string",
              "enum": [
                "start",
                "end"
              ]
            },
            "foot": {
              "type": "number",
              "minimum": -5000,
              "maximum": 5000
            },
            "kickOut": {
              "type": "boolean"
            },
            "from": {
              "type": "string",
              "maxLength": 240
            }
          },
          "required": [
            "end",
            "foot",
            "kickOut",
            "from"
          ],
          "x-eik-closed": true
        }
      },
      "required": [
        "z",
        "size"
      ],
      "x-eik-closed": true
    },
    "terminal": {
      "type": "object",
      "properties": {
        "flow": {
          "type": "number",
          "minimum": 0,
          "maximum": 5000
        },
        "power": {
          "type": "number",
          "minimum": 1,
          "maximum": 500000
        },
        "deltaT": {
          "type": "number",
          "minimum": 1,
          "maximum": 80
        },
        "kv": {
          "type": "number",
          "minimum": 0,
          "maximum": 1000
        },
        "preset": {
          "type": "string",
          "minLength": 1,
          "maxLength": 12
        }
      },
      "x-eik-closed": true
    },
    "top": {
      "type": "object",
      "properties": {
        "constraint": {
          "anyOf": [
            {
              "type": "string",
              "const": "unconnected"
            },
            {
              "type": "object",
              "properties": {
                "levelId": {
                  "type": "string",
                  "minLength": 1,
                  "x-eik-ref": "level"
                },
                "offset": {
                  "type": "number"
                }
              },
              "required": [
                "levelId",
                "offset"
              ],
              "x-eik-closed": true
            }
          ]
        },
        "attach": {
          "type": "object",
          "properties": {
            "hostId": {
              "type": "string",
              "minLength": 1,
              "x-eik-ref": "element"
            },
            "face": {
              "anyOf": [
                {
                  "type": "string",
                  "enum": [
                    "underside",
                    "top"
                  ]
                },
                {
                  "type": "object",
                  "properties": {
                    "layerId": {
                      "type": "string",
                      "minLength": 1
                    }
                  },
                  "required": [
                    "layerId"
                  ],
                  "x-eik-closed": true
                }
              ]
            },
            "offset": {
              "type": "number",
              "minimum": -10000,
              "maximum": 10000
            },
            "mode": {
              "type": "string",
              "enum": [
                "raking",
                "level"
              ]
            }
          },
          "required": [
            "hostId",
            "face"
          ],
          "x-eik-closed": true
        },
        "extendExteriorLayers": {
          "type": "boolean"
        },
        "cutRoofId": {
          "type": "string",
          "minLength": 1,
          "x-eik-ref": "element"
        },
        "cutRoofFace": {
          "anyOf": [
            {
              "type": "string",
              "const": "underside"
            },
            {
              "type": "object",
              "properties": {
                "layerId": {
                  "type": "string",
                  "minLength": 1
                }
              },
              "required": [
                "layerId"
              ],
              "x-eik-closed": true
            }
          ]
        }
      },
      "required": [
        "constraint"
      ],
      "x-eik-closed": true
    },
    "edgeAttachments": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "edgeId": {
            "type": "string",
            "minLength": 1
          },
          "hostId": {
            "type": "string",
            "minLength": 1,
            "x-eik-ref": "element"
          },
          "face": {
            "type": "string",
            "enum": [
              "interior",
              "exterior"
            ]
          }
        },
        "required": [
          "edgeId",
          "hostId",
          "face"
        ],
        "x-eik-closed": true
      },
      "maxItems": 100
    },
    "base": {
      "type": "object",
      "properties": {
        "attach": {
          "type": "object",
          "properties": {
            "hostId": {
              "type": "string",
              "minLength": 1,
              "x-eik-ref": "element"
            },
            "face": {
              "type": "string",
              "enum": [
                "top",
                "underside"
              ]
            },
            "offset": {
              "type": "number",
              "minimum": -10000,
              "maximum": 10000
            }
          },
          "required": [
            "hostId",
            "face"
          ],
          "x-eik-closed": true
        }
      },
      "x-eik-closed": true
    },
    "taper": {
      "type": "object",
      "properties": {
        "endDepth": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 10000
        }
      },
      "required": [
        "endDepth"
      ],
      "x-eik-closed": true
    },
    "status": {
      "type": "string",
      "enum": [
        "existing",
        "new",
        "demolished"
      ]
    },
    "framingTop": {
      "type": "object",
      "properties": {
        "mode": {
          "type": "string",
          "enum": [
            "auto",
            "underFloor",
            "levelPlate",
            "raking"
          ]
        },
        "wallLiveHeight": {
          "type": "number",
          "minimum": 100,
          "maximum": 20000
        },
        "floorId": {
          "type": "string",
          "minLength": 1,
          "x-eik-ref": "element"
        }
      },
      "x-eik-closed": true
    },
    "framingJoints": {
      "type": "array",
      "items": {
        "type": "number",
        "minimum": -100000,
        "maximum": 100000
      },
      "maxItems": 40
    },
    "framingCorners": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "enum": [
            "through",
            "butt"
          ]
        },
        "end": {
          "type": "string",
          "enum": [
            "through",
            "butt"
          ]
        }
      },
      "x-eik-closed": true
    },
    "framingStart": {
      "type": "string",
      "enum": [
        "left",
        "right",
        "centre",
        "bothEnds"
      ]
    },
    "framingOffset": {
      "type": "number",
      "minimum": -5000,
      "maximum": 5000
    },
    "framingStuds": {
      "type": "array",
      "items": {
        "type": "number",
        "minimum": -100000,
        "maximum": 100000
      },
      "maxItems": 80
    },
    "framingTees": {
      "type": "object",
      "properties": {
        "start": {
          "type": "string",
          "enum": [
            "backer",
            "ladder",
            "flat",
            "none"
          ]
        },
        "end": {
          "type": "string",
          "enum": [
            "backer",
            "ladder",
            "flat",
            "none"
          ]
        }
      },
      "x-eik-closed": true
    },
    "bottomPlate": {
      "type": "string",
      "enum": [
        "auto",
        "cut",
        "keep"
      ]
    },
    "frameHost": {
      "type": "object",
      "properties": {
        "wallId": {
          "type": "string",
          "minLength": 1
        },
        "layerId": {
          "type": "string",
          "minLength": 1
        },
        "roofId": {
          "type": "string",
          "minLength": 1
        },
        "memberId": {
          "type": "string",
          "minLength": 1
        },
        "role": {
          "type": "string",
          "minLength": 1
        },
        "edited": {
          "type": "boolean"
        }
      },
      "required": [
        "memberId",
        "role"
      ],
      "x-eik-closed": true
    },
    "trussLayout": {
      "type": "object",
      "properties": {
        "familyTypeId": {
          "type": "string",
          "minLength": 1
        },
        "layoutRule": {
          "type": "string",
          "enum": [
            "fixedDistance",
            "maximumSpacing",
            "fixedNumber",
            "positions"
          ],
          "default": "fixedDistance"
        },
        "spacing": {
          "type": "number",
          "minimum": 300,
          "maximum": 6000,
          "default": 1200
        },
        "count": {
          "type": "integer",
          "minimum": 2,
          "maximum": 400
        },
        "positions": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "at": {
                "type": "number",
                "minimum": 0,
                "maximum": 200000
              },
              "mark": {
                "type": "string",
                "minLength": 1,
                "maxLength": 12
              }
            },
            "required": [
              "at"
            ],
            "x-eik-closed": true
          },
          "maxItems": 400
        },
        "justification": {
          "type": "string",
          "enum": [
            "beginning",
            "center",
            "end"
          ],
          "default": "beginning"
        },
        "bearingWallIds": {
          "type": "array",
          "minItems": 2,
          "maxItems": 2,
          "prefixItems": [
            {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  },
                  "minItems": 1,
                  "maxItems": 6
                }
              ]
            },
            {
              "anyOf": [
                {
                  "type": "string",
                  "minLength": 1
                },
                {
                  "type": "array",
                  "items": {
                    "type": "string",
                    "minLength": 1
                  },
                  "minItems": 1,
                  "maxItems": 6
                }
              ]
            }
          ]
        },
        "bearingReference": {
          "type": "string",
          "enum": [
            "coreFace",
            "finishFace"
          ],
          "default": "coreFace"
        },
        "heelHeight": {
          "type": "number",
          "minimum": 0,
          "maximum": 5000
        },
        "chordLayer": {
          "type": "string",
          "minLength": 1
        },
        "overhang": {
          "type": "number",
          "minimum": 0,
          "maximum": 3000
        },
        "ends": {
          "type": "string",
          "enum": [
            "insideGables",
            "bearingEnds"
          ],
          "default": "insideGables"
        },
        "endOffset": {
          "type": "number",
          "minimum": 0,
          "maximum": 5000,
          "default": 0
        },
        "ridgeBeam": {
          "type": "object",
          "properties": {
            "width": {
              "type": "number",
              "minimum": 45,
              "maximum": 600
            },
            "depth": {
              "type": "number",
              "minimum": 90,
              "maximum": 2000
            },
            "material": {
              "type": "string",
              "minLength": 1,
              "maxLength": 60,
              "default": "GL30c"
            },
            "topOffset": {
              "type": "number",
              "minimum": 0,
              "maximum": 1000,
              "default": 0
            },
            "posts": {
              "type": "array",
              "items": {
                "type": "number",
                "minimum": 0,
                "maximum": 100000
              },
              "maxItems": 20,
              "default": []
            }
          },
          "required": [
            "depth"
          ],
          "x-eik-closed": true
        },
        "openingFraming": {
          "type": "object",
          "properties": {
            "trimmerPlies": {
              "type": "integer",
              "minimum": 1,
              "maximum": 3,
              "default": 2
            },
            "headerPlies": {
              "type": "integer",
              "minimum": 1,
              "maximum": 3,
              "default": 2
            },
            "dormerRafterDepth": {
              "type": "number",
              "minimum": 45,
              "maximum": 600
            }
          },
          "x-eik-closed": true
        },
        "hips": {
          "type": "object",
          "properties": {
            "frame": {
              "type": "boolean",
              "default": true
            },
            "system": {
              "type": "string",
              "enum": [
                "auto",
                "hipGirders",
                "ridgeGirder"
              ],
              "default": "auto"
            },
            "girderPlies": {
              "type": "integer",
              "minimum": 1,
              "maximum": 4,
              "default": 2
            },
            "hipPlies": {
              "type": "integer",
              "minimum": 1,
              "maximum": 3,
              "default": 2
            },
            "jackSpacing": {
              "type": "number",
              "minimum": 300,
              "maximum": 3000
            },
            "minJack": {
              "type": "number",
              "minimum": 0,
              "maximum": 3000,
              "default": 400
            }
          },
          "x-eik-closed": true
        }
      },
      "required": [
        "familyTypeId"
      ],
      "x-eik-closed": true
    },
    "topRoofId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "x-eik-ref": "element"
    },
    "roofCutId": {
      "type": "string",
      "minLength": 1,
      "x-eik-ref": "element"
    },
    "topCeilingId": {
      "anyOf": [
        {
          "type": "string",
          "minLength": 1
        },
        {
          "type": "null"
        }
      ],
      "x-eik-ref": "element"
    },
    "wallOutline": {
      "type": "array",
      "items": {
        "type": "array",
        "minItems": 2,
        "maxItems": 2,
        "prefixItems": [
          {
            "type": "number"
          },
          {
            "type": "number"
          }
        ]
      },
      "minItems": 3,
      "maxItems": 500
    },
    "hostId": {
      "type": "string",
      "x-eik-ref": "element"
    },
    "original": {
      "type": "string",
      "minLength": 1,
      "maxLength": 12,
      "pattern": "^[^/\\s]+$"
    },
    "copy": {
      "type": "string",
      "minLength": 1,
      "maxLength": 12,
      "pattern": "^[^/\\s]+$"
    },
    "born": {
      "type": "string",
      "minLength": 1,
      "maxLength": 12,
      "pattern": "^[^/\\s]+$"
    },
    "along": {
      "type": "number",
      "minimum": 0
    },
    "revision": {
      "type": "integer",
      "minimum": 0,
      "default": 0
    },
    "edgeIndex": {
      "type": "integer",
      "minimum": 0
    },
    "edgeIds": {
      "type": "array",
      "items": {
        "type": "string",
        "minLength": 1
      }
    },
    "hostEdgeId": {
      "type": "string",
      "minLength": 1
    },
    "horizontalOffset": {
      "type": "number"
    },
    "verticalOffset": {
      "type": "number"
    },
    "flipped": {
      "type": "boolean"
    },
    "handFlipped": {
      "type": "boolean"
    },
    "open": {
      "type": "number",
      "minimum": 0,
      "maximum": 1
    },
    "componentInverted": {
      "type": "boolean"
    },
    "miterEnds": {
      "type": "boolean"
    },
    "connection": {
      "type": "object",
      "properties": {
        "kind": {
          "type": "string",
          "enum": [
            "basePlate",
            "topPlate",
            "endPlate"
          ]
        },
        "width": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 10000
        },
        "depth": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 10000
        },
        "thickness": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 10000
        },
        "boltDiameter": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 10000
        },
        "edgeDistance": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 10000
        },
        "boltLength": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 10000
        }
      },
      "required": [
        "kind",
        "width",
        "depth",
        "thickness",
        "boltDiameter",
        "edgeDistance",
        "boltLength"
      ],
      "x-eik-closed": true
    },
    "joinEnds": {
      "type": "array",
      "minItems": 2,
      "maxItems": 2,
      "prefixItems": [
        {
          "type": "boolean"
        },
        {
          "type": "boolean"
        }
      ]
    },
    "joins": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "id": {
            "type": "string",
            "minLength": 1
          },
          "to": {
            "type": "string",
            "minLength": 1,
            "x-eik-ref": "element"
          },
          "at": {
            "type": "string",
            "enum": [
              "start",
              "end"
            ]
          },
          "kind": {
            "type": "string",
            "enum": [
              "butt",
              "mitre"
            ]
          },
          "gap": {
            "type": "number",
            "minimum": 0,
            "maximum": 200
          },
          "extend": {
            "type": "boolean"
          }
        },
        "required": [
          "id",
          "to",
          "at",
          "kind"
        ],
        "x-eik-closed": true
      },
      "maxItems": 4
    },
    "holes": {
      "type": "array",
      "items": {
        "type": "object",
        "properties": {
          "at": {
            "type": "number",
            "minimum": 0,
            "maximum": 100000
          },
          "offset": {
            "type": "number",
            "minimum": -2000,
            "maximum": 2000,
            "default": 0
          },
          "through": {
            "type": "string",
            "enum": [
              "width",
              "depth"
            ]
          },
          "diameter": {
            "type": "number",
            "exclusiveMinimum": 0,
            "maximum": 500
          },
          "side": {
            "type": "string",
            "enum": [
              "positive",
              "negative"
            ]
          }
        },
        "required": [
          "at",
          "through",
          "diameter"
        ],
        "x-eik-closed": true
      },
      "maxItems": 200
    },
    "upright": {
      "type": "boolean"
    },
    "axes": {
      "type": "object",
      "properties": {
        "x": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ]
        },
        "y": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ]
        }
      },
      "required": [
        "x",
        "y"
      ],
      "x-eik-closed": true
    },
    "plate": {
      "type": "object",
      "properties": {
        "outline": {
          "type": "array",
          "items": {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ]
          },
          "minItems": 3,
          "maxItems": 200
        },
        "holes": {
          "type": "array",
          "items": {
            "type": "object",
            "properties": {
              "x": {
                "type": "number"
              },
              "y": {
                "type": "number"
              },
              "diameter": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 1000
              },
              "length": {
                "type": "number",
                "exclusiveMinimum": 0,
                "maximum": 2000
              },
              "angle": {
                "type": "number",
                "minimum": -360,
                "maximum": 360
              }
            },
            "required": [
              "x",
              "y",
              "diameter"
            ],
            "x-eik-closed": true
          },
          "maxItems": 200
        }
      },
      "x-eik-closed": true
    },
    "bolts": {
      "type": "object",
      "properties": {
        "positions": {
          "type": "array",
          "items": {
            "type": "array",
            "minItems": 2,
            "maxItems": 2,
            "prefixItems": [
              {
                "type": "number"
              },
              {
                "type": "number"
              }
            ]
          },
          "minItems": 1,
          "maxItems": 200
        },
        "grip": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 3000
        },
        "through": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "maxItems": 20
        },
        "length": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 3000
        },
        "hole": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 200
        },
        "embed": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 3000
        }
      },
      "required": [
        "positions",
        "grip"
      ],
      "x-eik-closed": true
    },
    "weld": {
      "type": "object",
      "properties": {
        "throat": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 40
        },
        "kind": {
          "type": "string",
          "enum": [
            "fillet"
          ],
          "default": "fillet"
        },
        "site": {
          "type": "boolean"
        },
        "parts": {
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1
          },
          "maxItems": 2
        }
      },
      "required": [
        "throat"
      ],
      "x-eik-closed": true
    },
    "jointId": {
      "type": "string",
      "minLength": 1,
      "maxLength": 80
    },
    "structural": {
      "type": "boolean"
    },
    "pinned": {
      "type": "boolean"
    },
    "reinforcement": {
      "type": "object",
      "properties": {
        "layerId": {
          "type": "string"
        },
        "cover": {
          "type": "number",
          "minimum": 0
        },
        "diameter": {
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 50
        },
        "spacingX": {
          "type": "number",
          "minimum": 50
        },
        "spacingY": {
          "type": "number",
          "minimum": 50
        },
        "face": {
          "type": "string",
          "enum": [
            "top",
            "bottom"
          ]
        }
      },
      "required": [
        "layerId",
        "cover",
        "diameter",
        "spacingX",
        "spacingY",
        "face"
      ],
      "x-eik-closed": true
    },
    "bars": {
      "type": "object",
      "properties": {
        "shape": {
          "type": "string",
          "minLength": 1,
          "x-eik-values": "national"
        },
        "dims": {
          "type": "object",
          "properties": {
            "a": {
              "type": "number",
              "minimum": 0,
              "maximum": 30000
            },
            "b": {
              "type": "number",
              "minimum": 0,
              "maximum": 30000
            },
            "c": {
              "type": "number",
              "minimum": 0,
              "maximum": 30000
            },
            "d": {
              "type": "number",
              "minimum": 0,
              "maximum": 30000
            },
            "e": {
              "type": "number",
              "minimum": 0,
              "maximum": 30000
            },
            "f": {
              "type": "number",
              "minimum": 0,
              "maximum": 30000
            },
            "g": {
              "type": "number",
              "minimum": 0,
              "maximum": 30000
            },
            "x": {
              "type": "number",
              "minimum": 0,
              "maximum": 30000
            },
            "y": {
              "type": "number",
              "minimum": 0,
              "maximum": 30000
            },
            "v": {
              "type": "number",
              "minimum": 0,
              "maximum": 30000
            },
            "u": {
              "type": "number",
              "minimum": 0,
              "maximum": 30000
            },
            "s": {
              "type": "number",
              "minimum": 0,
              "maximum": 30000
            },
            "t": {
              "type": "number",
              "minimum": 0,
              "maximum": 30000
            }
          },
          "x-eik-closed": true
        },
        "diameter": {
          "type": "integer",
          "minimum": 5,
          "maximum": 40
        },
        "grade": {
          "type": "string",
          "minLength": 1,
          "x-eik-values": "national"
        },
        "mark": {
          "type": "string",
          "minLength": 1,
          "maxLength": 12
        },
        "origin": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ]
        },
        "xAxis": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ]
        },
        "yAxis": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ]
        },
        "along": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ]
        },
        "count": {
          "type": "integer",
          "minimum": 1,
          "maximum": 5000
        },
        "spacing": {
          "type": "number",
          "minimum": 10,
          "maximum": 20000
        },
        "face": {
          "type": "string",
          "enum": [
            "bottom",
            "top"
          ]
        },
        "anchor": {
          "type": "object",
          "properties": {
            "at": {
              "type": "array",
              "minItems": 3,
              "maxItems": 3,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ]
            },
            "dir": {
              "type": "array",
              "minItems": 2,
              "maxItems": 2,
              "prefixItems": [
                {
                  "type": "number"
                },
                {
                  "type": "number"
                }
              ]
            }
          },
          "required": [
            "at",
            "dir"
          ],
          "x-eik-closed": true
        },
        "note": {
          "type": "string",
          "maxLength": 40
        }
      },
      "required": [
        "shape",
        "dims",
        "diameter",
        "mark",
        "origin",
        "xAxis",
        "yAxis",
        "count"
      ],
      "x-eik-closed": true
    },
    "sheet": {
      "type": "object",
      "properties": {
        "designation": {
          "type": "string",
          "minLength": 1,
          "x-eik-values": "national"
        },
        "length": {
          "type": "number",
          "minimum": 500,
          "maximum": 12000,
          "default": 5000
        },
        "width": {
          "type": "number",
          "minimum": 500,
          "maximum": 4000,
          "default": 2300
        },
        "lap": {
          "type": "number",
          "minimum": 0,
          "maximum": 2000
        },
        "face": {
          "type": "string",
          "enum": [
            "bottom",
            "top",
            "seams",
            "exterior",
            "interior",
            "both",
            "middle"
          ]
        },
        "layer": {
          "anyOf": [
            {
              "type": "string",
              "enum": [
                "outer",
                "inner",
                "insulation"
              ]
            },
            {
              "type": "integer",
              "minimum": 0,
              "maximum": 31
            }
          ]
        },
        "cover": {
          "type": "number",
          "minimum": 10,
          "maximum": 200
        },
        "angle": {
          "type": "number",
          "minimum": -180,
          "maximum": 180
        },
        "grade": {
          "type": "string",
          "minLength": 1,
          "x-eik-values": "national"
        },
        "mark": {
          "type": "string",
          "minLength": 1,
          "maxLength": 12
        }
      },
      "required": [
        "designation",
        "face",
        "cover",
        "mark"
      ],
      "x-eik-closed": true
    },
    "generic": {
      "type": "object",
      "properties": {
        "standsFor": {
          "type": "string",
          "minLength": 1
        },
        "ifcClass": {
          "type": "string",
          "pattern": "^Ifc[A-Z][A-Za-z0-9]*$"
        },
        "discipline": {
          "type": "string",
          "enum": [
            "architecture",
            "structure",
            "systems",
            "site"
          ]
        }
      },
      "x-eik-closed": true
    },
    "owner": {
      "$ref": "../ownership/owner.schema.json"
    },
    "classifications": {
      "$ref": "../classifications/classifications.schema.json"
    },
    "shape": {
      "$ref": "../ifc-read/shape.schema.json"
    },
    "castWith": {
      "$ref": "../adopted/element-cast-with.schema.json"
    },
    "cable": {
      "type": "object",
      "properties": {
        "to": {
          "description": "The electrical element the leg feeds: a device, or a board fed by the circuit.",
          "type": "string",
          "minLength": 1,
          "x-eik-ref": "element"
        },
        "circuitId": {
          "description": "The leg's circuit: the circuitId of the element it feeds.",
          "type": "string",
          "minLength": 1,
          "x-eik-ref": "circuit"
        },
        "carrierIds": {
          "description": "The cable carriers it runs in.",
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "x-eik-ref": "element"
          }
        }
      },
      "required": [
        "to",
        "circuitId"
      ],
      "x-eik-closed": true
    },
    "electrical": {
      "type": "object",
      "properties": {
        "designation": {
          "description": "Its reference designation (IEC 81346), such as a board's.",
          "type": "string",
          "minLength": 1,
          "maxLength": 24,
          "pattern": "^[A-Za-z0-9.:+=-]+$"
        },
        "purpose": {
          "description": "What it serves, as the project's drawings code it.",
          "type": "string",
          "minLength": 1,
          "maxLength": 8,
          "x-eik-values": "national"
        },
        "power": {
          "description": "Its connected load where it differs from its type's, W.",
          "type": "number",
          "minimum": 0,
          "maximum": 1000000
        },
        "controls": {
          "description": "The elements a switch, a dimmer, a button or a sensor controls.",
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "x-eik-ref": "element"
          },
          "maxItems": 200
        },
        "circuitId": {
          "description": "The circuit that feeds it; a board's, the circuit that feeds the board.",
          "type": "string",
          "minLength": 1,
          "x-eik-ref": "circuit"
        },
        "from": {
          "description": "The device on the same circuit it is fed from; without it, its circuit's board.",
          "type": "string",
          "minLength": 1,
          "x-eik-ref": "element"
        },
        "cable": {
          "description": "The cable of the leg that feeds it, where it differs from its circuit's.",
          "$ref": "../project/circuit.schema.json#/$defs/cable"
        }
      },
      "x-eik-closed": true
    },
    "end": {
      "description": "The end of the member's reference line: its level, and its offset from it in mm, at its profile's second point (Part II, 6.2.1, rule 3).",
      "type": "object",
      "properties": {
        "levelId": {
          "type": "string",
          "minLength": 1,
          "x-eik-ref": "level"
        },
        "offset": {
          "type": "number"
        }
      },
      "required": [
        "levelId",
        "offset"
      ],
      "x-eik-closed": true
    },
    "provision": {
      "description": "The void it asks of its host (Part II, 6.10).",
      "type": "object",
      "properties": {
        "hostId": {
          "type": "string",
          "minLength": 1,
          "x-eik-ref": "element",
          "description": "The element it goes through: a wall, a slab, a foundation, a ceiling, a roof, a beam or a column (rule 3)."
        },
        "axis": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "items": false,
          "description": "A unit vector: the way it runs through its host (rule 1)."
        },
        "up": {
          "type": "array",
          "minItems": 3,
          "maxItems": 3,
          "prefixItems": [
            {
              "type": "number"
            },
            {
              "type": "number"
            },
            {
              "type": "number"
            }
          ],
          "items": false,
          "description": "A unit vector square to axis: the way its height is measured (rule 1)."
        },
        "depth": {
          "description": "Its length along its axis, half each way from its centre, mm (rule 2).",
          "type": "number",
          "exclusiveMinimum": 0,
          "maximum": 20000
        },
        "round": {
          "description": "true for a round void of diameter width; absent or false, a rectangle (rule 2).",
          "type": "boolean"
        },
        "forIds": {
          "description": "The runs it is for: pipes, ducts and cable carriers (rule 4).",
          "type": "array",
          "items": {
            "type": "string",
            "minLength": 1,
            "x-eik-ref": "element"
          },
          "minItems": 1,
          "maxItems": 20
        },
        "clearance": {
          "description": "The space kept round its runs on each side, which its size includes, mm.",
          "type": "number",
          "minimum": 0,
          "maximum": 1000
        },
        "note": {
          "description": "What it is for, in words for people.",
          "type": "string",
          "maxLength": 400
        },
        "answer": {
          "description": "Its host's owner's answer (rule 5); absent, it waits for one.",
          "type": "object",
          "properties": {
            "state": {
              "description": "cut: the void is made; declined: it is not.",
              "enum": [
                "cut",
                "declined"
              ]
            },
            "by": {
              "description": "Who answered, as the project names them.",
              "type": "string",
              "minLength": 1,
              "maxLength": 80
            },
            "discipline": {
              "description": "The discipline they answered for (Part XVI, 2, rule 4).",
              "enum": [
                "architecture",
                "structure",
                "ventilation",
                "plumbing",
                "electrical",
                "sprinkler",
                "site",
                "setup"
              ]
            },
            "at": {
              "description": "When, an RFC 3339 date and time in UTC.",
              "type": "string",
              "pattern": "^[0-9]{4}-[0-9]{2}-[0-9]{2}T[0-9]{2}:[0-9]{2}:[0-9]{2}(\\.[0-9]+)?Z$"
            },
            "text": {
              "description": "Why, in a sentence: required where it is declined.",
              "type": "string",
              "minLength": 1,
              "maxLength": 1000
            },
            "cut": {
              "description": "What the cut made: a recess of its host's recesses, or an element, each by its id. Required where it is cut.",
              "type": "array",
              "minItems": 1,
              "maxItems": 20,
              "items": {
                "oneOf": [
                  {
                    "type": "object",
                    "properties": {
                      "recess": {
                        "type": "string",
                        "minLength": 1
                      }
                    },
                    "required": [
                      "recess"
                    ],
                    "additionalProperties": false
                  },
                  {
                    "type": "object",
                    "properties": {
                      "element": {
                        "type": "string",
                        "minLength": 1,
                        "x-eik-ref": "element"
                      }
                    },
                    "required": [
                      "element"
                    ],
                    "additionalProperties": false
                  }
                ]
              }
            }
          },
          "required": [
            "state",
            "by",
            "at"
          ],
          "allOf": [
            {
              "if": {
                "properties": {
                  "state": {
                    "const": "cut"
                  }
                },
                "required": [
                  "state"
                ]
              },
              "then": {
                "required": [
                  "cut"
                ]
              }
            },
            {
              "if": {
                "properties": {
                  "state": {
                    "const": "declined"
                  }
                },
                "required": [
                  "state"
                ]
              },
              "then": {
                "required": [
                  "text"
                ],
                "properties": {
                  "cut": false
                }
              }
            }
          ],
          "x-eik-closed": true
        }
      },
      "required": [
        "hostId",
        "axis",
        "up",
        "depth"
      ],
      "x-eik-closed": true
    },
    "littera": {
      "$ref": "../estimate/littera.schema.json"
    },
    "tenderPart": {
      "$ref": "../estimate/tender-part.schema.json"
    },
    "action": {
      "$ref": "../estimate/action.schema.json"
    }
  },
  "required": [
    "id",
    "category",
    "name",
    "typeId",
    "levelId",
    "offset",
    "height",
    "width"
  ],
  "x-eik-closed": true,
  "if": {
    "properties": {
      "category": {
        "const": "railing"
      }
    },
    "required": [
      "category"
    ]
  },
  "else": {
    "required": [
      "profile"
    ]
  }
}
