<html><head><meta http-equiv="Content-Type" content="text/html charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space;" class=""><div class="">Hello Hervé,</div><div class=""><br class=""></div><div class="">Thank you much for your replying! But my problem is about writing the file .pvtu. I have two files: p1.vtu and p2.vtu which contain the polyhedrons. They are written by two MPI procs separately. Paraview could display them well. I used the writer vtkXMLPUnstructuredGridWriter to generate the file p.pvtu, but Paraview display nothing by reading p.pvtu. </div><div class=""><br class=""></div><div class="">The file p.pvtu is like this. It works for pixel, polygon etc.. But not for Polyhedron.</div><div class=""><br class=""></div><div class=""><div class=""><?xml version="1.0"?></div><div class=""><VTKFile type="PUnstructuredGrid" version="0.1" byte_order="LittleEndian" compressor="vtkZLibDataCompressor"></div><div class=""> <PUnstructuredGrid GhostLevel="0"></div><div class=""> <PPoints></div><div class=""> <PDataArray type="Float32" Name="Points" NumberOfComponents="3"/></div><div class=""> </PPoints></div><div class=""> <Piece Source="p0.vtu"/></div><div class=""> <Piece Source="p1.vtu"/></div><div class=""> </PUnstructuredGrid></div><div class=""></VTKFile></div></div><div class=""><br class=""></div><div class="">Regards,</div><div class="">Feng</div><div class=""><br class=""></div><div class=""><br class=""></div><br class=""><div><blockquote type="cite" class=""><div class="">On 06 May 2015, at 15:31, Hervé Gross <<a href="mailto:hgross@ar2tech.com" class="">hgross@ar2tech.com</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div dir="ltr" class=""><div class=""><div class=""><div class=""><div class="">Hi Feng,<br class=""><br class=""></div>This link is useful:<br class=""><a href="http://www.simpleitk.org/Wiki/VTK/Polyhedron_Support" target="_blank" class="">http://www.simpleitk.org/Wiki/VTK/Polyhedron_Support</a><br class=""><br class=""></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 class=""><br class=""><span style="font-family:monospace,monospace" class=""><?xml version="1.0"?><br class=""><VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian"><br class=""><UnstructuredGrid><br class=""><Piece NumberOfPoints="4" NumberOfCells="1"><br class=""><PointData><br class=""></PointData><br class=""><CellData><br class=""><DataArray type="Float64" Name="volume" Format="ascii"><br class="">.169<br class=""></DataArray><br class=""></CellData><br class=""><Points><br class=""><DataArray type="Float64" Name="Points" NumberOfComponents="3" format="ascii" RangeMin="0" RangeMax="1"><br class="">0 0 0<br class="">1 0 0<br class="">.5 1 0<br class="">.5 .5 1<br class=""></DataArray><br class=""></Points><br class=""><Cells><br class=""><DataArray type="Int64" Name="connectivity" format="ascii" RangeMin="0" RangeMax="3"><br class="">0 1 2 3<br class=""></DataArray><br class=""><DataArray type="Int64" Name="offsets" format="ascii" RangeMin="4" RangeMax="4"><br class="">4<br class=""></DataArray><br class=""><DataArray type="UInt8" Name="types" format="ascii" RangeMin="42" RangeMax="42"><br class="">42<br class=""></DataArray><br class=""><DataArray type="Int64" Name="faces" format="ascii" RangeMin="0" RangeMax="4"><br class="">4 3 0 1 2<br class="">3 0 1 3<br class="">3 1 2 3<br class="">3 0 2 3<br class=""></DataArray><br class=""><DataArray type="Int64" Name="faceoffsets" format="ascii" RangeMin="17" RangeMax="17"><br class="">17<br class=""></DataArray><br class=""></Cells><br class=""></Piece><br class=""></UnstructuredGrid><br class=""></VTKFile><br class=""><br class=""></span></div><span style="font-family:arial,helvetica,sans-serif" class="">Hope this helps,<br class=""><br class=""></span></div><span style="font-family:arial,helvetica,sans-serif" class="">Herve</span><span style="font-family:monospace,monospace" class=""><br class=""><br class=""><br class=""></span><div class=""><div class=""><div class=""><br class=""></div></div></div></div><div class="gmail_extra"><br clear="all" class=""><div class=""><div class="gmail_signature"><div dir="ltr" class=""><div class=""><span style="color:rgb(68,68,68)" class=""><font size="1" class=""><span style="background-color:rgb(255,255,255)" class=""><font size="2" class="">Herve Gross, PhD<br class=""><br class=""></font></span></font><font size="1" class=""><span style="background-color:rgb(255,255,255)" class=""><font size="2" class=""><font size="1" class=""><span style="background-color:rgb(255,255,255)" class=""><font size="2" class="">ADVANCED RESOURCES AND RISK TECHNOLOGIES<br class=""></font></span></font></font></span></font></span></div><span style="color:rgb(68,68,68)" class=""><font size="1" class=""><span style="background-color:rgb(255,255,255)" class=""></span></font></span><div class=""><span class=""><font color="#888888" class=""><div class=""><span style="color:rgb(68,68,68)" class=""><font size="2" class=""><a href="http://www.ar2tech.com/" target="_blank" class="">www.ar2tech.com</a><br class=""></font></span></div></font></span></div></div></div></div>
<br class=""><div class="gmail_quote">On Wed, May 6, 2015 at 4:36 AM, Feng Xing <span dir="ltr" class=""><<a href="mailto:snakexf@gmail.com" target="_blank" class="">snakexf@gmail.com</a>></span> wrote:<br class=""><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="word-wrap:break-word" class="">Dear everyone, <div class=""><br class=""></div><div class="">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" class="">http://public.kitware.com/pipermail/vtk-developers/2013-January/028078.html</a>.</div><div class=""><br class=""></div><div class="">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" class=""><div class=""><br class=""></div><div class="">Feng Xing</div><div class="">Postdoc INRIA France</div></font></span></div><br class="">_______________________________________________<br class="">
Powered by <a href="http://www.kitware.com/" target="_blank" class="">www.kitware.com</a><br class="">
<br class="">
Visit other Kitware open-source projects at <a href="http://www.kitware.com/opensource/opensource.html" target="_blank" class="">http://www.kitware.com/opensource/opensource.html</a><br class="">
<br class="">
Please keep messages on-topic and check the VTK FAQ at: <a href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank" class="">http://www.vtk.org/Wiki/VTK_FAQ</a><br class="">
<br class="">
Search the list archives at: <a href="http://markmail.org/search/?q=vtkusers" target="_blank" class="">http://markmail.org/search/?q=vtkusers</a><br class="">
<br class="">
Follow this link to subscribe/unsubscribe:<br class="">
<a href="http://public.kitware.com/mailman/listinfo/vtkusers" target="_blank" class="">http://public.kitware.com/mailman/listinfo/vtkusers</a><br class="">
<br class=""></blockquote></div><br class=""></div>
</div></blockquote></div><br class=""></body></html>