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

StdPrs_ShadedShape does not accept ShadingAspect

Anonymous's picture
Forums: 

Hi all, in my own AIS_InteractiveObject i used the StdPrs_ShadedShape function to display shapes (called from the Compute method). It works but it does not accept the SetShadingAspect which i set before. For WireFrame Display all works fine (also the aspects). What´s wrong ?

Bert

Michael Gandyra's picture

You could do the following:

Handle_Prs3d_ShadingAspect shading = new Prs3d_ShadingAspect;

// generate a FillStyle (look in docu) "yourFillStyle"

shading->SetAspect(yourFillStyle);

// myDrawer is a protected member that you can use directly in your inherited class

myDrawer->SetShadingAspect(shading);

this should be enough, cause myDrawer is the standard drawer. In the compute method, let the aspect of your object point to it:

aPresentation->SetShadingAspect(myDrawer->ShadingAspect());

It should also work to set an diffrent aspect for each single entity through a call to

aPresentation->SetShadingAspect(yourShadingAspect);

regards, Michael Gandyra

------------------------------------------------------------------

University of Kaiserslautern

Research Group for Computer Application in Engineering Design

------------------------------------------------------------------