Visualize Room-level energy simulation results

Hello everyone,

I’m trying to add the option to view energy simulation results using the “HB Color Rooms” component as an example, but it’s not working. Not sure if I’m doing it correctly. Has anyone tried to do something similar?
Here’s my code:

        #extract any rooms from input Models
        hb_model = HBModel.from_dict(data)

        rooms = []
        for hb_obj in hb_model.rooms:
            if isinstance(hb_obj, Model):
                rooms.extend(hb_obj)
            else:
                rooms.append(hb_obj)
        #create the ColorRoom visualization object and output geometry
        color_obj = ColorRoom(all_selected_outputs_for_plotting, rooms)
        graphic = color_obj.graphic_container

        #update model
        hb_model_new = HBModel(identifier="Test", rooms=color_obj.matched_rooms)
        model = Model(hb_model_new)
        model.to_vtkjs(folder=f'./data', name='model_new')
        st_vtkjs(content=pathlib.Path('data', 'model_new.vtkjs').read_bytes(),
                 key=f'Test_1', style={'height': '300px'}, subscribe=False
                 )

Thanks.

Hi @alextrofimchuk,

You are ahead of us on this. We decided to remove the graphic_container object and replaced it with a new object → VisualizationSet.

You have to hack the honeybee-vtk library to be able to change the colors for each room. It is possible but it is not straightforward.