BBox outputs invalid box

I have a strange issue where the BBox component doesn’t appear to output a valid box for one of the two planar surfaces that I have internalised in the definition below - this seems to be the reason why I am getting an “Invalid cast: Brep » Brep” error. However, if I simply DeBrep both surfaces and rebuild them, the error goes away:


brep.gh (12.7 KB)

I would like to understand this error - can anyone please explain?

FYI: The two surfaces come from a Honeybee model - they represent two skylights that I extracted using the decomposeBasedOnType component. The error may therefore have to do with the way Honeybee creates geometry, however I can’t find anything wrong with them when I bake them or use the other GH components above to rebuild them.

no clue why this thing happens, but for planar surfaces I’d suggest using Bounding Rectangle (BRec) from the plugin Putterfish

Indeed. Flat boxes can be weird sometimes. It’s why I made that BRec component.