Intersecting surface with windows with larger array of panels

Hi,

I am working on a script that intersects rectangular panels with a surface. When the surface has no holes (windows) it works fine:

Surface:
image

Panels:
image

Intersection:

image

However, when i add a hole in the surface (Windows) the script acts strangely and does not intersect the panels with the surface that i want:

Surface:
image.

If i use region intersection nothing happens. If i used case there are no intersections.

If i used solid intersection this is the outcome:
image

I want the opposite of this where the panels intersect with the surface and not the opposite. Any ideas?

Here is the file. For some reason i could not put part of the script in a cluster but the important bits are on the top left:

intersection of panels.gh (41.7 KB)

Your definition is difficult to understand with so many wires going backwards. I generally try to avoid this!

There was a problem somewhere here:

I simplified the i output of the List Item component to have paths numbered in an easier way. replaced your text panel on the P input of the Tree Item component with a slider.

Instead of trying to intersect panels and your surface, I checked which area centroids of the panels are inside your perimeter.

intersection of panels.gh (50.7 KB)

1 Like

I know, it probably was not an easy task to understand my script, i apologize for this! Also, this solution seems a lot more convenient and practical, thank you so much! i will have a play around with it.

Thank you!

I couldn’t really make sense of your script so just took the geometry that was giving you trouble and built from there. Rather than using a grid, if you array some lines to give that grid, the surface split component works quite nicely.

intersection of panels MBH.gh (12.7 KB)

2 Likes

Thanks @Matt_Harwood, didn’t think of doing it this way but looks like this works too. Ill have a pay around with it. Thanks you!
:slight_smile: