Color an Edge of a AIS_InteractiveObject...How to?

What's the approach of coloring an TopoDS_Edge of an AIS_InteractiveObject? I only want a selected edge(s) to be a specific color, not the entire object. Any ideas would be appreciated. Thanks.

I've got this much and tried a few things to color the edge but I haven't had much luck.

//Color the selected edge
TopoDS_Shape sh = myAISContext->SelectedShape();

if(sh.ShapeType() == TopAbs_EDGE)
//Ok I know this is an edge but how to do I color
//it and get it redisplayed with that color?????

Patrik Mueller's picture


for AIS_InteractiveContext exists methods like SetHighlightColor or SelectionColor. I think they will give you some help...