Edge artifacts in surface representation
I'm having strange edge artifacts when displaying surfaces of grids (ImageData, RectilinearGrid, StructuredGrid does not seem to make a difference) with EdgeVisibility.
Part of the edges that should be hidden are visible even though there is no transparency.
Did not happen with older (< 8) VTK versions, although I cannot confirm which is the first version that introduced the issue. Possibly related to #17783 and #18064 ?
This is easily reproduced with the code below. Relates to grid size, the effect is less noticeable with smaller grids.
import vtk
image_data = vtk.vtkImageData()
image_data.SetDimensions(100, 100, 2)
mapper = vtk.vtkDataSetMapper();
mapper.SetInputData(image_data)
actor = vtk.vtkActor();
actor.GetProperty().SetEdgeVisibility(True)
actor.SetMapper(mapper);
renderer = vtk.vtkRenderer()
renWin = vtk.vtkRenderWindow()
renWin.AddRenderer(renderer)
iren = vtk.vtkRenderWindowInteractor()
iren.SetRenderWindow(renWin)
iren.Initialize()
renderer.AddActor(actor)
cam = renderer.GetActiveCamera();
cam.SetPosition(-1, -1, .3);
cam.SetFocalPoint(0.0, 0.0, 0.5);
cam.SetViewUp(0, 0, 1);
cam.Zoom(0.5)
iren.Start()