AIS_TextLabel position

Hello all

I have trouble to positioning an AIS_TextLabel when I attache it to a parent.

The Label shows on the given Position (0,0,3000) but when I move parent the text is moving not the same distance (~ 2.5 times more) but in the correct direction

m_aisTextLabel  = new AIS_TextLabel();
m_aisMain->AddChild(m_aisTextLabel);
m_aisTextLabel->SetOwner(m_aisMain);
m_aisTextLabel->SetText("some text".toString().toStdString().c_str());
m_aisTextLabel->SetPosition(gp_Pnt(0,0,3000));
m_aisTextLabel->SetZoomable(false);
m_aisTextLabel->SetOwnAnchorPoint(true);
m_aisTextLabel->SetDisplayType(Aspect_TODT_SUBTITLE);
m_aisTextLabel->SetDisplayType(Aspect_TODT_DEKALE);
m_aisTextLabel->SetDisplayType(Aspect_TODT_SHADOW);
m_aisTextLabel->SetHJustification (Graphic3d_HorizontalTextAlignment::Graphic3d_HTA_CENTER);
m_aisTextLabel->SetVJustification (Graphic3d_VerticalTextAlignment::Graphic3d_VTA_TOP);
m_aisTextLabel->SetFlipping(false);
m_aisTextLabel->SetOrientation3D(gp_Ax2());
Kirill Gavrilov's picture

I don't think AIS_TextLabel will work as expected when connected as a child to another presentation due to the way how local transformation is currently applied to zoom-persistent objects.