Main menu

Category Archives: Architectural Design

In the meantime, we’ve all rolled into 2017 now. So with that I would like to send you my best wishes for this New Year. And above all, I wish you even more Dynamo awesomeness in 2017! That being said, I want to kick off the Dynamo Year 2017 with this post.

When we think about “Fire Exit Risk Assessment” in an architectural BIM model, then we also think about the creation of “evacuation plans” for the building. In a lot of situations this is done manually based on estimations of the shortest and easiest way to reach an indicated “emergency exit”. I’ve tried to tackle this challenge by automating the definition of the shortest routes between a room exit and the nearest emergency exit. Of course, all of this is done with Autodesk Revit and Dynamo.

In this post I want to explain you how you can build this type of script yourself and as usual you’ll find the datasets at the bottom.

Situation

The model that is used is shown on the images below. The script needs to detect the shortest route between a “normal” room exit door and one of the 4 indicated “emergency exit” doors at ground level. Therefore a room plan at that level is created and the rooms that can be used as “circulation”, which are the corridors in this case, are indicated in orange.

Results

The result of the script is the creation of evacuation routes for each room exit to the nearest emergency exit. In Dynamo this looks as follows:

When using the Dynamo curves to create Revit detail lines from them, this results in nice evacuation plans like shown in images below.

How to create the script

Before you start experimenting with the Dynamo script, provided at the bottom of the post, I would strongly advise you to watch the detailed recording with voice-over, I have made available on my YouTube channel. It will explain you step by step how to read the Revit model, analyse the circulation area, defined the shortest routes and finally how to automate the creation of the detail lines in Revit, representing the evacuation paths.

The ergonomics of a stair is not only about the tread depth, the riser height, the stair slope, … It is also about the safety of your head when you walk the stair. Ever been in a situation when you rushed down the stair to the cellar and then bumped your head against one of the floor beams 😉

In this post I will explain you how to create your own Dynamo script for the “Clearance Height Check” of your stairs in a Autodesk Revit project. The Dynamo script (which can be downloaded at the bottom of this post) works on a selected stair and will verify the “Clearance Height” or “Headroom” between the tread top surfaces and the objects above. The results will then be displayed as colored lines.

The script consists of 7 main parts, organized in node groups. Each of the steps is described below.

Step 1 – Input

In this step you need to select the stair that you want to analyze. This can be a single or a multi-story stair.
The Safety Offset parameter is explained in Step 3 further in this post.
And of course you need to set a constraint for the “Clearance Height” in the last parameter.

Step 2 – Detection of top surfaces of treads and landings

When you import the stair geometry into Dynamo, it’s considered as one single solid. This means you can’t detect the individual treads (with the native nodes). In this case we use the Element.Faces node to detect all the surfaces of the solid. Each of these surfaces has a normal vector (Surface.NormalAtParameter). The surfaces with a Z-value of this vector equal to 1, are the top horizontal surfaces of the stair. In this case these are the treads and landings, but also the smaller end surfaces of the supports or stringers. In the first List.FilterByBoolMask these top surfaces are filtered (results is in the in output). In the second List.FilterByBoolMask the surfaces with an area smaller than the tread area (= width * tread depth) are filtered out (the in output represents the surfaces with a greater or equal area).

Now we have the references of the treads and landings which represent the bottom of our “Clearance Height” calculation.

Step 3 – Detecting the upper elements with ray bouncing

This part of the script will generate the “calculation” elements by

creating a point in the middle of each top surface (Surface.PointAtParameter)

translating the points vertically with a distance equal to the indicated “Safety Offset”. This is done to avoid the point being inwards the solid of the tread. In a later step we will add this 50 mm value to the resulting clearance height.

using the points as origins for the RayBounce.ByOriginDirection which will cast rays in an upward direction until it meets an object on it’s way. The output of this node consists of Points, which are the start- and endpoints of the single ray (maxBounces=1 and Elements which represent the family instances that are hit by the ray.

connecting the start- and endpoints by means of the PolyCurve.ByPoints node.

These polycurves can now be used to calculate the headroom and visualize the results in the next steps.

Step 4 – Visualization of environment

In this optional step, the elements that are hitted by the rays are displayed within the Dynamo GUI. Play with the Number Slider to manage the transparency of the objects.

Step 5 – Check the Clearance Height

The smallest but nevertheless the most important part of the script checks the length of each designed polycurve (from Step 3) and adds the Safety Offset value (50 mm) to the result. The output is verified with the Minimal Clearance Height, indicated in the Input group. This results in list with “true” and “false” values which then will be used for filtering.

Step 6 – Creation of analysis samples in Revit

The polycurves, created in step 3 can now be used to create “Model Lines” in Revit, in order to visualize the possible problems with clearance heights. As the ModelCurve.ByCurve can not accept polycurves, we need to explode these in lines first. Graphically you can’t see any difference as the “unexploded” and the “exploded” version still show a two-point line. But the data type is different…

Optionally you change the style of the model lines, to have better representation and filtering capabilities in Revit. Therefore the Archi-lab / Grimshaw package offers the Get Line Style by Name node that loads a line style to Dynamo which is used to change the initially created line.

Step 7 – Visualization of the results

This last step will change the appearance of the lines created either in Dynamo either in Revit, depending on the Clearance Height requirements. If the length of the polycurve +50 mm, hence the real headroom, doesn’t meet the minimal clearance, then the line is colored in red, otherwise it is colored in green. This graphical result can help you to solve the problem with the surrounding elements and re-run the script to see the new results.

Datasets

The Dynamo script and the Revit sample file (originally the rac_advanced_sample_project.rvt) can be downloaded here.

More and more I’ve been challenged and inspired to find new ways to perform custom architectural analysis. In this post I want to share with you a short and simple (for once) Dynamo script that can be used to analyze the evacuation paths in your building design in Revit. The script (that you can download at the bottom of this post) will calculate the accumulated distance from several points to a selected emergency exit and display the results in a selected Revit view.

Before you start setting up or running the script you need to draw the evacuation paths in your Revit model. In this case Model Lines are used with a specific, newly created line style called “Evacuation Path”.

It’s also necessary to have these next Dynamo packages installed:

Lunchbox

Grimshaw (archi-lab.net)

Ampersand

When you then open the Dynamo script “Evacuation Path Analysis.dyn” you will see 4 parts.

1. Input geometry in Dynamo

In this part the model lines of style Evacuation Path are selected and their geometry is generated in Dynamo. For this selection the custom node Select Model Lines by Style from the Grimshaw (archi-lab.net) package is used.

You will also need to select the door that will function as the emergency exit. This will be used further in the script to detect the evacuation direction.

The “CurveDiscretization” is needed for dividing the resulting paths (polycurves) in equal parts (see later in this post).
The “SampleInterval” is a number that will be needed to indicated how much of the results are shown in Revit, as we don’t need to see the results for every divided piece (see later in this post).

2. Evacuation path direction

The curves resulting from the Element.Geometry output from previous step are put together into one or more polycurves, using the PolyCurve.ByCurves node, which joins an unordered list of curves. This node is installed with the Ampersand package.

It’s also difficult to control the direction of each designed model line, as you might have drawn them in non-ordered way. That’s why in this part of the script the distance between the start point of each path and the location point of the exit door is evaluated. When > 500 mm, then it is assumed that the Curve.Startpoint shows the point at the other end of the polycurve. In that case the curve will be reversed.

3. Accumulated distance to the emergency exit

In the third part of the script the length of the curve segments are analyzed (and they should be equal for all segments except the last one in this case), and the accumulated result is returned. This is done with the Lunchbox Mass Addition node which is available in the node library when the Lunchbox package is installed. This could be done also with the List.Scan node from the out-of-the-box Dynamo library, but this can not handle nested lists.

Finally the result is converted from mm to m (assuming that the project units are set to mm).

4. View the analysis results in Revit

In this last step every n-th result (defined by the “SampleInterval” variable, defined at the front of the script) for every n-th start point of the curve is taken. Then these results are transferred to the PointAnalysisDisplay node which will generate an analysis display in the selected view in Revit.

In Revit you can view and manage the appearance of the analysis results with the “Default Analysis Display” parameter of the view. In the dataset included in this post there is already a definition made, called “Point Analysis Display”.

Datasets

You can download the Revit file and Dynamo script by clicking on this link.

When a structural engineer, like me, hears or reads the word “analysis” then you will get full attention. That happened when I was discussing some architectural topics with my colleague Colin McCrone. He got my full attention, like a hypnotized patient to his shrink, when he gave me an example of “Line Of Sight Analysis”. Hah, “analysis”, that’s the magic word!

When buildings are designed, it is also necessary to think about the comfort of people living in it. And in that perspective, the line of sight is very important, if you ask me. I have been working for many years in offices: ‘landscape’ offices with no windows, offices where the sill was positioned at 1.8 m height (and this was no basement !), to office spaces with waaaaay to much windows (and thus too much sun) … Now I have my home office space (with one small window) or the airplane (with very tiny windows). So I got personally attracted by this example.

In this post I will explain you how you can analyze and visualize the line of sight of a human being in a specific room with Revit and Dynamo. As usual, at the bottom of this post you’ll find a demo video and the datasets.

Eye point

In this part of the script you select the Revit family that represents the eye point with the Select Model Element node. In the video below this is represented by a sitting man. As the FamilyInstance.Location takes the insertion point of this family we need to add the vector that points to the “eyes” of the human, which are at approximately 1.3 m here.

Vector Directions

Another input we need are the vector directions of the rays. Or with other words, which are the directions the eyes will look, assuming that the head and body can turn around too of course.

Ray Casting

These two inputs are then connected to the RayBounce.ByOriginDirection node. This node will send out the rays and return two outputs: points at the intersection of the ray with the first touched object in its direction and the element which is hit by the ray. The points can be used to visualize the rays with PolyCurve.ByPoints and the elements are filtered out with the Element.IsOfCategory (from the Clockwork package). In this case we need to find out which hit elements are Windows. This will define the colors of the rays.

Visualization of rays

By translating the boolean results from previous step into colors, we can visualize the rays. In this case green rays hit the windows and the blue rays hit other objects. In the same way these rays are reproduced in Revit with Model Lines. The change the color of these model line, you will need the custom node Line.ColorOverride which is included in the datasets below.

Revit geometry in Dynamo

To interpret the results better in Dynamo you’ll need the surrounding Revit geometry. This is done simultaneously with the large group of nodes at the bottom of the script.