fairyfly.colorobj module

Module for coloring geometry with attributes.

class fairyfly.colorobj.ColorBoundary(boundaries, attr_name, legend_parameters=None)[source]

Bases: _ColorObject

Object for visualizing boundary attributes.

Parameters:
  • boundaries – An array of fairyfly Boundaries which will be colored with their attributes.

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

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

Properties:
  • boundaries

  • attr_name

  • legend_parameters

  • attr_name_end

  • attributes_unique

  • attributes

  • attributes_original

  • flat_geometry

  • 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 boundaries

Get the fairyfly Boundaries assigned to this object.

property flat_geometry

Get an array of LineSegment3D on this object.

The geometries here align with the attributes and graphic_container colors.

property graphic_container

Get a ladybug GraphicContainer that relates to this object.

The GraphicContainer possesses almost all things needed to visualize the ColorShapes 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.

class fairyfly.colorobj.ColorShape(shapes, attr_name, legend_parameters=None)[source]

Bases: _ColorObject

Object for visualizing shape attributes.

Parameters:
  • shapes – An array of fairyfly Shapes, which will be colored with the attribute.

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

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

Properties:
  • shapes

  • attr_name

  • legend_parameters

  • attr_name_end

  • attributes

  • attributes_unique

  • attributes_original

  • geometry

  • 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 geometry

Get a nested array with each sub-array having the Face3D of each shape.

property graphic_container

Get a ladybug GraphicContainer that relates to this object.

The GraphicContainer possesses almost all things needed to visualize the ColorShapes 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 shapes

Get a tuple of fairyfly Shapes assigned to this object.