[vtkusers] UnstructuredGrid and 3DGlyph

Helvin Lui helvinlui at gmail.com
Tue Sep 15 01:13:13 EDT 2009


Hello,
Sorry to bother but I have a problem for which I cannot yet fine the answer
to online.
How do I apply a 3DGlyph to an unstructured grid? I can easily find examples
of applying it to like spheresource, or conesource objects, but not to
unstructuredgrids. When I try to get the outputport of my unstructuredgrid,
an erros results saying "Attribute error: GetOutputPort".

     aMeshGrid = vtk.vtkUnstructuredGrid()
     aMeshGrid.Allocate(2, 180)
  #cell_type and element_ID_list initiated
     aMeshGrid.InsertNextCell(cell_type, element_ID_list)
  #meshPoints created. it is of class vtkPoints
     aMeshGrid.SetPoints(meshPoints)
     glyph = vtk.vtkGlyph3D()
     glyph.SetInputConnection(aMeshGrid.GetOutputPort())

I tried using GetOutput instead of GetOutputPort, but the same error
results. Is it because it simply does not work with unstructured grids? Is
there another way?
Sorry I didn't include all my code, because it gets long and tedious. But if
you would like to see my code, by all means, let me know.

Regards
-- 
Helvin

"Though the world may promise me more, I'm just made to be filled with the
Lord."
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20090915/6f74f0e0/attachment.htm>


More information about the vtkusers mailing list