Dear VTK developers and users,
I am trying to do the following:
- I create a surface representation based on polygons, which can contain holes (needed to use vtkContourTriangulator, see #14834);
- Now I want to also display edges of my surface.
The approach we have been using previously, is to use a VTK filter, namely vtkFeatureEdges. However, the issue is that after moving from vtkDelaunay2D to vtkContourTriangulator, the edge creation filter seem to be confused. In this particular case, it is only one additional internal line/edge, but for more complex cases it can look much worse. Code below:
20241118_py_surfWithEdges.py (6.5 KB)
Now the nice thing about actor generated via vtkFeatureEdges is that it never becomes solid, i.e., we can use key commands ‘s’ and ‘w’ and those will only modify the surface representation, not the edge representation.
Next, in order to resolve the unnecessary edge issue, I have been using the original polydata defining the surface polygons. This works fine as long as I keep the actor representation to wireframe. However, as soon as I hit key ‘s’, also my manually constructed edge actor becomes solid and destroys the whole view. Code below:
20241118_py_surfWithEdges_useOrigPoints.py (6.4 KB)
Question - how to make manually created actor to be always displayed as wireframe? It should be possible, as actor created via vtkFeatureEdges functions that way. But I can not find the right option for mapper/actor, if I manually put lines on screen … I have a workaround to modify keyboard shortcut ‘s’ behavior to skip the particular actor, but I would like to avoid this if possible.
Does anyone know if there is a simple way to achieve this?
Best,
Ugis