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

Is it possible to attach AIS_Interactive_Object a Label

Erki Kiroglu's picture

When we create a class derived from AIS_Interactive_Object, it is possible to use the template
void myClass::Compute(const Handle PrsMgr_PresentationManager3d)& aPresentationManager,const Handle Prs3d_Presentation)& aPresentation,const Standard_Integer aMode)
switch (aMode) {
case 0:StdPrs_WFDeflectionShape::Add(aPresentation,Result_Panel, myDrawer );break;
case 1:myDrawer->LineAspect()->SetColor( Quantity_NOC_GRAY40 );
TopExp_Explorer Ex;
for ( Ex.Init( Result_Panel, TopAbs_EDGE); Ex.More(); Ex.Next()) {
Standard_Real first, last;
TopoDS_Edge Edge = TopoDS::Edge( Ex.Current() );
Handle ( Geom_Curve ) Curve = BRep_Tool::Curve( Edge, first, last );
GeomAdaptor_Curve GAC ( Curve );
StdPrs_Curve::Add( aPresentation, GAC, first, last, myDrawer );
StdPrs_ShadedShape::Add( aPresentation, Result_Panel, myDrawer );
void myClass::Compute(const Handle Prs3d_Projector)& aProjector,const Handle(Prs3d_Presentation)& aPresentation)

But what if we create first the AIS_Interactive_Object then try to attach a Label while still preserving the control over the object diplay?
Is this possible in OpenCascade?

Any help will be appreciated.
Thanks a lot.