Highlighting the edges of an actor

Hello,

I am trying to highlight the edges of an actor when I select it with the cursor. Is there a method that has this functionality?

I would greatly appreciate any help.
Thanks.

Check out this example:
https://lorensen.github.io/VTKExamples/site/Cxx/PolyData/Silhouette/

Do you mean the edges of each triangle or the silhouette?

Here is an example from the VTKExamples Project that highlights a picked actor. The example subclasses vtkInteractorStyleTrackballCamera.

When I click on the actor, I want there to be an outline around the actor. So I guess the silhouette.

Will the silhouette move along with the actor that I am trying to outline if I apply transformations to the actor, or will I have to apply the same transformation to the silhouette?

Update: The silhouette does not move along with the actor. Do you know a function that simplifies the task, instead of copy the code for the transformation of the actor for the silhouette?

I’ve added an new example to the VTK Examples Project. HighlightWithSilhouette adds a silhouette to the picked actor. I think this is what you were looking for?
Here is a youtube video of the interaction.

Enjoy VTK,

Bill

2 Likes

Thank you so much! Is there a Python version of the source code by any chance?

Maybe @amaclean will make a python version.

Will do, I’ll let you when it’s done.

I think is a neat way to show the highlighted actor.

It’s impressive.

Andrew Maclean

All done. It should appear when the next sync is done for the VTKExamples web page. See /src/Python/Picking/HighlightWithSilhouette.py in the VTKExamples folder.

@amaclean I have synced the site. Nice work!

Old Guys Rule!

1 Like

@at123 The python version is available here

The link has changed
https://kitware.github.io/vtk-examples/site/Cxx/Picking/HighlightWithSilhouette/