Using Dynamo to get the exterior boundary of a room

I’m really struggling with this one…

I need to get the exterior boundary of a room. I feel like this should be a very simple thing to do, but I’m running into issues near constantly, and after 15 rebuilds of the entire script, I’m getting the feeling this is just well outside my scope of knowledge.

What I’m looking for ideally is something like the Room.FinishBoundary node, but one that returns the exterior face of the wall bounding the room, as opposed to the interior lines.

Every method I try to return this results in one type of room being excluded, whether it’s because it uses room separation lines, storefront, has a jog in the core, or has an angled wall.

Is there some simple way with DesignScript or Python to get the exterior of a room somehow? I don’t know enough about the inner-workings of Revit to know why there isn’t such thing as a Room.OuterBoundary node of some kind.

Methods I’ve tried so far:
Offset Finish Face by wall thickness (jog in a wall creates nulls, no thickness to offset some lines by)
Offset Centerline by wall thickness (jog in the wall ruins this as well)
Get wall geometry using Clockwork Room Boundary Node(Returns the entire wall, not just that around the room.)

I’d really appreciate some fresh ideas!

Hi @Sto_M …something here could probably work in some cases

Hey sovitek!

Thanks for the idea! Unfortunately I’m running into some issues using it.

I don’t seem to have the Wall.Width node, but I can still get the wall width by using the parameter value.

I’m also finding that my walls are offsetting in the incorrect directions when I use Curve.Offset:

image

I’m curious to know why the Curve.Offset seems to work on your script and not when I recreate it.

I do have a workaround, I’m using the Translate w/ direction node, and then I get vectors as shown below:

I’m curious to know what you’re doing at the end with the Curve.Shatter node, which package is that from? It looks like you then get the length and filter it, what does this do?

Additionally, I’m finding that I have a lot of null data values originating from Clockworks Room.Boundaries node, when working with a jog in a wall, due to a change in wall thickness on part of a room.


image

My assumption is that this is due to the two small lines generated when the wall jogs, but doesn’t actually create a new wall. I can cull these from the list, but then my list lengths mismatch when I go to offset the curves on the wall.

My thought here is that Instead of using the translate node, I use a Curve.Extrude, to add thickness to the wall and get some perpendicular lines that I can use to get the intersection points.

I think this is close, but I need to either use the width lines to intersect (runs into issues on outer corners) or somehow connect, or ignore them, and use the start and end lines, in conjunction with the intersection points of only the outer faces, and use all of those points to create a polycurve. I don’t know how to sort these points all back together in a cohesive way that leads to a polycurve being generated correctly.

Summarizing the places I’m stuck:

Extrude Method without wall width lines:
How can I connect the outer boundary lines together? Or how do I sort and combine the start/end points on lines, with the intersection points on corners, in a way that a polycurve can be generated correctly.

Extrude Method with wall width lines:
How can I get the correct intersection I’m looking for at both the wall jog, and outer corners? Additionally, how do I organize these lines in a way that I can have them check intersections with any other line around them, as opposed to my current method of just checking an intersect with the line before it?

Extrude Method with surface patches
I’ve also included this approach, which seems to be pretty close as well, but I can’t find a way to organize the indeces correctly. If there’s some way I can tell Geometry.Intersect to find all intersections between lines within a group, this would be ideal, but I’m not having luck with the Cross Product lacing.

Curve Offset Method:
How can I take wall jogs into account?

Overarching problem:

How can I filter out nulls/room separation lines/storefront, and place a value back into the list at the correct sublist index so that these cases can be taken into account?

I’ve attached a test file that represents every situation I’d like this script to be able to manage. I’ve removed the circle room, as I don’t think this would ever happen, but the wall jog rooms are critical, and also happen to be the ones causing by far the most trouble.

In the dynamo file I’ve grouped the different approaches in orange, and have a note at the end showing where I’m struggling with each approach.

Clockwork Required:
Room Boundary V17.dyn (141.6 KB)
Revit 2020:
Room Boundary Test File.rvt (4.9 MB)

2 Likes

I don’t have a solution for you, but wanted to say that this :point_up: is a really well written follow up
post :heartbeat: :ok_hand:.

2 Likes

Hi @Sto_M how about a way with union solids and intersect…


1 Like

I do think this approach has yielded the best result of those I’ve tried, and I feel like the problems with it are the most likely to be something fixable.

It works great for most rooms, except for those with an extended wall, room separation lines, or storefront.

Those outlined in Red are those that this doesn’t seem to work for, with the red line representing where I’m looking for the boundary to be drawn.

My next step in this case would be to filter out geometry outside of this area. I can’t just run an intersect, since I’d need the outline I’m trying to get to use as intersection! However If I break it up into points, I can filter out lines associated with those points, and use those left to draw new points at intersections.

I currently do this by using a surface made by the interior finish face (offset by .1 because it doesn’t consider corner points within it for some reason), remove any within it, and then offset that surface to outside the redlined area. I can use an arbitrary value here for the moment, but I think in the future, I could make sure this area offsets to the thickest wall length associated with the room, meaning the highest chance of removing anything outside simply.

Then I run intersections on the remaining lines, and I should receive a collection of points that represents the outline.

My hangup on this approach is due to how I get intersection points, so I need to find a new way to get these. My current approach is as follows:

I take the list of curves, shift the indices one, so that each curve lines up with its neighbor, and use that to make an intersection point. This works great for most situations, except for here:

Where I would need to shift indices by 3. However if I do that, adjacent lines can’t check for intersections anymore.

I also seem to have a problem with Geometry.Intersect saying this point isn’t within the surface, even when I thicken the surface! It’s definitely there! Not sure what’s going on.

My only other problem point here is then that I need to find a way to add curves for room separation lines back into the mix at the correct sublist, and include them in the intersection calculations. This is something I’m going to focus on tomorrow, as I think I can figure this one out!

Summarizing:
How can I get intersection points for any lines within a list?

I imagine this would be something that would run through all possible combinations (slow but thorough). ex. (l0,l1) (l0,l2) (l0,l3) (l0,l4) (l1,l2) etc. From here, prune duplicate points and I’m good!

How can I get add back in a room separation line into a multi-nested list for only specific rooms?

My guess here is running the boundaries through a boolean filter, returning true for any room separation lines, that will give me the indices for any room separation lines. Looking at my script right now, that looks like [12][3] and [13][3], but I’m not sure how to use nodes or DesignScript to get this. List.GetItemAtIndex doesn’t seem to work?. Using this I can convert to lines, and weave them back into the set.