[Closed] Detecting and deleting/filling solid holes
I’m looking for a way in MaxScript to detect and delete solid holes in a model. The picture below should clarify what I mean, since trying to search with the term “hole” in the context of meshes means something different but I don’t know how else to word it. The picture is just a toy example, i but what I have is geometry originally imported as a body object, though easily converted to mesh or poly as needed. I’m looking for a way to delete the hole through the solid, which means deleting the surfaces highlighted in red and filling in the top/bottom to cover the hole. I would like to delete holes under a certain diameter, they may be through flat or curved surfaces, and there could be anywhere from 0 to 100s on any given surface. Is there a good way to automate this task? I have some experience with 3ds Max/MaxScript, but haven’t been using it for very long.
Converting NURBS surfaces into editable poly is definitely not a good idea, so you’ll have to deal with editable mesh
You’ll need to sort faces in your mesh into elements, then look which of them have vertices with opposing normals, those are the hole’s inside surface.
imagine a cube with a hole in the shape of a cone, one end with big hole the other one small…
So is that hole big or small ?
The actual meshes I will be doing this on will be much more complex than the cube, so there will be faces that have opposing normals that aren’t the interior of a hole.
Also as far as conical holes through the part, I can almost definitely assume that will never occur in my meshes, and even if it did, if I could detect the hole I could theoretically delete or retain it based on min or max of the two ends.