[vtkusers] Polyhedron pvtu

Hervé Gross hgross at ar2tech.com
Wed May 6 09:31:17 EDT 2015


Hi Feng,

This link is useful:
http://www.simpleitk.org/Wiki/VTK/Polyhedron_Support

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:

<?xml version="1.0"?>
<VTKFile type="UnstructuredGrid" version="0.1" byte_order="LittleEndian">
<UnstructuredGrid>
<Piece NumberOfPoints="4" NumberOfCells="1">
<PointData>
</PointData>
<CellData>
<DataArray type="Float64" Name="volume" Format="ascii">
.169
</DataArray>
</CellData>
<Points>
<DataArray type="Float64" Name="Points" NumberOfComponents="3"
format="ascii" RangeMin="0" RangeMax="1">
0 0 0
1 0 0
.5 1 0
.5 .5 1
</DataArray>
</Points>
<Cells>
<DataArray type="Int64" Name="connectivity" format="ascii" RangeMin="0"
RangeMax="3">
0 1 2 3
</DataArray>
<DataArray type="Int64" Name="offsets" format="ascii" RangeMin="4"
RangeMax="4">
4
</DataArray>
<DataArray type="UInt8" Name="types" format="ascii" RangeMin="42"
RangeMax="42">
42
</DataArray>
<DataArray type="Int64" Name="faces" format="ascii" RangeMin="0"
RangeMax="4">
4 3 0 1 2
3 0 1 3
3 1 2 3
3 0 2 3
</DataArray>
<DataArray type="Int64" Name="faceoffsets" format="ascii" RangeMin="17"
RangeMax="17">
17
</DataArray>
</Cells>
</Piece>
</UnstructuredGrid>
</VTKFile>

Hope this helps,

Herve




Herve Gross, PhD

ADVANCED RESOURCES AND RISK TECHNOLOGIES
www.ar2tech.com

On Wed, May 6, 2015 at 4:36 AM, Feng Xing <snakexf at gmail.com> wrote:

> Dear everyone,
>
> 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 :
> http://public.kitware.com/pipermail/vtk-developers/2013-January/028078.html
> .
>
> 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.
>
> Feng Xing
> Postdoc INRIA France
>
> _______________________________________________
> Powered by www.kitware.com
>
> Visit other Kitware open-source projects at
> http://www.kitware.com/opensource/opensource.html
>
> Please keep messages on-topic and check the VTK FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
>
> Search the list archives at: http://markmail.org/search/?q=vtkusers
>
> Follow this link to subscribe/unsubscribe:
> http://public.kitware.com/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20150506/571ae87d/attachment.html>


More information about the vtkusers mailing list