<!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> </DIV>
<DIV>I need your help to display vector results on a deformed
UnStructuredGrid - should be simple but...</DIV>
<DIV>I'm using ...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 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> </DIV>
<DIV>
<DIV>Thanks,</DIV>
<DIV>Gil </DIV>
<DIV> </DIV>
<DIV>Email: <A
href="mailto:gil@femplusplus.com">gil@femplusplus.com</A><BR>---</DIV></DIV></DIV>
<DIV> </DIV>
<DIV> </DIV>
<DIV>
<DIV>########## the tcl file</DIV></DIV>
<DIV>package require vtk</DIV>
<DIV> </DIV>
<DIV># read UnStructured mesh + results (nodal
vectors+scalars)<BR>vtkUnstructuredGridReader reader<BR>
reader SetFileName "contact_3d.io0_0002.vtk"<BR> reader
SetScalarsName "s11"<BR> reader SetVectorsName
"DISPLACE"<BR>vtkWarpVector warp<BR> warp SetInput [reader
GetOutput]</DIV>
<DIV> </DIV>
<DIV>vtkGeometryFilter mat<BR> mat SetInput [warp
GetOutput]<BR>vtkPolyDataNormals normals1<BR> normals1
SetInput [mat GetOutput]<BR> normals1 SetFeatureAngle
60<BR>vtkLookupTable lut<BR> lut SetHueRange 0.0
0.66667<BR>vtkPolyDataMapper matMapper<BR> matMapper SetInput
[normals1 GetOutput]<BR> matMapper SetLookupTable
lut<BR> matMapper SetScalarRange 0.1 0.9<BR>vtkActor
matActor<BR> matActor SetMapper matMapper</DIV>
<DIV> </DIV>
<DIV><BR># display the vector field REACTION</DIV>
<DIV> </DIV>
<DIV># the following is not working - reader stays with the DISPLACE
vector<BR>[[warp GetOutput] GetPointData] SetActiveVectors "REACTION"<BR>warp
Update ;# this doesn't help</DIV>
<DIV> </DIV>
<DIV>vtkVectorNorm norm0<BR> norm0 SetInput [warp GetOutput]<BR> norm0
NormalizeOff<BR> norm0 SetAttributeModeToUsePointData</DIV>
<DIV> </DIV>
<DIV>vtkHedgeHog hhog0<BR> hhog0 SetInput [norm0
GetOutput]<BR>vtkPolyDataMapper hogmapper0<BR> hogmapper0 SetInput [hhog0
GetOutput]<BR>vtkActor hogActor0<BR> hogActor0 SetMapper
hogmapper0<BR> [hogActor0 GetProperty] SetColor 0 0 1</DIV>
<DIV> </DIV>
<DIV>norm0 NormalizeOff<BR>hhog0 SetScaleFactor 10.0</DIV>
<DIV> </DIV>
<DIV># graphics<BR>vtkRenderer ren1<BR>vtkRenderWindow
renWin<BR> renWin AddRenderer
ren1<BR>vtkRenderWindowInteractor iren<BR> iren
SetRenderWindow renWin</DIV>
<DIV> </DIV>
<DIV># Add the actors to the renderer, set the background and size<BR>#<BR>ren1
AddActor matActor<BR>ren1 AddActor hogActor0</DIV>
<DIV> </DIV>
<DIV>ren1 SetBackground 1 1 1<BR>ren1 ResetCameraClippingRange<BR>renWin SetSize
700 550<BR>iren Initialize</DIV>
<DIV> </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> </DIV></BODY></HTML>