dragonfly.colorobj module

Module for coloring geometry with attributes.

class dragonfly.colorobj.ColorRoom2D(room_2ds, attr_name, legend_parameters=None)[source]

Bases: _ColorObject

Object for visualizing Room2D-level attributes.

Parameters
  • room_2ds – An array of honeybee Room2Ds, which will be colored with the attribute.

  • attr_name – A text string of an attribute that the input rooms should have. This can have ‘.’ that separate the nested attributes from one another. For example, ‘properties.energy.program_type’.

  • legend_parameters – An optional LegendParameter object to change the display of the ColorRoom2D (Default: None).

Properties:
  • room_2ds

  • attr_name

  • legend_parameters

  • attr_name_end

  • attributes

  • attributes_unique

  • attributes_original

  • floor_faces

  • graphic_container

  • min_point

  • max_point

ToString()

Overwrite .NET ToString.

property attr_name

Get a text string of an attribute that the input objects should have.

property attr_name_end

Get text for the last attribute in the attr_name.

Useful when attr_name is nested.

property attributes

Get a tuple of text for the attributes assigned to the objects.

If the input attr_name is a valid attribute for the object but None is assigned, the output will be ‘None’. If the input attr_name is not valid for the input object, ‘N/A’ will be returned.

property attributes_original

Get a tuple of objects for the attributes assigned to the objects.

These will follow the original object typing of the attribute and won’t be strings like the attributes.

property attributes_unique

Get a tuple of text for the unique attributes assigned to the objects.

property floor_faces

Get an list with a Face3Ds for each Room2D.

property graphic_container

Get a ladybug GraphicContainer that relates to this object.

The GraphicContainer possesses almost all things needed to visualize the ColorRooms object including the legend, value_colors, etc.

property legend_parameters

Get or set the legend parameters.

property max_point

Get a Point3D for the maximum of the box around the objects.

property min_point

Get a Point3D for the minimum of the box around the objects.

property room_2ds

Get a tuple of dragonfly Room2Ds assigned to this object.