dragonfly.cli.translate module

dragonfly translation commands.

dragonfly.cli.translate.merge_models_to_honeybee(base_model, dragonfly_model=(), honeybee_model=(), full_geometry=False, plenum=False, solve_adjacency=False, bypass_adj_check=False, permit_non_solid=False, output_file=None, multiplier=True, no_plenum=True, default_adjacency=True, enforce_adj_check=True, enforce_solid=True)[source]

Merge multiple Dragonfly and/or Honeybee Models into a single Honeybee Model.

Parameters:
  • base_model – Full path to a Dragonfly Model JSON or Pkl file that serves as the base into which the other model(s) will be merged.

  • dragonfly_model – List of other Dragonfly Models to be merged into the base model.

  • honeybee_model – List of other Honeybee Models to be merged into the base model.

  • full_geometry – Boolean to note if the multipliers on each Story should be passed along to the generated Honeybee Room objects or if full geometry objects should be written for each story in the building. (Default: False).

  • plenum – Boolean to indicate whether ceiling/floor plenums should be auto-generated for the Rooms. (Default: False).

  • solve_adjacency – Boolean to indicate whether all boundary conditions of the original models should be left as they are or whether adjacencies should be solved across the final model when everything is merged together. In this case, solving adjacencies will involve merging all coplanar faces across the Dragonfly/Honeybee Models, intersecting coplanar Faces to get matching areas, and setting Surface boundary conditions for all matching coplanar faces. (Default: False).

  • bypass_adj_check – Boolean to note whether an exception should be raised if an adjacency between two Room2Ds is invalid or if the check should be bypassed and the invalid Surface boundary condition should be replaced with an Outdoor boundary condition. If bypass is selected, any Walls containing WindowParameters and an illegal boundary condition will also be replaced with an Outdoor boundary condition. (Default: False).

  • permit_non_solid – Boolean to note whether rooms should be translated as solid extrusions whenever translating them with custom roof geometry produces a non-solid result or the non-solid room geometry should be allowed to remain in the result. The latter is useful for understanding why a particular roof geometry has produced a non-solid result. (Default: False).

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

dragonfly.cli.translate.model_to_honeybee(model_file, obj_per_model='Building', full_geometry=False, plenum=False, cap=False, ceil_adjacency=False, shade_dist=None, bypass_adj_check=False, permit_non_solid=False, folder=None, log_file=None, multiplier=True, no_plenum=True, no_cap=True, no_ceil_adjacency=True, enforce_adj_check=True, enforce_solid=True)[source]

Translate a Dragonfly Model file into one or more Honeybee Models.

Parameters:
  • model_file – Full path to a Dragonfly Model JSON or Pkl file.

  • full_geometry – Boolean to note if the multipliers on each Story should be passed along to the generated Honeybee Room objects or if full geometry objects should be written for each story in the building. (Default: False).

  • plenum – Boolean to indicate whether ceiling/floor plenums should be auto-generated for the Rooms. (Default: False).

  • cap – Boolean to indicate whether context shade buildings should be capped with a top face. (Default: False).

  • ceil_adjacency – Boolean to indicate whether adjacencies should be solved between interior stories when Room2D floor and ceiling geometries are coplanar. This ensures that Surface boundary conditions are used instead of Adiabatic ones. (Default: False).

  • shade_dist – An optional number to note the distance beyond which other buildings shade should not be exported into a Model. This can include the units of the distance (eg. 100ft) or, if no units are provided, the value will be interpreted in the dragonfly model units. If None, all other buildings will be included as context shade in each and every Model. Set to 0 to exclude all neighboring buildings from the resulting models. (Default: None).

  • bypass_adj_check – Boolean to note whether an exception should be raised if an adjacency between two Room2Ds is invalid or if the check should be bypassed and the invalid Surface boundary condition should be replaced with an Outdoor boundary condition. If bypass is selected, any Walls containing WindowParameters and an illegal boundary condition will also be replaced with an Outdoor boundary condition. (Default: False).

  • permit_non_solid – Boolean to note whether rooms should be translated as solid extrusions whenever translating them with custom roof geometry produces a non-solid result or the non-solid room geometry should be allowed to remain in the result. The latter is useful for understanding why a particular roof geometry has produced a non-solid result. (Default: False).

  • folder – Folder on this computer, into which the HBJSON files will be written. If None, the files will be output to the honeybee default simulation folder and placed in a project folder with the same name as the model json. (Default: None).

  • log_file – Optional log file to output a JSON array of dictionaries with information about each of the generated HBJSONs, including their file paths. If None, the string will be returned from this method.

dragonfly.cli.translate.model_to_honeybee_file(model_file, full_geometry=False, plenum=False, ceil_adjacency=False, bypass_adj_check=False, permit_non_solid=False, output_file=None, multiplier=True, no_plenum=True, no_ceil_adjacency=True, enforce_adj_check=True, enforce_solid=True)[source]

Translate a Dragonfly Model into a single Honeybee Model.

Parameters:
  • model_file – Full path to a Dragonfly Model JSON or Pkl file.

  • full_geometry – Boolean to note if the multipliers on each Story should be passed along to the generated Honeybee Room objects or if full geometry objects should be written for each story in the building. (Default: False).

  • plenum – Boolean to indicate whether ceiling/floor plenums should be auto-generated for the Rooms. (Default: False).

  • ceil_adjacency – Boolean to indicate whether adjacencies should be solved between interior stories when Room2D floor and ceiling geometries are coplanar. This ensures that Surface boundary conditions are used instead of Adiabatic ones. (Default: False).

  • bypass_adj_check – Boolean to note whether an exception should be raised if an adjacency between two Room2Ds is invalid or if the check should be bypassed and the invalid Surface boundary condition should be replaced with an Outdoor boundary condition. If bypass is selected, any Walls containing WindowParameters and an illegal boundary condition will also be replaced with an Outdoor boundary condition. (Default: False).

  • permit_non_solid – Boolean to note whether rooms should be translated as solid extrusions whenever translating them with custom roof geometry produces a non-solid result or the non-solid room geometry should be allowed to remain in the result. The latter is useful for understanding why a particular roof geometry has produced a non-solid result. (Default: False).

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