I have a code block similar to this:<br>
<br>
// First load the points<br>
vtkPoints *newPts = vtkPoints::New();<br>
newPts->Allocate(countVert);<br>
for(i=1; i<=countVert; i++) {<br>
newPts->InsertPoint(i-1, x, y, z);<br>
}<br>
<br>
// Now load up the connectivity<br>
vtkIdList *pts = vtkIdList::New();<br>
pts->Allocate(VTK_CELL_SIZE);<br>
vtkCellArray *newPolys = vtkCellArray::New();<br>
newPolys->Allocate(countPoly);<br>
<br>
for(i=1; i<=countPoly; i++) {<br>
pts->Reset();<br>
pts->InsertNextId(v1-1);<br>
pts->InsertNextId(v2-1);<br>
pts->InsertNextId(v3-1);<br>
newPolys->InsertNextCell(pts);<br>
}<br>
fclose(fptr);<br>
<br>
vtkPolyData *output = vtkPolyData::New();<br>
output->SetPoints(newPts);<br>
newPts->Delete();<br>
output->SetPolys(newPolys);<br>
newPolys->Delete();<br>
pts->Delete();<br>
<br>
Now when I try to query the resulting vtkPolyData, I get segfaults in
the ComputeBounds routines. I tried connecting it to a
vtkPLYWriter, and it saves a file to disk that crashes both 3DSMax
& Paraview. Any ideas what I'm missing here?<br><br>-- <br>Randall Hand<br><a href="http://www.yeraze.com">http://www.yeraze.com</a>