[vtkusers] How to check if a vtkPolyData object is a closed surface

David Gobbi david.gobbi at gmail.com
Wed Apr 14 15:44:02 EDT 2010


Hi Roman,

The vtkFeatureEdges filter can check for closed surfaces.  Use the
following settings:

featureEdges->FeatureEdgesOff()
featureEdges->BoundaryEdgesOn()
featureEdges->NonManifoldEdgesOn()

If you do featureEdges->Update(), then
featureEdges->GetOutput()->GetNumberOfCells() will return the number
of open edges for the data.

The output of vtkFeatureEdges is a set of lines that correspond to the
problem edges, so you can put the output of vtkFeatureEdges into a
mapper & actor so that you can superimpose the problem edges on top of
your data set.

  David


On Wed, Apr 14, 2010 at 6:35 AM, Roman Grothausmann
<roman.grothausmann at helmholtz-berlin.de> wrote:
> Dear mailing list members,
>
>
> We want to check if our vtkPolyData surface is closed because the normals
> from the output of vtkPolyDataNormals with AutoOrientNormalsOn are not
> consistently pointing outwards. Strangely with AutoOrientNormalsOff they all
> normals seem to be pointing outwards.
> We tried vtkSelectEnclosedPoints::IsSurfaceClosed() to check if our
> vtkPolyData surface is closed but that results in an error when we set
> CheckSurfaceOn() and Update the filter.
> Is there any other way to check if a surface is closed? It would be nice if
> vtkPolyDataNormals had this functionality so that we don't need to create
> some input points for vtkSelectEnclosedPoints.
> Calling vtkSelectEnclosedPoints::IsSurfaceClosed() without an instance seems
> not to be possible in python, or is it?
>
> Any help or hints on this are very much appreciated
> Roman
>
>
> --
> Roman Grothausmann
>
> Helmholtz-Zentrum Berlin für Materialien und Energie GmbH
> Bereich Funktionale Materialien
> Institut für angewandte Materialforschung
> Hahn-Meitner-Platz 1
> D-14109 Berlin
>
> Tel.: +49-(0)30-8062-2816
> Fax.: +49-(0)30-8062-3059
>
> Vorsitzender des Aufsichtsrats: Prof. Dr. Dr. h.c. mult. Joachim Treusch
> Stellvertretende Vorsitzende: Dr. Beatrix Vierkorn-Rudolph
> Geschäftsführer: Prof. Dr. Anke Rita Kaysser-Pyzalla, Prof. Dr. Dr. h.c.
> Wolfgang Eberhardt, Dr. Ulrich Breuer
> Sitz der Gesellschaft: Berlin
> Handelsregister: AG Charlottenburg, 89 HRB 5583
>
> _______________________________________________
> 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
>
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>



More information about the vtkusers mailing list