honeybee_display.cli package

Module contents

honeybee-display commands.

honeybee_display.cli.model_to_vis_set(model_file, color_by='type', exclude_wireframe=False, faces=False, hide_color_by=False, room_attr=(), face_attr=(), text_attr=False, grid_display_mode='Default', show_grid=False, grid_data=None, grid_data_display_mode='Surface', active_grid_data=None, output_format='vsf', output_file=None, wireframe=True, mesh=True, show_color_by=True, color_attr=True, hide_grid=True)[source]

Translate a Honeybee Model file (.hbjson) to a VisualizationSet file (.vsf).

This function can also optionally translate the Honeybee Model to a .vtkjs file, which can be visualized in the open source Visual ToolKit (VTK) platform.

Parameters
  • model_file – Path to a Honeybee Model (HBJSON or HBpkl) file.

  • color_by – Text for the property that dictates the colors of the Model geometry. Choose from: type, boundary_condition, none. If none, only a wireframe of the Model will be generated (assuming the exclude_wireframe option is not used). None is useful when the primary purpose of the visualization is to display results in relation to the Model geometry or display some room_attr or face_attr as an AnalysisGeometry or Text labels.

  • exclude_wireframe – Boolean to note whether a ContextGeometry dedicated to the Model Wireframe (in DisplayLineSegment3D) should be included in the output visualization.

  • faces – Boolean to note whether the colored model geometries should be represented with DisplayMesh3D objects instead of DisplayFace3D objects. Meshes can usually be rendered faster and they scale well for large models but all geometry is triangulated (meaning that their wireframe in certain platforms might not appear ideal).

  • hide_color_by – Boolean to note whether the color-by geometry should be hidden or shown by default. Hiding the color-by geometry is useful when the primary purpose of the visualization is to display grid_data or room/face attributes but it is still desirable to have the option to turn on the geometry.

  • room_attr – An optional text string of an attribute that the Model Rooms have, which will be used to construct a visualization of this attribute in the resulting VisualizationSet. A list of text can also be passed and a separate VisualizationData will be added to the AnalysisGeometry that represents the attribute in the resulting VisualizationSet (or a separate ContextGeometry layer if text_attr is True). Room attributes input here can have . that separates the nested attributes from one another. For example, properties.energy.program_type.

  • face_attr – An optional text string of an attribute that the Model Faces have, which will be used to construct a visualization of this attribute in the resulting VisualizationSet. A list of text can also be passed and a separate VisualizationData will be added to the AnalysisGeometry that ‘ represents the attribute in the resulting VisualizationSet (or a separate ‘ ContextGeometry layer if text_attr is True). Face attributes input here can have . that separates the nested attributes from one another. For example, properties.energy.construction.

  • text_attr – Boolean to note whether to note whether the input room_attr and face_attr should be expressed as a colored AnalysisGeometry or a ContextGeometry as text labels.

  • grid_display_mode – Text that dictates how the ContextGeometry for Model SensorGrids should display in the resulting visualization. The Default option will draw sensor points whenever there is no grid_data_path and will not draw them at all when grid data is provided, assuming the AnalysisGeometry of the grids is sufficient. Choose from: Default, Points, Wireframe, Surface, SurfaceWithEdges, None.

  • show_grid – Boolean to note whether the SensorGrid ContextGeometry should be hidden or shown by default.

  • grid_data – An optional path to a folder containing data that aligns with the SensorGrids in the model. Any sub folder within this path that contains a grids_into.json (and associated CSV files) will be converted to an AnalysisGeometry in the resulting VisualizationSet. If a vis_metadata.json file is found within this sub-folder, the information contained within it will be used to customize the AnalysisGeometry. Note that it is acceptable if data and grids_info.json exist in the root of this grid_data_path. Also note that this argument has no impact if honeybee-radiance is not installed and SensorGrids cannot be decoded. (Default: None).

  • grid_data_display_mode

    Optional text to set the display_mode of the AnalysisGeometry that is is generated from the grid_data_path above. Note that this has no effect if there are no meshes associated with the model SensorGrids. (Default: Surface). Choose from the following:

    • Surface

    • SurfaceWithEdges

    • Wireframe

    • Points

  • active_grid_data – Optional text to specify the active data in the AnalysisGeometry. This should match the name of the sub-folder within the grid_data_path that should be active. If None, the first data set in the grid_data_path with be active. (Default: None).

  • output_format – Text for the output format of the resulting VisualizationSet File (.vsf). Choose from: vsf, json, pkl, vtkjs, html. Note that both vsf and json refer to the the JSON version of the VisualizationSet file and the distinction between the two is only for help in coordinating file extensions (since both .vsf and .json can be acceptable). Also note that ladybug-vtk must be installed in order for the vtkjs or html options to be usable and the html format refers to a web page with the vtkjs file embedded within it.

  • output_file – Optional file to output the string of the visualization file contents. If None, the string will simply be returned from this method.