I want to detect (and close) openings and holes/hollowed out parts of a closed mesh. I know that for an open mesh, this can be done by finding the boundary edges (edges belonging to only one triangle) as described here.
But what about a closed mesh, where such boundary edges don't exist? Below is an example image. The box has an opening at the top, while the cylinder has a complete hole. Is there an algorithm to detect these things?