   Merging Polygons
  So I am at the point where I am taking my triangle soup, converting to polygons (retaining connectedness information) and fixing t-junctions, cracks, and gaps, and then simplifying.#1: Can someone roughly outline an algorithm for detecting cracks, gaps, and t-junctions?  (I suspect there will be more than just “an” algorithm.)  Once found, I will know how to remove them.  But for now I do not see how to find them.#2: The important question(s).When I am merging polygons, I take all segments from both polygons and put them into a sorted list, then remove duplicates.  Correct way to go about this?Then I will form all the polygons that can be made from that list of segments, which will be more than one if there are holes.  I combine them into one polygon by adding a 0-width slit from the outer polygon to the holes.  I know that this is the correct thing to do, but:-> A: I find the vertices to connect (from the hole to the outer polygon) by using the closest points between them (the hole and the outer rim).  Is there a robustness problem with this method?  Is there a faster method?  Since this method requires all vertices in one polygon be checked against all in the others.-> B: How should I handle the case where the found vertices are so close together (but not exactly together) than they are less than the width of my fat planes?  By being so close, any triangles later formed using that new edge will be almost guaranteed to be degenerate.  Currently I would plan to merge them instead of making a line between them, but then I would have to redo my cracks/gaps/t-junction steps.B may not even be a problem at all, however, since I already performed a step to merge close vertices.  But just in case, I would like some insight into this problem.Thank you,L. Spiro   