Fastest way to get to know if element intersect with a bounding box

I have lots of elements to check whether the elements intersects a solid. The bounding box intersection check nodes by BimorphNodes does indeed works faster, but it’s very inaccurate. For example if I wanted to check for an air teminal (approximately 100 units in measurement) intersection with ceilings (approximately 10000 or less units in measurements), with how the nodes works, it’ll create another bounding box for ceiling and check whether the two boxes intersect, this become an issue for me because the bounding box of the ceiling will include another ceiling (another elements).

What I’m trying to achieve is a very simple things (yet huge amount data) that return whether the air terminal intersect with the ceiling below it (true/false). Any ideas how to solve this (whether python/nodes will do).

EDIT: Or what’s inside the bounding box of the air terminal (as air terminals is usually placed on the ceiling, thus portion of the ceiling will be inside the bounding box) will do too. The GetElementsInside the bounding box in BimorphNodes doesn’t work as the ceiling does not fully inside the box (large ceiling).

Thanks in advance.

Hi @judithdwilliamsG5VAE

Instead finding 1000’s of intersection elements i would suggest use Geometry.Distance to and filter the elements which has min. distance value. Check out Springs.Geometry.IndexByDistance it will help you get started.

Good Luck!

1 Like