Join walls that intersect or are attach to each other

I wonder if you know if there is a way to join walls that are attach to each or intersect.
We have this python script and dyn kindly shared that join all the wall types in a model the problem is that it join elements even if they do not intersect.


Sometimes the definition finishes and leave the model full of warnings of elements that do not intersect and sometimes dynamo crashes due to the amount of walls.

Hello,
The reason for getting all those errors is that in the above script every wall is joined with every other wall in order to over come this we need to first find out only those walls that intersect and join those only. The script below may help solve you problem though it would take a long time to run for large projects. It would be great if you can share the revit file and along the reason for joining the walls then it would be possible to optimise the script for that.


WallJoin.dyn (11.7 KB)

3 Likes

This thread seems to have provided a solution for this, be sure to read the whole thing because it seems the Python code that was shared had a few errors that were later resolved but not revised within the thread:

Edit: Looks like @SouravGanguli and I were posting at the same time, and now you have a full solution :slight_smile:

2 Likes

Hello Sourav, that graph look very promising, I am going to definitely give it a try. thank you very muuuch!!!
The reason for joining walls is that we model our external walls by levels, (they way they are going to be built and how the information is going to be listed in schedules)
However when we need to create detail elevations using Hidden Lines Visual Style, walls that are not joint show the separation line between the two, please see images attached
Our projects(Links) differ in size quite a lot but ideally we would like to use this graph in projects size from 10 up until 300units, do you think your script will be able to handle such amount of operations in a decent time???

Sourav,
Your graph works perfectly!!!
I have tested on a medium size model (50 Units) where we have 96 external walls in total and took 13minutes to run on a quite powerful machine.
I wonder how long it will take on a bigger project??? In order to optimize the operations I have filter by wall type.
Many thanks for your help!!!

I will test to night on a project with 1600 external walls, I wonder if the script will finish?

BIM ADMIN,
Glad to hear that it worked.I also use dynamo to join the walls in order to to remove the line between wall but please keep in mid that all those join operations for a large model will affect the model performance,therefore I use it only after I have completed all edits to the document.
The script I use is slightly different.I would suggest you make the following changes to the script in order to improve editing performance-

1.Run the script on a per level basis that is the script will be run only on a particular level and the level above it this will greatly reduce the calculation time as the amount of geometry intersection check it will have to perform will be greatly reduced.As it it is all intersection check between the first floor walls and 3rd floor walls will return false,inspite of that they will be calculated and so on.

2.If the floors are typical and has been copied with the past aligned to selected level command then no need to run intersection check, if the walls are collected by level then the walls from the 2 list can be directly plugged into the join geometry node, the walls are collected in the same order therefore the wall one on top of one another will have the same index in the 2 list. This will greatly reduce run times.(If the walls are in groups the groups need to be collected and walls filtered out from groups)

3.The walls may further filtered based elements visible in view node.

    The best way to optimize the script is to  reduce the number of geometry intersection it would have to calculate.

Thank You
Sourav Ganguli

Thank you very much for your support Sourav, I left the computer on tonight and when I came this morning Revit was crashed, I wonder what would cause the issue?
Anyway as you suggested we would need to batch the operations in sectors or end up doing this manually if the process is too long…
Thank you very much again

Hello Sourav,
I think the issue here is using the geometry and does intersect nodes.
I think it will quicker to create a list of elements that match the top constraint of a level with the base of the other level and create another list extracting the points of the curves and filter out the elements that have similar points.
don’t you think that this will be computed faster???
the problem with this workaround will be if we have attachments on walls??? this procedure wont work!

I am not sure what caused the crash it may be due lack of enough RAM or the computer trying to go to sleep mode while the script is running, just guesses. They is lot of scope to optimize the script further for example removing the permutations with elements from the same level etc.
I have not tried you suggestion to improve model performence therefore am not sure of its estimated performance gain.
I would suggest you give Bimorph clash detection node a try it should reduce calculation time,it has done wonders for me.:grinning:

2 Likes

Dont know if anyone still cares but I came here trying to solve a similiar problem and ran into the same runtime error. Element.boundingbox is a lot faster than get.geometry. A LOT

1 Like