Group Walls by Proximity

Hello Everybody

So i am facing a problem in revit due to bad-practices of modelling from my architectural office.
Instead of using walls with the correct layers of materials and splitting this walls into layers using the “parts” comand, the office delivers me a revit model with what is known in Brazil as “Onion Walls”.
That is, say we have a wall with three layers, instead of setting a basic wall with three different layers of materials.They model three different walls, each one with a single layer of material.

Now i need to group these walls into a single group of walls Based on their location. I do it in a rather inneficient way, i select every single one of then and use the join comand to do it. Is there a way to make it faster ?

Thank you all in advance!

Hi @ramoon.bandeira

In our office this is good practice if we want a BOQ with the correct quantities. :slight_smile:

This is of no help tho

Hi @ramoon.bandeira,

I do not know of a tool that do what you want. However, if I had to design a custom node that helps, my first thoughts would go towards geometry intersection.

I would :

  • get the intersection of all the walls with themselves (lacing set to cross product, or optimized with a python script).
  • for each two intersecting walls, check if the intersection is a surface that exceeds a given area (to correctly determine if the wall are in “onion” configuration or not)
  • If the surface exceeds that given area, put those walls in a sub-list and memorizing their initial index
  • After checking, merging all the two-walls sublists containing the same index and ignoring all the duplicates. From that moment, you will get a list of sublists that contains all the layers of each onion.

However, i suspect that designing such a node require some time and a lot of optimizing if you do not want your computer spending half an hour doing all the calculation.

Hope it helps in some way

1 Like

I think that the solution is here, however, i think that it will take a long time processing for big projects…

There is definitely a part of the solution there. But the problem difficulty of the graph you want to do is not to determine if the walls are simply intersecting, but is to determine if they are intersecting in a very specific way.

There will surely be a long processing time for big projects, but designing such a graph will demand a lot of optimizing. In a first time you could try operating only on walls that share a given direction for instance, or walls that have the same height/width, etc.

Unless I am missing something, this is clearly no simple task.

Well i think i would need to perform this operation for each level in the project.
And then i am thinking about grouping walls by proximity, so the Element.Geometry and Geometry.DoesIntersect nodes would haver fewer inputs.
That would be a solution… but stil, would not be the perfect one.

I think i should avoid using the Solids for the test of intersection, is think if i did it with lines would be faster too. What do you think @mellouze

Probably, but it depends on a lot of things and on what of are wanting to achieve.

There is no inherent problem about manipulating lines (and one should always try to avoid computing geometries intersection); but, for instance, if you want to join only parallel walls (and not all the walls contained in a single level), you will certainely need a way to distinguish two walls to join from two others.

Any solution imply a lot of checking, may it be on lines or solids.

1 Like

another thing i just realized, i only need to join the walls that have windows attached to it with the other parallel walls. That’s a ton less processing.

Well, that is indeed a lot more. I think you should just check for each window which wall it is intersecting, and then join those walls (care about duplicates if you have multiple windows attached to a single groupe of walls). No need to intersect the walls anymore I guess, as we found another way to discriminate the walls we needed.

For the intersection between windows and walls, I strongly recommend applying the Element.BoundingBox node and the BoundingBox.ToCuboid node to the Windows elements. Just see for each cuboid created that way which wall it is intersecting. That should do the trick (with the help of a little list manipulation afterwards).

1 Like