Divide irregular flat surfaces

Hi, I have little exprience with GH and am trying to divide a collection of irregular surfaces with a similar grid, and have no idea how to do this. I tried using isotrim but it ignores the surface original shapes, and also thought of trimming them but that didn’t work as well.
Any help will be greatly appreciated![SRF-DIVIDE.gh|attachment]

SRF-DIVIDE.gh (30.2 KB)

You really need to give some example of what you mean by “divide”, on these irregular surfaces and not just the most “regular” one.

1 Like

Hi, sorry.
Attached is a clearer image -
the idea is to divide them into square-like tiles roughly the same size. they don’t have to be equal but just match the outline of the surface they’re dividing

Ok, what about these guys?

Does this work for you/
SRF-DIVIDE-b.gh (22.2 KB)

1 Like

Yes, I see what you did. Very clever.
Thank You!

You’re welcome! I’ll just mention that most of the curves in the periphery of each region are not closed. I tried it with Region Intersection instead of Trim with Region because that does result in closed curves, but I had to reduce the grid to a 50x50 so it would end any time today. Another alternative, if you have the Pufferfish addon is to use the Close Curve component, which will do just that, but with some slight inaccuracies, in this case.

Here is something that uses a minimal Bounding Box for each of the ‘curves from plan’, thanks to Riccardo Majewski (@maje90), from here:

SRF-DIVIDE_2021Oct23a.gh (37.3 KB)

To see the ‘Tree/List Viewer’ output, disable preview on the ColorB cluster.

1 Like

You could get it 10x faster, if you can live with 5% more of boundingbox area doing it by native components:

These are great! Thanks alot!

The white group (below) returns surface fragments. This was much more difficult than it should be, requiring use of Repeat Data (yellow group) to match data trees. And there are a few fragments missing due to mystery SrfSplit failures.

SRF-DIVIDE_2021Oct23b.gh (46.0 KB)

Region Intersection puts one too much:

Works for me now, though it didn’t when I tried it earlier.

SRF-DIVIDE_2021Oct23c.gh (40.3 KB)

As before, disable preview on the ColorB cluster to see the ‘Tree/List Viewer’ output.

How did you break SrfSplit (red component in your image)?

seems to be a tolerance issue. Now it works also on my machine.

That’s a good question. I thought maybe hitting escape to stop it calculating. Can’t replicate it