dragonfly.extensionutil module¶
A series of utility functions that are useful across several dragonfly extensions.
- dragonfly.extensionutil.building_extension_dicts(building_list, extension_key, building_ext_dicts, story_ext_dicts, room2d_ext_dicts)[source]¶
Get all Building property dictionaries of an extension organized by geometry type.
- Parameters
building_list – A list of Building dictionaries.
extension_key – Text for the key of the extension (eg. “energy”, “radiance”).
- Returns
A tuple with three elements
building_ext_dicts: A list with the Building extension property dictionaries.
story_ext_dicts: A list with Story extension property dictionaries.
room2d_ext_dicts: A list with Room2D extension property dictionaries.
- dragonfly.extensionutil.context_shade_extension_dicts(context_shade_list, extension_key, context_shade_ext_dicts)[source]¶
Get all ContextShade property dictionaries of an extension.
- Parameters
context_shade_list – A list of ContextShade dictionaries.
extension_key – Text for the key of the extension (eg. “energy”, “radiance”).
- Returns
context_shade_ext_dicts – A list with ContextShade extension property dictionaries.
- dragonfly.extensionutil.model_extension_dicts(data, extension_key, building_ext_dicts, story_ext_dicts, room2d_ext_dicts, context_shade_ext_dicts)[source]¶
Get all Model property dictionaries of an extension organized by geometry type.
Note that the order in which dictionaries appear in the output lists is the same order as the geometry objects appear when requested from the model. For example, the shade_ext_dicts align with the model.shades.
- Parameters
data – A dictionary representation of an entire honeybee-core Model.
extension_key – Text for the key of the extension (eg. “energy”, “radiance”).
- Returns
A tuple with four elements
building_ext_dicts: A list of Building extension property dictionaries that align with the serialized model.buildings.
story_ext_dicts: A list of Story extension property dictionaries that align with the serialized model.stories.
room2d_ext_dicts: A list of Room2D extension property dictionaries that align with the serialized model.rooms.
context_shade_ext_dicts: A list of ContextShade extension property dictionaries that align with the serialized model.context_shades.
- dragonfly.extensionutil.room2d_extension_dicts(room2d_list, extension_key, room2d_ext_dicts)[source]¶
Get all Room2D property dictionaries of an extension.
- Parameters
room2d_list – A list of Room2D dictionaries.
extension_key – Text for the key of the extension (eg. “energy”, “radiance”).
- Returns
room2d_ext_dict – A list with Room2D extension property dictionaries.
- dragonfly.extensionutil.story_extension_dicts(story_list, extension_key, story_ext_dicts, room2d_ext_dicts)[source]¶
Get all Building property dictionaries of an extension organized by geometry type.
- Parameters
building_list – A list of Building dictionaries.
extension_key – Text for the key of the extension (eg. “energy”, “radiance”).
- Returns
A tuple with two elements
story_ext_dicts: A list with Story extension property dictionaries.
room2d_ext_dicts: A list with Room2D extension property dictionaries.