[vtkusers] vtkFeatureEdges will only appear blue and not any other colors

Karthik Krishnan karthik.krishnan at kitware.com
Wed Mar 26 16:29:47 EDT 2008


On 3/26/08, William E Lucarell <welucarell at equityeng.com> wrote:
>
>  I've been playing around with vtkFeatureEdges to represent a mesh.  I
> have an actor for my mesh based on my geometry filter.  The correct edges
> occur; however, when I set the color and the edge color, the edges are still
> *blue*.  I want them to be black so I used the SetColor(r,g,b) method
> after calling the GetProperty() method of the vtkActor.  Why are my edges
> still blue and not black?
>

The mapper is coloring the edges based on the scalar value (effectively
based on the edge type). You should turn Coloring off on vtkFeatureEdges.

Please see vtkFeatureEdges::SetColoring

Or turn ScalarVisibilityyOff on the vtkPolydataMapper. But the former is the
preferred method since you do not need scalars anyway.

HTH
--
karthik

    geometryFilter = new vtkGeometryFilter();
>
>     geometryFilter.SetInput(TestMesh);
>
>     geometryFilter.Update();
>
>
>
>     geometry = new vtkFeatureEdges();
>
>     geometry.SetFeatureAngle(80);
>
>     geometry.NonManifoldEdgesOff();
>
>     geometry.BoundaryEdgesOn();
>
>     geometry.FeatureEdgesOff();
>
>     geometry.ManifoldEdgesOn();
>
>     geometry.SetColoring(0);
>
>     geometry.SetInput(geometryFilter.GetOutput());
>
>
>
>     // Add the outline mapper and actor
>
>
>
>     geometryMapper = new vtkPolyDataMapper();
>
>     geometryMapper.SetInput(geometry.GetOutput());
>
>     geometryActor = new vtkActor();
>
>     geometryActor.SetMapper(geometryMapper);
>
>     geometryActor.GetProperty().SetEdgeColor(0,0,0);
>
>     geometryActor.GetProperty().SetColor(0,0,0);
>
>     geometryActor.GetProperty().SetRepresentationToWireframe();
>
>     geometryActor.GetProperty().SetLineWidth(0.5);
>
> * *
>
> *Thanks,*
>
> * *
>
> *Bill*
>
>
>
> _______________________________________________
> This is the private VTK discussion list.
> Please keep messages on-topic. Check the FAQ at:
> http://www.vtk.org/Wiki/VTK_FAQ
> Follow this link to subscribe/unsubscribe:
> http://www.vtk.org/mailman/listinfo/vtkusers
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.vtk.org/pipermail/vtkusers/attachments/20080326/af9eddb5/attachment.htm>


More information about the vtkusers mailing list