It returns a set of MeshFace objects that contain indices that reflect the array indices in the polyline. But I guess that this is nothing more than the series (0, 1, N-2), (N-2, 2, N-3), (N-3, 3, N-4), … to iteratively create triangles out of a closed polygon.
In another post I see that you have hexagons? In that case it might be more useful to add the average point of all 6 points and draw triangles from each edge of the hexagon to the middle point, to give 6 triangles that form the hexagon. It will be nicer than the iterative method.