Unable to change color to edges in Meshes/SolidClip example

Folks,
I am wondering how to change the color for the edges computed by the clipping plane in the Meshes/SolidClip example.

I went through the vtkFeatureEdges documentaton but did not succeed in changing the color even if I set the SetScalarModeToUseCellData option to the mapper.

Also, I’ve realized that for another dataset that I have, the edges are colored in blue. I assume that this is a consequence of a different type of edge that the clipper is computing for that dataset and providing as the output for the vtkFeatureEdges class.

Not sure how the color corresponding to each type matches the scalar variable (if that is the variable that controls the color at least).

Additionally I would like to be able to change the size/width of the edge. Not sure if that makes sense for the vtkFeatureEdge type of object, or whether I would need to transform the object somehow into another construct to do that.

Any pointer would be appreciated.

Thanks.

I found the way to color the edges. The key was to turn off the coloring for the vtkFeatureEdges instance.

I also found the way to change the line width.

For the mentioned example, and assuming that we remove setting the backface property:

(...)

vtkNew<vtkNamedColors> colors;

# Edges
featureEdges = vtkNew<vtkFeatureEdges>;
featureEdges->SetInputConnection(clipper->GetOutputPort());
featureEdges->BoundaryEdgesOn();
featureEdges->FeatureEdgesOff();
featureEdges->ManifoldEdgesOff();
featureEdges->NonManifoldEdgesOff();
featureEdges->ColoringOff();
featureEdges->Update();

# Visualize
edgeMapper = vtkNew<vtkPolyDataMapper>;
edgeMapper->SetInputConnection(featureEdges->GetOutputPort());
edgeMapper->SetScalarModeToUseCellData();
edgeActor = vtkNew<vtkActor>;
edgeActor->SetMapper(edgeMapper);

edgeActor->GetProperty()->SetColor(colors->GetColor3d("Blue").GetData());
edgeActor->GetProperty()->SetLineWidth(4.5)

(...)

renderer->AddActor(edgeActor);

(...)

So the question is answered.