Rooms are not loading due to a geometry problem

@mingbo After updating the Rhino Pollination plugin, my rooms are not loading. I am receiving the below error when I tryin PO_ValidateModel

Pollination Rhino Plugin: 0.147.0.0 (2/15/2022)
System.ArgumentException: Failed to convert Room 0d65d[Room_0d65ddd1] to HBObject.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Core.Data.FaceData.ToHBObject(BrepFace brepFace)
   at Core.Objects.RoomObject.<>c.<ToHBObject>b__46_0(BrepFace _)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Core.Objects.RoomObject.ToHBObject()
   at Core.Objects.RoomObject.ToHBObject()
   at Core.ModelEntity.<>c.<GetHBModel>b__50_1(RoomObject _)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Core.ModelEntity.GetHBModel()
   at Pollination.RH.RhinoCommands.PO_ValidateModel.RunCommand(RhinoDoc doc, RunMode mode)

Hi @justinshultz, does it work with the older version? From what I can see this room has an invalid face that is not getting converted. Let me know if it doesn’t and I try to help you in some other way. You let us know.

It’s unfortunate that you can’t share your model. That would have made it much easier to help. If you can export this single room and send it over we can try it on our side. Thanks.

The corruption seems to be with my model, not sure if updating the plugin had an effect. I downgraded the plugin and still had the error.

The list of Rooms in the Pollination window is not populating so I’m having trouble identifying which polysurface is causing the problem. Is there a way I can find the Room referenced in the error message without selecting it in the Pollination window? A command to select Room by name/ID?

We don’t have an official command for that but there is a script that does the same. See here:

Run EditPythonScript command, copy the code there and press the Run button.

Then put the ID for the face or room and search for it. It should select the geometry for you.

Alternatively, you can export the file as a HBJSON and edit the HBJSON file directly, if you feel comfortable editing a JSON file.

P.S. @mingbo, I think we should keep the design that we had before that we tag rooms as invalid if there are issues but we still load the rest of the model. That will give the user a chance to fix the model as needed.

This would be a huge help. My model is really stuck at the moment. I have a room that is preventing the Pollination model from loading correctly. I can’t figured out which one it is so instead I’m getting a loading bar at the bottom of my screen and no Pollination model.

1 Like

Unfortunately the above script did not work for me because the problematic Room is not loaded into the model so I can’t find it using the PythonScript.

Can you export the model as an HBJSON file?

No, when I try to do a SaveAs .hbjson. I receive pretty much the same error:

System.ArgumentException: Failed to convert Room 0d65d[Room_0d65ddd1] to HBObject.
System.NullReferenceException: Object reference not set to an instance of an object.
   at Core.Data.FaceData.ToHBObject(BrepFace brepFace)
   at Core.Objects.RoomObject.<>c.<ToHBObject>b__46_0(BrepFace _)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Core.Objects.RoomObject.ToHBObject()
   at Core.Objects.RoomObject.ToHBObject()
   at Core.ModelEntity.<>c.<GetHBModel>b__50_1(RoomObject _)
   at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at Core.ModelEntity.GetHBModel()
   at Core.Exporters.SaveModelToHBJson(String saveAsFilePath, String& simuParamPath)
   at Core.Exporters.ToHBJson(String HbJsonFilePath)

Hi @justinshultz, Thanks for trying. I sent you a message so we can make sure to solve this for you as soon as possible.

This has been resolved in version 0.147.1. The model loads successfully but it gives you an error about the problematic object.

There is still a small problem with visualization that we still have to resolve. It looks like because of the invalid room some of the rooms don’t get rendered correctly when we color the model by type. I mark this topic as solved and we will track that issue separately.

1 Like