How do I cull mesh items based on area?

Im trying to create a generative algorithm for settlement planning, wherein the search space for selecting the study patch is defined by a circular bounding box. I divided the selected study patch terrain into a grid of smaller meshes based on slope.
Now I am trying to cull these mesh items, such that if the total area of the study patch exceeds 'x’sqkm, cull the remaining mesh items ( preferably in an irregular way )

Could some one help me with this ?

The image attached is kind of the result I want, but the script for it is culling random mesh items based on their proximity to the bounding curve.
I want to do a similar operation based on areas.


Try to share your script which you’re working.


Generative_Design_ (445.3 KB)

Script Im working on

Thank you, Ive attached the script