Open CASCADE 5.2 Bug with AIS_TexturedShape & Prs3d_Text::Draw ???

Hi everybody,

I looked to the OpenCASCADE Demo ‘TexturesExt’ and just want to add some text with an other OpenCASCADE demo class ( ISession_Text).

And something strange occurs.

If text was displayed in AIS_InteractiveContext before differents AIS_TexturedShape, the resulting texture became black..

In void TexturesExt_Presentation::sampleBottle() method for example:

// Texture is black
Handle( ISession_Text ) hText = new ISession_Text( "BLABLABLABLABLABLABLABLABLA" );
getAISContext()->Display(hText, Standard_True);

Handle_AIS_TexturedShape aTFace1 = Texturize(aFaces(16), "carrelage1.gif", 1, 1, 3, 2);
DISP(aTFace1);

Handle_AIS_TexturedShape aTFace2 = Texturize(aFaces(21), "carrelage1.gif", 1, 1, 3, 2);
DISP(aTFace2);

But if I the text was displayed after the texture appears correctly.

Handle_AIS_TexturedShape aTFace1 = Texturize(aFaces(16), "carrelage1.gif", 1, 1, 3, 2);
DISP(aTFace1);

Handle_AIS_TexturedShape aTFace2 = Texturize(aFaces(21), "carrelage1.gif", 1, 1, 3, 2);
DISP(aTFace2);

// Ok
Handle( ISession_Text ) hText = new ISession_Text("BLABLABLABLABLABLABLABLABLA" );
getAISContext()->Display(hText, Standard_True);

Someone had a idea about it ???

Thanx in advance for any help

Toka

PS: I try this example because I have the same problem in my program

Patrik Mueller's picture

Hi,

take a look at the release notes for the minor 5.2 releases. If I remember correctly this was one of the fixed bugs...

Greets,

Patrik

Anjul Beohar's picture

Hi,

I am facing the same problem in opencascade6.1 as you mentioned.
In my case the text becomes the blue box and object loses the texture when I display both text and the texture in the view and try to move the cursor on any of the entity(text or texture).

http://www.opencascade.org/org/forum/thread_10348

If you have resolved this problem or know any solution for it then please tell me.

Thanks,
Anjul