Anemone loop help

Hello,
I am fairly new to Anemone. I am trying to make a definition to find largest geometry that does not intersect with given vectors (with Mesh | Ray intersection component).

I made a loop (I posted a file) and it kind of works but i still have a couple of problems:

  1. I have no idea how to save geometry so when loop is done im left with nothing :slight_smile:

  2. Each extrusion grows until it intersects. When there is an intersection found (hit output of MeshRay) loop jumps to next extrusion and so on. So it just stops growing. What i would like to do is REMOVE last step (subtract ā€œ1ā€), so that i get biggest geometry that is NOT intersecting rays instead of first that does.

This can be done afterwards of course (If i knew how to output geometry after a loop that is) but I would like a loop to handle it automatically.

Please take a look at my definition. Iā€™d appreciate your help and ideas.

RAYS LOOP.gh (37.6 KB)