honeybee package

Subpackages

Submodules

honeybee.config module

Honeybee configurations.

Import this module in every module that you need to access Honeybee configurations.

Usage:

import config print(config.radlib_path) print(config.radbin_path) print(config.platform) config.radbin_path = “c:/radiance/bin”
class honeybee.config.Folders(mute=False)[source]

Bases: object

Honeybee folders.

mute

Set to True if you don’t want the class to print the report (Default: False)

Usage:

folders = Folders(mute=False) print(folders.radbin_path)
ep_folder

Path to EnergyPlus folder.

load_from_file(file_path=None)[source]

Load installation folders from a json file.

open_studio_path

Set and get the path to openstudio installation folder.

perl_exe_path

Path to perl executable file.

perl_path

Path to the folder containing Perl binary files.

python_exe_path

Path to Python folder.

radbin_path

Path to Radiance binary folder.

radiance_path

Get and set path to radiance installation folder.

radlib_path

Path to Radiance library folder.

honeybee.config.epPath = None

Path to EnergyPlus folder.

honeybee.config.perlExePath = None

Path to the perl executable needed for some othe Radiance Scripts.

honeybee.config.pythonExePath = 'c:\\python27\\python.exe'

Path to python executable needed for some Radiance scripts from the PyRad library

honeybee.config.radbin_path = 'c:\\radiance\\bin'

Path to Radinace binaries folder.

honeybee.config.radlib_path = 'c:\\radiance\\lib'

Path to Radinace libraries folder.

honeybee.config.wrapper = '"'

Wrapper for path with white space.

honeybee.dataoperation module

Collection of functions for data operation.

honeybee.dataoperation.flatten(input_list)[source]

Return a flattened genertor from an input list.

Usage:

input_list = [[‘a’], [‘b’, ‘c’, ‘d’], [[‘e’]], [‘f’]] list(flatten(input_list)) >> [‘a’, ‘b’, ‘c’, ‘d’, ‘e’, ‘f’]
honeybee.dataoperation.flatten_tuple_list(input_list)[source]

Return a flattened generator from an input list of (x, y, z) tuples.

Usage:

input_list = [[(0, 0, 0)], [(10, 0, 0), (10, 10, 0)]] print(list(flattenPointList(input_list)))

>> [(0, 0, 0), (10, 0, 0), (10, 10, 0)]

honeybee.dataoperation.match_data(guide, follower, none_value=(0, 0, 1))[source]

Match data between two lists and reomove None values.

Parameters:
  • guide – Long list.
  • follower – Short list.
  • noneValue – Place holder for alternative values for None values in shortlist.
honeybee.dataoperation.match_points_and_vectors(pts_t, vec_t)[source]

Convert list fo data to list.

Parameters:
  • pts_t – List of lists of test points.
  • vec_t – List of lists of vectors.
Returns:

Nested list of points vectors: Nested list of vectors

Return type:

pts

honeybee.dataoperation.unflatten(guide, falttened_input)[source]

Unflatten a falttened generator.

Parameters:
  • guide – A guide list to follow the structure
  • falttened_input – A flattened iterator object

Usage:

guide = iter([[“a”], [“b”,”c”,”d”], [[“e”]], [“f”]]) input_list = [0, 1, 2, 3, 4, 5, 6, 7] unflatten(guide, iter(input_list)) >> [[0], [1, 2, 3], [[4]], [5]]

honeybee.futil module

A collection of auxiliary funtions for working with files and directories.

honeybee.futil.bat_to_sh(file_path)[source]

Convert honeybee .bat file to .sh file.

WARNING: This is a very simple function and doesn’t handle any edge cases.

honeybee.futil.copy_files_to_folder(files, target_folder, overwrite=True)[source]

Copy a list of files to a new target folder.

Returns:A list of fullpath of the new files.
honeybee.futil.get_radiance_path_lines()[source]

Return path to radiance folders.

honeybee.futil.normspace(path)[source]

Norm white spaces in path.

Return path with quotation marks if there is whitespace in path.

honeybee.futil.nukedir(target_dir, rmdir=False)[source]

Delete all the files inside target_dir.

Usage:
nukedir(“c:/ladybug/libs”, True)
honeybee.futil.preparedir(target_dir, remove_content=True)[source]

Prepare a folder for analysis.

This method creates the folder if it is not created, and removes the file in the folder if the folder already existed.

honeybee.futil.write_to_file(file_path, data, mkdir=False)[source]

Write a string of data to file.

Parameters:
  • file_path – Full path for a valid file path (e.g. c:/ladybug/testPts.pts)
  • data – Any data as string
  • mkdir – Set to True to create the directory if doesn’t exist (Default: False)
honeybee.futil.write_to_file_by_name(folder, fname, data, mkdir=False)[source]

Write a string of data to file by filename and folder.

Parameters:
  • folder – Target folder (e.g. c:/ladybug).
  • fname – File name (e.g. testPts.pts).
  • data – Any data as string.
  • mkdir – Set to True to create the directory if doesn’t exist (Default: False).

honeybee.geometryoperation module

Collection of methods for geometrical operations.

honeybee.geometryoperation.center_point_from_points(pts)[source]

Calculate center point.

This method finds the center point by averging x, y and z values.

honeybee.geometryoperation.normal_from_points(pts)[source]

Calculate normal vector for a list of points.

This method uses the pts[-1], pts[0] and pts[1] to calculate the normal assuming the points are representing a planar surface

honeybee.geometryoperation.strip_point_list(pts)[source]

Flatten a list of list of points.

honeybee.geometryoperation.up_vector_from_points(pts)[source]

Calculate up vector for a surface from points.

honeybee.geometryoperation.vector_angle(vector1, vector2)[source]

Calculate vector angle between two vectors.

honeybee.geometryoperation.vector_angle_to_z_axis(vector)[source]

Calculate angle between vectoe and (0, 0, 1) in degrees.

honeybee.hbdynamicsurface module

A honeybee surface with multiple states.

class honeybee.hbdynamicsurface.HBDynamicSurface(name, sorted_points=[], surface_type=None, is_name_set_by_user=False, is_type_set_by_user=False, rad_properties=None, ep_properties=None, states=None)[source]

Bases: honeybee.hbsurface.HBSurface

Base class for Honeybee surface.

name

A unique string for surface name

sorted_points

A list of 3 points or more as tuple or list with three items (x, y, z). Points should be sorted. This class won’t sort the points. If surfaces has multiple subsurfaces you can pass lists of point lists to this function (e.g. ((0, 0, 0), (10, 0, 0), (0, 10, 0))).

surface_type

Optional input for surface type. You can use any of the surface types available from surfacetype libraries or use a float number to indicate the type. If not indicated it will be assigned based on normal angle of the surface which will be calculated from surface points.

0.0: Wall 0.5: UndergroundWall 1.0: Roof 1.5: UndergroundCeiling 2.0: Floor 2.25: UndergroundSlab 2.5: SlabOnGrade 2.75: ExposedFloor 3.0: Ceiling 4.0: AirWall 6.0: Context
is_name_set_by_user

If you want the name to be changed by honeybee any case set is_name_set_by_user to True. Default is set to False which let Honeybee to rename the surface in cases like creating a newHBZone.

rad_properties

Radiance properties for this surface. If empty default RADProperties will be assigned to surface by Honeybee.

ep_properties

EnergyPlus properties for this surface. If empty default ep_properties will be assigned to surface by Honeybee.

states

A list of SurfaceStates for this dynamic surface.

isHBDynamicSurface

Check if the surface is HBDynamicSurface.

honeybee.hbfensurface module

class honeybee.hbfensurface.HBFenSurface(name, sorted_points=None, is_name_set_by_user=False, rad_properties=None, ep_properties=None, states=None)[source]

Bases: honeybee._hbanalysissurface.HBAnalysisSurface

Honeybee fenestration surface.

Parameters:
  • name – A unique string for surface name
  • sorted_points – A list of 3 points or more as tuple or list with three items (x, y, z). Points should be sorted. This class won’t sort the points. If surfaces has multiple subsurfaces you can pass lists of point lists to this function (e.g. ((0, 0, 0), (10, 0, 0), (0, 10, 0))).
  • is_name_set_by_user – If you want the name to be changed by honeybee any case set is_name_set_by_user to True. Default is set to False which let Honeybee to rename the surface in cases like creating a newHBZone.
  • rad_properties – Radiance properties for this surface. If empty default RADProperties will be assigned to surface by Honeybee.
  • ep_properties – EnergyPlus properties for this surface. If empty default ep_properties will be assigned to surface by Honeybee.

Usage:

from honeybee.hbsurface import HBSurface from honeybee.hbfensurface import HBFenSurface

# create a surface pts = [(0, 0, 0), (10, 0, 0), (0, 0, 10)] hbsrf = HBSurface(“001”, pts, surface_type=None, is_name_set_by_user=True)

glzpts = [(1, 0, 1), (8, 0, 1), (1, 0, 8)] glzsrf = HBFenSurface(“glz_001”, glzpts)

# add fenestration surface to hb surface hbsrf.add_fenestration_surface(glzsrf)

# get full definiion of the surface including the fenestration print(hbsrf.to_rad_string(include_materials=True))

# save the definiion to a .rad file hbsrf.rad_string_to_file(r”c:/ladybug/triangle.rad”, include_materials=True)

classmethod from_ep_string(ep_string)[source]

Init Honeybee fenestration surface from an ep_string.

Parameters:ep_string – The full ep_string for an EnergyPlus fenestration.
classmethod from_geometry(name, geometry, is_name_set_by_user=False, rad_properties=None, ep_properties=None, states=None, group=False)[source]

Create a honeybee fenestration surface from Grasshopper geometry.

geometry

Return geometry.

isHBFenSurface

Return True for HBFenSurface.

is_child_surface

Return True if Honeybee surface is Fenestration Surface.

is_created_from_geometry

Return True if the surface is created from a geometry not points.

parent

Return parent surface for this fenestration surface.

profile

Get profile curve of this surface.

honeybee.hbobject module

class honeybee.hbobject.HBObject[source]

Bases: object

Base class for Honeybee Zone and Surface.

isHBObject

Return True.

honeybee.hbshadesurface module

class honeybee.hbshadesurface.HBShadingSurface(name, sorted_points=[], is_name_set_by_user=False, rad_properties=None, ep_properties=None, states=None)[source]

Bases: honeybee._hbanalysissurface.HBAnalysisSurface

Honeybee shading surface.

Parameters:
  • name – A unique string for surface name
  • sorted_points – A list of 3 points or more as tuple or list with three items (x, y, z). Points should be sorted. This class won’t sort the points. If surfaces has multiple subsurfaces you can pass lists of point lists to this function (e.g. ((0, 0, 0), (10, 0, 0), (0, 10, 0))).
  • is_name_set_by_user – If you want the name to be changed by honeybee any case set is_name_set_by_user to True. Default is set to False which let Honeybee to rename the surface in cases like creating a newHBZone.
  • rad_properties – Radiance properties for this surface. If empty default RADProperties will be assigned to surface by Honeybee.
  • ep_properties – EnergyPlus properties for this surface. If empty default ep_properties will be assigned to surface by Honeybee.
classmethod from_ep_string(ep_string)[source]

Init Honeybee shading from an ep_string.

Supported types are Shading:Site:Detailed, Shading:Building:Detailed, Shading:Zone:Detailed

Parameters:ep_string – The full ep_string for an EnergyPlus shading object.
isHBShadingSurface

Return True for HBFenSurface.

is_child_surface

Return True if Honeybee surface is Fenestration Surface.

parent

Get or set parent zone.

honeybee.hbsurface module

class honeybee.hbsurface.HBSurface(name, sorted_points=[], surface_type=None, is_name_set_by_user=False, is_type_set_by_user=False, rad_properties=None, ep_properties=None, states=None)[source]

Bases: honeybee._hbanalysissurface.HBAnalysisSurface

Base class for Honeybee surface.

name

A unique string for surface name

sorted_points

A list of 3 points or more as tuple or list with three items (x, y, z). Points should be sorted. This class won’t sort the points. If surfaces has multiple subsurfaces you can pass lists of point lists to this function (e.g. ((0, 0, 0), (10, 0, 0), (0, 10, 0))).

surface_type

Optional input for surface type. You can use any of the surface types available from surfacetype libraries or use a float number to indicate the type. If not indicated it will be assigned based on normal angle of the surface which will be calculated from surface points.

0.0: Wall 0.5: UndergroundWall 1.0: Roof 1.5: UndergroundCeiling 2.0: Floor 2.25: UndergroundSlab 2.5: SlabOnGrade 2.75: ExposedFloor 3.0: Ceiling 4.0: AirWall 6.0: Context
is_name_set_by_user

If you want the name to be changed by honeybee any case set is_name_set_by_user to True. Default is set to False which let Honeybee to rename the surface in cases like creating a newHBZone.

rad_properties

Radiance properties for this surface. If empty default RADProperties will be assigned to surface by Honeybee.

ep_properties

EnergyPlus properties for this surface. If empty default ep_properties will be assigned to surface by Honeybee.

Usage:

pts = ((0, 0, 0), (10, 0, 0), (0, 0, 10)) hbsrf = HBSurface(“001”, pts, surface_type=None, is_name_set_by_user=True,

is_type_set_by_user=True)

print(hbsrf.to_rad_string(include_materials=True))

> void plastic generic_wall > 0 > 0 > 5 0.500 0.500 0.500 0.000 0.000 > generic_wall polygon 001 > 0 > 0 > 9 > 0 0 0 > 10 0 0 > 0 10 10

add_fenestration_surface(fenestration_surface)[source]

Add a fenestration surface to HB surface.

add_fenestration_surface_by_size(name, width, height, sill_height=1, radiance_material=None)[source]

Add rectangular fenestration surface to surface.

Parameters:
  • width – Opening width. Opening will be centered in HBSurface.
  • height – Opening height.
  • sill_height – Sill height (default: 1).
  • radiance_material – Optional radiance material for this fenestration.
children_surfaces

Get children surfaces.

classmethod from_ep_string(ep_string)[source]

Init Honeybee surface from an ep_string.

Parameters:ep_string – The full ep_string for an EnergyPlus surface.
classmethod from_geometry(name, geometry, surface_type=None, is_name_set_by_user=False, is_type_set_by_user=False, rad_properties=None, ep_properties=None, states=None, group=False)[source]

Create honeybee surface[s] from a Grasshopper geometry.

If group is False it will return a list of HBSurfaces.

geometry

Return geometry.

has_child_surfaces

Return True if Honeybee surface has Fenestration surrfaces.

isHBSurface

Return True for HBSurface.

is_child_surface

Return False for HBSurface.

is_created_from_geometry

Return True if the surface is created from a geometry not points.

parent

Get or set parent zone.

profile

Get profile curve of this surface.

honeybee.hbzone module

class honeybee.hbzone.HBZone(name=None, origin=(0, 0, 0), geometry_rules=None, building_program=None, zone_program=None, is_conditioned=True)[source]

Bases: honeybee.hbobject.HBObject

Honeybee base class.

Parameters:
  • name – Unique name for this zone.
  • origin – Zone origin point (default: 0, 0, 0)
  • geometry_rules – EnergyPlus geometry_rules. (default: “LowerLeftCorner”; “CounterClockWise”; “Absolute”)
  • building_program – HBZone building program.
  • zone_program – Specific program for this zone from the available building programs.
  • is_conditioned – A boolean that indicates if the zone is conditioned. (default: True)
ToString()[source]

Overwrite .NET ToString.

add_surface(surface)[source]

Add a surface to Honeybee zone.

ceilings

Get ceilings surfaces.

children_surfaces

Get list of children Surfaces for this zone.

floors

Get floor surfaces.

classmethod from_ep_string(ep_string, geometry_rules=None, building_program=None, zone_program=None, is_conditioned=True)[source]

Init Honeybee zone from an ep_string.

Parameters:ep_string – The full ep_string for an EnergyPlus Zone.
geometry

Return zone geometry for visualization.

geometry_rules

Get and set global geometry rules for this zone.

isHBZone

Return True if a HBZone.

is_relative_system

Return True if coordinate system is relative.

To find the absolute coordinate values in a relative system you should add surface coordinates to zone origin.

name

Zone name

origin

origin of the zone.

profile

Return zone profile for visualization.

rad_string_to_file(file_path, mode=1, include_materials=False, flipped=False, blacked=False)[source]

Write Radiance definition for this surface to a file.

Parameters:
  • filepath – Full filepath (e.g c:/ladybug/geo.rad).
  • mode – An integer 0-2 (Default: 1) 0 - Do not include children surfaces. 1 - Include children surfaces. 2 - Only children surfaces.
  • include_materials – Set to False if you only want the geometry definition (default:True).
  • flipped – Flip the surface geometry.
  • blacked – If True materials will all be set to plastic 0 0 0 0 0.
radiance_materials

Get list of Radiance materials for zone including fenestration.

surfaces

Get list of HBSurfaces for this zone.

to_rad_file()[source]

Return a RadFile like object.

Use this method to get easy access to radiance geometries and materials for this zone. For a full definition as a string use to_rad_string method.

to_rad_string(mode=1, include_materials=False, flipped=False, blacked=False)[source]

Get full radiance file as a string.

Parameters:
  • mode – An integer 0-2 (Default: 1) 0 - Do not include children surfaces. 1 - Include children surfaces. 2 - Only children surfaces.
  • include_materials – Set to False if you only want the geometry definition (default:True).
  • flipped – Flip the surface geometry.
  • blacked – If True materials will all be set to plastic 0 0 0 0 0.
walls

Get wall surfaces.

honeybee.plus module

Collection of methods for Honeybee geometry operations in Grasshopper.

honeybee.plus.check_for_internal_edge(hb_surface)[source]

Check if the surface has an internal edge.

For surfaces with internal edge surfaces needs to be meshed to extract the points.

Parameters:hb_surface – A Honeybee surface
Returns:True is the surface has an internal edge, otherwise return False.
honeybee.plus.check_planarity(hb_surface, tolerance=0.001)[source]

Check planarity of a hb_surface.

Parameters:
  • hb_surface – A Honeybee surface
  • tolerance – A float number as tolerance (Default: 1e-3)
Returns:

True is the surface is planar, otherwise return False.

honeybee.plus.extract_brep_points(brep, meshing_parameters=None, tol=0.001)[source]

Extract points from Brep.

honeybee.plus.extract_geometry_points(geometries, meshing_parameters=None)[source]

Calculate list of points for a Grasshopper geometry.

For planar surfaces the length of the list will be only 1. For non-planar surfaces or surfaces with internal edges it will be a number of lists.

Parameters:
  • geometries – List of meshes or Breps
  • meshing_parameters

    Optional Rhino meshing_parameters. This will only be used if the surface is non-planar or has an internal edge and needs to be meshed. Default:

    Rhino.Geometry.meshing_parameters.Coarse; SimplePlanes = True for planar surfaces; Rhino.Geometry.meshing_parameters.Smooth for non-planar surfaces
Returns:

A Collection of (geometry, points) in which each geometry is coupled by points. For planar surfaces the length of the points list will be only 1. For non-planar surfaces, meshes or surfaces with internal edges it will be multiple lists.

honeybee.plus.extract_mesh_points(meshes)[source]

Extract points from a mesh.

honeybee.plus.get_surface_center_pt_and_normal(geometry)[source]

Calculate center point and normal for a hb_surface.

Parameters:hb_surface – A Honeybee surface
Returns:Returns a tuple as (center_pt, normal_vector)
honeybee.plus.is_planar(geometry, tol=0.001)[source]

Check if a surface in planar.

honeybee.plus.is_points_sorted_anticlockwise(sorted_points, normal)[source]

Check if an ordered list of points are anti-clockwise.

honeybee.plus.polygon(point_list)[source]

Return a polygon from points.

honeybee.plus.vectors_cross_product(vector1, vector2)[source]

Calculate cross product of two vectors.

honeybee.plus.xyz_to_geometrical_points(xyz_points)[source]

convert a sequence of (x, y, z) values to Grasshopper points.

Input should be list of lists of points.

honeybee.room module

Honeybee test room.

This class generates prototype rooms.

class honeybee.room.Room(origin=(0, 0, 0), width=3, depth=6, height=3.2, rotation_angle=0)[source]

Bases: honeybee.hbzone.HBZone

Honeybee room.

Attribute:
origin: Origin of the room as a tuple (default: (0, 0, 0)). width: Room width. depth: Room depth. height: Room height. rotationAngle: Clock-wise rotation angle of the room from YAxis.
add_fenestration_surface(wall_name, width, height, sill_height, radiance_material=None)[source]

Add rectangular fenestration surface to surface.

Parameters:
  • wall_name – Target wall name (back, right, front, left)
  • width – Opening width. Opening will be centered in HBSurface.
  • height – Opening height.
  • sill_height – Sill height (default: 1).
  • radiance_material – Optional radiance material for this fenestration.

Usage:

r = Room() for pt in r.generate_test_points():

print(pt)

r.add_fenestration_surface(‘back’, 2, 2, .7) r.add_fenestration_surface(‘right’, 4, 1.5, .5) r.add_fenestration_surface(‘right’, 4, 0.5, 2.2) with open(‘c:/ladybug/room.rad’, ‘wb’) as outf:

outf.write(r.to_rad_string(include_materials=True))
generate_interior_view(u=0.5, v=0.5, z=0.5, angle=0, view_up_vector=(0, 0, 1), view_type=0, view_h_size=60, view_v_size=60, x_resolution=64, y_resolution=64, view_shift=0, view_lift=0)[source]

Generate an inetrior view.

Parameters:
  • angle – Rotation angle from back wall.
  • view_up_vector – Set the view up (-vu) vector (vertical direction) to (x, y, z).cDefault: (0, 0, 1)
  • view_type
    Set view type (-vt) to one of the choices below.
    0: Perspective (v) 1: Hemispherical fisheye (h) 2: Parallel (l) 3: Cylindrical panorma (c) 4: Angular fisheye (a) 5: Planisphere [stereographic] projection (s)

    For more detailed description about view types check rpict manual page: (http://radsite.lbl.gov/radiance/man_html/rpict.1.html)

  • view_h_size – Set the view horizontal size (-vs). For a perspective projection (including fisheye views), val is the horizontal field of view (in degrees). For a parallel projection, val is the view width in world coordinates.
  • view_v_size – Set the view vertical size (-vv). For a perspective projection (including fisheye views), val is the horizontal field of view (in degrees). For a parallel projection, val is the view width in world coordinates.
  • x_resolution – Set the maximum x resolution (-x) to an integer.
  • y_resolution – Set the maximum y resolution (-y) to an integer.
  • view_shift – Set the view shift (-vs). This is the amount the actual image will be shifted to the right of the specified view. This option is useful for generating skewed perspectives or rendering an image a piece at a time. A value of 1 means that the rendered image starts just to the right of the normal view. A value of −1 would be to the left. Larger or fractional values are permitted as well.
  • view_lift – Set the view lift (-vl) to a value. This is the amount the actual image will be lifted up from the specified view.
generate_test_points(grid_size=1, height=0.75)[source]

Generate a grid of test points in the room.

Parameters:
  • grid_size – Size of test grid.
  • height – Test points height.
get_location(u=0.5, v=0.5, z=0.5)[source]

Get location as a point based on u, v, z.

u, v, z must be between 0..1.

vertices

Return the room vertices.

honeybee.schedule module

Honeybee schedule.

Use this class to create schecules.

class honeybee.schedule.Schedule(values, hoys=None)[source]

Bases: object

Schedule.

values

Schedule values.

hoys

List of hours of the year for this values.

ToString()[source]

Overwrite .NET ToString.

classmethod eight_am_to_six_pm()[source]

An 8am to 6pm schedule for IES-LM-83-12 requirements.

This schedule includes 10 hours per day from 8am to 6pm.

classmethod from_analysis_period(occ_period=None, off_hours=None, weekend=None, default_value=None)[source]

Create a schedule from Ladybug’s AnalysisPeriod.

Parameters:
  • occ_period – An analysis period for occupancy. Default is (8, 17).
  • off_hours – A list of hours that building is unoccupied during the occupancy period everyday (e.g. lunch break). Default is an hour lunch break at (12, 13). Use -1 for no break during the day.
  • weekend – A list of numbers to indicate the weekend days. [0] None, [1-7] MON to SUN. Default is 6, 7 (SAT, SUN).
  • default_value – Default value for occupancy hours (Default: 1).
classmethod from_workday_hours(occ_hours=None, off_hours=None, weekend=None, default_value=None)[source]

Create a schedule from Ladybug’s AnalysisPeriod.

Parameters:
  • occ_hours – Start and end hour of work day as a tuple. Default is (8, 17).
  • off_hours – A list of hours that building is unoccupied during the occupancy period everyday (e.g. lunch break). Default is an hour lunch break at (12, 13). Use -1 for no break during the day.
  • weekend – A list of numbers to indicate the weekend days. [0] None, [1-7] MON to SUN. Default is 6, 7 (SAT, SUN).
  • default_value – Default value for occupancy hours (Default: 1).
hours

Tuple of values in this schedule.

occupied_hours

Occupied hours of the year as a set.

values

Tuple of values in this schedule.

write(file_path)[source]

Write the schedule to a csv file.

honeybee.surfaceproperties module

Surface Properties.

A class that contains both radiance and energyplus properties which can be applied to a surface or a list of honeybee surfaces.

class honeybee.surfaceproperties.SurfaceProperties(surface_type=None, rad_properties=None, ep_properties=None)[source]

Bases: object

Surface data for a single state.

This class is useful to define several states for one or a group of HBSurfaces. Each state can has a different material and add additional geometry to the scene. You can add the states to each HBSurface using HBSurface.addState.

surface_type

A honeybee surface type (Default: surfacetype.Wall).

rad_properties

Radiance properties for this surface. If empty default RADProperties will be assigned based on surface type once assigned to a surface.

ep_properties

EnergyPlus properties for this surface. If empty default ep_properties will be assigned based on surface type once assigned to a surface.

ToString()[source]

Overwrite .NET ToString method.

isSurfaceProperties()[source]

Return True for states.

rad_material_from_type()[source]

Get default radiance material for the surface type.

radiance_properties

Get and set Radiance properties.

surface_type

Get and set Surface Type.

class honeybee.surfaceproperties.SurfaceState(name, surface_properties=None, surfaces=None)[source]

Bases: object

A HBSurface State.

A state includes surface data for a single state which includes SurfaceProperties and optional additional HBSurfaces.

This class is useful to define several states for one or a group of HBSurfaces. Each state can have different material and add additional geometry to the scene. You can add the states to a HBSurface using HBSurface.addState.

Both Attributes are optional but at least one of them should be provided to make the state meaningful.

name

Name as a string.

surface_properties

An instance of SurfaceProperties (Default: None).

surfaces

A list of HBSurfaces to be added to the scene. For multi-phase daylight simulation hb_surfaces can only be located outside the room (Default: None).

ToString()[source]

Overwrite .NET ToString method.

isSurfaceState

Return True if a SurfaceState.

name

The name of this state.

radiance_black_material

Get Radiance black material from SurfaceProperties.

radiance_material

Get Radiance material from SurfaceProperties.

radiance_materials(blacked=False, to_rad_string=False)[source]

Get the full list of materials for surfaces.

radiance_properties

Get Radiance material from SurfaceProperties.

surface_properties

SurfaceProperties for this state.

surfaces
to_rad_string(mode=1, include_materials=False, flipped=False, blacked=False)[source]

Get surfaces as a RadFile. Use str(to_rad_string) to get the full str.

Parameters:
  • mode – An integer 0-2 (Default: 1) 0 - Do not include children surfaces. 1 - Include children surfaces. 2 - Only children surfaces.
  • include_materials – Set to False if you only want the geometry definition (default:True).
  • flipped – Flip the surface geometry.
  • blacked – If True materials will all be set to plastic 0 0 0 0 0.

honeybee.surfacetype module

Honeybee surface types (e.g. wall, roof, etc.).

class honeybee.surfacetype.AirWall[source]

Bases: honeybee.surfacetype.SurfaceTypeBase

Air wall.

Virtual wall to define zones inside a space. AirWalls don’t exist in reality.

radiance_material = void glass generic_glass 0 0 4 1.08858143784 1.08858143784 1.08858143784 1.52

Default Radiance material.

typeId = 4

Surface type id.

class honeybee.surfacetype.Ceiling[source]

Bases: honeybee.surfacetype.SurfaceTypeBase

Ceiling.

radiance_material = void plastic generic_ceiling 0 0 5 0.8 0.8 0.8 0.0 0.0

Default Radiance material.

typeId = 3

Surface type id.

class honeybee.surfacetype.Context[source]

Bases: honeybee.surfacetype.SurfaceTypeBase

Context surfaces.

radiance_material = void plastic generic_shading 0 0 5 0.35 0.35 0.35 0.0 0.0

Default Radiance material.

typeId = 6

Surface type id.

class honeybee.surfacetype.ExposedFloor[source]

Bases: honeybee.surfacetype.SurfaceTypeBase

Exposed Floor.

Part of the floor/slab the is cantilevered.

radiance_material = void plastic generic_floor 0 0 5 0.2 0.2 0.2 0.0 0.0

Default Radiance material.

typeId = 2.75

Surface type id.

class honeybee.surfacetype.Floor[source]

Bases: honeybee.surfacetype.SurfaceTypeBase

Floor.

radiance_material = void plastic generic_floor 0 0 5 0.2 0.2 0.2 0.0 0.0

Default Radiance material.

typeId = 2.0

Surface type id.

class honeybee.surfacetype.Roof[source]

Bases: honeybee.surfacetype.SurfaceTypeBase

Roof.

radiance_material = void plastic generic_roof 0 0 5 0.8 0.8 0.8 0.0 0.0

Default Radiance material.

typeId = 1.0

Surface type id.

class honeybee.surfacetype.SlabOnGrade[source]

Bases: honeybee.surfacetype.SurfaceTypeBase

Slab on Grade.

Any floor that is touching the ground. z=0

radiance_material = void plastic generic_floor 0 0 5 0.2 0.2 0.2 0.0 0.0

Default Radiance material.

typeId = 2.5

Surface type id.

class honeybee.surfacetype.SurfaceTypeBase[source]

Bases: object

Base class for surface types.

ToString()[source]

Overwrite .NET ToString method.

energyPlusConstruction = None

Default EnergyPlus Construction.

isSurfaceType()[source]

Return True for surface types.

radiance_material = None

Default Radiance material.

typeId = -1

Surface type id.

class honeybee.surfacetype.SurfaceTypes[source]

Bases: object

Collection of surface types.

0.0: Wall, 0.5: UndergroundWall, 1.0: Roof, 1.5: UndergroundCeiling, 2.0: Floor, 2.25: UndergroundSlab, 2.5: SlabOnGrade, 2.75: ExposedFloor, 3.0: Ceiling, 4.0: AirWall, 5.0: Window, 6.0: Context

classmethod by_normal_angle_and_points(normal_angle, points=[])[source]

Get surface type based on surface normal angle to Z axis.

Parameters:
  • normal_angle – Angle between surface normal and z axis in degrees.
  • points – List of surface points. If not provided the base type will be returned.
Returns:

Surface type as SurfaceTypeBase object.

static get_base_type_by_normal_angle(angle_to_z_axis, maximum_roof_angle=30)[source]

Get based type of the surface.

This method does calculte base methods as wall,roof and floor

Parameters:angle_to_z_axis – Angle between surface normal and z_axis in degrees.
Returns:Wall, 1: Roof, 2: Floor
Return type:An integer between 0-2 0
classmethod get_type_by_key(key)[source]

Return type based on key value.

Parameters:key – 0.0: Wall, 0.5: UndergroundWall, 1.0: Roof, 1.5: UndergroundCeiling, 2.0: Floor, 2.25: UndergroundSlab, 2.5: SlabOnGrade, 2.75: ExposedFloor, 3.0: Ceiling, 4.0: AirWall, 5.0: Window, 6.0: Context
Usage:
srf_type = SurfaceTypes.get_type_by_key(6)
static is_surface_on_ground(pts)[source]

Check if this surface is on the ground.

static is_surface_underground(pts)[source]

Check if this surface is underground.

re_evaluate_surface_type(base_surface_type, pts)[source]

Re-evaluate base type for special types.

class honeybee.surfacetype.UndergroundCeiling[source]

Bases: honeybee.surfacetype.SurfaceTypeBase

Underground Ceiling.

radiance_material = void plastic generic_wall 0 0 5 0.5 0.5 0.5 0.0 0.0

Default Radiance material.

typeId = 1.5

Surface type id.

class honeybee.surfacetype.UndergroundSlab[source]

Bases: honeybee.surfacetype.SurfaceTypeBase

Underground slab.

Any floor that is located under ground (z < 0)

radiance_material = void plastic generic_floor 0 0 5 0.2 0.2 0.2 0.0 0.0

Default Radiance material.

typeId = 2.25

Surface type id.

class honeybee.surfacetype.UndergroundWall[source]

Bases: honeybee.surfacetype.SurfaceTypeBase

Underground wall.

radiance_material = void plastic generic_wall 0 0 5 0.5 0.5 0.5 0.0 0.0

Default Radiance material.

typeId = 0.5

Surface type id.

class honeybee.surfacetype.Wall[source]

Bases: honeybee.surfacetype.SurfaceTypeBase

Wall.

radiance_material = void plastic generic_wall 0 0 5 0.5 0.5 0.5 0.0 0.0

Default Radiance material.

typeId = 0.0

Surface type id.

class honeybee.surfacetype.Window[source]

Bases: honeybee.surfacetype.SurfaceTypeBase

Window surfaces.

radiance_material = void glass generic_glass 0 0 4 0.654047488895 0.654047488895 0.654047488895 1.52

Default Radiance material.

typeId = 5

Surface type id.

honeybee.utilcol module

A collection of useful utilities for Honeybee

honeybee.utilcol.check_name(name)[source]

Check if a name is a valid honeybee name.

A valid name can only have alphabet, digits, - and _.

honeybee.utilcol.random_name(shorten=True)[source]

Generate a random name as a string using uuid.

Parameters:shorten – If True the name will be the first to segment of uuid.

Module contents

Honeybee core library.