diff --git a/honeybee_display/cli/__init__.py b/honeybee_display/cli/__init__.py index 23934c3..de0b95b 100644 --- a/honeybee_display/cli/__init__.py +++ b/honeybee_display/cli/__init__.py @@ -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, diff --git a/honeybee_display/model.py b/honeybee_display/model.py index 2c55d69..c9c8950 100644 --- a/honeybee_display/model.py +++ b/honeybee_display/model.py @@ -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 @@ -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: