Daylight Zones, Offsetting Walls

Here’s a fun one for you.
One of my engineers wants to create daylight energy save zones, which essentially means I need to create lines (or ref planes) that offset from a wall. The distance of that offset needs to equal the height of the windows (=head height - sill height).
I managed to write a script that finds all windows, and offset a curve (!!) based on the height of the windows. But I have two problems:

  1. In the preview, the offset looks the color I want it to appear (red), but in Revit the line color is blue. Any way to fix that?
  2. You can see that some of the offsets go to the exterior of the walls, rather than the interior. I need the offset always to go towards the interior. I know this is probably going to involve vectors, but how do I always get vectors to point towards the interior for every project, no just this one?

Any help would be appreciated for either question. Thanks!!



Window Experiment 2.dyn (44.8 KB)

The revit color you are seeing is likely the Dynamo preview. It doesn’t look like your script actually generates a detail line element yet.

I believe exterior function walls have their normal vector pointing to the exterior, but can’t check for a few hours.

1 Like

@jmayesP84R8 to try to answer your second question I would recommend you look into using the room boundary curves, which will give you the perimeter of the room which you could then pull the center point of the room to know which way to offset your lines, or just offset the room boundary line by negative 1 * the distance you calculated.

1 Like

Thanks NickDodge! (Bonus points for your icon)
I’ve never used room boundary curves, so it was a good node to learn. But how do you isolate just one curve that faces the exterior wall? I don’t need to offset each wall, but just walls with windows on them.
How can I feed the rooms into another node to find their center then use the center as a vector direction?

you could off set all edges outward about 4’ or so and then test to see if that line intersects with an adjacent room or wall or something else, then based off of that test you could filter off the exterior edges that don’t intersect with anything as the edges you offset towards the interior.

1 Like

So I went a little crazy and I think there’s probably a better way to do everything, I’m sure, but I managed to get it to work.
First, I clarified with my engineers that all they needed was a hidden line that determined the limits of the daylight zone they needed. I was aiming for a region (which I’d still like to do sometime), but this made the process much simpler.
Then I had to insert a ton of nodes in order to get a vector that would always point inward towards the room, a vector that would be perpendicular to that vector, then draw detail lines. The room and the length of the lines needed to be Inputs.
This is what I came up with and it seems to be working!


My next steps are to make sure all the inputs have a good user-interface with them, probably through Data-Shapes, to make sure the engineers make clear what they need.
Thanks for the input, all!

1 Like