Smooth surface boundary

Hi all,
I have a surface with a bad boundary.


I need to smooth and repair the boundary. I used vtkSmoothPolydata but not useful.

smoothFilter = vtk.vtkSmoothPolyDataFilter()
smoothFilter.SetInputData(part)
smoothFilter.SetNumberOfIterations(iterate)
smoothFilter.SetRelaxationFactor(relaxationFactor)
smoothFilter.BoundarySmoothingOn()
smoothFilter.Update()

I’ll be pleased if anyone knows the solution.
best regards.

Also try windowed sinc polydata filter. It’s a better smoothing method.

1 Like

Hi Will,
Thank you for your reply.
I used vtkWindowedSincPolyDataFilter and SetEdgeAngle. it was perfect. Thanks.

windowed = vtk.vtkWindowedSincPolyDataFilter()
windowed.SetInputData(part)
windowed.SetNumberOfIterations(20)
windowed.FeatureEdgeSmoothingOn()
windowed.SetFeatureAngle(180)
windowed.BoundarySmoothingOn()
windowed.SetEdgeAngle(180)
windowed.Update()