Splitting the floors of a building, and being able to pick one side only

I have planes like this(floors of a building);

Then I would like to use the green plane to split the floors into two pieces;

Then I would like to pick the split surfaces that are on the right side of the screen(the bigger parts) but for the bottom two levels, it picks the ones on the left(the ones that I want to get rid of);

I can manually pick those but the # of floors might change, and I would like to be able to do that automatically. Any solutions you can think of? The following image is what I tried, along with the .gh file;


Trimming Planes.gh (24.8 KB)

Hi
You can try to sort by area.like this

Trimming Planes.gh (28.8 KB)

1 Like

You could also sort the planes in X-direction (as an other option)Trimming Planes_ME.gh (25.6 KB)

1 Like

Thank you for this solution, this would work for most of the part, but as we add more floors, and since the cutter plane is tilted, on upper levels the area that I would like to keep gets smaller than the area we are cutting off. But I will keep this solution. Thank you!

This is great, thank you very much!