[vtkusers] problem creating a vtu file with a VTK polyhedron

kenichiro yoshimi rccm.kyoshimi at gmail.com
Sun Dec 10 21:20:02 EST 2017


Hello,

OpenGL may not render non-convex polygons correctly, hence polyhedrons
with concave faces too.
http://vtk.1045678.n5.nabble.com/Polyhedron-with-concave-faces-td4363498.html

In my experience, multiple non-convex polyhedrons which are mounted
side by side are correctly displayed  even though the rendering fails
for an individual concave polygon. (Please see the attached)

By the way, the data of "connecitivity" and "offsets" in the vtu file
may be wrong.
---
<DataArray type="Int64" Name="connectivity" format="ascii"
RangeMin="0" RangeMax="9">
0 1 2 3 4 5 6 7 8 9
</DataArray>
<DataArray type="Int64" Name="offsets" format="ascii" RangeMin="10"
RangeMax="10">
10 </DataArray>
----

Thanks

2017-12-11 8:20 GMT+09:00  <JFSLB at gmx.de>:
> <VTKFile type="UnstructuredGrid" version="1.0" byte_order="LittleEndian" header_type="UInt64">
> <UnstructuredGrid>
> <Piece NumberOfPoints="10" NumberOfCells="1">
> <CellData Scalars="level">
> <DataArray type="Float32" Name="level" format="ascii" RangeMin="0" RangeMax="0">
> 0
> </DataArray>
> </CellData>
> <Points>
> <DataArray type="Float32" Name="Points" NumberOfComponents="3" format="ascii" RangeMin="-1" RangeMax="1">
> 0.0204729 -0.000857723 0.0396787
> 0.0206677 -0.000857723 0.038172
> 0.0212252 -0.000857723 0.038172
> 0.0212252 -0.000857723 0.0396787
> 0.0207424 0.0006489 0.038172
> 0.0207424 0.0006489 0.0387988
> 0.0206286 0.0006489 0.0396787
> 0.0212252 0.0006489 0.0396787
> 0.0212252 0.0006489 0.038172
> 0.0207501 -6.0656e-05 0.038172
> </DataArray>
> </Points>
> <Cells>
> <DataArray type="Int64" Name="connectivity" format="ascii" RangeMin="0" RangeMax="6">
> 0 1 2 3 4 5 6
> </DataArray>
> <DataArray type="Int64" Name="offsets" format="ascii" RangeMin="7" RangeMax="7">
> 7 </DataArray>
> <DataArray type="UInt8" Name="types" format="ascii" RangeMin="42" RangeMax="42">
> 42
> </DataArray>
> <DataArray type="Int64" Name="faces" format="ascii" RangeMin="0" RangeMax="9">
> 7
> 4 0 1 2 3
> 5 4 5 6 7 8
> 5 9 4 8 2 1
> 4 6 0 3 7
> 4 2 8 7 3
> 3 9 5 4
> 5 6 5 9 1 0
> </DataArray>
> <DataArray type="Int64" Name="faceoffsets" format="ascii" RangeMin="38" RangeMax="38">
> 38
> </DataArray>
> </Cells>
> </Piece>
> </UnstructuredGrid>
> </VTKFile>
>
>
> On 10.12.2017 22:56, Bill Lorensen wrote:
>> Post the new data set please.
>>
>> On Dec 10, 2017 4:08 PM, <JFSLB at gmx.de> wrote:
>>
>>     I have reversed the order in "faces" so that the normals of the polygons point outwards, but he image is still the same. I have also reversed the order in "connectivity" but that did not help. For some reason two polygons (one in the x-y-plane and one in the x-z-plane) are rendered as a polygons with 4 points although they contain 5 points.
>>
>>     When I generated the data set there were some duplicated vertices, i.e. vertices with identical coordinates but different index and only one of the polygons was rendered incorrectly. I eliminated the duplicates and the second polygon was rendered incorrectly. I have no idea if that helps.
>>
> _______________________________________________
> 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 --------------
A non-text attachment was scrubbed...
Name: concave_polyhedrons.png
Type: image/png
Size: 139143 bytes
Desc: not available
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171211/3526f188/attachment-0001.png>


More information about the vtkusers mailing list