[vtkusers] vtkPolyData, mixing vtktriangle and vtkquad
Bryn Lloyd
lloyd at itis.ethz.ch
Mon Nov 7 12:58:17 EST 2011
I am not sure if I completely understand your question, but here is a guess
at an answer.
Assuming you have constructed cell arrays for triangles, vertices etc. for
the a polydata either by calling:
pd->SetPolys(triangles);
pd->SetLines(lines);
pd->SetVertices(verts);
or by calling
pd->Allocate();
Now you can add e.g. a quad by calling:
vtkIdType pts[4] = {n1,n2,n3,n4};
pd->InsertNextCell(VTK_QUAD, 4, pts);
and an extra triangle by calling:
vtkIdType pts[3] = {n1,n2,n3 };
pd->InsertNextCell(VTK_TRIANGLE, 3, pts);
From: vtkusers-bounces at vtk.org [mailto:vtkusers-bounces at vtk.org] On Behalf
Of pablo p del castillo
Sent: Monday, November 07, 2011 6:02 PM
To: vtkusers at vtk.org
Subject: [vtkusers] vtkPolyData, mixing vtktriangle and vtkquad
Hello,
How is possible after SetPolys with quads to vtkPolyData, after add
vtkTriangle?
It seems that AddPolys is not working.
Thanks,
Pablo
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20111107/32302dda/attachment.htm>
More information about the vtkusers
mailing list