Dear VTK Developers,
I hope you’re doing well.
I’m currently working on loading STL files into VTK and performing extrusion operations based on selected surface regions. Specifically, I select a region by drawing a contour circle and considering only the inner region of that contour for extrusion.
To ensure the extrusion does not start directly from the STL surface, I offset the selected region by 0.1 units along the surface normal, so that the extrusion is generated slightly above the STL model rather than from within it.
However, the extrusion process becomes problematic. I believe that STL models contain impurities, such as:
- Self-intersecting triangles
- Non-manifold edges or vertices
- Tiny disconnected loops or holes
- Duplicate or degenerate faces
- Gaps or inconsistent triangle orientations
These issues may cause instability and artifacts during surface processing — especially when using filters like vtkLinearExtrusionFilter or when computing per-vertex normals for smooth extrusion.
I’ve attached reference images that illustrate the problem.
I already tried with vtkCleanPolyData after the loading of STL and provided for the following operations.
Any guidance or suggestions on how to clean, repair, or prepare such STL vtkPolyData (or offsetting of surface) for stable extrusion would be greatly appreciated.
@lassoan @dgobbi @LucasGandel @mwestphal @ben.boeckel @pieper

