honeybee_energy.writer module¶
Methods to write to idf.
- honeybee_energy.writer.aperture_to_idf(aperture)[source]¶
Generate an IDF string representation of an Aperture.
Note that the resulting string does not include full construction definitions but it will include a WindowShadingControl definition if a WindowConstructionShade is assigned to the aperture. It will also include a ventilation object if the aperture has a VentilationOpening object assigned to it.
Also note that shades assigned to the Aperture are not included in the resulting string. To write these objects into a final string, you must loop through the Aperture.shades, and call the to.idf method on each one.
If the input aperture is orphaned, the resulting string will possess both the Shading object as well as a ShadingProperty:Reflectance that aligns with the Aperture’s exterior construction properties. However, a transmittance schedule that matches the transmittance of the window construction will only be referenced and not included in the resulting string. All transmittance schedules follow the format of ‘Constant %.3f Transmittance’.
- Parameters:
aperture – A honeybee Aperture for which an IDF representation will be returned.
- honeybee_energy.writer.door_to_idf(door)[source]¶
Generate an IDF string representation of a Door.
Note that the resulting string does not include full construction definitions but it will include a WindowShadingControl definition if a WindowConstructionShade is assigned to the door. It will also include a ventilation object if the door has a VentilationOpening object assigned to it.
Also note that shades assigned to the Door are not included in the resulting string. To write these objects into a final string, you must loop through the Door.shades, and call the to.idf method on each one.
If the input door is orphaned, the resulting string will possess both the Shading object as well as a ShadingProperty:Reflectance that aligns with the Doors’s exterior construction properties. However, a transmittance schedule that matches the transmittance of the window construction will only be referenced and not included in the resulting string. All transmittance schedules follow the format of ‘Constant %.3f Transmittance’.
- Parameters:
door – A honeybee Door for which an IDF representation will be returned.
- honeybee_energy.writer.energyplus_idf_version(version_array=None)[source]¶
Get IDF text for the version of EnergyPlus.
This will match the version of EnergyPlus found in the config if it it exists. It will be None otherwise.
- Parameters:
version_array – An array of up to 3 integers for the version of EnergyPlus for which an IDF string should be generated. If None, the energyplus_version from the config will be used if it exists.
- honeybee_energy.writer.face_3d_to_gbxml_element(face_3d, tolerance=0.001, rect_geo_format='BoundingRectangle', explicit_holes=False, parent_element=None, rect_origin=None)[source]¶
Get gbXML PlanarGeometry and RectangularGeometry Elements from a Face3D.
- Parameters:
face_3d – A ladybug-geometry Face3D for which gbXML PlanarGeometry and RectangularGeometry Elements will be returned.
tolerance – The minimum difference in coordinate values below which vertices are considered to be identical. (Default: 0.001, suitable for objects in Meters or Feet).
rect_geo_format –
Text string to note how the rectangular geometry for all Surfaces is written into the gbXML. BoundingRectangle sets the width and height of the rectangular geometry using the bounding rectangle around the geometry, which results in an overestimated area for non-rectangular geo. SimpleArea will set the rectangle width always equal to geometry area and the height always equal to one, ensuring accurate areas and making it easy to check the geometry area in the gbXML. SimpleAreaForNonRectOnly will report the width and height of rectangular Face3D correctly but use simpler areas for non-rectangular geometry. (Default: BoundingRectangle). Choose from the following.
BoundingRectangle
SimpleArea
SimpleAreaForNonRectOnly
explicit_holes – Boolean to note whether holes in the Face3D should be represented explicitly with their own PolyLoop or the hole and boundary should be collapsed into a single PolyLoop that winds inwards to cut out the holes. (Default: False).
parent_element – An optional XML Element for the Surface or Opening XML Element to which the geometry will be added. If None, a new XML Element will be generated. (Default: None).
rect_origin – An optional Point3D to set the origin of the rectangular geometry. This is used for sub faces, which need to use the origin of the parent Face. If None, the Face3D’s lower left corner will be used. (Default: None).
- honeybee_energy.writer.face_to_gbxml(face, tolerance=0.001, rect_geo_format='BoundingRectangle', explicit_holes=False)[source]¶
Get a gbXML Surface string from a honeybee Face.
Note that the resulting Surface element includes all Apertures and Doors assigned to the Face as gbXML Openings.
- Parameters:
face – A honeybee Face for which an gbXML Surface string will be returned.
tolerance – The minimum difference in coordinate values below which vertices are considered to be identical. (Default: 0.001, suitable for objects in Meters or Feet).
rect_geo_format –
Text string to note how the rectangular geometry for all Surfaces is written into the gbXML. BoundingRectangle sets the width and height of the rectangular geometry using the bounding rectangle around the geometry, which results in an overestimated area for non-rectangular geo. SimpleArea will set the rectangle width always equal to geometry area and the height always equal to one, ensuring accurate areas and making it easy to check the geometry area in the gbXML. SimpleAreaForNonRectOnly will report the width and height of rectangular Face3D correctly but use simpler areas for non-rectangular geometry. (Default: BoundingRectangle). Choose from the following.
BoundingRectangle
SimpleArea
SimpleAreaForNonRectOnly
explicit_holes – Boolean to note whether holes in the Face3D should be represented explicitly with their own PolyLoop or the hole and boundary should be collapsed into a single PolyLoop that winds inwards to cut out the holes. (Default: False).
- honeybee_energy.writer.face_to_gbxml_element(face, tolerance=0.001, rect_geo_format='BoundingRectangle', explicit_holes=False, campus_element=None)[source]¶
Get a gbXML Surface Element from a honeybee Face.
Note that the resulting Surface element includes all Apertures and Doors assigned to the Face as gbXML Opening elements.
- Parameters:
face – A honeybee Face for which an gbXML Surface Element will be returned.
tolerance – The minimum difference in coordinate values below which vertices are considered to be identical. (Default: 0.001, suitable for objects in Meters or Feet).
rect_geo_format –
Text string to note how the rectangular geometry for all Surfaces is written into the gbXML. BoundingRectangle sets the width and height of the rectangular geometry using the bounding rectangle around the geometry, which results in an overestimated area for non-rectangular geo. SimpleArea will set the rectangle width always equal to geometry area and the height always equal to one, ensuring accurate areas and making it easy to check the geometry area in the gbXML. SimpleAreaForNonRectOnly will report the width and height of rectangular Face3D correctly but use simpler areas for non-rectangular geometry. (Default: BoundingRectangle). Choose from the following.
BoundingRectangle
SimpleArea
SimpleAreaForNonRectOnly
explicit_holes – Boolean to note whether holes in the Face3D should be represented explicitly with their own PolyLoop or the hole and boundary should be collapsed into a single PolyLoop that winds inwards to cut out the holes. (Default: False).
campus_element – An optional XML Element for the Campus to which the surface element will be added. If None, a new XML Element will be generated. (Default: None).
- honeybee_energy.writer.face_to_idf(face)[source]¶
Generate an IDF string representation of a Face.
Note that the resulting string does not include full construction definitions.
Also note that this does not include any of the shades assigned to the Face in the resulting string. Nor does it include the strings for the apertures or doors. To write these objects into a final string, you must loop through the Face.shades, Face.apertures, and Face.doors and call the to.idf method on each one.
If the input face is orphaned, the resulting string will possess both the Shading object as well as a ShadingProperty:Reflectance that aligns with the Face’s exterior construction properties. Furthermore, any child apertures of doors in the face will also be included as shading geometries.
- Parameters:
face – A honeybee Face for which an IDF representation will be returned.
- honeybee_energy.writer.generate_idf_string(object_type, values, comments=None)[source]¶
Get an IDF string representation of an EnergyPlus object.
- Parameters:
object_type – Text representing the expected start of the IDF object. (ie. WindowMaterial:Glazing).
values – A list of values associated with the EnergyPlus object in the order that they are supposed to be written to IDF format.
comments – A list of text comments with the same length as the values. If None, no comments will be written into the object.
- Returns:
ep_str – Am EnergyPlus IDF string representing a single object.
- honeybee_energy.writer.model_to_gbxml(model, ip_units=False, include_shell_geometry=False, include_space_boundaries=False, interior_face_type='InteriorFloor', ground_face_type='AutoAssign', face_rename_format=None, subface_rename_format=None, reset_geometry_ids=False, reset_resource_ids=False, triangulate_subfaces=False, triangulate_non_planar=True, rect_geo_format='BoundingRectangle', explicit_holes=False, total_ventilation=True, program_name=None, program_version=None, gbxml_schema_version=None)[source]¶
Get a gbXML string for a Model.
- Parameters:
model – A honeybee Model for which a gbXML text string will be returned.
ip_units – A boolean to note whether the geometry, space loads, and construction properties are reported in IP units (True) or SI units (False). (Default: False).
include_shell_geometry – Boolean for whether shell geometry should be included vs. just the minimal required non-manifold geometry. (Default: False).
include_space_boundaries – Boolean for whether space boundaries should be included vs. just the minimal required non-manifold geometry. (Default: False).
interior_face_type –
Text string for the type to be used for all interior floor/ceiling faces. (Default: InteriorFloor). Choose from the following.
InteriorFloor
Ceiling
ground_face_type –
Text string for the type to be used for all ground-contact floor faces. If AutoAssign, the ground types will be SlabOnGrade for floors belonging to rooms with any above-ground walls and UndergroundSlab for floors in rooms with all underground walls. Choose from the following.
AutoAssign
UndergroundSlab
SlabOnGrade
RaisedFloor
face_rename_format – An optional text string for the pattern with which faces will be renamed. Any property on the honeybee Face class may be used (eg. gbxml_str) and each property should be put in curly brackets. Nested properties can be specified by using “.” to denote nesting levels (eg. properties.energy.construction.display_name). Functions that return string outputs can also be passed here as long as these functions defaults specified for all arguments.
subface_rename_format – An optional text string for the pattern with which apertures and doors will be renamed. Any property that exists on both the honeybee Aperture and honeybee Door class may be used (eg. gbxml_str) and each property should be put in curly brackets. Nested properties can be specified by using “.” to denote nesting levels (eg. properties.energy.construction.display_name). Functions that return string outputs can also be passed here as long as these functions defaults specified for all arguments.
reset_geometry_ids – Boolean to note whether a cleaned version of geometry display names should be used for the IDs that appear within the gbXML file. Using this flag will affect all Rooms, Faces, Apertures, Doors, and Shades. It will generally result in more read-able IDs in the gbXML file but this means that it will not be easy to map results back to the input Model. Cases of duplicate IDs resulting from non-unique names will be resolved by adding integers to the ends of the new IDs that are derived from the name. (Default: False).
reset_resource_ids – Boolean to note whether a cleaned version of all resource display names should be used for the IDs that appear within the gbXML file. Using this flag will affect all Materials, Constructions, ConstructionSets, Schedules, Loads, and ProgramTypes. It will generally result in more read-able names for the resources in the gbXML file. Cases of duplicate IDs resulting from non-unique names will be resolved by adding integers to the ends of the new IDs that are derived from the name. (Default: False).
triangulate_non_planar – Boolean to note whether any non-planar orphaned geometry in the model should be triangulated. This can be helpful because OpenStudio simply raises an error when it encounters non-planar geometry, which would hinder the ability to save files that are to be corrected later. (Default: False).
triangulate_subfaces – 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. (Default: False).
rect_geo_format –
Text string to note how the rectangular geometry for all Surfaces is written into the gbXML. BoundingRectangle sets the width and height of the rectangular geometry using the bounding rectangle around the geometry, which results in an overestimated area for non-rectangular geo. SimpleArea will set the rectangle width always equal to geometry area and the height always equal to one, ensuring accurate areas and making it easy to check the geometry area in the gbXML. SimpleAreaForNonRectOnly will report the width and height of rectangular Face3D correctly but use simpler areas for non-rectangular geometry. (Default: BoundingRectangle). Choose from the following.
BoundingRectangle
SimpleArea
SimpleAreaForNonRectOnly
explicit_holes – Boolean to note whether holes in Surfaces should be represented explicitly with their own PolyLoop or the hole and boundary should be collapsed into a single PolyLoop that winds inwards to cut out the holes. (Default: False).
total_ventilation – Boolean to note whether outdoor air ventilation values in the gbXML are written as a single total OAFlowPerZone (True) or ventilation criteria are written as separate criteria (False). That is, separate specifications for OAFlowPerPerson, OAFlowPerArea, etc. Note that the total ventilation accounts for the ventilation effectiveness while the individual flows do not. (Default: True).
program_name – Optional text to set the name of the software that will appear under the programId and ProductName tags of the DocumentHistory section. This can be set things like “Ladybug Tools” or “Pollination” or some other software in which this gbXML export capability is being run. If None, the “OpenStudio” will be used. (Default: None).
program_version – Optional text to set the version of the software that will appear under the DocumentHistory section. If None, and the program_name is also unspecified, only the version of OpenStudio will appear. Otherwise, this will default to “0.0.0” given that the version field is required. (Default: None).
gbxml_schema_version – Optional text to set the version of the gbXML schema that is specified in the XML header (eg. “5.00”). If None, this will default to the latest version.
- honeybee_energy.writer.model_to_gbxml_element(model, ip_units=False, include_shell_geometry=False, include_space_boundaries=False, interior_face_type='InteriorFloor', ground_face_type='AutoAssign', face_rename_format=None, subface_rename_format=None, reset_geometry_ids=False, reset_resource_ids=False, triangulate_subfaces=False, triangulate_non_planar=True, rect_geo_format='BoundingRectangle', explicit_holes=False, total_ventilation=True, program_name=None, program_version=None, gbxml_schema_version=None)[source]¶
Get a gbXML ElementTree that represents ann entire model.
- Parameters:
model – A honeybee Model for which a gbXML ElementTree will be returned.
ip_units – A boolean to note whether the geometry, space loads, and construction properties are reported in IP units (True) or SI units (False). (Default: False).
include_shell_geometry – Boolean for whether shell geometry should be included vs. just the minimal required non-manifold geometry. (Default: False).
include_space_boundaries – Boolean for whether space boundaries should be included vs. just the minimal required non-manifold geometry. (Default: False).
interior_face_type –
Text string for the type to be used for all interior floor/ceiling faces. (Default: InteriorFloor). Choose from the following.
InteriorFloor
Ceiling
ground_face_type –
Text string for the type to be used for all ground-contact floor faces. If AutoAssign, the ground types will be SlabOnGrade for floors belonging to rooms with any above-ground walls and UndergroundSlab for floors in rooms with all underground walls. Choose from the following.
AutoAssign
UndergroundSlab
SlabOnGrade
RaisedFloor
face_rename_format – An optional text string for the pattern with which faces will be renamed. Any property on the honeybee Face class may be used (eg. gbxml_str) and each property should be put in curly brackets. Nested properties can be specified by using “.” to denote nesting levels (eg. properties.energy.construction.display_name). Functions that return string outputs can also be passed here as long as these functions defaults specified for all arguments.
subface_rename_format – An optional text string for the pattern with which apertures and doors will be renamed. Any property that exists on both the honeybee Aperture and honeybee Door class may be used (eg. gbxml_str) and each property should be put in curly brackets. Nested properties can be specified by using “.” to denote nesting levels (eg. properties.energy.construction.display_name). Functions that return string outputs can also be passed here as long as these functions defaults specified for all arguments.
reset_geometry_ids – Boolean to note whether a cleaned version of geometry display names should be used for the IDs that appear within the gbXML file. Using this flag will affect all Rooms, Faces, Apertures, Doors, and Shades. It will generally result in more read-able IDs in the gbXML file but this means that it will not be easy to map results back to the input Model. Cases of duplicate IDs resulting from non-unique names will be resolved by adding integers to the ends of the new IDs that are derived from the name. (Default: False).
reset_resource_ids – Boolean to note whether a cleaned version of all resource display names should be used for the IDs that appear within the gbXML file. Using this flag will affect all Materials, Constructions, ConstructionSets, Schedules, Loads, and ProgramTypes. It will generally result in more read-able names for the resources in the gbXML file. Cases of duplicate IDs resulting from non-unique names will be resolved by adding integers to the ends of the new IDs that are derived from the name. (Default: False).
triangulate_non_planar – Boolean to note whether any non-planar orphaned geometry in the model should be triangulated. This can be helpful because OpenStudio simply raises an error when it encounters non-planar geometry, which would hinder the ability to save files that are to be corrected later. (Default: False).
triangulate_subfaces – 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. (Default: False).
rect_geo_format –
Text string to note how the rectangular geometry for all Surfaces is written into the gbXML. BoundingRectangle sets the width and height of the rectangular geometry using the bounding rectangle around the geometry, which results in an overestimated area for non-rectangular geo. SimpleArea will set the rectangle width always equal to geometry area and the height always equal to one, ensuring accurate areas and making it easy to check the geometry area in the gbXML. SimpleAreaForNonRectOnly will report the width and height of rectangular Face3D correctly but use simpler areas for non-rectangular geometry. (Default: BoundingRectangle). Choose from the following.
BoundingRectangle
SimpleArea
SimpleAreaForNonRectOnly
explicit_holes – Boolean to note whether holes in Surfaces should be represented explicitly with their own PolyLoop or the hole and boundary should be collapsed into a single PolyLoop that winds inwards to cut out the holes. (Default: False).
total_ventilation – Boolean to note whether outdoor air ventilation values in the gbXML are written as a single total OAFlowPerZone (True) or ventilation criteria are written as separate criteria (False). That is, separate specifications for OAFlowPerPerson, OAFlowPerArea, etc. Note that the total ventilation accounts for the ventilation effectiveness while the individual flows do not. (Default: True).
program_name – Optional text to set the name of the software that will appear under the programId and ProductName tags of the DocumentHistory section. This can be set things like “Ladybug Tools” or “Pollination” or some other software in which this gbXML export capability is being run. If None, the “OpenStudio” will be used. (Default: None).
program_version – Optional text to set the version of the software that will appear under the DocumentHistory section. If None, and the program_name is also unspecified, only the version of OpenStudio will appear. Otherwise, this will default to “0.0.0” given that the version field is required. (Default: None).
gbxml_schema_version – Optional text to set the version of the gbXML schema that is specified in the XML header (eg. “5.00”). If None, this will default to the latest version.
- honeybee_energy.writer.model_to_idf(model, schedule_directory=None, use_ideal_air_equivalent=True, patch_missing_adjacencies=False, timestep=6)[source]¶
Generate an IDF string representation of a Model.
The resulting string will include all geometry (Rooms, Faces, Shades, Apertures, Doors), all fully-detailed constructions + materials, all fully-detailed schedules, and the room properties (loads, thermostats with setpoints, and HVAC).
Essentially, the string includes everything needed to simulate the model except the simulation parameters. So joining this string with the output of SimulationParameter.to_idf() should create a simulate-able IDF.
- Parameters:
model – A honeybee Model for which an IDF representation will be returned.
schedule_directory – An optional file directory to which all file-based schedules should be written to. If None, all ScheduleFixedIntervals will be translated to Schedule:Compact and written fully into the IDF string instead of to Schedule:File. (Default: None).
use_ideal_air_equivalent – Boolean to note whether any detailed HVAC system templates should be converted to an equivalent IdealAirSystem upon export. If False and the Model contains detailed systems, a ValueError will be raised since this method does not support the translation of detailed systems. (Default:True).
patch_missing_adjacencies – Boolean to note whether any missing adjacencies in the model should be replaced with Adiabatic boundary conditions. This is useful when the input model is only a portion of a much larger model. (Default: False).
timestep – An integer for the simulation timestep, which will be used to balance air boundary flows to ensure that there is never more air than the room volume mixed at a given simulation timestep. If None, no balancing of air boundary flows wil occur. (Default: 6).
Usage:
import os from ladybug.futil import write_to_file from honeybee.model import Model from honeybee.room import Room from honeybee.config import folders from honeybee_energy.lib.programtypes import office_program from honeybee_energy.hvac.idealair import IdealAirSystem from honeybee_energy.simulation.parameter import SimulationParameter # Get input Model room = Room.from_box('Tiny House Zone', 5, 10, 3) room.properties.energy.program_type = office_program room.properties.energy.add_default_ideal_air() model = Model('Tiny House', [room]) # Get the input SimulationParameter sim_par = SimulationParameter() sim_par.output.add_zone_energy_use() ddy_file = 'C:/EnergyPlusV9-0-1/WeatherData/USA_CO_Golden-NREL.724666_TMY3.ddy' sim_par.sizing_parameter.add_from_ddy_996_004(ddy_file) # create the IDF string for simulation parameters and model idf_str = '\n\n'.join((sim_par.to_idf(), model.to.idf(model))) # write the final string into an IDF idf = os.path.join(folders.default_simulation_folder, 'test_file', 'in.idf') write_to_file(idf, idf_str, True)
- honeybee_energy.writer.room_to_gbxml(room, ip_units=False, include_shell_geometry=False, include_space_boundaries=False, tolerance=0.001, explicit_holes=False)[source]¶
Get a gbXML Space string from a honeybee Room.
Note that the Space elements of gbXML do not contain any geometry given that all geometry is specified with Surface elements.
- Parameters:
room – A honeybee Room for which an gbXML Space string will be returned.
ip_units – A boolean to note whether the space loads should be reported in IP units (True) or SI units (False). (Default: False).
include_shell_geometry – Boolean for whether shell geometry should be included in the Space definition. (Default: False).
include_space_boundaries – Boolean for whether space boundaries should be included in the Space definition. (Default: False).
tolerance – The minimum difference in coordinate values below which vertices are considered to be identical. (Default: 0.001, suitable for objects in Meters or Feet).
explicit_holes – Boolean to note whether holes in Face3Ds should be represented explicitly with their own PolyLoop or the hole and boundary should be collapsed into a single PolyLoop that winds inwards to cut out the holes. (Default: False).
- honeybee_energy.writer.room_to_gbxml_element(room, ip_units=False, include_shell_geometry=False, include_space_boundaries=False, tolerance=0.001, explicit_holes=False, building_element=None)[source]¶
Get a gbXML Space Element from a honeybee Room.
Note that the Space elements of gbXML do not contain any geometry given that all geometry is specified with Surface elements.
- Parameters:
room – A honeybee Room for which an gbXML Space Element will be returned.
ip_units – A boolean to note whether the space loads should be reported in IP units (True) or SI units (False). (Default: False).
include_shell_geometry – Boolean for whether shell geometry should be included in the Space definition. (Default: False).
include_space_boundaries – Boolean for whether space boundaries should be included in the Space definition. (Default: False).
tolerance – The minimum difference in coordinate values below which vertices are considered to be identical. (Default: 0.001, suitable for objects in Meters or Feet).
explicit_holes – Boolean to note whether holes in Face3Ds should be represented explicitly with their own PolyLoop or the hole and boundary should be collapsed into a single PolyLoop that winds inwards to cut out the holes. (Default: False).
building_element – An optional XML Element for the Building to which the space element will be added. If None, a new XML Element will be generated. (Default: None).
- honeybee_energy.writer.room_to_idf(room)[source]¶
Generate an IDF string representation of a Room.
The resulting string will include all internal gain definitions for the Room (people, lights, equipment, process) and the infiltration definition. It will also include internal masses, ventilation fans, and daylight controls. However, complete schedule definitions assigned to these load objects are excluded.
If the room’s zone name is the same as the room identifier, the resulting IDF string will be for an EnergyPlus Zone and it will include ventilation requirements and thermostat objects. Otherwise, the IDF string will be for a Space with ventilation and thermostats excluded (with the assumption that these objects are to be written separately with the parent Zone).
The Room’s HVAC is always excluded in the string returned from this method regardless of whether the room represents an entire zone or an individual space within a larger zone.
Also note that this method does not write any of the geometry of the Room into the resulting string. To represent the Room geometry, you must loop through the Room.shades and Room.faces and call the to.idf method on each one. Note that you will likely also need to call to.idf on the apertures, doors and shades of each face as well as the shades on each aperture.
- Parameters:
room – A honeybee Room for which an IDF representation will be returned.
- honeybee_energy.writer.shade_mesh_to_gbxml(shade_mesh, tolerance=0.001, rect_geo_format='BoundingRectangle', explicit_holes=False)[source]¶
Get a gbXML string from a honeybee ShadeMesh.
- Parameters:
shade_mesh – A honeybee ShadeMesh for which a gbXML Surface string will be returned.
tolerance – The minimum difference in coordinate values below which vertices are considered to be identical. (Default: 0.001, suitable for objects in Meters or Feet).
rect_geo_format –
Text string to note how the rectangular geometry for all Surfaces is written into the gbXML. BoundingRectangle sets the width and height of the rectangular geometry using the bounding rectangle around the geometry, which results in an overestimated area for non-rectangular geo. SimpleArea will set the rectangle width always equal to geometry area and the height always equal to one, ensuring accurate areas and making it easy to check the geometry area in the gbXML. SimpleAreaForNonRectOnly will report the width and height of rectangular Face3D correctly but use simpler areas for non-rectangular geometry. (Default: BoundingRectangle). Choose from the following.
BoundingRectangle
SimpleArea
SimpleAreaForNonRectOnly
explicit_holes – Boolean to note whether holes in the Face3D should be represented explicitly with their own PolyLoop or the hole and boundary should be collapsed into a single PolyLoop that winds inwards to cut out the holes. (Default: False).
- honeybee_energy.writer.shade_mesh_to_gbxml_element(shade_mesh, tolerance=0.001, rect_geo_format='BoundingRectangle', explicit_holes=False, campus_element=None)[source]¶
Get a list of gbXML Elements from a honeybee ShadeMesh.
- Parameters:
shade_mesh – A honeybee ShadeMesh for which a list of gbXML Surface Elements will be returned.
tolerance – The minimum difference in coordinate values below which vertices are considered to be identical. (Default: 0.001, suitable for objects in Meters or Feet).
rect_geo_format –
Text string to note how the rectangular geometry for all Surfaces is written into the gbXML. BoundingRectangle sets the width and height of the rectangular geometry using the bounding rectangle around the geometry, which results in an overestimated area for non-rectangular geo. SimpleArea will set the rectangle width always equal to geometry area and the height always equal to one, ensuring accurate areas and making it easy to check the geometry area in the gbXML. SimpleAreaForNonRectOnly will report the width and height of rectangular Face3D correctly but use simpler areas for non-rectangular geometry. (Default: BoundingRectangle). Choose from the following.
BoundingRectangle
SimpleArea
SimpleAreaForNonRectOnly
explicit_holes – Boolean to note whether holes in the Face3D should be represented explicitly with their own PolyLoop or the hole and boundary should be collapsed into a single PolyLoop that winds inwards to cut out the holes. (Default: False).
campus_element – An optional XML Element for the Campus to which all of the surface elements will be added. If None, a new XML Element will be generated. (Default: None).
- honeybee_energy.writer.shade_mesh_to_idf(shade_mesh)[source]¶
Generate an IDF string representation of a ShadeMesh.
Note that the resulting string will possess both the Shading object as well as a ShadingProperty:Reflectance if the Shade’s construction is not in line with the EnergyPlus default of 0.2 reflectance.
- Parameters:
shade_mesh – A honeybee ShadeMesh for which an IDF representation will be returned.
- honeybee_energy.writer.shade_to_gbxml(shade, tolerance=0.001, rect_geo_format='BoundingRectangle', explicit_holes=False)[source]¶
Get a gbXML Surface string from a honeybee Shade.
- Parameters:
shade – A honeybee Shade for which an gbXML Surface string will be returned.
tolerance – The minimum difference in coordinate values below which vertices are considered to be identical. (Default: 0.001, suitable for objects in Meters or Feet).
rect_geo_format –
Text string to note how the rectangular geometry for all Surfaces is written into the gbXML. BoundingRectangle sets the width and height of the rectangular geometry using the bounding rectangle around the geometry, which results in an overestimated area for non-rectangular geo. SimpleArea will set the rectangle width always equal to geometry area and the height always equal to one, ensuring accurate areas and making it easy to check the geometry area in the gbXML. SimpleAreaForNonRectOnly will report the width and height of rectangular Face3D correctly but use simpler areas for non-rectangular geometry. (Default: BoundingRectangle). Choose from the following.
BoundingRectangle
SimpleArea
SimpleAreaForNonRectOnly
explicit_holes – Boolean to note whether holes in the Face3D should be represented explicitly with their own PolyLoop or the hole and boundary should be collapsed into a single PolyLoop that winds inwards to cut out the holes. (Default: False).
- honeybee_energy.writer.shade_to_gbxml_element(shade, tolerance=0.001, rect_geo_format='BoundingRectangle', explicit_holes=False, campus_element=None)[source]¶
Get a gbXML Surface Element from a honeybee Shade.
- Parameters:
shade – A honeybee Shade for which an gbXML Surface Element will be returned.
tolerance – The minimum difference in coordinate values below which vertices are considered to be identical. (Default: 0.001, suitable for objects in Meters or Feet).
rect_geo_format –
Text string to note how the rectangular geometry for all Surfaces is written into the gbXML. BoundingRectangle sets the width and height of the rectangular geometry using the bounding rectangle around the geometry, which results in an overestimated area for non-rectangular geo. SimpleArea will set the rectangle width always equal to geometry area and the height always equal to one, ensuring accurate areas and making it easy to check the geometry area in the gbXML. SimpleAreaForNonRectOnly will report the width and height of rectangular Face3D correctly but use simpler areas for non-rectangular geometry. (Default: BoundingRectangle). Choose from the following.
BoundingRectangle
SimpleArea
SimpleAreaForNonRectOnly
explicit_holes – Boolean to note whether holes in the Face3D should be represented explicitly with their own PolyLoop or the hole and boundary should be collapsed into a single PolyLoop that winds inwards to cut out the holes. (Default: False).
campus_element – An optional XML Element for the Campus to which the surface element will be added. If None, a new XML Element will be generated. (Default: None).
- honeybee_energy.writer.shade_to_idf(shade)[source]¶
Generate an IDF string representation of a Shade.
Note that the resulting string will possess both the Shading object as well as a ShadingProperty:Reflectance if the Shade’s construction is not in line with the EnergyPlus default of 0.2 reflectance.
- Parameters:
shade – A honeybee Shade for which an IDF representation will be returned.
- honeybee_energy.writer.sub_face_to_gbxml(sub_face, tolerance=0.001, rect_geo_format='BoundingRectangle', explicit_holes=False)[source]¶
Get a gbXML Opening string from a honeybee Aperture or Door.
- Parameters:
sub_face – A honeybee Aperture or Door for which a gbXML Opening string object will be returned.
tolerance – The minimum difference in coordinate values below which vertices are considered to be identical. (Default: 0.001, suitable for objects in Meters or Feet).
rect_geo_format –
Text string to note how the rectangular geometry for all Surfaces is written into the gbXML. BoundingRectangle sets the width and height of the rectangular geometry using the bounding rectangle around the geometry, which results in an overestimated area for non-rectangular geo. SimpleArea will set the rectangle width always equal to geometry area and the height always equal to one, ensuring accurate areas and making it easy to check the geometry area in the gbXML. SimpleAreaForNonRectOnly will report the width and height of rectangular Face3D correctly but use simpler areas for non-rectangular geometry. (Default: BoundingRectangle). Choose from the following.
BoundingRectangle
SimpleArea
SimpleAreaForNonRectOnly
explicit_holes – Boolean to note whether holes in the Face3D should be represented explicitly with their own PolyLoop or the hole and boundary should be collapsed into a single PolyLoop that winds inwards to cut out the holes. (Default: False).
- honeybee_energy.writer.sub_face_to_gbxml_element(sub_face, tolerance=0.001, rect_geo_format='BoundingRectangle', explicit_holes=False, surface_element=None, rect_origin=None)[source]¶
Get a gbXML Opening Element from a honeybee Aperture or Door.
- Parameters:
sub_face – A honeybee Aperture or Door for which a gbXML Opening Element object will be returned.
tolerance – The minimum difference in coordinate values below which vertices are considered to be identical. (Default: 0.001, suitable for objects in Meters or Feet).
rect_geo_format –
Text string to note how the rectangular geometry for all Surfaces is written into the gbXML. BoundingRectangle sets the width and height of the rectangular geometry using the bounding rectangle around the geometry, which results in an overestimated area for non-rectangular geo. SimpleArea will set the rectangle width always equal to geometry area and the height always equal to one, ensuring accurate areas and making it easy to check the geometry area in the gbXML. SimpleAreaForNonRectOnly will report the width and height of rectangular Face3D correctly but use simpler areas for non-rectangular geometry. (Default: BoundingRectangle). Choose from the following.
BoundingRectangle
SimpleArea
SimpleAreaForNonRectOnly
explicit_holes – Boolean to note whether holes in the Face3D should be represented explicitly with their own PolyLoop or the hole and boundary should be collapsed into a single PolyLoop that winds inwards to cut out the holes. (Default: False).
surface_element – An optional XML Element for the Surface to which the opening element will be added. If None, a new XML Element will be generated. (Default: None).
rect_origin – An optional Point3D to set the origin of the rectangular geometry. This is used for sub faces, which need to use the origin of the parent Face. If None, the Face3D’s lower left corner will be used. (Default: None).