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

Compute() color problem

seumonkey's picture

I inherit myclass from AIS_InteractiveObject, and I want to set shape\shape2\shape3 with different color,however I cannot make it .Please help ,thanks.
Compute function as below:
(The final display : three shapes are the same color ,which is same with last color set of myDrawer)
void DblYellowLine::Compute(const Handle_PrsMgr_PresentationManager3d& aPresentationManager,
const Handle_Prs3d_Presentation& aPresentation,
const Standard_Integer aMode )
switch (aMode)
case 0:
StdPrs_WFDeflectionShape::Add(aPresentation,myShape2, myDrawer ); //Wire Frame 线框
StdPrs_WFDeflectionShape::Add(aPresentation,myShape, myDrawer ); //Wire Frame 线框
case 1:
StdPrs_ShadedShape::Add(aPresentation,myShape, myDrawer);

StdPrs_ShadedShape::Add(aPresentation,myShape2, myDrawer);

StdPrs_ShadedShape::Add(aPresentation,myShape3, myDrawer);