How to avoid rendering ISO lines on surfaces

Hi vtk helpers,

There’re always ISO lines on surfaces rendered, as highlighted below:

Here’s my code:

I can set the width of the lines by “props->SetLineWidth(3.0)”, but I cannot just disable it by assigning 0 to the value.

How can I avoid rendering the ISO lines?

There are two solutions I can think of:

  1. tweak the coincident offsets such that the lines appear below the surface. See vtkMapper:: SetResolveCoincidentTopology and vtkMapper::SetRelativeCoincidentTopologyLineOffsetParameters
  2. Pass the output of your source through a filter that removes the lines. I’m not aware of a filter that does it. However, it’s quite easy to write one that shallow copies the points and polys into output and skips the lines.

Maybe vtkExtractCellsByType by selecting all types except the line ones would do the trick?

That is a good suggestion!

Thank you both.

I tried out vtkExtractCellsByType but it got nothing to output.
The output is a PNG but it turned out to be empty at all.
Did I miss anything essential?

Codes here:

Can you confirm that the source has only triangles? Or is it quads?

I’m not sure, but I tried to add all the available cell types to the extraction filter.

However, it extracted nothing.
It seems as if nothing was input to the filter, so it got nothing to extract from.

Is it related to the data source? It’s an Open CASCADE shape “TopoDS_Shape”.
Or did I use the correct way of connecting the data source to the filter?

The codes I used now here:

I tried to direct the output to a VTK file, but it turned to be empty.

I got the problem fixed.

The input was indeed empty due to the lack of an explicit invoke of IVtkTools_ShapeDataSource::Update.

And the output has no ISO lines at all.

The final solution here:

Thank you very much buddies @jaswantp @Francois_Mazen