Ok, another step closer.<br><br>First off, something very bizarre happens when I close the loop in the input points.<br><br>So, the first time off, I tried without closing the loop as follows:<br><br>float pts[3][3] = {{-49.2188
, -19.6875, zOffset},<br> {42.6542, 58.125, zOffset},<br> {57.6562, -0.9375, zOffset}, <br><br>vtkFloatArray* pcoords = vtkFloatArray::New();<br>pcoords->SetNumberOfComponents(3);
<br>pcoords->SetNumberOfTuples(4);<br>for (int i=0; i<3; i++)<br>{<br> pcoords->SetTuple(i, pts[i]);<br>}<br>// Create vtkPoints and assign pcoords as the internal data array.<br> vtkPoints* points = vtkPoints::New();
<br> points->SetData(pcoords);<br> vtkPolyData* polydata = vtkPolyData::New();<br> polydata->SetPoints(points);<br><br><br> vtkCellArray* strips = vtkCellArray::New();<br> strips->InsertNextCell(3);<br> strips->InsertCellPoint(0);
<br> strips->InsertCellPoint(1);<br> strips->InsertCellPoint(2);<br> <br>polydata->SetStrips(strips);<br><br>I am attaching a screenshot here that displays what happens. At least the triangle part looks ok!
<br><br>Now, when I close the loop, the output goes completely bonkers!<br><br>Here is a screenshot of the output with the same points when the loop is closed.<br><br>As you can see from the points, it is a simple triable with no cross overs or anything but it seems to mess up the shape completely...
<br><br>Any idea what is happening here?<br><br>Cheers,<br>Anja<br><br><br><br><br>