a-helcman Wed, 05/01/2002 - 11:18 Forums: Other usage issuesHi All, Is it possible to draw back side of the face in different color than the front side? Greetings, Adrian Stephane Routelous Wed, 05/01/2002 - 18:09 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 Stephanehttp://www.exotk.org Log in to post comments a-helcman Thu, 05/02/2002 - 14:17 Stephane, Thank you very much for information! Best regards, Adrian Log in to post comments a-helcman Mon, 10/18/2004 - 11:12 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 Log in to post comments Stephane Routelous Mon, 10/18/2004 - 17:08 Hi Adrian, I think you cannot mix materials and colors like that. You have to set eColor to eFrontMaterial and/or to eBackMaterial. Stephane Log in to post comments Jun WANG Sat, 02/14/2009 - 10:08 Anybody knows how to handle this issue ????????? Log in to post comments
Wed, 05/01/2002 - 18:09
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
Stephane
http://www.exotk.org
Thu, 05/02/2002 - 14:17
Stephane,
Thank you very much for information!
Best regards,
Adrian
Mon, 10/18/2004 - 11:12
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
Mon, 10/18/2004 - 17:08
Hi Adrian,
I think you cannot mix materials and colors like that.
You have to set eColor to eFrontMaterial and/or to eBackMaterial.
Stephane
Sat, 02/14/2009 - 10:08
Anybody knows how to handle this issue ?????????