Skip to content

Commit

Permalink
fix(model): Fix bug related to assigned shades
Browse files Browse the repository at this point in the history
  • Loading branch information
chriswmackey committed Jul 26, 2024
1 parent b9419ba commit f29c023
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion honeybee_display/cli/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ def model_to_vis_set_cli(
text_labels = not color_attr
show_grid = not hide_grid

# pass the input to the function in order to convert the
# pass the input to the function in order to convert the model to a visualization
model_to_vis_set(model_file, color_by, exclude_wireframe, faces, hide_color_by,
room_attrs, face_attrs, text_labels, grid_display_mode,
show_grid, grid_data, grid_data_display_mode, active_grid_data,
Expand Down
5 changes: 3 additions & 2 deletions honeybee_display/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ def model_to_vis_set(
f_faces = [
face for face in faces
if isinstance(face, face_attr_types) or
isinstance(face.type, face_attr_types)
(hasattr(face, 'type') and isinstance(face.type, face_attr_types))
]
else:
f_faces = faces
Expand All @@ -296,7 +296,8 @@ def model_to_vis_set(
f_faces = [
face for face in f_faces if
isinstance(face, Shade) or
isinstance(face.boundary_condition, bcs)
(hasattr(face, 'boundary_condition') and
isinstance(face.boundary_condition, bcs))
]

if not f_faces:
Expand Down

0 comments on commit f29c023

Please sign in to comment.