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.
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
Answers:
You can solve this problem by Remeshing the object. you can use vtkAdaptiveSubdivisionFilter
class to do that.
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.
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
You can solve this problem by Remeshing the object. you can use vtkAdaptiveSubdivisionFilter
class to do that.