dragonfly_radiance.properties.model module

Model Radiance Properties.

class dragonfly_radiance.properties.model.ModelRadianceProperties(host)[source]

Bases: object

Radiance Properties for Dragonfly Model.

Parameters:

host – A dragonfly_core Model object that hosts these properties.

Properties:
  • host

  • modifiers

  • shade_modifiers

  • modifier_sets

  • global_modifier_set

ToString()[source]
apply_properties_from_dict(data)[source]

Apply the radiance properties of a dictionary to the host Model of this object.

Parameters:

data – A dictionary representation of an entire dragonfly-core Model. Note that this dictionary must have ModelRadianceProperties in order for this method to successfully apply the radiance properties.

check_all(raise_exception=True, detailed=False)[source]

Check all of the aspects of the Model radiance properties.

Parameters:
  • raise_exception – Boolean to note whether a ValueError should be raised if any errors are found. If False, this method will simply return a text string with all errors that were found.

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns:

A text string with all errors that were found or a list if detailed is True. This string (or list) will be empty if no errors were found.

check_all_duplicate_identifiers(raise_exception=True, detailed=False)[source]

Check that there are no duplicate identifiers for any geometry objects.

This includes Rooms, Faces, Apertures, Doors, Shades, and ShadeMeshes.

Parameters:
  • raise_exception – Boolean to note whether a ValueError should be raised if any Model errors are found. If False, this method will simply return a text string with all errors that were found. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns:

A text string with all errors that were found or a list if detailed is True. This string (or list) will be empty if no errors were found.

check_duplicate_modifier_identifiers(raise_exception=True, detailed=False)[source]

Check that there are no duplicate Modifier identifiers in the model.

Parameters:
  • raise_exception – Boolean to note whether a ValueError should be raised if duplicate identifiers are found. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns:

A string with the message or a list with a dictionary if detailed is True.

check_duplicate_modifier_set_identifiers(raise_exception=True, detailed=False)[source]

Check that there are no duplicate ModifierSet identifiers in the model.

Parameters:
  • raise_exception – Boolean to note whether a ValueError should be raised if duplicate identifiers are found. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns:

A string with the message or a list with a dictionary if detailed is True.

check_for_extension(raise_exception=True, detailed=False)[source]

Check that the Model is valid for Radiance simulation.

This process includes all relevant dragonfly-core checks as well as checks that apply only for Radiance.

Parameters:
  • raise_exception – Boolean to note whether a ValueError should be raised if any errors are found. If False, this method will simply return a text string with all errors that were found. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns:

A text string with all errors that were found or a list if detailed is True. This string (or list) will be empty if no errors were found.

check_generic(raise_exception=True, detailed=False)[source]

Check generic of the aspects of the Model radiance properties.

This includes checks for everything except duplicate identifiers for modifiers and modifier sets. Typically, these checks just add to the validation time without providing useful information since extension objects with duplicate IDs are lost during HBJSON serialization.

Parameters:
  • raise_exception – Boolean to note whether a ValueError should be raised if any errors are found. If False, this method will simply return a text string with all errors that were found.

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns:

A text string with all errors that were found or a list if detailed is True. This string (or list) will be empty if no errors were found.

duplicate(new_host=None)[source]

Get a copy of this Model.

Parameters:

new_host – A new Model object that hosts these properties. If None, the properties will be duplicated with the same host.

to_dict()[source]

Return Model radiance properties as a dictionary.

to_honeybee(new_host)[source]

Get a honeybee version of this object.

Parameters:

new_host – A honeybee-core Model object that will host these properties.

property face_modifiers

Get a list of all unique modifiers assigned to Faces, Apertures and Doors.

These objects only exist under the Building.room_3ds property.

property global_modifier_set

The global radiance modifier set.

This is what is used whenever there is no modifier_set assigned to a Room2D, a parent Story, or a parent Building.

property host

Get the Model object hosting these properties.

property modifier_sets

A list of all unique Building-Assigned ModifierSets in the Model.

Note that this includes ModifierSets assigned to individual Stories and Room2Ds in the Building.

property modifiers

List of all unique modifiers contained within the model.

This includes modifiers across all Room2Ds, Stories, and Building ModifierSets but it does NOT include the Honeybee generic default modifier set.

property shade_modifiers

A list of all unique modifiers assigned to ContextShades in the model.