Holes in PolyData while using vtkLinearExtrusionFilter in Python

Question:

I wanna create a 3D object from a surface.I used vtkAdaptiveSubdivisionFilter to remesh a polydata. When I GetOutput from vtkAdaptiveSubdivisionFilter and use vtkLinearExtusionFilter to extrude
I see some holes on extrude output and some bad edges. see the pic below.

enter image description here

here is my code:

        normals = vtk.vtkPolyDataNormals()
        normals.SetInputData(polydata)
        normals.SetComputePointNormals(True)
        normals.SetComputeCellNormals(False)
        normals.SplittingOff()
        normals.NonManifoldTraversalOff()
        normals.FlipNormalsOff()
        normals.ConsistencyOff()
        normals.AutoOrientNormalsOff()
        normals.Update()

        extrude = vtk.vtkLinearExtrusionFilter()
        # extrude = vtk.vtkPLinearExtrusionFilter()
        # extrude.PieceInvariantOff ()
        extrude.SetInputData(normals.GetOutput())
        extrude.SetScaleFactor(3)
        extrude.SetExtrusionTypeToNormalExtrusion()
        extrude.Update()

as you see, I used vtkPlinearExtusionFilter too but there is the same problem.
Should I use another library or package or vtk Classes?
how can I fix it?
best regards

Asked By: Beheshtian

||

Answers:

You can solve this problem by Remeshing the object. you can use vtkAdaptiveSubdivisionFilter class to do that.

Answered By: Amir Hossein Zeydi
Categories: questions Tags: ,
Answers are sorted by their score. The answer accepted by the question owner as the best is marked with
at the top-right corner.