<div dir="ltr"><div><div>David,<br><br>It should work with ASCII too. Here is a simple XML example with one tetrahedron (coded as as a polyhedron), if it helps finding the structured syntax:<br><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></span><br></div>HTH,<br><br></div>Herve<br><div><div><br><br></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 Fri, Apr 24, 2015 at 7:29 AM, David Uystepruyst <span dir="ltr"><<a href="mailto:David.Uystepruyst@univ-valenciennes.fr" target="_blank">David.Uystepruyst@univ-valenciennes.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000"><div>Hello Herve,<br></div><div> <br></div><div> Thank you for your answer.<br></div><div> I already saw this page. It looks like functions to perform binary files.<br></div><div> I'll go further to find the equivalent in ascii format.<br></div><div><br></div><div>David<br></div><div><br></div><hr><div style="color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt"><b>De: </b>"Hervé Gross" <<a href="mailto:hgross@ar2tech.com" target="_blank">hgross@ar2tech.com</a>><br><b>À: </b>"David Uystepruyst" <<a href="mailto:David.Uystepruyst@univ-valenciennes.fr" target="_blank">David.Uystepruyst@univ-valenciennes.fr</a>><br><b>Cc: </b><a href="mailto:vtkusers@vtk.org" target="_blank">vtkusers@vtk.org</a><br><b>Envoyé: </b>Vendredi 24 Avril 2015 16:04:43<br><b>Objet: </b>Re: [vtkusers] vtk old legacy polyhedron<div><div class="h5"><br><div><br></div><div dir="ltr"><div><div>Hello David,<br><div><br></div></div>This explains the format for polyhedral blocks. Make sure you use the faces and facestream tags.<br><div><br></div><a href="http://www.simpleitk.org/Wiki/VTK/Polyhedron_Support" target="_blank">http://www.simpleitk.org/Wiki/VTK/Polyhedron_Support</a><br><div><br></div></div>Herve<br><div><br></div></div><div class="gmail_extra"><br clear="all"><div><div><div dir="ltr"><div><span style="color:rgb(68,68,68)"><span style="font-size:xx-small" size="1"><span style="background-color:rgb(255,255,255)"><span style="font-size:small" size="2">Herve Gross, PhD<br><div><br></div></span></span></span><span style="font-size:xx-small" size="1"><span style="background-color:rgb(255,255,255)"><span style="font-size:small" size="2"><span style="font-size:xx-small" size="1"><span style="background-color:rgb(255,255,255)"><span style="font-size:small" size="2">ADVANCED RESOURCES AND RISK TECHNOLOGIES<br></span></span></span></span></span></span></span></div><span style="color:rgb(68,68,68)"><span style="font-size:xx-small" size="1"><span style="background-color:rgb(255,255,255)"></span></span></span><div><span><span style="color:#888888" color="#888888"><div><span style="color:rgb(68,68,68)"><span style="font-size:small" size="2"><a href="http://www.ar2tech.com" target="_blank">www.ar2tech.com</a><br></span></span></div></span></span></div></div></div></div>
<br><div class="gmail_quote">On Fri, Apr 24, 2015 at 2:57 AM, David Uystepruyst <span dir="ltr"><<a href="mailto:David.Uystepruyst@univ-valenciennes.fr" target="_blank">David.Uystepruyst@univ-valenciennes.fr</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div><div style="font-family:times new roman,new york,times,serif;font-size:12pt;color:#000000"><div>Hello,<br></div><div><br></div><div> I would like to create an ASCII output files in vtk (unstructured) format from a CFD code written in fortran.<br></div><div><br></div><div> The main parts of cells are cartesian hexa (cube) but the boundary cells can be polyhedral (convex and concave).<br></div><div><br></div><div> Then, I want to use polyhedron cell type (referred as 42 in vtk) but it seems difficult to find examples ?<br></div><div><br></div><div> I guess polyhedron cells need more informations as there is no specific order for the nodes ?<br></div><div><br></div><div>Thanks,<span><span style="color:#888888" color="#888888"><br></span></span></div><span><span style="color:#888888" color="#888888"><div>-- <br></div><div><span></span>David <br></div></span></span></div></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>
</div></div></div><div><br></div></div></div></blockquote></div><br></div>