Find Adjacent Walls

Hi guys,
How can I get adjacent walls as a separate list in Revit? For instance, I selected a wall and I want to find walls that are either intersecting or adjacent to selected wall. An example would be something like this👇:

Highlighted wall is selected wall. I want to get the walls that are either intersecting or adjacent to it. That woul be something like this I think.

I have already tried “Intersects Element” and “Intersects Brep” Filters. They don’t work on adjacent surfaces.

Hi @mucahitbgoker

If I understand your question correctly, I might be able to help a bit. :slight_smile:

When working with intersections of elements, I like to keep it as simple as possible to ease the processing of the script. I find intersections of curves to be better and faster than intersection of breps.

I have used the center curve of the walls to test the intersection, and it seems to work alright. It will however not work if the walls are disallowed to join in Revit.

This is just quickly put together, so there might be some improvements to be made. It might also not work correctly when selecting multiple walls to test. There could be some data structure to figure out there, I’m not sure. :slight_smile:

I hope it helps!

Adjacent_or_intersecting_walls.gh (12.6 KB)

Hi @christian_degn,

I can find intersecting walls but I was asking for adjacent walls. They share a common face, parallel to each other etc.

Thanks for your answer though

Any idea how can I achieve this?

Mucahitbgoker,

Try this method GetGeneratingElementIds Method

1 Like

I didn’t really understand why to use this method @Japhy. The wall I selected is a separate wall, not a layer. At where I work, finish and core walls are separately created.

My bad, i was thinking intersecting not parallel.

I guess to find parallel walls you will need to set some parameters. Do you want every wall in a certain radius? or all parallel walls in the project (which might be the first step anyways)

To get all parallel walls you will need to get the location line and compare vectors (flipping any negative vectors first)

Like so…

I am not looking for parallel walls @Japhy. I am trying to get adjacent/adjoining walls. Walls that are next to each other, sharing a face. I thought an intersection method would find it but it didn’t work since they don’t really intersect (somehow?).

An example might be the image below. These walls are adjacent to each other but they don’t have an hard intersection(like the one in the end).

image

Think of it like a line navigation problem. One native way is the point groups (sets the radius of point groups) or start getting into network relationships like those in Heteroptera