How change ViewCube edges color

Dear All, I would like change the edge color of viewcube , programmatically I compiled this code, but it doesn't work ( in the sense the edges are always diplayed black) :

            opencascade::handle<AIS_ViewCube> aisViewCube = new AIS_ViewCube;
            aisViewCube->SetBoxColor(Quantity_NOC_WHITE);
            const Handle(Prs3d_Drawer)& aDrawer = aisViewCube->Attributes();
            aDrawer->SetFaceBoundaryDraw(true);
            aDrawer->FaceBoundaryAspect()->SetColor(Quantity_NameOfColor::Quantity_NOC_LIGHTSKYBLUE);
            aDrawer->FaceBoundaryAspect()->SetWidth(1.7);
             .....

Any suggestion? PS.: playing on color parameter of aisViewCube->SetBoxColor(... color...) it has effects, ie the face color change.

Kirill Gavrilov's picture

Maybe you forgot calling Prs3d_Drawer::SetFaceBoundaryAspect()/::SetupOwnFaceBoundaryAspect() before changing it's properties?

Mauro Corbo's picture

Great Kirill!
Your suggestions are always precious.
I have fixed following your advice and it's run fine !
Thank you again