dragonfly_radiance.properties.context module

Context Shade Radiance Properties.

class dragonfly_radiance.properties.context.ContextShadeRadianceProperties(host_shade, modifier=None)[source]

Bases: object

Radiance Properties for Dragonfly ContextShade.

Parameters
  • host_shade – A dragonfly_core ContextShade object that hosts these properties.

  • modifier – An optional Modifier object to set the reflectance and specularity of the ContextShade. The default is a completely diffuse modifier with 0.2 reflectance.

Properties:
  • host

  • modifier

  • is_modifier_set_by_user

ToString()[source]
apply_properties_from_dict(abridged_data, modifiers)[source]

Apply properties from a ContextShadeRadiancePropertiesAbridged dictionary.

Parameters
  • abridged_data – A ContextShadeRadiancePropertiesAbridged dictionary (typically coming from a Model).

  • modifiers – A dictionary of modifiers with modifiers identifiers as keys, which will be used to re-assign modifiers.

duplicate(new_host=None)[source]

Get a copy of this object.

new_host: A new ContextShade object that hosts these properties.

If None, the properties will be duplicated with the same host.

classmethod from_dict(data, host)[source]

Create ContextShadeRadianceProperties from a dictionary.

Note that the dictionary must be a non-abridged version for this classmethod to work.

Parameters
  • data – A dictionary representation of ContextShadeRadianceProperties.

  • host – A ContextShade object that hosts these properties.

from_honeybee(hb_properties)[source]

Transfer radiance attributes from a Honeybee Shade to Dragonfly ContextShade.

Parameters

hb_properties – The ShadeRadianceProperties of the honeybee Shade that is being translated to a Dragonfly ContextShade.

to_dict(abridged=False)[source]

Return radiance properties as a dictionary.

Parameters

abridged – Boolean to note whether the full dictionary describing the object should be returned (False) or just an abridged version (True). Default: False.

to_honeybee(new_host)[source]

Get a honeybee version of this object.

Parameters

new_host – A honeybee-core Shade or ShadeMesh object that will host these properties.

property host

Get the Shade object hosting these properties.

property is_modifier_set_by_user

Boolean noting if modifier is user-set.

property modifier

Get or set a Modifier for the context shade.