For all issues regarding the Forums use, please, refer to the Forum Rules.

Our Solutions

Need professional assistance?
Consider our:

Support Offerings


Need to speed up your development?
Have a look at our:

Samples & Tools


Need some functionality extending standard OCCT capabilities?
Check out our:

Adv. Components

Related pages

AIS InteractiveObject and Drawer

Anonymous's picture


I'm inheriting from AIS_InteractiveObject to describe my own objects.

In the Constructor om MyObject, I have :

//don't use the default drawer from the context

Handle_AIS_Drawer aNewDrawer = new AIS_Drawer();

myDrawer = aNewDrawer;

Handle_Prs3d_ShadingAspect aNewAspect = new Prs3d_ShadingAspect();

(.. setting differents display to the shading aspect .. )


I remember the Pointer of aNewAspect.

Later, in my application , I write :

Handle_AIS_InteractiveObject theCurrent = myAISContext->Current();

Handle_MyObject myObj = Handle_MyObject::DownCast(theCurrent);

if ( !myObj.IsNull() ) {

Handle_AIS_Drawer theDrawer = myObj->Attributes();

Handle_Prs3d_ShadingAspect theAsp = theDrawer->ShadingAspect(); }

Here I can see that theAsp is not the same object ( pointer ) as aNewAspect. So, when I try to take the attributes of the shading aspect , they are false ( of course ).

What is wrong ? Is there something with the myLink field of an AIS_Drawer ? What is the link ?