fairyfly.extensionutil module¶
A series of utility functions that are useful across several fairyfly extensions.
- fairyfly.extensionutil.boundary_extension_dicts(boundary_list, extension_key, boundary_ext_dicts)[source]¶
Get all Boundary property dictionaries of an extension.
- Parameters:
shape_list – A list of Boundary dictionaries.
extension_key – Text for the key of the extension (eg. “therm”).
- Returns:
boundary_ext_dicts – A list with Boundary extension property dictionaries.
- fairyfly.extensionutil.model_extension_dicts(data, extension_key, shape_ext_dicts, boundary_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 shape_ext_dicts align with the model.shapes.
- Parameters:
data – A dictionary representation of an entire fairyfly-core Model.
extension_key – Text for the key of the extension (eg. “therm”).
- Returns:
A tuple with two elements
shape_ext_dicts: A list of Shape extension property dictionaries that align with the serialized model.shapes.
boundary_ext_dicts: A list of Boundary extension property dictionaries that align with the serialized model.boundaries.
- fairyfly.extensionutil.shape_extension_dicts(shape_list, extension_key, shape_ext_dicts)[source]¶
Get all Shape property dictionaries of an extension.
- Parameters:
shape_list – A list of Shape dictionaries.
extension_key – Text for the key of the extension (eg. “therm”).
- Returns:
shape_ext_dicts – A list with Shape extension property dictionaries.