[vtkusers] vtkPolyData exported to OpenInventor
Mathieu Malaterre
Mathieu.Malaterre at creatis.insa-lyon.fr
Wed Aug 6 14:01:58 EDT 2003
Laurent,
Please move vtkTriangleFilter at the end your pipeline.
vtkIVWriter is written to take only triangles into account and not
*triangle strips*.
So your filter should be:
vtkContourFilter -> vtkDecimatePro ->
vtkSmoothPolyDataFilter -> vtkPolyDataNormals -> vtkStripper ->
vtkCleanPolyData -> vtkTriangleFilter -> vtkIVWriter
Next time you should proceed step by step. For example, with your old
pipeline:
vtkContourFilter -> vtkTriangleFilter -> vtkDecimatePro ->
vtkSmoothPolyDataFilter -> vtkPolyDataNormals -> vtkStripper ->
vtkPolyDataWriter
*then* write a simple python script:
r = vtkPolyDataReader
w = vtkIVWriter
you'll see your file will be buggy.
Then try:
r = vtkPolyDataReader
clean = vtkCleanPolyData
w = vtkIVWriter
in order to remove all degenerate cells
r = vtkPolyDataReader
clean = vtkCleanPolyData
tf = vtkTriangleFilter
w = vtkIVWriter
in order to: first remove degenerate cells, *then* turn strips into
triangle (and not the contrary!)
HTH
mathieu
imho wrote:
> Hi all,
>
> I have a vtkPolyData with these filters :
> vtkContourFilter -> vtkTriangleFilter -> vtkDecimatePro ->
> vtkSmoothPolyDataFilter -> vtkPolyDataNormals -> vtkStripper ->
> vtkCleanPolyData
>
> I can export it to a OpenInventor (iv) file with the vtkIVWriter.
> I have updated my vtk version with the nightly release to fix some bugs
> in these class.
>
> I'd like to use the MESH program http://mesh.epfl.ch/ to compute
> differences between two meshes.
>
> This program said that my poly is: "empty (no faces)"
>
> What can I do to fix this?
> Wich filter should I add in my pipeline to have faces?
>
> Thanks
>
> imho
>
>
>
>
>
> _______________________________________________
> This is the private VTK discussion list. Please keep messages on-topic.
> Check the FAQ at: <http://public.kitware.com/cgi-bin/vtkfaq>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
--
Mathieu Malaterre
CREATIS
28 Avenue du Doyen LEPINE
B.P. Lyon-Montchat
69394 Lyon Cedex 03
http://www.creatis.insa-lyon.fr/~malaterre/
More information about the vtkusers
mailing list