Forum archiveIssue archiveOther usage issues

Archived discussion

Backside of face

Other usage issuesWed, 05/01/2002 - 11:185 replies

Browse this forum
QuestionAuthor

Hi All,

Is it possible to draw back side of the face in different color than the front side?

Greetings,
Adrian

Discussion

5 archived replies

Posts are displayed in their archived order.

01Commenter-1

Hi,

to set the AIS_InteractiveObject derived object with a different color than the front side, do the following :

Handle_AIS_InteractiveObject theObj = ...
Handle_AIS_InteractiveContext theContext = ...
theObj->Attributes()->ShadingAspect()->Aspect()->SetDistinguishOn();
theObj->Attributes()->ShadingAspect()->Aspect()->SetFrontMaterial(Graphic3d_NOM_GOLD);
theObj->Attributes()->ShadingAspect()->Aspect()->SetBackMaterial(Graphic3d_NOM_JADE);
theContext->Redisplay(theObj);

It *should* work.

Attribute() returns a Handle_AIS_Drawer
ShadingAspect() returns a Handle_Prs3d_ShadingAspect
Aspect() returns a Handle_Graphic3d_AspectFillArea3d

So, see the file Graphic3d_AspectFillArea3d.cdl to see what is available.

HTH

Commenter-1
http://www.exotk.org

02Author

Stephane,

Thank you very much for information!

Best regards,
Adrian

03Author

hi,

it is possible to set a different material for front/back side of the face. but is it possible to set a different color for both sides?

i use the next lines to mix material + color:

po_AIS_Shape->Attributes()->ShadingAspect()->Aspect()->SetDistinguishOn();
po_AIS_Shape->Attributes()->ShadingAspect()->Aspect()->SetFrontMaterial(eFrontMaterial);
po_AIS_Shape->Attributes()->ShadingAspect()->Aspect()->SetBackMaterial(eBackMaterial);
po_AIS_Context->SetColor (po_AIS_Shape, eColor, false);

problem is, that SetColor function influences both sides here!

best regards,
adrian

04Commenter-1

Hi Adrian,

I think you cannot mix materials and colors like that.
You have to set eColor to eFrontMaterial and/or to eBackMaterial.

Commenter-1

05Commenter-2

Anybody knows how to handle this issue ?????????