C# Recursive Data Stream


I am trying to figure out how I can use output breps as source data for new list to be cutted.

I have 3 surfaces and I would want to cut upper surfaces by lowest surface (using extrude).
After lowest surface has cut 2 upper ones, goal is to use those cut 2 layers as source data, where script would pick the lowest, extrude and cut upper ones.

I am trying to make it dynamic so I could have 3 or 500 surfaces and end result would be list of surfaces that are cut so they are not overlaying each other.

Any ideas how to make this?

Grasshopper runs in cascade, not a loop, so you can’t, unless you use some loops plugin like Anemone or Hoopsnake.

Doesn’t it help you to replicate the C# component at the end?

could you please attache a GH file with internalized original geometries?
maybe it would also help if you could include the first 2 or 3 recursion steps, just to get a clear idea of what you are looking for