honeybee.model module

Honeybee Model.

class honeybee.model.Model(identifier, rooms=None, orphaned_faces=None, orphaned_shades=None, orphaned_apertures=None, orphaned_doors=None, units='Meters', tolerance=None, angle_tolerance=1.0)[source]

Bases: honeybee._base._Base

A collection of Rooms, Faces, Shades, Apertures, and Doors representing a model.

Parameters
  • identifier – Text string for a unique Model ID. Must be < 100 characters and not contain any spaces or special characters.

  • rooms – A list of Room objects in the model.

  • orphaned_faces – A list of the Face objects in the model that lack a parent Room. Note that orphaned Faces are not acceptable for Models that are to be exported for energy simulation.

  • orphaned_shades – A list of the Shade objects in the model that lack a parent.

  • orphaned_apertures – A list of the Aperture objects in the model that lack a parent Face. Note that orphaned Apertures are not acceptable for Models that are to be exported for energy simulation.

  • orphaned_doors – A list of the Door objects in the model that lack a parent Face. Note that orphaned Doors are not acceptable for Models that are to be exported for energy simulation.

  • units

    Text for the units system in which the model geometry exists. Default: ‘Meters’. Choose from the following:

    • Meters

    • Millimeters

    • Feet

    • Inches

    • Centimeters

  • tolerance – The maximum difference between x, y, and z values at which vertices are considered equivalent. Zero indicates that no tolerance checks should be performed. None indicates that the tolerance will be set based on the units above, with the tolerance consistently being between 1 cm and 1 mm (roughly the tolerance implicit in the OpenStudio SDK and EnergyPlus). (Default: None).

  • angle_tolerance – The max angle difference in degrees that vertices are allowed to differ from one another in order to consider them colinear. Zero indicates that no angle tolerance checks should be performed. (Default: 1.0).

Properties:
  • identifier

  • display_name

  • units

  • tolerance

  • angle_tolerance

  • rooms

  • faces

  • apertures

  • doors

  • shades

  • indoor_shades

  • outdoor_shades

  • orphaned_faces

  • orphaned_shades

  • orphaned_apertures

  • orphaned_doors

  • stories

  • volume

  • floor_area

  • exposed_area

  • exterior_wall_area

  • exterior_roof_area

  • exterior_aperture_area

  • exterior_wall_aperture_area

  • exterior_skylight_aperture_area

  • user_data

ToString()
add_aperture(obj)[source]

Add an orphaned Aperture object to the model.

add_door(obj)[source]

Add an orphaned Door object to the model.

add_face(obj)[source]

Add an orphaned Face object without a parent to the model.

add_model(other_model)[source]

Add another Model object to this model.

add_prefix(prefix)[source]

Change the identifier of this object and child objects by inserting a prefix.

This is particularly useful in workflows where you duplicate and edit a starting object and then want to combine it with the original object since all objects within a Model must have unique identifiers.

Parameters

prefix – Text that will be inserted at the start of this object’s (and child objects’) identifier and display_name. It is recommended that this prefix be short to avoid maxing out the 100 allowable characters for honeybee identifiers.

add_room(obj)[source]

Add a Room object to the model.

add_shade(obj)[source]

Add an orphaned Shade object to the model, typically representing context.

apertures_by_identifier(identifiers)[source]

Get a list of Aperture objects in the model given the Aperture identifiers.

assign_stories_by_floor_height(min_difference=2.0, overwrite=False)[source]

Assign story properties to the rooms of this Model using their floor heights.

Stories will be named with a standard convention (‘Floor1’, ‘Floor2’, etc.).

Parameters
  • min_difference – An float value to denote the minimum difference in floor heights that is considered meaningful. This can be used to ensure rooms like those representing stair landings are grouped with floors. Default: 2.0, which means that any difference in floor heights less than 2.0 will be considered a part of the same story. This assumption is suitable for models in meters.

  • overwrite – If True, all story properties of this model’s rooms will be overwritten by this method. If False, this method will only assign stories to Rooms that do not already have a story identifier already assigned to them. (Default: False).

Returns

A list of the unique story names that were assigned to the input rooms.

check_all(raise_exception=True, detailed=False)[source]

Check all of the aspects of the Model for possible errors.

This includes basic properties like adjacency checks and all geometry checks. Furthermore, all extension attributes will be checked assuming the extension Model properties have a check_all function. Note that an exception will always be raised if the model has a tolerance of zero as this means that no geometry checks can be performed.

Parameters
  • raise_exception – Boolean to note whether a ValueError should be raised if any Model errors are found. If False, this method will simply return a text string with all errors that were found. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns

A text string with all errors that were found or a list if detailed is True. This string (or list) will be empty if no errors were found.

check_all_air_boundaries_adjacent(raise_exception=True, detailed=False)[source]

Check that all Faces with the AirBoundary type are adjacent to other Faces.

This is a requirement for energy simulation.

Parameters
  • raise_exception – Boolean to note whether a ValueError should be raised if an AirBoundary without an adjacency is found. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns

A string with the message or a list with a dictionary if detailed is True.

check_duplicate_face_identifiers(raise_exception=True, detailed=False)[source]

Check that there are no duplicate Face identifiers in the model.

Parameters
  • raise_exception – Boolean to note whether a ValueError should be raised if duplicate identifiers are found. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns

A string with the message or a list with a dictionary if detailed is True.

check_duplicate_room_identifiers(raise_exception=True, detailed=False)[source]

Check that there are no duplicate Room identifiers in the model.

Parameters
  • raise_exception – Boolean to note whether a ValueError should be raised if duplicate identifiers are found. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns

A string with the message or a list with a dictionary if detailed is True.

check_duplicate_shade_identifiers(raise_exception=True, detailed=False)[source]

Check that there are no duplicate Shade identifiers in the model.

Parameters
  • raise_exception – Boolean to note whether a ValueError should be raised if duplicate identifiers are found. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns

A string with the message or a list with a dictionary if detailed is True.

check_duplicate_sub_face_identifiers(raise_exception=True, detailed=False)[source]

Check that there are no duplicate sub-face identifiers in the model.

Note that both Apertures and Doors are checked for duplicates since the two are counted together by EnergyPlus.

Parameters
  • raise_exception – Boolean to note whether a ValueError should be raised if duplicate identifiers are found. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns

A string with the message or a list with a dictionary if detailed is True.

check_matching_adjacent_areas(tolerance=0.01, raise_exception=True, detailed=False)[source]

Check that all adjacent Faces have areas that match within the tolerance.

This is required for energy simulation in order to get matching heat flow across adjacent Faces. Otherwise, conservation of energy is violated. Note that, if there are missing adjacencies in the model, the message from this method will simply note this fact without reporting on mis-matched areas.

Parameters
  • tolerance – tolerance: The maximum difference between x, y, and z values at which face vertices are considered equivalent. (Default: 0.01, suitable for objects in meters).

  • raise_exception – Boolean to note whether a ValueError should be raised if invalid adjacencies are found. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns

A string with the message or a list with a dictionary if detailed is True.

check_missing_adjacencies(raise_exception=True, detailed=False)[source]

Check that all Faces Apertures, and Doors have adjacent objects in the model.

Parameters
  • raise_exception – Boolean to note whether a ValueError should be raised if invalid adjacencies are found. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns

A string with the message or a list with a dictionary if detailed is True.

check_non_zero(tolerance=0.0001, raise_exception=True, detailed=False)[source]

Check that the Model’s geometry components are above a “zero” area tolerance.

This includes all of the Model’s Faces, Apertures, Doors and Shades.

Parameters
  • tolerance – The minimum acceptable area of the object. Default is 0.0001, which is equal to 1 cm2 when model units are meters. This is just above the smallest size that OpenStudio will accept.

  • raise_exception – If True, a ValueError will be raised if the object area is below the tolerance. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns

A string with the message or a list with a dictionary if detailed is True.

check_planar(tolerance, raise_exception=True, detailed=False)[source]

Check that all of the Model’s geometry components are planar.

This includes all of the Model’s Faces, Apertures, Doors and Shades.

Parameters
  • tolerance – The minimum distance between a given vertex and a the object’s plane at which the vertex is said to lie in the plane.

  • raise_exception – Boolean to note whether an ValueError should be raised if a vertex does not lie within the object’s plane.

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns

A string with the message or a list with a dictionary if detailed is True.

check_rooms_all_air_boundary(raise_exception=True, detailed=False)[source]

Check that there are no Rooms composed entirely of AirBoundaries.

This is a requirement for energy simulation since EnergyPlus will throw a “no surfaces” error if it encounters a Room composed entirely of AirBoundaries.

Parameters
  • raise_exception – Boolean to note whether a ValueError should be raised if a Room composed entirely of AirBoundaries is found. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns

A string with the message or a list with a dictionary if detailed is True.

check_rooms_solid(tolerance=0.01, angle_tolerance=1, raise_exception=True, detailed=False)[source]

Check whether the Model’s rooms are closed solid to within tolerances.

Parameters
  • tolerance – tolerance: The maximum difference between x, y, and z values at which face vertices are considered equivalent. Default: 0.01, suitable for objects in meters.

  • angle_tolerance – The max angle difference in degrees that vertices are allowed to differ from one another in order to consider them colinear. Default: 1 degree.

  • raise_exception – Boolean to note whether a ValueError should be raised if the room geometry does not form a closed solid. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns

A string with the message or a list with a dictionary if detailed is True.

check_self_intersecting(tolerance=0.01, raise_exception=True, detailed=False)[source]

Check that no edges of the Model’s geometry components self-intersect.

This includes all of the Model’s Faces, Apertures, Doors and Shades.

Parameters
  • tolerance – The minimum difference between the coordinate values of two vertices at which they can be considered equivalent. Default: 0.01, suitable for objects in meters.

  • raise_exception – If True, a ValueError will be raised if an object intersects with itself (like a bowtie). (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns

A string with the message or a list with a dictionary if detailed is True.

check_sub_faces_overlapping(raise_exception=True, detailed=False)[source]

Check that model’s sub-faces do not overlap with one another.

Parameters
  • raise_exception – Boolean to note whether a ValueError should be raised if a sub-faces overlap with one another.

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns

A string with the message or a list with a dictionary if detailed is True.

check_sub_faces_valid(tolerance=0.01, angle_tolerance=1, raise_exception=True, detailed=False)[source]

Check that model’s sub-faces are co-planar with faces and in the face boundary.

Note this does not check the planarity of the sub-faces themselves, whether they self-intersect, or whether they have a non-zero area.

Parameters
  • tolerance – The minimum difference between the coordinate values of two vertices at which they can be considered equivalent. Default: 0.01, suitable for objects in meters.

  • angle_tolerance – The max angle in degrees that the plane normals can differ from one another in order for them to be considered coplanar. Default: 1 degree.

  • raise_exception – Boolean to note whether a ValueError should be raised if an sub-face is not valid. (Default: True).

  • detailed – Boolean for whether the returned object is a detailed list of dicts with error info or a string with a message. (Default: False).

Returns

A string with the message or a list with a dictionary if detailed is True.

static conversion_factor_to_meters(units)[source]

Get the conversion factor to meters based on input units.

Parameters

units

Text for the units. Choose from the following:

  • Meters

  • Millimeters

  • Feet

  • Inches

  • Centimeters

Returns

A number for the conversion factor, which should be multiplied by all distance units taken from Rhino geometry in order to convert them to meters.

convert_to_units(units='Meters')[source]

Convert all of the geometry in this model to certain units.

This involves scaling the geometry, scaling the Model tolerance, and changing the Model’s units property.

Parameters

units

Text for the units to which the Model geometry should be converted. Default: Meters. Choose from the following:

  • Meters

  • Millimeters

  • Feet

  • Inches

  • Centimeters

doors_by_identifier(identifiers)[source]

Get a list of Door objects in the model given the Door identifiers.

duplicate()

Get a copy of this object.

faces_by_identifier(identifiers)[source]

Get a list of Face objects in the model given the Face identifiers.

classmethod from_dict(data)[source]

Initialize a Model from a dictionary.

Parameters

data – A dictionary representation of a Model object.

classmethod from_file(hb_file)[source]

Initialize a Model from a HBJSON or HBpkl file, auto-sensing the type.

Parameters

hb_file – Path to either a HBJSON or HBpkl file.

classmethod from_hbjson(hbjson_file)[source]

Initialize a Model from a HBJSON file.

Parameters

hbjson_file – Path to HBJSON file.

classmethod from_hbpkl(hbpkl_file)[source]

Initialize a Model from a HBpkl file.

Parameters

hbpkl_file – Path to HBpkl file.

classmethod from_objects(identifier, objects, units='Meters', tolerance=None, angle_tolerance=1.0)[source]

Initialize a Model from a list of any type of honeybee-core geometry objects.

Parameters
  • identifier – Text string for a unique Model ID. Must be < 100 characters and not contain any spaces or special characters.

  • objects – A list of honeybee Rooms, Faces, Shades, Apertures and Doors.

  • units

    Text for the units system in which the model geometry exists. Default: ‘Meters’. Choose from the following:

    • Meters

    • Millimeters

    • Feet

    • Inches

    • Centimeters

  • tolerance – The maximum difference between x, y, and z values at which vertices are considered equivalent. Zero indicates that no tolerance checks should be performed. None indicates that the tolerance will be set based on the units above, with the tolerance consistently being between 1 cm and 1 mm (roughly the tolerance implicit in the OpenStudio SDK and EnergyPlus). (Default: None).

  • angle_tolerance – The max angle difference in degrees that vertices are allowed to differ from one another in order to consider them colinear. Zero indicates that no angle tolerance checks should be performed. (Default: 1.0).

classmethod from_stl(file_path, geometry_to_faces=False, units='Meters', tolerance=None, angle_tolerance=1.0)[source]

Create a Honeybee Model from an STL file.

Parameters
  • file_path – Path to an STL file as a text string. The STL file can be in either ASCII or binary format.

  • geometry_to_faces – A boolean to note whether the geometry in the STL file should be imported as Faces (with Walls/Floors/RoofCeiling set according to the normal). If False, all geometry will be imported as Shades instead of Faces. (Default: False).

  • units

    Text for the units system in which the model geometry exists. Default: ‘Meters’. Choose from the following:

    • Meters

    • Millimeters

    • Feet

    • Inches

    • Centimeters

  • tolerance – The maximum difference between x, y, and z values at which vertices are considered equivalent. Zero indicates that no tolerance checks should be performed. None indicates that the tolerance will be set based on the units above, with the tolerance consistently being between 1 cm and 1 mm (roughly the tolerance implicit in the OpenStudio SDK and EnergyPlus). (Default: None).

  • angle_tolerance – The max angle difference in degrees that vertices are allowed to differ from one another in order to consider them colinear. Zero indicates that no angle tolerance checks should be performed. (Default: 1.0).

move(moving_vec)[source]

Move this Model along a vector.

Parameters

moving_vec – A ladybug_geometry Vector3D with the direction and distance to move the Model.

reflect(plane)[source]

Reflect this Model across a plane with the input normal vector and origin.

Parameters

plane – A ladybug_geometry Plane across which the object will be reflected.

remove_all_apertures()[source]

Remove all Apertures from the model.

This includes assigned apertures as well as orphaned apertures.

remove_all_doors()[source]

Remove all Doors from the model.

This includes assigned doors as well as orphaned doors.

remove_all_shades()[source]

Remove all Shades from the model.

This includes assigned shades as well as orphaned shades.

remove_apertures()[source]

Remove all orphaned Apertures from the model.

remove_assigned_apertures()[source]

Remove all Apertures assigned to the model’s Faces.

This includes nested apertures like those assigned to Faces with parent Rooms.

remove_assigned_doors()[source]

Remove all Doors assigned to the model’s Faces.

This includes nested doors like those assigned to Faces with parent Rooms.

remove_assigned_shades()[source]

Remove all Shades assigned to the model’s Rooms, Faces, Apertures and Doors.

This includes nested shades like those assigned to Apertures with parent Faces that have parent Rooms.

remove_doors()[source]

Remove all orphaned Doors from the model.

remove_faces()[source]

Remove all orphaned Faces from the model.

remove_rooms()[source]

Remove all Rooms from the model.

remove_shades()[source]

Remove all orphaned Shades from the model, typically representing context.

rooms_by_identifier(identifiers)[source]

Get a list of Room objects in the model given the Room identifiers.

rotate(axis, angle, origin)[source]

Rotate this Model by a certain angle around an axis and origin.

Parameters
  • axis – A ladybug_geometry Vector3D axis representing the axis of rotation.

  • angle – An angle for rotation in degrees.

  • origin – A ladybug_geometry Point3D for the origin around which the object will be rotated.

rotate_xy(angle, origin)[source]

Rotate this Model counterclockwise in the world XY plane by a certain angle.

Parameters
  • angle – An angle in degrees.

  • origin – A ladybug_geometry Point3D for the origin around which the object will be rotated.

scale(factor, origin=None)[source]

Scale this Model by a factor from an origin point.

Note that using this method does NOT scale the model tolerance and, if it is desired that this tolerance be scaled with the model geometry, it must be scaled separately.

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

  • origin – A ladybug_geometry Point3D representing the origin from which to scale. If None, it will be scaled from the World origin (0, 0, 0).

shades_by_identifier(identifiers)[source]

Get a list of Shade objects in the model given the Shade identifiers.

skylight_apertures_by_ratio(ratio, tolerance=0.01)[source]

Add apertures to all exterior roofs given a ratio of aperture to face area.

Note this method only affects the Models rooms (no orphaned faces) and removes any existing apertures and overhead doors on the Room’s roofs. This method attempts to generate as few apertures as necessary to meet the ratio.

Parameters
  • ratio – A number between 0 and 1 (but not perfectly equal to 1) for the desired ratio between aperture area and face area.

  • tolerance – The maximum difference between point values for them to be considered a part of a rectangle. This is used in the event that this face is concave and an attempt to subdivide the face into a rectangle is made. It does not affect the ability to produce apertures for convex Faces. Default: 0.01, suitable for objects in meters.

to_dict(included_prop=None, triangulate_sub_faces=False, include_plane=True)[source]

Return Model as a dictionary.

Parameters
  • included_prop – List of properties to filter keys that must be included in output dictionary. For example [‘energy’] will include ‘energy’ key if available in properties to_dict. By default all the keys will be included. To exclude all the keys from extensions use an empty list.

  • triangulate_sub_faces – Boolean to note whether sub-faces (including Apertures and Doors) should be triangulated if they have more than 4 sides (True) or whether they should be left as they are (False). This triangulation is necessary when exporting directly to EnergyPlus since it cannot accept sub-faces with more than 4 vertices. Note that setting this to True will only triangulate sub-faces with parent Faces that also have parent Rooms since orphaned Apertures and Faces are not relevant for energy simulation. (Default: False).

  • include_plane – Boolean to note wether the planes of the Face3Ds should be included in the output. This can preserve the orientation of the X/Y axes of the planes but is not required and can be removed to keep the dictionary smaller. (Default: True).

to_hbjson(name=None, folder=None, indent=None, included_prop=None, triangulate_sub_faces=False)[source]

Write Honeybee model to HBJSON.

Parameters
  • name – A text string for the name of the HBJSON file. If None, the model identifier wil be used. (Default: None).

  • folder – A text string for the directory where the HBJSON will be written. If unspecified, the default simulation folder will be used. This is usually at “C:UsersUSERNAMEsimulation.”

  • indent – A positive integer to set the indentation used in the resulting HBJSON file. (Default: None).

  • included_prop – List of properties to filter keys that must be included in output dictionary. For example [‘energy’] will include ‘energy’ key if available in properties to_dict. By default all the keys will be included. To exclude all the keys from extensions use an empty list.

  • triangulate_sub_faces – Boolean to note whether sub-faces (including Apertures and Doors) should be triangulated if they have more than 4 sides (True) or whether they should be left as they are (False). This triangulation is necessary when exporting directly to EnergyPlus since it cannot accept sub-faces with more than 4 vertices. Note that setting this to True will only triangulate sub-faces with parent Faces that also have parent Rooms since orphaned Apertures and Faces are not relevant for energy simulation. (Default: False).

to_hbpkl(name=None, folder=None, included_prop=None, triangulate_sub_faces=False)[source]

Write Honeybee model to compressed pickle file (HBpkl).

Parameters
  • name – A text string for the name of the pickle file. If None, the model identifier wil be used. (Default: None).

  • folder – A text string for the directory where the pickle file will be written. If unspecified, the default simulation folder will be used. This is usually at “C:UsersUSERNAMEsimulation.”

  • included_prop – List of properties to filter keys that must be included in output dictionary. For example [‘energy’] will include ‘energy’ key if available in properties to_dict. By default all the keys will be included. To exclude all the keys from extensions use an empty list.

  • triangulate_sub_faces – Boolean to note whether sub-faces (including Apertures and Doors) should be triangulated if they have more than 4 sides (True) or whether they should be left as they are (False). This triangulation is necessary when exporting directly to EnergyPlus since it cannot accept sub-faces with more than 4 vertices. Note that setting this to True will only triangulate sub-faces with parent Faces that also have parent Rooms since orphaned Apertures and Faces are not relevant for energy simulation. (Default: False).

to_stl(name=None, folder=None)[source]

Write Honeybee model to an ASCII STL file.

Note that all geometry is triangulated when it is converted to STL.

Parameters
  • name – A text string for the name of the STL file. If None, the model identifier wil be used. (Default: None).

  • folder – A text string for the directory where the STL will be written. If unspecified, the default simulation folder will be used. This is usually at “C:UsersUSERNAMEsimulation.”

triangulated_apertures()[source]

Get triangulated versions of the model Apertures that have more than 4 sides.

This is necessary for energy simulation since EnergyPlus cannot accept sub-faces with more than 4 sides. Note that this method does not alter the Apertures within the Model object but just returns a list of modified Apertures that all have 3 or 4 sides.

Returns

A tuple with two elements

  • triangulated_apertures: A list of lists where each list is a set of triangle Apertures meant to replace an Aperture with more than 4 sides in the model.

  • parents_to_edit: An list of lists that parallels the triangulated apertures in that each item represents an Aperture that has been triangulated in the model. However, each of these lists holds between 1 and 3 values for the identifiers of the original aperture and parents of the aperture. This information is intended to help edit parent faces that have had their child faces triangulated. The 3 values are as follows:

    • 0 = The identifier of the original Aperture that was triangulated.

    • 1 = The identifier of the parent Face of the original Aperture (if it exists).

    • 2 = The identifier of the parent Room of the parent Face of the original Aperture (if it exists).

triangulated_doors()[source]

Get triangulated versions of the model Doors that have more than 4 sides.

This is necessary for energy simulation since EnergyPlus cannot accept sub-faces with more than 4 sides. Note that this method does not alter the Doors within the Model object but just returns a list of Doors that all have 3 or 4 sides.

Returns

A tuple with two elements

  • triangulated_doors: A list of lists where each list is a set of triangle Doors meant to replace a Door with more than 4 sides in the model.

  • parents_to_edit: An list of lists that parellels the triangulated_doors in that each item represents a Door that has been triangulated in the model. However, each of these lists holds between 1 and 3 values for the identifiers of the original door and parents of the door. This information is intended to help edit parent faces that have had their child faces triangulated. The 3 values are as follows:

    • 0 = The identifier of the original Door that was triangulated.

    • 1 = The identifier of the parent Face of the original Door (if it exists).

    • 2 = The identifier of the parent Room of the parent Face of the original Door (if it exists).

wall_apertures_by_ratio(ratio, tolerance=0.01)[source]

Add apertures to all exterior walls given a ratio of aperture to face area.

Note this method only affects the Models rooms (no orphaned faces) and it removes any existing apertures and doors on the room’s exterior walls. This method attempts to generate as few apertures as necessary to meet the ratio.

Parameters
  • ratio – A number between 0 and 1 (but not perfectly equal to 1) for the desired ratio between aperture area and face area.

  • tolerance – The maximum difference between point values for them to be considered a part of a rectangle. This is used in the event that this face is concave and an attempt to subdivide the face into a rectangle is made. It does not affect the ability to produce apertures for convex Faces. Default: 0.01, suitable for objects in meters.

UNITS = ('Meters', 'Millimeters', 'Feet', 'Inches', 'Centimeters')
UNITS_TOLERANCES = {'Centimeters': 1.0, 'Feet': 0.01, 'Inches': 0.1, 'Meters': 0.01, 'Millimeters': 1.0}
property angle_tolerance

Get or set a number for the max meaningful angle difference in degrees.

Face3D normal vectors differing by this amount are not considered parallel and Face3D segments that differ from 180 by this amount are not considered colinear. Zero indicates cases where no angle_tolerance checks should be performed.

property apertures

Get a list of all Aperture objects in the model.

property display_name

Get or set a string for the object name without any character restrictions.

If not set, this will be equal to the identifier.

property doors

Get a list of all Door objects in the model.

property exposed_area

Get the combined area of all room faces with outdoor boundary conditions.

Useful for estimating infiltration, often expressed as a flow per unit exposed envelope area. Note that this property accounts for the room multipliers.

property exterior_aperture_area

Get the combined area of all exterior apertures on the model’s rooms.

Note that this property accounts for the room multipliers.

property exterior_roof_area

Get the combined area of all exterior roofs on the model’s rooms.

This is NOT the area of the roof’s punched_geometry and it includes BOTH the area of opaque and transparent parts of the roofs. Note that this property accounts for the room multipliers.

property exterior_skylight_aperture_area

Get the combined area of all apertures on exterior roofs of the model’s rooms.

Note that this property accounts for the room multipliers.

property exterior_wall_aperture_area

Get the combined area of all apertures on exterior walls of the model’s rooms.

Note that this property accounts for the room multipliers.

property exterior_wall_area

Get the combined area of all exterior walls on the model’s rooms.

This is NOT the area of the wall’s punched_geometry and it includes BOTH the area of opaque and transparent parts of the walls. Note that this property accounts for the room multipliers.

property faces

Get a list of all Face objects in the model.

property floor_area

Get the combined area of all room floor faces in the Model.

Note that this property accounts for the room multipliers.

property full_id

Get a string with both the object display_name and identifier.

This is formatted as display_name[identifier].

This is useful in error messages to give users an easy means of finding invalid objects within models. If there is no display_name assigned, only the identifier will be returned.

property identifier

Get or set a text string for the unique object identifier.

This identifier remains constant as the object is mutated, copied, and serialized to different formats (eg. dict, idf, rad). As such, this property is used to reference the object across a Model.

property indoor_shades

Get a list of all indoor Shade objects in the model.

property max

Get a Point3D for the max bounding box vertex in the XY plane.

property min

Get a Point3D for the min bounding box vertex in the XY plane.

property orphaned_apertures

Get a list of all Aperture objects without parent Faces in the model.

property orphaned_doors

Get a list of all Door objects without parent Faces in the model.

property orphaned_faces

Get a list of all Face objects without parent Rooms in the model.

property orphaned_shades

Get a list of all Shade objects without parent Rooms in the model.

property outdoor_shades

Get a list of all outdoor Shade objects in the model.

This includes all of the orphaned_shades.

property properties

Get object properties, including Radiance, Energy and other properties.

property rooms

Get a list of all Room objects in the model.

property shades

Get a list of all Shade objects in the model.

property stories

Get a list of text for each unique story identifier in the Model.

Note that this will be an empty list if the model has to rooms.

property to

Model writer object.

Use this method to access Writer class to write the model in other formats.

Usage:

model.to.idf(model) -> idf string.
model.to.radiance(model) -> Radiance string.
property tolerance

Get or set a number for the max meaningful difference between x, y, z values.

This value should be in the Model’s units. Zero indicates cases where no tolerance checks should be performed.

property units

Get or set Text for the units system in which the model geometry exists.

property user_data

Get or set an optional dictionary for additional meta data for this object.

This will be None until it has been set. All keys and values of this dictionary should be of a standard Python type to ensure correct serialization of the object to/from JSON (eg. str, float, int, list, dict)

property volume

Get the combined volume of all rooms in the Model.

Note that this property accounts for the room multipliers. Also note that, if this model’s rooms are not closed solids, the value of this property will not be accurate.