Files
bps-schema/schema-building.json

962 lines
20 KiB
JSON

{
"$schema": "https://json-schema.org/draft/2020-12/schema",
"$id": "bps/building",
"title": "HBJSON Compatible Building Schema",
"description": "Building-scale geometry schema, fully compatible with honeybee-schema (HBJSON). Defines the core hierarchy: Model \u2192 Room \u2192 Face \u2192 Aperture/Door \u2192 Shade.",
"$defs": {
"Point3D": {
"type": "object",
"properties": {
"type": {
"const": "Point3D"
},
"x": {
"type": "number"
},
"y": {
"type": "number"
},
"z": {
"type": "number"
}
},
"required": [
"x",
"y",
"z"
],
"additionalProperties": false
},
"Plane": {
"type": "object",
"properties": {
"type": {
"const": "Plane"
},
"n": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 3,
"maxItems": 3
},
"o": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 3,
"maxItems": 3
},
"x": {
"type": [
"array",
"null"
],
"items": {
"type": "number"
},
"minItems": 3,
"maxItems": 3
}
},
"required": [
"n",
"o"
],
"additionalProperties": false
},
"Face3D": {
"type": "object",
"properties": {
"type": {
"const": "Face3D"
},
"boundary": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 3,
"maxItems": 3
},
"minItems": 3
},
"holes": {
"type": [
"array",
"null"
],
"items": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 3,
"maxItems": 3
},
"minItems": 3
}
},
"plane": {
"anyOf": [
{
"$ref": "#/$defs/Plane"
},
{
"type": "null"
}
]
}
},
"required": [
"boundary"
],
"additionalProperties": false
},
"Color": {
"type": "object",
"properties": {
"type": {
"const": "Color"
},
"r": {
"type": "integer",
"minimum": 0,
"maximum": 255
},
"g": {
"type": "integer",
"minimum": 0,
"maximum": 255
},
"b": {
"type": "integer",
"minimum": 0,
"maximum": 255
},
"a": {
"type": "integer",
"minimum": 0,
"maximum": 255,
"default": 255
}
},
"required": [
"r",
"g",
"b"
],
"additionalProperties": false
},
"Mesh3D": {
"type": "object",
"properties": {
"type": {
"const": "Mesh3D"
},
"vertices": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
},
"minItems": 3,
"maxItems": 3
},
"minItems": 3
},
"faces": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "integer",
"minimum": 0
},
"minItems": 3,
"maxItems": 4
},
"minItems": 1
},
"colors": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Color"
}
}
},
"required": [
"vertices",
"faces"
],
"additionalProperties": false
},
"UserData": {
"type": [
"object",
"null"
],
"description": "Optional dictionary of user data. All keys and values should be standard data types."
},
"_IdentifiedObject": {
"type": "object",
"properties": {
"identifier": {
"type": "string",
"pattern": "^[.A-Za-z0-9_-]+$",
"minLength": 1,
"maxLength": 100
},
"display_name": {
"type": [
"string",
"null"
],
"default": null
},
"user_data": {
"$ref": "#/$defs/UserData"
}
},
"required": [
"identifier"
]
},
"Outdoors": {
"type": "object",
"properties": {
"type": {
"const": "Outdoors"
},
"sun_exposure": {
"type": "boolean",
"default": true
},
"wind_exposure": {
"type": "boolean",
"default": true
},
"view_factor": {
"anyOf": [
{
"type": "number"
},
{
"const": "autocalculate"
}
],
"default": "autocalculate"
}
},
"required": [
"type"
],
"additionalProperties": false
},
"Surface": {
"type": "object",
"properties": {
"type": {
"const": "Surface"
},
"boundary_condition_objects": {
"type": "array",
"items": {
"type": "string"
},
"minItems": 2,
"maxItems": 3
}
},
"required": [
"type",
"boundary_condition_objects"
],
"additionalProperties": false
},
"Ground": {
"type": "object",
"properties": {
"type": {
"const": "Ground"
}
},
"required": [
"type"
],
"additionalProperties": false
},
"Adiabatic": {
"type": "object",
"properties": {
"type": {
"const": "Adiabatic"
}
},
"required": [
"type"
],
"additionalProperties": false
},
"OtherSideTemperature": {
"type": "object",
"properties": {
"type": {
"const": "OtherSideTemperature"
},
"heat_transfer_coefficient": {
"type": "number",
"minimum": 0,
"default": 0
},
"temperature": {
"anyOf": [
{
"type": "number"
},
{
"const": "autocalculate"
}
],
"default": "autocalculate"
}
},
"required": [
"type"
],
"additionalProperties": false
},
"BoundaryCondition": {
"description": "Face boundary condition: Outdoors, Surface, Ground, Adiabatic, or OtherSideTemperature.",
"oneOf": [
{
"$ref": "#/$defs/Outdoors"
},
{
"$ref": "#/$defs/Surface"
},
{
"$ref": "#/$defs/Ground"
},
{
"$ref": "#/$defs/Adiabatic"
},
{
"$ref": "#/$defs/OtherSideTemperature"
}
]
},
"ApertureBoundaryCondition": {
"description": "Aperture/Door boundary condition: Outdoors or Surface only.",
"oneOf": [
{
"$ref": "#/$defs/Outdoors"
},
{
"$ref": "#/$defs/Surface"
}
]
},
"FaceType": {
"type": "string",
"enum": [
"Wall",
"Floor",
"RoofCeiling",
"AirBoundary"
]
},
"Units": {
"type": "string",
"enum": [
"Meters",
"Millimeters",
"Feet",
"Inches",
"Centimeters"
],
"default": "Meters"
},
"ShadePropertiesAbridged": {
"type": "object",
"properties": {
"type": {
"const": "ShadePropertiesAbridged"
},
"energy": {
"type": [
"object",
"null"
]
},
"radiance": {
"type": [
"object",
"null"
]
}
},
"additionalProperties": false
},
"Shade": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "Shade"
},
"geometry": {
"$ref": "#/$defs/Face3D"
},
"properties": {
"$ref": "#/$defs/ShadePropertiesAbridged"
},
"is_detached": {
"type": "boolean",
"default": false
}
},
"required": [
"type",
"geometry",
"properties"
],
"additionalProperties": false
}
]
},
"AperturePropertiesAbridged": {
"type": "object",
"properties": {
"type": {
"const": "AperturePropertiesAbridged"
},
"energy": {
"type": [
"object",
"null"
]
},
"radiance": {
"type": [
"object",
"null"
]
}
},
"additionalProperties": false
},
"Aperture": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "Aperture"
},
"geometry": {
"$ref": "#/$defs/Face3D"
},
"boundary_condition": {
"$ref": "#/$defs/ApertureBoundaryCondition"
},
"is_operable": {
"type": "boolean",
"default": false
},
"indoor_shades": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Shade"
}
},
"outdoor_shades": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Shade"
}
},
"properties": {
"$ref": "#/$defs/AperturePropertiesAbridged"
}
},
"required": [
"type",
"geometry",
"boundary_condition",
"properties"
],
"additionalProperties": false
}
]
},
"DoorPropertiesAbridged": {
"type": "object",
"properties": {
"type": {
"const": "DoorPropertiesAbridged"
},
"energy": {
"type": [
"object",
"null"
]
},
"radiance": {
"type": [
"object",
"null"
]
}
},
"additionalProperties": false
},
"Door": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "Door"
},
"geometry": {
"$ref": "#/$defs/Face3D"
},
"boundary_condition": {
"$ref": "#/$defs/ApertureBoundaryCondition"
},
"is_glass": {
"type": "boolean",
"default": false
},
"indoor_shades": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Shade"
}
},
"outdoor_shades": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Shade"
}
},
"properties": {
"$ref": "#/$defs/DoorPropertiesAbridged"
}
},
"required": [
"type",
"geometry",
"boundary_condition",
"properties"
],
"additionalProperties": false
}
]
},
"FacePropertiesAbridged": {
"type": "object",
"properties": {
"type": {
"const": "FacePropertiesAbridged"
},
"energy": {
"type": [
"object",
"null"
]
},
"radiance": {
"type": [
"object",
"null"
]
}
},
"additionalProperties": false
},
"Face": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "Face"
},
"geometry": {
"$ref": "#/$defs/Face3D"
},
"face_type": {
"$ref": "#/$defs/FaceType"
},
"boundary_condition": {
"$ref": "#/$defs/BoundaryCondition"
},
"apertures": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Aperture"
}
},
"doors": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Door"
}
},
"indoor_shades": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Shade"
}
},
"outdoor_shades": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Shade"
}
},
"properties": {
"$ref": "#/$defs/FacePropertiesAbridged"
}
},
"required": [
"type",
"geometry",
"face_type",
"boundary_condition",
"properties"
],
"additionalProperties": false
}
]
},
"ShadeMeshPropertiesAbridged": {
"type": "object",
"properties": {
"type": {
"const": "ShadeMeshPropertiesAbridged"
},
"energy": {
"type": [
"object",
"null"
]
},
"radiance": {
"type": [
"object",
"null"
]
}
},
"additionalProperties": false
},
"ShadeMesh": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "ShadeMesh"
},
"geometry": {
"$ref": "#/$defs/Mesh3D"
},
"properties": {
"$ref": "#/$defs/ShadeMeshPropertiesAbridged"
},
"is_detached": {
"type": "boolean",
"default": true
}
},
"required": [
"type",
"geometry",
"properties"
],
"additionalProperties": false
}
]
},
"RoomPropertiesAbridged": {
"type": "object",
"properties": {
"type": {
"const": "RoomPropertiesAbridged"
},
"energy": {
"type": [
"object",
"null"
]
},
"radiance": {
"type": [
"object",
"null"
]
},
"doe2": {
"type": [
"object",
"null"
]
}
},
"additionalProperties": false
},
"Room": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "Room"
},
"faces": {
"type": "array",
"items": {
"$ref": "#/$defs/Face"
},
"minItems": 4
},
"indoor_shades": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Shade"
}
},
"outdoor_shades": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Shade"
}
},
"multiplier": {
"type": "integer",
"minimum": 1,
"default": 1
},
"exclude_floor_area": {
"type": "boolean",
"default": false
},
"zone": {
"type": [
"string",
"null"
]
},
"story": {
"type": [
"string",
"null"
]
},
"properties": {
"$ref": "#/$defs/RoomPropertiesAbridged"
}
},
"required": [
"type",
"faces",
"properties"
],
"additionalProperties": false
}
]
},
"ModelProperties": {
"type": "object",
"properties": {
"type": {
"const": "ModelProperties"
},
"energy": {
"type": [
"object",
"null"
]
},
"radiance": {
"type": [
"object",
"null"
]
},
"doe2": {
"type": [
"object",
"null"
]
}
},
"additionalProperties": false
},
"Model": {
"type": "object",
"allOf": [
{
"$ref": "#/$defs/_IdentifiedObject"
},
{
"type": "object",
"properties": {
"type": {
"const": "Model"
},
"version": {
"type": "string",
"pattern": "^([0-9]+)\\.([0-9]+)\\.([0-9]+)$",
"default": "0.0.0"
},
"rooms": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Room"
}
},
"orphaned_faces": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Face"
}
},
"orphaned_apertures": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Aperture"
}
},
"orphaned_doors": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Door"
}
},
"orphaned_shades": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/Shade"
}
},
"shade_meshes": {
"type": [
"array",
"null"
],
"items": {
"$ref": "#/$defs/ShadeMesh"
}
},
"units": {
"$ref": "#/$defs/Units"
},
"tolerance": {
"type": "number",
"minimum": 0,
"default": 0.01
},
"angle_tolerance": {
"type": "number",
"minimum": 0,
"default": 1.0
},
"properties": {
"$ref": "#/$defs/ModelProperties"
}
},
"required": [
"type",
"properties"
],
"additionalProperties": false
}
]
}
},
"$ref": "#/$defs/Model"
}