@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?
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.
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.
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)
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.