CurtainGridLine segments surrounding certain curtain wall Panels

My objective is to delete all grid line segments which aren’t adjacent to certain types of panels. To select these segments, I have imported the geometry of the panels into dynamo, got the PolyCurve of the grid line, and tried to get intersections between them.

I get intersections using Geometry.DoesIntersect or BoundingBox.Intersects, but that only show the intersections with the entire grid line, not its segments. And if i get the curves from the polycurve (=segments), i cannot get any intersections with the panels. I have tried offsetting them, but it does not help.

Not sure if i’m even going about this correctly; or perhaps i just don’t understand how to work with polycurves. Help very much appreciated.

Hello @jensa

Can you check the offset of the geometry of the panels. (Z-value) and offset of the grids (Z value)
and keep all the lines in the same plane and try again

Sagar Jain

1 Like

Thank you for the answer! The curves were definitely going through the geometry of the panels, if i understood you correctly.The issue was with lacing, using cross product lacing yielded results.

This is the version of the script that had worked for me in the end:

1 Like