<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=windows-1255">
<META content="MSHTML 6.00.2900.2668" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV>Hi All,</DIV>
<DIV>&nbsp;</DIV>
<DIV>I need your help&nbsp;to display vector results on a deformed 
UnStructuredGrid - should be simple but...</DIV>
<DIV>I'm using&nbsp; ...SetActiveVectors "vector"... which seems to be wrong 
because the displayed vector is the one used for the warp (DISPLACE). I searched 
the web but could not find an example of that kind.</DIV>
<DIV>(Using VTK 4.2+tcl/tk 8.3.2 &nbsp;on Windows/XP)<BR></DIV>
<DIV>The data file can be found at:</DIV>
<DIV>
<DIV><A 
href="ftp://ftp.netvision.net.il/home/f/fempp/contact_3d.io0_0002.vtk">ftp://ftp.netvision.net.il/home/f/fempp/contact_3d.io0_0002.vtk</A> 
</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV>Thanks,</DIV>
<DIV>Gil </DIV>
<DIV>&nbsp;</DIV>
<DIV>Email: <A 
href="mailto:gil@femplusplus.com">gil@femplusplus.com</A><BR>---</DIV></DIV></DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;</DIV>
<DIV>
<DIV>########## the tcl file</DIV></DIV>
<DIV>package require vtk</DIV>
<DIV>&nbsp;</DIV>
<DIV># read UnStructured mesh + results (nodal 
vectors+scalars)<BR>vtkUnstructuredGridReader reader<BR>&nbsp;&nbsp;&nbsp; 
reader SetFileName "contact_3d.io0_0002.vtk"<BR>&nbsp;&nbsp;&nbsp; reader 
SetScalarsName "s11"<BR>&nbsp;&nbsp;&nbsp; reader SetVectorsName 
"DISPLACE"<BR>vtkWarpVector warp<BR>&nbsp;&nbsp;&nbsp; warp SetInput [reader 
GetOutput]</DIV>
<DIV>&nbsp;</DIV>
<DIV>vtkGeometryFilter mat<BR>&nbsp;&nbsp;&nbsp; mat SetInput [warp 
GetOutput]<BR>vtkPolyDataNormals normals1<BR>&nbsp;&nbsp;&nbsp; normals1 
SetInput [mat GetOutput]<BR>&nbsp;&nbsp;&nbsp; normals1 SetFeatureAngle 
60<BR>vtkLookupTable lut<BR>&nbsp;&nbsp;&nbsp; lut SetHueRange 0.0 
0.66667<BR>vtkPolyDataMapper matMapper<BR>&nbsp;&nbsp;&nbsp; matMapper SetInput 
[normals1 GetOutput]<BR>&nbsp;&nbsp;&nbsp; matMapper SetLookupTable 
lut<BR>&nbsp;&nbsp;&nbsp; matMapper SetScalarRange 0.1 0.9<BR>vtkActor 
matActor<BR>&nbsp;&nbsp;&nbsp; matActor SetMapper matMapper</DIV>
<DIV>&nbsp;</DIV>
<DIV><BR># display the vector field REACTION</DIV>
<DIV>&nbsp;</DIV>
<DIV># the following is not working - reader stays with the DISPLACE 
vector<BR>[[warp GetOutput] GetPointData] SetActiveVectors "REACTION"<BR>warp 
Update&nbsp;&nbsp;;# this doesn't help</DIV>
<DIV>&nbsp;</DIV>
<DIV>vtkVectorNorm norm0<BR>&nbsp;norm0 SetInput [warp GetOutput]<BR>&nbsp;norm0 
NormalizeOff<BR>&nbsp;norm0 SetAttributeModeToUsePointData</DIV>
<DIV>&nbsp;</DIV>
<DIV>vtkHedgeHog hhog0<BR>&nbsp;hhog0 SetInput [norm0 
GetOutput]<BR>vtkPolyDataMapper hogmapper0<BR>&nbsp;hogmapper0 SetInput [hhog0 
GetOutput]<BR>vtkActor hogActor0<BR>&nbsp;hogActor0 SetMapper 
hogmapper0<BR>&nbsp;[hogActor0 GetProperty] SetColor 0 0 1</DIV>
<DIV>&nbsp;</DIV>
<DIV>norm0 NormalizeOff<BR>hhog0 SetScaleFactor 10.0</DIV>
<DIV>&nbsp;</DIV>
<DIV># graphics<BR>vtkRenderer ren1<BR>vtkRenderWindow 
renWin<BR>&nbsp;&nbsp;&nbsp; renWin AddRenderer 
ren1<BR>vtkRenderWindowInteractor iren<BR>&nbsp;&nbsp;&nbsp; iren 
SetRenderWindow renWin</DIV>
<DIV>&nbsp;</DIV>
<DIV># Add the actors to the renderer, set the background and size<BR>#<BR>ren1 
AddActor matActor<BR>ren1 AddActor hogActor0</DIV>
<DIV>&nbsp;</DIV>
<DIV>ren1 SetBackground 1 1 1<BR>ren1 ResetCameraClippingRange<BR>renWin SetSize 
700 550<BR>iren Initialize</DIV>
<DIV>&nbsp;</DIV>
<DIV># prevent the tk window from showing up then start the event loop<BR>wm 
withdraw .<BR></DIV>
<DIV>########## end of tcl file</DIV>
<DIV>&nbsp;</DIV></BODY></HTML>