At this point i can detect the edges of the presentation.
But i would like to override the default graphical representation of a detected Edge.
Increase the line width and change the color.
I thought this was the role of DynamicHilightAttributes()->LineAspect();
I think there is something i am missing.
Thank you for your help,
Aurelien
Discussion
3 archived replies
Posts are displayed in their archived order.
01Commenter-1
Highlighting of AIS_Shape reuses the same presentation for a normal display, so that DynamicHilightAttributes() affects only color and a couple of other attributes, but not fine-grained attributes like number of isolines to compute or width of wires. See also a comment for method AIS_InteractiveContext::HighlightStyle():
Tip: although highlighting style is defined by Prs3d_Drawer, only a small set of properties derived from it's base class Graphic3d_PresentationAttributes will be actually used in most cases.
You will need modifying behavior of AIS_Shape if you really need highlighting to have different presentation - like making a dedicated display mode or customizing SelectMgr_EntityOwner::HilightWithColor() within subclasses.
Alternatively, Graphic3d_PresentationAttributes might be extended within OCCT itself to allow overriding line width (as a multiplier, for instance) for highlighting.
02Author
So one of the best solutions for specific highlighting behaviour is probably to create a new presentation that better suits the needs.
Now without talking about highlighting, only taking into account the presentation. For an AIS_Shape, in theory we could change the width of the face boundaries with the SetWidth() method.
When we look at the source code of AIS_Shape.cxx, the SetWidth() method modifies the FaceBoundary aspect. Note that SetFaceBoundaryDraw(Standard_True).