Selecting doors and windows from room X to room Y

Hey all,

I build up my current dynamo from the work of @seandburke Script works just fine in a test... not a real project

I also added a user interface to let the user choose which rooms and what floor type he wants to generate.
Here is the dynamo:
test3.dyn (199.2 KB)

What I would like to achieve is that when creating the geometries for the floor including the part under the doors, that it would only select the doors going outwards to another room, like this:
Because right now it generates for both doors going inwards and outwards:

So how do I achieve selecting doors only going outwards? Do I need another parameter in my door family?

There is this node from clockwork but I have no idea how to connect it to each individual room since I want to generate multiple rooms at once…

Attached is my functioning script using a slightly simpler method than my orginal version. I imagine if you knew which patches matched up by testing their centroid points to the room insertion point using the Geometry.ClosestPointTo node, you could merge both into the boundary for the toRoom.CreateFloors_fromRooms.dyn (178.8 KB)

I downloaded your dynamo but it looks the same as the one I found in your earlier thread: Script works just fine in a test... not a real project

And this seems Chinese to me :joy:
“which patches matched up by testing their centroid points to the room insertion point using the Geometry.ClosestPointTo node, you could merge both into the boundary for the toRoom”

let me try to explain what i think is meant.
If you take the geometry of the door, lines and solids, and draw an imaginary box (called bounding box) around it, get the centre of that box, that centre is located in the room the door swings into.

How would it now where the door swings to? Also, the center of this boundingbox around the door, would be in between rooms since the room picks the wall as an edge. So the center of the door is in neither rooms…

that is true if you forget about the lines :slight_smile:

Ah, you mean the ‘doorswing’ lines?
But, how do i connect it to the opposite room? Because the room where the center is in, is not the room where the floor needs to go, it is in the other room.

So I guess it is better to use ‘to room’ and ‘from room’ I just don’t know how…

1 Like

Instead of getting all doors on the level (your orange group), try getting all doors hosted in the room’s walls. I believe Element.Inserts in the Clockwork package works for that.

Then feed those doors into the Door.Rooms node, and compare the names or numbers of the FromRoom output to the names or numbers of the originally selected rooms. Lacing and list levels will matter here as the doors in the room will be a sublist at an index equal to the room’s index.

Now use a boolean mask to filter the doors in the room by the results of the equality check. The resulting in the IN output swing out (assuming your doors were modeled correctly), and you can pick up patching at the thresholds accordingly.

1 Like

Could you post a screenshot? I keep breaking my head on this but I don’t seem to get it :confounded:

I don’t have a graph that does it. All based on work I have done before. Start with getting the doors by host, post where you get and I can guide you along periodically (I do have a day job to tend to after all).

Note that you likely can filter the doors by the from room as I noted above without restarting the selection too, though I think the hosts method will be quicker.

@jacob.small this is what I have so far…

This screenshot doesn’t have enough info. Post the dyn and a simple rvt and I’ll try to review tonight.

test4.dyn (225.3 KB)

Revised Revit (made a few edge case conditions and removed unnecessary geometry/elements so it’d post to the forum):
FloorByRoomAndThresholds-ComplexifiedGeometry.rvt (3.8 MB)

Revised dyn:
FloorByRoomAndThresholds - AnotherMethod.dyn (101.3 KB)

Might be able to simplify that a bit more if you spend some time on it, perhaps using some in-line design script in place of some of the longer strings of nodes. Key aspect was remembering that you’re working with rooms at first - so collecting ALL the doors on a level adds some additional time since you were just filtering most of them out - you wouldn’t go get every spice out of the spice rack if you knew you only needed salt and pepper. Also by querying parameters and properties of the doors it reduces geometry calculations. Some examples:

  • No need to build a vector by the wall’s start and end point as the door already has a FacingOrientation.
  • No need to build an offset point from the door’s location and see if it’s inside the room, as the door already knows which room it’s moving from.

Another thing that helps is reducing the number of long, untraceable wires in the graph. I know it takes time but you had a few duplicate efforts which I don’t think you would have come up against if things were a bit cleaner.

I did delete your UI as it was adding a degree of complexity I didn’t want to get into at the moment. You can open the old graph, copy the nodes, and then open this graph to reinsert it quite quickly.


@jacob.small Thanks, I understand the graph now!

I’m trying to insert the UI and I’m trying to get the same output-lists as you, but I have no clue on how to change the list-levels. (I tried reading up on list-levels-for-dummy’s-manuals on the internet but I think I’m to dummy)

When the UI is attached I’m also getting this error:

Has to do with the list levels I assume?

Okay, never mind! A simple list.flatten worked :slight_smile:

Now the trick is to also take in account the free standing walls and/or columns.
I’m gonna check these 2 threads first:

After some digging and reading, this node should be able to make the openings but I can’t really find good examples on how to use it and get the boundaries of the freestanding walls…

I guess the floors I created earlier are the hosts, but I don’t know how to get the geometry of the inner free standing walls/columns and match that to the list of floors…