Perforate mesh deleting random quads/triangles based on their area size

hello everyone, i’m trying to perforate a mesh with random holes. in the attached example file is a mesh with different sized quads. i want to be able to select the quads that i want to remove from the mesh based on their area size and then delete those quads from the mesh. i then want to thicken and 3d print the mesh.

what I’ve done so far: i’ve managed to ‘deconstruct mesh’ and use the mesh faces output from this to construct individual meshes from the faces. i’ve taken these individual meshes from the faces and culled out the larger mesh sizes i don’t want using ‘larger than’ and ‘cull pattern’ components.

what i need to do and can’t figure out: i need to corelate the remaining list of small meshes from ‘cull pattern’ output with the centroids output from the ‘mesh area’ component so that they can be used as the reference to delete the list of small meshes from the original mesh. i don’t know how to corelate these ?

also, after the list of small meshes has been corelated with it’s corresponding centroid/index, i would then like to filter out some random items from this list of meshes so that the final list of small meshes deleted from the original mesh looks a bit more random and interesting in the final 3d print (rather than a strict list of small faces that are only under a certain area in size).

i would prefer to be able to do this process on a mesh that is triangulated but it seems the ‘triremesh’ component in grasshopper uses a fixed edge length (i’ve tried ‘meshmachine’ to overcome this but can’t get that to work). so i can probably use quads but if you also happen to know how to do this on a triangulated mesh, that would be great too.

fyi, i know how to use mesh closest point, normal, extrude and cut out mesh faces from a Boolean mesh but i’m dealing with meshes with very high quad counts and that process does not work for me here. i’ve also looked at various hole making techniques on meshes throughout the forum. thank you for any input you have into this!

perforate mesh by area.gh (2.8 MB)

Smaller mesh faces will likely concentrate at the high curvature areas after remeshing. So, you are making holes at those areas.

i’ve managed to find a solution to this, i’ve attached the updated script. i’ll update it with a more refined solution after i have developed it a bit more as it now only strips out the smaller areas of the mesh defined by the > number slider but i’m going to develop it to cut out a more random pattern then thicken and smooth it so it can be printed

perforate mesh by area rev1.gh (2.8 MB)

i’ve updated this to produce more random holes in the mesh using random reduce. sub divided and thickened, it’s all a bit crude but it does produce a random hole pattern, maybe it can help someone..

perforate mesh by area rev2.gh (3.0 MB)

I took a look at your script, I don’t have the plugins you are using but you can speed it up greatly using something like this: