Filter elements intersected with beam at the beam's longitudinal direction only

Hi, for example, as the pictures below, I want to get columns and walls intersected with the beam at the beam’s longitudinal direction (i.e., I want to get 1 and 3). The Geometry.DoesIntersect Node gives all the intersected columns and walls. How can I get the intersected ones at the beam’s longitudinal direction only (i.e., 1 and 3 in the picture, excluding 2)? Thanks!



Dynamo file: sample.dyn (39.7 KB)
Model: model.rvt - Google Drive

1 Like

Hi,

You can try to use the Element.GetLocation instead of the Element.Geometry node for the beam.

1 Like

What about getting the start and end points of the beam and then checking which elements intersect with those points?

2 Likes

Thanks for the tips! @Joelmick @johanboo

I used Element.GetLocation to get the location points instead but somehow some points are zeros.

I created a small surface, used Geometry.Transform to transform it to the two small vertical surfaces of each beam, translated the tranformed surfaces a little bit to the outer, then lofted them into solids, finally checked the intersection. It worked although it seems ugly…