Selecting doors and windows from room X to room Y

Realized I forgot to post this on Sunday (or super early Monday morning really).

FloorByRoomOptionalOffsetIncludingWindows - Modified.dyn (288.7 KB)

Working with windows which aren’t hosted by the bounding elements requires quite a bit of a change in both the initial gathering and the sizing of items. Instead of getting the elements hosted in the boundaries, we just get the windows associated with the room using a Room.Windows node.

Anyway, once you have the window’s selected using a Room.Windows, you want to filter out windows which have a real sill not a floor. For this I used the Sill Height parameter to build a filter, but you’ll know what is best for your office’s modeling methods. Next build a coordinate system from the facing orientation of the family as you were before, but don’t use a Rectangle.ByWidthLength that requires a CS, as you’ll want to shift the rectangle into place on the origin so it hits the floor correctly. Instead build a rectangle by just the width and length, where the length is the width of the door (yay coordinate systems!) and the length is the distance from the widow’s insertion point to the room’s bounding polyline. Finding that distance does shift the ‘major’ elements of the garph around a bit, as you need to find that polyline before you can find the window threshold. It’s doable though. Next you need to shift the rectangle by 1/2 of the distance from the room boundary to the element so the edge sits on the origin point (the original rectangle will draw on the origin). You can then use a Geometry.Transform node to shift the thresholds into the correct rotation and location. It all looks like this when you’re done:

This change in concept also extended to doors, as they’d be in exterior walls which would have a sub-wall behind them just like windows, so you’d have to edit that section too. So anyone who uses this… method of multiple walls to make a single wall will need to be cognizant of this fact in the above graphs and modify accordingly. Remember you still need to keep the to/from room filters though. Looks like this when you combine the two:

Ok from there you have to join the two sets of thresholds (windows and doors) into a single list, and then transpose and then flatten them so you’ll have a list thresholds grouped by room. From there it is more or less the same as before.

You may also want to consider leveraging some element binding on this instead of using a ‘delete old floors’ method, as that could cause some headaches with lost data if you had parameters filled out in the existing elements.

Best of luck!

3 Likes