public void triangulate()
        {
            double minArea = 1000 * charLength * DOUBLE_PREC;

            newFaces.clear();

            foreach (object o in faces)
            {
                Face face = (Face)o;
                if (face.mark == Face.VISIBLE)
                {
                    face.triangulate(newFaces, minArea);
                    // splitFace (face);
                }
            }
            for (Face face = newFaces.first(); face != null; face = face.next)
            {
                faces.Add(face);
            }
        }
        protected void resolveUnclaimedPoints(FaceList newFaces)
        {
            Vertex vtxNext = unclaimed.first();

            for (Vertex vtx = vtxNext; vtx != null; vtx = vtxNext)
            {
                vtxNext = vtx.next;

                double maxDist = tolerance;
                Face   maxFace = null;
                for (Face newFace = newFaces.first(); newFace != null;
                     newFace = newFace.next)
                {
                    if (newFace.mark == Face.VISIBLE)
                    {
                        double dist = newFace.distanceToPlane(vtx.pnt);
                        if (dist > maxDist)
                        {
                            maxDist = dist;
                            maxFace = newFace;
                        }
                        if (maxDist > 1000 * tolerance)
                        {
                            break;
                        }
                    }
                }
                if (maxFace != null)
                {
                    addPointToFace(vtx, maxFace);
                    if (debug && vtx.index == findIndex)
                    {
                        Console.WriteLine(findIndex + " CLAIMED BY " +
                                          maxFace.getVertexString());
                    }
                }
                else
                {
                    if (debug && vtx.index == findIndex)
                    {
                        Console.WriteLine(findIndex + " DISCARDED");
                    }
                }
            }
        }