On 3/26/08, <b class="gmail_sendername">William E Lucarell</b> <<a href="mailto:welucarell@equityeng.com">welucarell@equityeng.com</a>> wrote:<div><span class="gmail_quote"></span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US">
<div>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);">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 <b>blue</b>. 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?</span></p></div></div></blockquote><div><br>The mapper is coloring the edges based on the scalar value (effectively
based on the edge type). You should turn Coloring off on
vtkFeatureEdges. <br>
<br>
Please see vtkFeatureEdges::SetColoring<br>
<br>
Or turn ScalarVisibilityyOff on the vtkPolydataMapper. But the former
is the preferred method since you do not need scalars anyway.<br>
<br>
HTH<br>
--<br>
karthik </div><br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div link="blue" vlink="purple" lang="EN-US"><div><p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometryFilter = new vtkGeometryFilter();</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometryFilter.SetInput(TestMesh);</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometryFilter.Update();</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometry = new vtkFeatureEdges();</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometry.SetFeatureAngle(80);</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometry.NonManifoldEdgesOff();</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometry.BoundaryEdgesOn();</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometry.FeatureEdgesOff();</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometry.ManifoldEdgesOn();</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometry.SetColoring(0);</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometry.SetInput(geometryFilter.GetOutput());</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> // Add the outline mapper and actor</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> </span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometryMapper = new vtkPolyDataMapper();</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometryMapper.SetInput(geometry.GetOutput());</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometryActor = new vtkActor();</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometryActor.SetMapper(geometryMapper);</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometryActor.GetProperty().SetEdgeColor(0,0,0);</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometryActor.GetProperty().SetColor(0,0,0);</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometryActor.GetProperty().SetRepresentationToWireframe();</span></p>
<p><span style="font-size: 10pt; color: rgb(0, 51, 127);"> geometryActor.GetProperty().SetLineWidth(0.5);</span></p>
<p><b><i><span style="font-size: 10pt; color: rgb(0, 51, 127);"> </span></i></b></p>
<p><b><i><span style="font-size: 10pt; color: rgb(0, 51, 127);">Thanks,</span></i></b></p>
<p><b><i><span style="font-size: 10pt; color: rgb(0, 51, 127);"> </span></i></b></p>
<p><b><i><span style="font-size: 10pt; color: rgb(0, 51, 127);">Bill</span></i></b><span style="color: navy;"></span></p>
<p> </p>
</div>
</div>
<br>_______________________________________________<br>
This is the private VTK discussion list.<br>
Please keep messages on-topic. Check the FAQ at: <a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/Wiki/VTK_FAQ" target="_blank">http://www.vtk.org/Wiki/VTK_FAQ</a><br>
Follow this link to subscribe/unsubscribe:<br>
<a onclick="return top.js.OpenExtLink(window,event,this)" href="http://www.vtk.org/mailman/listinfo/vtkusers" target="_blank">http://www.vtk.org/mailman/listinfo/vtkusers</a><br>
<br></blockquote></div><br>