[vtkusers] Assign colors to lines of vtkPolyData with cell type polygon.

Martijn Koopman koopman.mk at gmail.com
Thu Nov 23 15:52:44 EST 2017


Hello,

I have a vtkPolyData which cell types are polygons.
Is it possible to color individual lines of such a vtkPolyData?

I know it is possible to color individual cells by creating a data array,
setting it as cell data and calling
vtkPolyDataMapper::SetScalarModeToUseCellData().

However, the cells of the polydata are polygons, not lines.

Some background information:
First I read polygons from a file. Each polygon consists of an exterior
ring and zero or more interior rings.
I construct a vtkPolyData with these rings as lines and use
vtkContourTriangulator to form the polygons.
vtkContourTriangulator returns a vtkPolyData with polygons ofcourse.

Afterwards I want to assign a color only to those lines that constitute the
interior and exterior rings, not the lines that make up the triangulation.

Thanks in Advance,
Martijn
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://public.kitware.com/pipermail/vtkusers/attachments/20171123/c2e384d1/attachment.html>


More information about the vtkusers mailing list