Learn how to use clash detection to find placement locations for wall protection.
- [Instructor] The Line_Start.dyn has already been set up to allow us to select a room, find the boundaries of the room, and process those boundaries into a single list of lines. Go ahead and hit select on the select model elements node and make sure to select the room outside boundaries. Now click run so we can see the different lines and elements that are surrounding the room. In the custom node that we made, the elements output provides a list of the elements that are surrounding the room.
Our curve loop simplified node is given a list of four lines that are the lines surrounding the four sides of our room. Now even though we see four walls surrounding this room, the list of walls in our elements surrounding it are six. If you look closely, you'll see the element IDs are duplicates for two of the walls. That's because this Dynamo sees multiple boundary lines and simplified them into one. It still clashes each of those lines as an element surrounding the room. We can clean this list of elements up by using the unique item node.
I'm gonna right click on the canvas and search for unique items. Now if I pass the watch node to the list input of unique items, because this is a three-level list, I'm gonna set this to look at the second level, so it processes the unique items in this list of elements. Now when I click run, I have a list of four unique walls. It removed the duplicate walls from our list.
Now that we have the list of walls surrounding our room, I'm gonna convert them into Dynamo geometry so we can clash them against the list of lines of the room boundaries to find the intersecting locations where we wanna place our wall protection. If I right click on the canvas, I can search for element geometry. The element geometry node converts Revit geometry into Dynamo geometry so that we can work with it in the Dynamo environment.
If I click run, now you'll see that there's a list of solids. The preview in the background shows the geometry of the walls. Now this list is a list of chopped-up elements. We're gonna flatten this so we can use it more easily. I'm gonna right click on the canvas and use the flatten node. Often rooms have multiple boundaries, and we'd like to set this workspace up to work in any situation. Because of that, I'm gonna set my levels for the list flatten node to look at level three.
And I'll wire the output from element geometry to the list flatten node and click run. Now I have a nice, compact list three levels deep of all the solids that are surrounding the room. I'm gonna convert these into one single solid that I can use to find the intersection with each of these curves. If I right click on the canvas, I can search for solid by union and use the by union node to combine all the solids in this list into one single solid.
Set the node to use levels and look at level two and set the lacing to longest. Now when I click run, I have one single solid for all the walls surrounding the room. Now the list of lines are drawn at the base of the wall, so they don't technically intersect with the wall. We use the geometry translate node to translate this line up four feet so it intersects with the wall and hits all the openings of the doors.
If I right click on the canvas, I can search for geometry translate and use the translate direction node. This looks for geometry and a direction. The direction's provided as a vector. If I right click on the canvas and search for vector, I can use the vector by coordinates node to create a vector that will translate up in the z direction. If I double click on the canvas, I can type four into a code block and pass that through to the z input of vector by coordinates.
If I wire the vector output to direction on the geometry translate node and the simplified curve loop output to the geometry input of geometry translate, I'm gonna click run, and you'll see the line has offset in the preview around the room. Now if I right click and look for the intersect node, I can use the intersect node to find the intersecting geometry of another geometry.
I'm gonna wire the solid from solid by union node to the geometry input of the geometry intersect and the geometry translate's geometry output to the other input on geometry intersect. If I set the other to level two and my lacing to longest, now when I click run, I have a list of several lists of lines.
I'm gonna select several of the nodes and turn off the preview, and you should see dashed lines in the preview. These dashed lines are the locations that we'll use to place our wall protection. Looking inside the Dynamo, those are the segments of line that are ran along the wall where there are not doors. And with this list of line locations, we can use this to place our wall protection, or even if you're not using this to place geometry, this is a great way to extract the length and quantity of wall protection surrounding a room.
- Working with room boundaries
- Creating wall protection, door signage, and corner guard Revit families
- Placing wall protection, door signage, and corner guard Revit families
- Resolving conflicts with family placement
- Accommodating inside and outside room boundaries