Summary

Generally speaking, when working with Generative Design we have a tendency to focus on the design phase. This is partially due to the fact that there are a lot of opportunities for optimization and optioneering at this phase of a project.

However, when it comes to a project timeline, quite a bit of time is spent on the less exciting portions, like tagging and documentation. Being that a lot of time is spent in this phase, this has been a topic of interest to me personally. Previously, we covered a similar documentation topic of laying out viewports with Generative Design. In that example, we used the same bin-packing algorithms from our building layout examples to simply layout viewports on a sheet.

In this post, we will take a look at how to estimate room tag locations (2d) with Generative Design while using a Dynamo package meant for 3d analysis.

Revit’s Tag All Tool

Revit has a lot of tools available to us. One of these is the ability to simply tag all. Unfortunately with this option, we will have some cleanup to do afterward, (As illustrated below).

As you can see the tag all tool doesn’t take into account criteria that an individual would consider while placing the tag.

This includes:

  • Proximity to the visual center of the room.
  • Is the tag overlapping other tags?
  • Is the tag overlapping model objects?

Additionally, the tag all command simply skips items that are already tagged. As a person tagging the rooms, you would also fix any that seem off.

Solving Each Problem with Dynamo

Problem 1 – Where can I place tags?

In Revit, rooms are aware of their boundaries. Rooms are also aware of elements within them that are bounding, such as columns. However, rooms are not aware of other items, like tags, dimensions and non-room bounding elements.

Dynamo does have geometry operations to account for a lot of this. We can get the solids of the elements (or bounding boxes for annotative elements) and remove those from the room mass. The problem here is this can be SLOW.

Thankfully, there are other ways.

After seeing this tweet from Jacob demonstrating quick cut and fill with a new Dynamo package called VASA, I immediately thought this would help with adding “voids” to rooms where tags cannot be placed.

Room Geometry collected for use in VASA

 

 

 

 

 

 

 

 

 

Solid Room Sections in VASA (where a tag can potentially be placed)

With this part complete we have a graph that could kind of work with Generative Design. I say, “kind of” because it really only optimizes for a single room. You can run it on several rooms, but the placement point would be similar per room and that would result in less-than-ideal tags in quite a few cases. This creates another problem for us to solve.

Problem 2 – Placing Tags as Centered on Room as Possible

Generally, when a user is tagging rooms they will work to place them as centered in the space as possible. (Although if you want your tags in the corner, that is possible too).

When it comes to ensuring elements are “attracted” to one another in Dynamo, there’s a really great package for this, DynaShape.

DynaShape is a package for constraint-based form-finding and physics simulation. If you want to learn more about it, check it out on the Dynamo forum here.

If you recall, we have used DynaShape before for Generative Design. Specifically, we used DynaSpace for laying out space bubble diagrams.

In this example, we want to use DynaShape to create a constraint of our room tags to the center of the room and to create boundaries to clash against. We can think of this as “rubber banding” the potential tag location to the center as we want that tag to try to be as close as possible to that center of the room.

Using DynaShape, we are able to establish a series of goals to simulate this. In the video below the red circle would represent a pick point for a room tag and the black circle represents the room origin. The room bounding elements are all represented by the light blue circles.

 

And now with solutions to those problems complete, we can build out our Dynamo graph.

Graph Overview

 

 

 

Section 1

  • User Inputs for room selection, room tag selection and option (for Generative Design)
  • Caching of room geometry with remember nodes

Section 2

  • Extraction of the geometry of elements within the room (where tags cannot go)
  • Uses custom python to collect room elements

Section 3

  • DynaShape physics simulation for “rubber-banding” the room tag to the center of the room
    • Includes clashing of room objects

Section 4

  • Room tag creation and updating
  • Works in active Revit view
  • Validation based on proximity to room center (Generative Design Output)

Section 5

  • Validation based on the overlap of room tag with other elements (Generative Design Output)

 

How is this Generative?

For this specific workflow, we are using Generative Design for Revit to quickly iterate through options, using the randomize option. The reason is, DynaShape’s solver does all the optimization for us.

Video Overview

Sample Files

Sample Files are available on Github here: Optimized Room Tag Placement