honeybee_radiance.cli.translate module¶
honeybee radiance translation commands.
- honeybee_radiance.cli.translate.model_to_rad(model_file, blk=False, minimal=False, output_file=None, maximal=True)[source]¶
Translate a Model file to a Radiance string.
The resulting strings will include all geometry (Rooms, Faces, Shades, Apertures, Doors) and all modifiers. However, it does not include any states for dynamic geometry and will only write the default state for each dynamic object. To correctly account for dynamic objects, model-to-rad-folder should be used.
- Parameters:
model_file – Full path to a Model JSON file (HBJSON) or a Model pkl (HBpkl) file.
blk – Boolean to note whether the “blacked out” version of the geometry should be output, which is useful for direct studies and isolation studies of individual apertures.
minimal – Boolean to note whether the radiance strings should be written in a minimal format (with spaces instead of line breaks).
output_file – Optional RAD file to output the RAD string of the translation. If None, the string will be returned from this method. (Default: None).
- honeybee_radiance.cli.translate.model_to_rad_folder(model_file, folder=None, view=None, grid=None, full_match=False, config_file=None, minimal=False, grid_check=False, view_check=False, log_file=None, no_full_match=True, maximal=True, no_grid_check=False, no_view_check=False)[source]¶
Translate a Model file into a Radiance Folder.
- Parameters:
model_file – Full path to a Model JSON file (HBJSON) or a Model pkl (HBpkl) file. This can also be a zipped version of a Radiance folder, in which case this command will simply unzip the file into the –folder and no other operations will be performed on it.
folder – Folder into which the model Radiance folders will be written. If None, the files will be output in the same location as the model_file.
view – List of grids to be included in folder. By default all the sensor grids will be exported. You can also use wildcards here. For instance first_floor_* will select all the sensor grids that has an identifier that starts with first_floor. To filter based on group_identifier use /. For example daylight/* will select all the grids that belong to daylight group. (Default: None).
grid – List of views to be included in folder. By default all the views will be exported. You can also use wildcards to filter multiple views. For instance first_floor_* will select all the views that has an identifier that starts with first_floor. To filter based on group_identifier use /. For example daylight/* will select all the views that belong to daylight group. (Default: None).
full_match – Boolean to note whether the grids and views should be filtered by their identifiers as full matches. Setting this to True indicates that wildcard symbols will not be used in the filtering of grids and views. (Default: False).
config_file – An optional config file path to modify the default folder names. If None, folder.cfg in honeybee-radiance-folder will be used.
minimal – Boolean to note whether the radiance strings should be written in a minimal format (with spaces instead of line breaks). (Default: False).
grid_check – Boolean to note whether the model should be checked for the presence of sensor grids. If the check is set and the model has no grids, an explicit error will be raised. (Default: False).
view_check – Boolean to note whether the model should be checked for the presence of views. If the check is set and the model has no views, an explicit error will be raised. (Default: False).
log_file – Optional log file to output the path of the radiance folder generated from the model. If None, it will be returned from this method.