How to optimize the clash detection process in dynamo?

Hello everyone, I’m trying to create a graph about clash detection with dynamo. I’m using the node Element.IntersectsElement from Bimorphnodes but it takes a very long time. As you can see in the screenshot below, It’s about over 30 minutes but not done yet. So can anyone help me if there are other ideas to optimize this process? I’ll be very appreciated. Thank you in advance.

What exactly are you clashing? I’ve benchmarked it up to 80 million potential clashes on mega projects (like gas refineries) and it typically takes 2-3 mins. There’s probably some other part of your graph causing this in all probability - there is nothing faster than BimorphNodes not unless you want to explore possibilities using APIs other than the Revit API.


Are you running it only in Dynamo Editor? Have you tested it through the Dynamo Player? I’ve found that things can sometimes run smoother through the Player

Also, what is the size of the list of inputs that you are feeding it? I’ve previously ran a script every day that progressively increasing runtime up to multiple hours, and it seemed to be due to the amount of data points that the API was processing.

1 Like

Double check you don’t have something like 80 million element bindings in play, as that would first require attempting to pack everything previously created into memory, which would be a disaster.


Really? In my project, I have to put opening family instances into place where the pipes/ducts go through the walls/floors (see the screenshot). Sometimes, I miss few positions. So I create this graph in order to check if the pipes/ducts have openings or not. My idea is:
Step 1. Check intersections between pipes/ducts and walls/floor → List 1
Step 2. Then use List 1 to check intersection with openings → List 2
Step 3. Set difference between List 1 and List 2, the output is elements which don’t have opening on it.
In order to speed up the process, I’ve filtered elements by levels. It’s about few million possibilities at each level (not 80 million like yours) but like I showed, it takes me over 30 mins (all the elements including pipes,ducts,walls,floors are in the linked model but except the openings)
Can help me check the graph if there is anything wrong?
This is what I’ve got so far:

Sorry for inconvenience I’m a new user so I can’t upload the attachment.

I didn’t test it through the Dynamo Player. I’ve filtered the elements by levels so it just have few million potential clashes. Anyway, thank you for your recommendation. I’ll try it out.

I’ve filtered elements by levels so I just have few million possibilities at each level.

If you are making Revit instances, that is a few million element bindings to deal with. Soudns like you aren’t creating any new elements in this graph though, so the speed is another aspect of how your code is executing. Perhaps check execution times with the Tuneup view extension?

1 Like

Something’s strange. When I switch to check walls intersect with pipes/ducts, it only takes 2-3 mins to execute (the quantity of possibilities are still the same). Then the output is walls not pipes/ducts. Anyway, thank you for your idea. I’ll try it.

cant download it, change sharing restrictions