<div dir="ltr"><div><div><div><div>Hi Feng,<br><br></div>This link is useful:<br><a href="http://www.simpleitk.org/Wiki/VTK/Polyhedron_Support" target="_blank">http://www.simpleitk.org/Wiki/VTK/Polyhedron_Support</a><br><br></div>It explains the concept of facestream, necessary to write/read a polyhedron. Also, here is a simple example with a tetrahedron written as a polyhedron:<br><br><span style="font-family:monospace,monospace"><?xml version="1.0"?><br><VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian"><br><UnstructuredGrid><br><Piece NumberOfPoints="4" NumberOfCells="1"><br><PointData><br></PointData><br><CellData><br><DataArray type="Float64" Name="volume" Format="ascii"><br>.169<br></DataArray><br></CellData><br><Points><br><DataArray type="Float64" Name="Points" NumberOfComponents="3" format="ascii" RangeMin="0" RangeMax="1"><br>0 0 0<br>1 0 0<br>.5 1 0<br>.5 .5 1<br></DataArray><br></Points><br><Cells><br><DataArray type="Int64" Name="connectivity" format="ascii" RangeMin="0" RangeMax="3"><br>0 1 2 3<br></DataArray><br><DataArray type="Int64" Name="offsets" format="ascii" RangeMin="4" RangeMax="4"><br>4<br></DataArray><br><DataArray type="UInt8" Name="types" format="ascii" RangeMin="42" RangeMax="42"><br>42<br></DataArray><br><DataArray type="Int64" Name="faces" format="ascii" RangeMin="0" RangeMax="4"><br>4 3 0 1 2<br>3 0 1 3<br>3 1 2 3<br>3 0 2 3<br></DataArray><br><DataArray type="Int64" Name="faceoffsets" format="ascii" RangeMin="17" RangeMax="17"><br>17<br></DataArray><br></Cells><br></Piece><br></UnstructuredGrid><br></VTKFile><br><br></span></div><span style="font-family:arial,helvetica,sans-serif">Hope this helps,<br><br></span></div><span style="font-family:arial,helvetica,sans-serif">Herve</span><span style="font-family:monospace,monospace"><br><br><br></span><div><div><div><br></div></div></div></div><div class="gmail_extra"><br clear="all"><div><div class="gmail_signature"><div dir="ltr"><div><span style="color:rgb(68,68,68)"><font size="1"><span style="background-color:rgb(255,255,255)"><font size="2">Herve Gross, PhD<br><br></font></span></font><font size="1"><span style="background-color:rgb(255,255,255)"><font size="2"><font size="1"><span style="background-color:rgb(255,255,255)"><font size="2">ADVANCED RESOURCES AND RISK TECHNOLOGIES<br></font></span></font></font></span></font></span></div><span style="color:rgb(68,68,68)"><font size="1"><span style="background-color:rgb(255,255,255)"></span></font></span><div><span><font color="#888888"><div><span style="color:rgb(68,68,68)"><font size="2"><a href="http://www.ar2tech.com" target="_blank">www.ar2tech.com</a><br></font></span></div></font></span></div></div></div></div>
<br><div class="gmail_quote">On Wed, May 6, 2015 at 4:36 AM, Feng Xing <span dir="ltr"><<a href="mailto:snakexf@gmail.com" target="_blank">snakexf@gmail.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word">Dear everyone, <div><br></div><div>I would like to write a .pvtu file for Polyhedron mesh. I tried to use vtkXMLPUnstructuredGridWriter, it seems that it does not work. Paraview display nothing by reading the file .pvtu. However, the visu is successful by reading the .vtu files. I found in google someone said there is a bug some years ago : <a href="http://public.kitware.com/pipermail/vtk-developers/2013-January/028078.html" target="_blank">http://public.kitware.com/pipermail/vtk-developers/2013-January/028078.html</a>.</div><div><br></div><div>Another way I would like to try is that I write the file .pvtu by myself, but I didn’t find the doc for Polyhedron. Thank you very much for help.</div><span class="HOEnZb"><font color="#888888"><div><br></div><div>Feng Xing</div><div>Postdoc INRIA France</div></font></span></div><br>_______________________________________________<br>
Powered by <a href="http://www.kitware.com" target="_blank">www.kitware.com</a><br>
<br>
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank">http://www.kitware.com/opensource/opensource.html</a><br>
<br>
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
<br>
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank">http://markmail.org/search/?q=vtkusers</a><br>
<br>
Follow this link to subscribe/unsubscribe:<br>
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank">http://public.kitware.com/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br></div>