[vtkusers] Programmable source not visualized
Favre Jean
jfavre at cscs.ch
Mon Feb 22 11:39:07 EST 2016
you are pretty close to the solution. Remember to set the "output dataset type" to vtkUnstructuredGrid (at the top of the ProgrammaableSource panel, and substitute your code
# Add the points and hexahedron to an unstructured grid
uGrid = vtk.vtkUnstructuredGrid()
uGrid.Allocate(1,1)
uGrid.InsertNextCell(hex_.GetCellType(), hex_.GetPointIds())
uGrid.SetPoints(points)
uGrid.GetPointData().SetScalars(scalars)
with this code, which makes use of the predefined object called 'output"
output.Allocate(1,1)
output.InsertNextCell(hex_.GetCellType(), hex_.GetPointIds())
output.Points = points
output.PointData.SetScalars(scalars)
-----------------
Jean/CSCS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20160222/cd33b042/attachment.html>
More information about the vtkusers
mailing list