How to use vtkRuledSurface

Thank you for your reply.
Perhaps my explanation is not quite clear: I don’t need to keep the original index information in the output. I need to connect each line of the first to its correspondant on the second (same index) by triangulation. Please see the uploaded picture.

Both closed lines have the same number of points.
I used the code below but it doesn’t work.

vtkNew<vtkAppendPolyData> append;
append->AddInputData(closedLine1);
append->AddInputData(closedLine2);
append->Update();

vtkNew<vtkRuledSurfaceFilter> ruledSurfaceFilter;
ruledSurfaceFilter->SetInputData(append->GetOutput());
ruledSurfaceFilter->SetOrientLoops(0);
ruledSurfaceFilter->SetCloseSurface(1);
ruledSurfaceFilter->SetRuledModeToPointWalk();
ruledSurfaceFilter->Update();