Find nearest clash detection


I am trying to figure out how to find nearest element, so i can try to operate the clash detection only on those who are closer, and not all the elements, if i dont do it, the Dynamo code runs for ages, so I am trying to accelerate the process basically.

I was thinking on a spatial grid made out of boundingbox, but better ideas? how to develop it in Dyn - Python?


Use BimorphNodes Element.IntersectsElement :wink:

Otherwise, get the bounding box of the question element, collect the surrounding elements (BoundingBox intersects filter), then perform the clash detection on the elements which pass the filter.

somehow the biomorphNodes Element.Intersectselement doesnt work for IFC, just revit elements, thats why I am doing it by myself.
The logic of the boundinBox sounds good, I will give it a try

It does depend on the nature of the geometry in IFC - typically if its not supported, then extracting solids from the IFC is also not supported (which you’re going to need to perform the clash test). However, if you can obtain the solids then you could try Element.IntersectsSolid instead and see if that offers any solution.

ei Thomas,
I was just watching your web-site of biomorphNodes, I learnt a few things there, thanks! :slight_smile:

1 Like

In case this does not work, is there an alternative?

@ethanscott278 can you elaborate? Work with what? IFC? Explain your workflow and what isn’t working if you expect an answer.