[vtkusers] vtk old legacy polyhedron

Hervé Gross hgross at ar2tech.com
Fri Apr 24 10:46:45 EDT 2015


David,

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:


<?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>

HTH,

Herve



Herve Gross, PhD

ADVANCED RESOURCES AND RISK TECHNOLOGIES
www.ar2tech.com

On Fri, Apr 24, 2015 at 7:29 AM, David Uystepruyst <
David.Uystepruyst at univ-valenciennes.fr> wrote:

> Hello Herve,
>
>   Thank you for your answer.
>   I already saw this page. It looks like functions to perform binary files.
>   I'll go further to find the equivalent in ascii format.
>
> David
>
> ------------------------------
> *De: *"Hervé Gross" <hgross at ar2tech.com>
> *À: *"David Uystepruyst" <David.Uystepruyst at univ-valenciennes.fr>
> *Cc: *vtkusers at vtk.org
> *Envoyé: *Vendredi 24 Avril 2015 16:04:43
> *Objet: *Re: [vtkusers] vtk old legacy polyhedron
>
>
> Hello David,
>
> This explains the format for polyhedral blocks. Make sure you use the
> faces and facestream tags.
>
> http://www.simpleitk.org/Wiki/VTK/Polyhedron_Support
>
> Herve
>
>
> Herve Gross, PhD
>
> ADVANCED RESOURCES AND RISK TECHNOLOGIES
> www.ar2tech.com
>
> On Fri, Apr 24, 2015 at 2:57 AM, David Uystepruyst <
> David.Uystepruyst at univ-valenciennes.fr> wrote:
>
>> Hello,
>>
>>   I would like to create an ASCII output files in vtk (unstructured)
>> format from a CFD code written in fortran.
>>
>>   The main parts of cells are cartesian hexa (cube) but the boundary
>> cells can be polyhedral (convex and concave).
>>
>>   Then, I want to use polyhedron cell type (referred as 42 in vtk) but it
>> seems difficult to find examples ?
>>
>>   I guess polyhedron cells need more informations as there is no specific
>> order for the nodes ?
>>
>> Thanks,
>> --
>> David
>>
>> _______________________________________________
>> 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/20150424/f78d9c06/attachment.html>


More information about the vtkusers mailing list