honeybee_ph.properties.model module¶
HB-PH Model Properties.
- class honeybee_ph.properties.model.ModelPhProperties(_host)[source]¶
Bases:
object- apply_properties_from_dict(data: Dict[str, Any]) None[source]¶
Apply the .ph properties of a dictionary to the host Model of this object.
This method is called when the HB-Model is de-serialized from a dict back into a Python object. In an ‘Abridged’ HBJSON file, all the property information is stored at the model level, not at the sub-model object level. In that case, this method is used to apply the right property data back onto all the sub-model objects (faces, rooms, apertures, etc).
Arguments:¶
- data (dict[str, Any]): A dictionary representation of an entire honeybee-core
Model. Note that this dictionary must have ModelPhProperties in order for this method to successfully apply the .ph properties.
Note: data is an HB-Model dict and .keys() will include: [
‘display_name’, ‘identifier’, ‘tolerance’, ‘angle_tolerance’, ‘rooms’, ‘type’, ‘version’, ‘units’, ‘orphaned_shades’, ‘properties’
]
Returns:¶
None
- duplicate(new_host: Any | None = None) ModelPhProperties[source]¶
- classmethod from_dict(_dict: dict[str, Any], host: Any) ModelPhProperties[source]¶
- static load_properties_from_dict(data: Dict[str, Dict]) Tuple[Dict[str, BldgSegment], ProjectTeam][source]¶
Load the HB-Model .ph properties from an HB-Model dictionary as Python objects.
Loaded objects include: BldgSegment, Team, …
The function is called when re-serializing an HB-Model object from a dictionary. It will load honeybee_ph entities as Python objects and returns a tuple of dictionaries with all the de-serialized Honeybee-PH objects.
Arguments:¶
- data: A dictionary representation of an entire honeybee-core Model.
Note that this dictionary must have ModelPhProperties
in order for this method to successfully apply the .ph properties.
Note: data is an HB-Model dict and .keys() will include: [
‘display_name’, ‘identifier’, ‘tolerance’, ‘angle_tolerance’, ‘rooms’, ‘type’, ‘version’, ‘units’, ‘orphaned_shades’, ‘properties’
]
Returns:¶
tuple[dict[str, BldgSegment], ProjectTeam]: ModelPhProperties Objects
- property host¶