I’ve been using Clockwork’s Room.Boundaries to get a sorted list of walls defining a room object. Issue though is that the architect sometimes doesn’t use the walls as room bounding and instead have created room separation lines, even overlapping where there actually is a wall. This can be because of import/link through IFC or some other butched workflow. I’m gonna take that fight somewhere else… Now, given that the arch model is a hot mess, does anyone have a viable idea on how to get the walls surrounding a room? By geometry or other means?
We use RayBounce to get ceilings and floors which surrounding the Room. I think it can also work for walls!
show me graph, when you know more
Yes, been thinking about that, but still that comes with its own challenges. Ceilings and floors are easy since they are up or down, but how do you make sure you hit all walls in a room that are not rectangluar? How do you set the number of rays in order to not get to small angular density of rays? How do you make sure you get the center of the room in odd shaped rooms? etc. etc.
Hi @jostein_olsen invert the problem:
- Get the volume of the room (ensure Area and Volume computation setting in Revit is on)
- Get the vertical faces ( you know how using a bit of applied mathematics ).
- Get the mid-point of the face.
- Offset slightly back into the volume of room.
- Use ReferenceIntersection.FindNearest() from the RevitAPI (ray bounce) to select the nearest element.
The wall it hits is the connected room.
It will still have its own challenges, for example the same wall could subdivide multiple rooms, but will get you closer.
YES! Thomas, you magnificent british beast!
thanks! Glad it worked.
How would you solve the problem of the Ray “overshooting” the seperation line? The selected Wall in the image gets found as a boundary on Room 4. I can measure the distance between the origin and bounce points and filter by a limit (since I’m pulling the point 100mm back, let’s say the limit is 150mm). The result would be a flag/filter on the walls that are farther back.
Any idea’s how to get Seperation line as a bounding element?RoomBoundary.dyn (40.7 KB)
Great solution for most cases. I previously tried something like this, but found that if there is a perpendicular room separation line mid-way through a wall, or a partial height wall intersecting a full height wall the results may be off.
@jostein_olsen do the room separation lines actually touch the walls? If so, do you have a ‘wall and room separation line overlap’ error for each? May be easier to pull that list directly since it is already in the DB (maybe clean that up while you’re at it as these warnings have a disproportionate impact on performance).
Just filter it out via proximity; assuming all walls are flush with the faces of the room volume, then the distance from the ray origin to the hit point should be zero (or if you applied a small offset back into the room as suggested then its this distance). If its greater than zero then it can be assumed that is passed into another room separated by a room boundary line, or there is no wall.
Really, my suggestion is just the start point; there are a myriad of different problems to solve beyond that, as you’ve quickly discovered.