I have a mesh that has holes. I found a paper, An Automatic Hole-Filling Algorithm for Polygon Meshes
It details an algorithm that uses a k-d tree for finding holes (from a manifold triangle mesh). The steps are as follows:
Step1: Compute the center of each triangle and the correspondences between the center and three vertexes of the triangle;
Step2: Set up the Kd-tree according the centers of triangles;
Step3: Search the Kd-tree and check up the topological connectivity of the corresponding edges, and find the boundary edges;
Step4: Distinguish the different boundary loops according to the topological connectivity of vertexes;
I do not not understand how this algorithm actually finds the hole, can some please explain this in Layman's terms so that I can implement it --- I know there are probably better way out there of finding holes but I need to understand this particular algorithm.