dragonfly.shadingparameter module

Shading Parameters with instructions for generating shades.

class dragonfly.shadingparameter.ExtrudedBorder(depth)[source]

Bases: _ShadingParameterBase

Instructions for extruded borders over all windows in the wall.

Parameters

depth – A number for the depth of the border.

Properties:
  • depth

ToString()
add_shading_to_face(face, tolerance=0.01)[source]

Add Shades to a Honeybee Face using these Shading Parameters.

Parameters
  • face – A honeybee-core Face object.

  • tolerance – An optional value to return None if the overhang has a length less than the tolerance. Default: 0.01, suitable for objects in meters.

duplicate()

Get a copy of this object.

classmethod from_dict(data)[source]

Create ExtrudedBorder from a dictionary.

{
"type": "ExtrudedBorder",
"depth": 0.5
}
scale(factor)[source]

Get a scaled version of these ShadingParameters.

This method is called within the scale methods of the Room2D.

Parameters

factor – A number representing how much the object should be scaled.

to_dict()[source]

Get ExtrudedBorder as a dictionary.

property depth

Get a number for the depth of the border.

class dragonfly.shadingparameter.LouversByCount(louver_count, depth, offset=0, angle=0, contour_vector=Vector2D(0.0, 1.0), flip_start_side=False)[source]

Bases: _LouversBase

Instructions for a specific number of louvered Shades over a wall.

Parameters
  • louver_count – A positive integer for the number of louvers to generate.

  • depth – A number for the depth to extrude the louvers.

  • offset – A number for the distance to louvers from the wall. Default is 0 for no offset.

  • angle – A number for the for an angle to rotate the louvers in degrees. Default is 0 for no rotation.

  • contour_vector – A Vector2D for the direction along which contours are generated. This 2D vector will be interpreted into a 3D vector within the plane of the wall. (0, 1) will usually generate horizontal contours in 3D space, (1, 0) will generate vertical contours, and (1, 1) will generate diagonal contours. Default: (0, 1).

  • flip_start_side – Boolean to note whether the side the louvers start from should be flipped. Default is False to have contours on top or right. Setting to True will start contours on the bottom or left.

Properties:
  • louver_count

  • depth

  • offset

  • angle

  • contour_vector

  • flip_start_side

ToString()
add_shading_to_face(face, tolerance=0.01)[source]

Add Shades to a Honeybee Face using these Shading Parameters.

Parameters
  • face – A honeybee-core Face object.

  • tolerance – An optional value to remove any louvers with a length less than the tolerance. Default: 0.01, suitable for objects in meters.

duplicate()

Get a copy of this object.

classmethod from_dict(data)[source]

Create LouversByCount from a dictionary.

{
"type": "LouversByCount",
"louver_count": 10,
"depth": 0.1,
"offset": 0.3,
"angle": 0,
"contour_vector": [0,  1],  # array of (x, y) values
"flip_start_side": False
}
scale(factor)[source]

Get a scaled version of these ShadingParameters.

This method is called within the scale methods of the Room2D.

Parameters

factor – A number representing how much the object should be scaled.

to_dict()[source]

Get LouversByCount as a dictionary.

property angle

Get a number for an angle to rotate the louvers in degrees.

property contour_vector

Get a Vector2D for the direction along which contours are generated.

property depth

Get a number for the depth to extrude the louvers.

property flip_start_side

Get a boolean to note whether the side the louvers start from is flipped.

property louver_count

Get a integer for the number of louvers to generate.

property offset

Get a number for the distance to louvers from this Face.

class dragonfly.shadingparameter.LouversByDistance(distance, depth, offset=0, angle=0, contour_vector=Vector2D(0.0, 1.0), flip_start_side=False)[source]

Bases: _LouversBase

Instructions for a series of louvered Shades at a given distance between.

Parameters
  • distance – A number for the approximate distance between each louver.

  • depth – A number for the depth to extrude the louvers.

  • offset – A number for the distance to louvers from the wall. Default is 0 for no offset.

  • angle – A number for the for an angle to rotate the louvers in degrees. Default is 0 for no rotation.

  • contour_vector – A Vector2D for the direction along which contours are generated. This 2D vector will be interpreted into a 3D vector within the plane of the wall. (0, 1) will usually generate horizontal contours in 3D space, (1, 0) will generate vertical contours, and (1, 1) will generate diagonal contours. Default: (0, 1).

  • flip_start_side – Boolean to note whether the side the louvers start from should be flipped. Default is False to have contours on top or right. Setting to True will start contours on the bottom or left.

Properties:
  • distance

  • depth

  • offset

  • angle

  • contour_vector

  • flip_start_side

ToString()
add_shading_to_face(face, tolerance=0.01)[source]

Add Shades to a Honeybee Face using these Shading Parameters.

Parameters
  • face – A honeybee-core Face object.

  • tolerance – An optional value to remove any louvers with a length less than the tolerance. Default: 0.01, suitable for objects in meters.

duplicate()

Get a copy of this object.

classmethod from_dict(data)[source]

Create LouversByDistance from a dictionary.

{
"type": "LouversByDistance",
"distance": 0.3,
"depth": 0.1,
"offset": 0.3,
"angle": 0,
"contour_vector": [0, 1],  # array of (x, y) values
"flip_start_side": False
}
scale(factor)[source]

Get a scaled version of these ShadingParameters.

This method is called within the scale methods of the Room2D.

Parameters

factor – A number representing how much the object should be scaled.

to_dict()[source]

Get LouversByDistance as a dictionary.

property angle

Get a number for an angle to rotate the louvers in degrees.

property contour_vector

Get a Vector2D for the direction along which contours are generated.

property depth

Get a number for the depth to extrude the louvers.

property distance

Get a number for the approximate distance between each louver.

property flip_start_side

Get a boolean to note whether the side the louvers start from is flipped.

property offset

Get a number for the distance to louvers from this Face.

class dragonfly.shadingparameter.Overhang(depth, angle=0)[source]

Bases: _ShadingParameterBase

Instructions for a single overhang over an entire wall.

Parameters
  • depth – A number for the overhang depth.

  • angle – A number for the for an angle to rotate the overhang in degrees. Positive values indicate a downward rotation. Negative values indicate an upward rotation. Default is 0 for no rotation.

Properties:
  • depth

  • angle

ToString()
add_shading_to_face(face, tolerance=0.01)[source]

Add Shades to a Honeybee Face using these Shading Parameters.

Parameters
  • face – A honeybee-core Face object.

  • tolerance – An optional value to return None if the overhang has a length less than the tolerance. Default: 0.01, suitable for objects in meters.

duplicate()

Get a copy of this object.

classmethod from_dict(data)[source]

Create Overhang from a dictionary.

{
"type": "Overhang",
"depth": 1.5,
"angle": 0
}
scale(factor)[source]

Get a scaled version of these ShadingParameters.

This method is called within the scale methods of the Room2D.

Parameters

factor – A number representing how much the object should be scaled.

to_dict()[source]

Get Overhang as a dictionary.

property angle

Get a number for the overhang angle.

property depth

Get a number for the overhang depth.