- triangleStrip1->GetPointIds()->SetId(triangleIndex+2,triangleStripStart);
- triangleStrip1->GetPointIds()->SetId(triangleIndex+3,centroidId);
+ vtkNew<vtkTriangle> triangle;
+ triangle->GetPointIds()->SetId(0, index);
+ triangle->GetPointIds()->SetId(1, triangleStripStart);
+ triangle->GetPointIds()->SetId(2, centroidId);
+ cells->InsertNextCell(triangle);
+ }else if(index-increment > initial){
+ vtkNew<vtkTriangle> triangle;
+ triangle->GetPointIds()->SetId(0, index);
+ triangle->GetPointIds()->SetId(1, index-increment);
+ triangle->GetPointIds()->SetId(2, centroidId);
+ cells->InsertNextCell(triangle);