Visualization HLR and Material

Hello,

I'm trying to use the Visualization HLR as described in this tcl example(https://draw.sview.ru/visualization-hlr/). It works properly if there is no material setted on the AIS_Shape, setting properly the AIS_InteractiveContext's Default Drawer Shading Attributes:

ais_context_->DefaultDrawer()->ShadingAspect()->Aspect()->SetDrawSilhouette(true);
ais_context_->DefaultDrawer()->ShadingAspect()->Aspect()->SetInteriorStyle(Aspect_IS_HIDDENLINE);

but if a material is setted on the AIS_Shape, changing those Shading attributes have no effects, and I'm not able to obtain the same result, even if I set a default material directly on the AIS_Shape, and I set explicitly the Shading Color to be the same as the the background and then setting Draw Silhouette to true and the interior style as hiddeline:

prs->SetMaterial(Graphic3d_NOM_DEFAULT);
prs->GetAIS()->Attributes()->ShadingAspect()->Aspect()->SetColor(occ_view_->BackgroundColor().Name());
prs->GetAIS()->Attributes()->ShadingAspect()->Aspect()->SetDrawSilhouette(true);
prs->GetAIS()->Attributes()->ShadingAspect()->Aspect()->SetInteriorStyle(Aspect_IS_HIDDENLINE);
prs->Display(true);

Is there way to do the same thing when there is material setted on the AIS_Shape?

Thanks in advance for your reply.

Giovanni Pennisi's picture

To make a clarification and give a better understanding of my issue. I'm unable to display the Visualzation HLR when all the AIS_ColoredShape have different custom color for each subshape, otherwise everything works fine!

Giovanni Pennisi's picture

I found the solution, AIS_ColoredShape use many Drawers, one for each subshape that has custom attributes. So it is necessary to override the attributes of every AIS_ColoredShape's drawers to display the Visualization HLR