Hello, I want to use vtkRuledSurfaceFilter to create surface between two closed lines. These lines have the same number of points. How can I proceed to generate surface by connecting the same index point of each line? I use the method SetRuledModeToPointWalk() but it doesn’t work. Need help please?
Thanks
Hello,
My two cents: the point indexes will certainly change in the output for one of the closed lines. For example, both closed lines have a point with index 0. In the result, one of the zero-index points will have another index (perhaps index n0, where n0 is the number of points of the first closed line). If you need to keep the original index information in the output, I suggest you to store the original index values as a scalar values in the input data sets.
best,
PC
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();
I think this is possible using vtkPolyData at a low level. E.g. Defining vtkCells yourself
Yes it works by using vtkCells. Thanks.