dragonfly_radiance.gridpar module

Grid Parameters with instructions for generating SensorGrids.

class dragonfly_radiance.gridpar.ExteriorApertureGridParameter(dimension, offset=0.1, aperture_type='All', include_mesh=True)[source]

Bases: _GridParameterBase

Instructions for a SensorGrid generated from exterior Aperture.

Parameters:
  • dimension – The dimension of the grid cells as a number.

  • offset – A number for how far to offset the grid from the base geometries. (Default: 0.1, suitable for Rooms in Meters).

  • aperture_type

    Text to specify the type of Aperture that will be used to generate grids. Window indicates Apertures in Walls. Skylights are in parent Roof faces. Choose from the following. (Default: All).

    • Window

    • Skylight

    • All

  • include_mesh – A boolean to note whether the resulting SensorGrid should include the mesh. (Default: True).

ToString()[source]
duplicate()[source]

Get a copy of this object.

classmethod from_dict(data)[source]

Create ExteriorApertureGridParameter from a dictionary.

{
"type": "ExteriorApertureGridParameter",
"dimension": 0.5,
"offset": 0.15,
"aperture_type": "Window",
"include_mesh": True
}
generate_grid_from_room(honeybee_room)[source]

Get a SensorGrid from a Honeybee Room using these GridParameter.

Parameters:

honeybee_room – A Honeybee Room to which these grid parameters are applied.

Returns:

A honeybee-radiance SensorGrid generated from the Honeybee Room. Will be None if the object has no exterior Apertures.

scale(factor)[source]

Get a scaled version of these GridParameters.

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 ExteriorApertureGridParameter as a dictionary.

APERTURE_TYPES = ('Window', 'Skylight', 'All')
property aperture_type

Get text to specify the type of face that will be used to generate grids.

property dimension

Get a number for the dimension of the grid cells.

property include_mesh

Get a boolean for whether the resulting SensorGrid should include the mesh.

property offset

Get a number for how far to offset the grid from the base geometries.

class dragonfly_radiance.gridpar.ExteriorFaceGridParameter(dimension, offset=0.1, face_type='Wall', punched_geometry=False, include_mesh=True)[source]

Bases: _GridParameterBase

Instructions for a SensorGrid generated from exterior Faces.

Parameters:
  • dimension – The dimension of the grid cells as a number.

  • offset – A number for how far to offset the grid from the base geometries. (Default: 0.1, suitable for Rooms in Meters).

  • face_type

    Text to specify the type of face that will be used to generate grids. Note that only Faces with Outdoors boundary conditions will be used, meaning that most Floors will typically be excluded unless they represent the underside of a cantilever. Choose from the following. (Default: Wall).

    • Wall

    • Roof

    • Floor

    • All

  • punched_geometry – Boolean to note whether the punched_geometry of the faces should be used (True) with the areas of sub-faces removed from the grid or the full geometry should be used (False). (Default:False).

  • include_mesh – A boolean to note whether the resulting SensorGrid should include the mesh. (Default: True).

ToString()[source]
duplicate()[source]

Get a copy of this object.

classmethod from_dict(data)[source]

Create ExteriorFaceGridParameter from a dictionary.

{
"type": "ExteriorFaceGridParameter",
"dimension": 0.5,
"offset": 0.15,
"face_type": "Roof",
"include_mesh": True
}
generate_grid_from_room(honeybee_room)[source]

Get a SensorGrid from a Honeybee Room using these GridParameter.

Parameters:

honeybee_room – A Honeybee Room to which these grid parameters are applied.

Returns:

A honeybee-radiance SensorGrid generated from the Honeybee Room. Will be None if the Room has no exterior Faces.

scale(factor)[source]

Get a scaled version of these GridParameters.

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 ExteriorFaceGridParameter as a dictionary.

FACE_TYPES = ('Wall', 'Roof', 'Floor', 'All')
property dimension

Get a number for the dimension of the grid cells.

property face_type

Get text to specify the type of face that will be used to generate grids.

property include_mesh

Get a boolean for whether the resulting SensorGrid should include the mesh.

property offset

Get a number for how far to offset the grid from the base geometries.

property punched_geometry

Get a boolean for whether the punched_geometry of the faces should be used.

class dragonfly_radiance.gridpar.RoomGridParameter(dimension, offset=1.0, wall_offset=0, include_mesh=True)[source]

Bases: _GridParameterBase

Instructions for a SensorGrid generated from a Room2D’s floors.

The resulting grid will have the room referenced in its room_identifier property. Note that the grid is generated within the XY coordinate system of the Room2D’s floor_geometry. So rotating the plane of this geometry will will result in rotated grid cells.

Parameters:
  • dimension – The dimension of the grid cells as a number.

  • offset – A number for how far to offset the grid from the base geometries. (Default: 1, suitable for Rooms in Meters).

  • wall_offset – A number for the distance at which sensors close to walls should be removed. Note that this option has no effect unless the value is more than half of the dimension. (Default: 0).

  • include_mesh – A boolean to note whether the resulting SensorGrid should include the mesh. (Default: True).

ToString()[source]
duplicate()[source]

Get a copy of this object.

classmethod from_dict(data)[source]

Create RoomGridParameter from a dictionary.

{
"type": "RoomGridParameter",
"dimension": 0.5,
"offset": 1.0,
"wall_offset": 0.5,
"include_mesh": True
}
generate_grid_from_room(honeybee_room)[source]

Get a SensorGrid from a Honeybee Room using these GridParameter.

Parameters:

honeybee_room – A Honeybee Room to which these grid parameters are applied.

Returns:

A honeybee-radiance SensorGrid generated from the Honeybee Room. Will be None if a valid Grid cannot be generated from the Room.

scale(factor)[source]

Get a scaled version of these GridParameters.

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 RoomGridParameter as a dictionary.

property dimension

Get a number for the dimension of the grid cells.

property include_mesh

Get a boolean for whether the resulting SensorGrid should include the mesh.

property offset

Get a number for how far to offset the grid from the base geometries.

property wall_offset

Get a number for the distance at which sensors near walls should be removed.

class dragonfly_radiance.gridpar.RoomRadialGridParameter(dimension, offset=1.2, wall_offset=0, dir_count=8, start_vector=Vector3D(0.00, -1.00, 0.00), mesh_radius=None, include_mesh=True)[source]

Bases: RoomGridParameter

Instructions for a SensorGrid of radial directions around positions from floors.

This type of sensor grid is particularly helpful for studies of multiple view directions, such as imageless glare studies.

The resulting grid will have the room referenced in its room_identifier property. Note that the grid is generated within the XY coordinate system of the Room2D’s floor_geometry. So rotating the plane of this geometry will will result in rotated grid cells.

Parameters:
  • dimension – The dimension of the grid cells as a number.

  • offset – A number for how far to offset the grid from the base geometries. (Default: 1.2, suitable for Rooms in Meters).

  • wall_offset – A number for the distance at which sensors close to walls should be removed. Note that this option has no effect unless the value is more than half of the x_dim or y_dim. (Default: 0).

  • dir_count – A positive integer for the number of radial directions to be generated around each position. (Default: 8).

  • start_vector – A Vector3D to set the start direction of the generated directions. This can be used to orient the resulting sensors to specific parts of the scene. It can also change the elevation of the resulting directions since this start vector will always be rotated in the XY plane to generate the resulting directions. (Default: (0, -1, 0)).

  • mesh_radius – An optional number to override the radius of the meshes generated around each sensor. If None or autocalculate, it will be equal to 45% of the grid dimension. (Default: None).

  • include_mesh – A boolean to note whether the resulting SensorGrid should include the mesh. (Default: True).

ToString()[source]
duplicate()[source]

Get a copy of this object.

classmethod from_dict(data)[source]

Create RoomRadialGridParameter from a dictionary.

{
"type": "RoomRadialGridParameter",
"dimension": 1.0,
"offset": 1.2,
"wall_offset": 1.0,
"dir_count": 8,
"start_vector": (0, -1, 0),
"mesh_radius": 0.5,
"include_mesh": True
}
generate_grid_from_room(honeybee_room)[source]

Get a SensorGrid from a Honeybee Room using these GridParameter.

Parameters:

honeybee_room – A Honeybee Room to which these grid parameters are applied.

Returns:

A honeybee-radiance SensorGrid generated from the Honeybee Room. Will be None if a valid Grid cannot be generated from the Room.

scale(factor)[source]

Get a scaled version of these GridParameters.

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 RoomRadialGridParameter as a dictionary.

property dimension

Get a number for the dimension of the grid cells.

property dir_count

Get an integer for the number of radial directions around each position.

property include_mesh

Get a boolean for whether the resulting SensorGrid should include the mesh.

property mesh_radius

Get a number that sets the radius of the meshes generated around each sensor.

If None or autocalculate, it will be equal to 45% of the grid dimension.

property offset

Get a number for how far to offset the grid from the base geometries.

property start_vector

Get a Vector3D that sets the start direction of the generated directions.

property wall_offset

Get a number for the distance at which sensors near walls should be removed.