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

William E Lucarell welucarell at equityeng.com
Wed Mar 26 16:40:11 EDT 2008


Thanks, Karthik! I set the scalar visibility off in the mapper and it
worked.  Coloring was already turned off in my example.

 

From: Karthik Krishnan [mailto:karthik.krishnan at kitware.com] 
Sent: Wednesday, March 26, 2008 4:30 PM
To: William E Lucarell
Cc: vtkusers at vtk.org
Subject: Re: [vtkusers] vtkFeatureEdges will only appear blue and not any
other colors

 

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/9575da4b/attachment-0002.htm>


More information about the vtkusers mailing list