I’m trying to get , for each Walls, the list of all the rooms that are enclosed by, to write later on a wall parameters the name of the rooms.
I found the nodes Room.Boundary or Room.Finishes that helps to know, for each room, what are the walls that enclose it, but I now need to “Invert” this list to get a list of the rooms by Wall.
Yes, we model the wall coverings in each individual room. These wall coverings do not form room boundaries. The type names of the wall coverings always start with ‘WS_’. A Dynamo script would need to identify in which room these wall coverings are located, and then the room name should be automatically entered into a wall parameter.
I did a script a couple of years ago that created the wall coverings for the room… No one used it at work though
Seems to make more sense to find the room / room type then model the wall lining from this rather than model an unknown wall covering of unknown width first?
If you already have the wall linings per room then maybe find the rooms, then find which walls they intersect with and apply the parameters required that way.
Yes, I am familiar with the method in which wall coverings are automatically placed based on room designations. Unfortunately, this doesn’t work for us because we have different wall coverings in the rooms. Here, we primarily take into account the underlying surface of the wall coverings. For instance, we have several wall types for plaster constructions. These differ depending on whether the underlying surface is masonry, reinforced concrete, or plasterboard.
Not sure I’m a fan of this as it’ll cause a good amount of pain with dimensions and alignments and modelling accuracy. I mean there wouldn’t be a seam there, why model it as such?
In any case, you could try this:
Get all rooms
Pull the room solids.
Build a function to test the geometry of each wall against each of the solid room geometries.
Use a List.FilterByBoolMask to get the room (#1, not the solids) which intersects the wall geometry.
Intersect each wall’s geometry against the associated room’s geometry, and pull the object type
Get the room associated with intersection result which contains a solid object type, and pull the parameter you want to copy over (name, number, whatever it may be)
Set your wall’s parameter to the value of the parameter from the room
Note that if you have walls in multiple rooms you’re going to get incorrect results, which is why I asked the question above.
Sadly you can’t rely on point testing for the same reason - you’d either have to sample ALL points on the wall and get the room at that point to overcome that issue.