<DIV>Dear vtk-users,</DIV>
<DIV>&nbsp;</DIV>
<DIV>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; I am a newbie with vtk and am trying to read 3D tetrahedral mesh from FEA softwares into VTK. </DIV>
<DIV>I converted the FEA mesh into vtk format. I am first trying to read simple mesh of a cube. The input vtk file is as follows:</DIV>
<DIV><FONT size=2>
<P># vtk DataFile Version 2.0</P>
<P>Trial</P>
<P>ASCII </P>
<P></P>
<P>DATASET UNSTRUCTURED_GRID </P>
<P>POINTS 10 float </P>
<P>-1 1 2 </P>
<P>-1 1 0 </P>
<P>-1 -1 2 </P>
<P>-1 -1 0 </P>
<P>1 -1 2 </P>
<P>1 -1 0 </P>
<P>1 1 2 </P>
<P>1 1 0 </P>
<P>0.400316 0.171597 0.759397 </P>
<P>-0.099509 -0.159484 1.126592 </P>
<P>CELLS 16 80</P>
<P>4 7 1 10 2 </P>
<P>4 9 8 2 6 </P>
<P>4 10 1 5 3 </P>
<P>4 10 7 5 1 </P>
<P>4 7 2 10 9 </P>
<P>4 10 9 5 7 </P>
<P>4 6 9 10 2 </P>
<P>4 8 6 9 5 </P>
<P>4 8 5 9 7 </P>
<P>4 8 7 9 2 </P>
<P>4 6 5 3 10 </P>
<P>4 6 2 10 4 </P>
<P>4 10 4 2 1 </P>
<P>4 4 1 10 3 </P>
<P>4 6 10 3 4 </P>
<P>4 6 5 10 9 </P>
<P>CELL_TYPES 16 </P>
<P>10</P>
<P>10</P>
<P>10</P>
<P>10</P>
<P>10</P>
<P>10</P>
<P>10</P>
<P>10</P>
<P>10</P>
<P>10</P>
<P>10</P>
<P>10</P>
<P>10</P>
<P>10</P>
<P>10</P>
<P>10</P></FONT></DIV>
<DIV>&nbsp;</DIV>
<DIV>I am reading&nbsp;the vtk file using the following code:</DIV>
<DIV>&nbsp;</DIV>
<DIV>package require vtk<BR></DIV>
<DIV>vtkUnstructuredGridReader reader<BR>&nbsp;&nbsp;&nbsp; reader SetFileName "$DataSource/outputfile2.vtk"<BR><BR>vtkDataSetMapper mapper<BR>&nbsp;&nbsp;&nbsp; mapper SetInput [reader GetOutput]<BR>&nbsp;&nbsp; <BR>vtkActor actor<BR>&nbsp;&nbsp; actor SetMapper mapper<BR>&nbsp;&nbsp;&nbsp; [actor GetProperty] SetColor .2 .2 .2<BR>&nbsp;&nbsp;&nbsp; [actor GetProperty] SetRepresentationToWireframe</DIV>
<DIV>vtkExtractUnstructuredGrid extractGrid<BR>&nbsp;&nbsp;&nbsp; extractGrid SetInput [reader GetOutput]<BR>&nbsp; <BR>&nbsp;&nbsp;&nbsp; <BR># graphics stuff<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># Add the actors to the renderer, set the background and size<BR>#</DIV>
<DIV>ren1 AddActor actor<BR>ren1 SetBackground 1 1 1<BR>[ren1 GetActiveCamera] Azimuth 60<BR>[ren1 GetActiveCamera] Roll -90<BR>[ren1 GetActiveCamera] Dolly 2<BR>ren1 ResetCameraClippingRange<BR>renWin SetSize 500 375<BR>iren Initialize</DIV>
<DIV># prevent the tk window from showing up then start the event loop<BR>wm withdraw .</DIV>
<DIV>&nbsp;</DIV>
<DIV>The output visualization of the mesh is not as expected.&nbsp;I are not able to see the outer bounds&nbsp;of the cube. Can anyone help me and tell why this problem is arising???</DIV>
<DIV>&nbsp;</DIV>
<DIV>thanking you,</DIV>
<DIV>regards,</DIV>
<DIV>Nikhil Butala</DIV>
<DIV><BR>&nbsp;</DIV><p><font face=arial size=-1>Do you Yahoo!?<br>
<a href="http://us.rd.yahoo.com/mailtag_us/*http://mail.yahoo.com" target="_blank"><b>Yahoo! Mail</a></b> - More reliable, more storage, less spam