Dispatch Closed Breps into Walls, Floors and Roof

Hi,

As an example, I have a two-storey building and would like to filter the surfaces of each closed brep into Walls, Floors and Roof.

I thought I could do this by evaluating the centroid of each room and then dispatching by height. However, this doesn’t seem to work because there are multiple levels. I think the problem I’m having is I’m comparing the centroids of all rooms to every face. How do I get Grasshopper to only compare the centroid of each room to its own surfaces?

Any idea how to get around this?

Thanks in advance!



Dispatch Walls Floors and Roof.gh (52.3 KB)

This could be a way.


Dispatch Walls Floors and Roof_re.gh (51.5 KB)

Hi @HS_Kim

After taking a closer look, I’ve updated the script a little bit since it was mixing floors and ceilings together. This was due to the absolute component. For whatever reason, floors have -1 vector and ceilings have a +1 vector.

I’ve attached an updated working script. Thank you!

Dispatch Walls Floors and Roof.gh (56.2 KB)

1 Like