private Point[] progressSplines(Stack<Point> stack)
    {
        Point p = null;
        Point begin = null;
        Spline s = last;
        Spline next = null;
        while (s.prev != null)
        {
            next = s;
            s = s.prev;
            if (s.prev != null)
            {
                Point q = addPointForMiddleSpline(s, true);
                stack.add(addPointForMiddleSpline(s, false));
                if (p != null)
                    connect(p,q);
                else    begin = q;
                p = q;
            }
        }
        if (next != null)
        {
            Point[] ar = constructCircle(s, Math.PI + getAngle(next), p);
            p = ar[0];
            if (begin == null)  begin = ar[1];
        }
        Point[] result = {p, begin};
        return result;
    }