position of a AIS_Manipulator

Hello all!

How to get the position - relative to the attached object - from a AIS_Manipulator?

Handle(TopLoc_Datum3D) locManipulator = m_manipulator->LocalTransformationGeom();

    qDebug() << "locManipulator" << locManipulator->Transformation().TranslationPart().X()<< locManipulator->Transformation().TranslationPart().Y()<< locManipulator->Transformation().TranslationPart().Z();

    qDebug() << "locManipulator" << locManipulator->Trsf().TranslationPart().X()<< locManipulator->Trsf().TranslationPart().Y()<< locManipulator->Trsf().TranslationPart().Z();


    gp_Trsf s;
    m_manipulator->ObjectTransformation(0,0,OccViewManager::instance()->view(), s);
    qDebug() << "s" << s.TranslationPart().X() << s.TranslationPart().Y() << 
s.TranslationPart().Z();

This always gives me 0,0,0

Thanks!

Daniel Duesentrieb's picture
gp_Ax2 a = m_manipulator->Position();
qDebug() << "global location x/y/z" << a.Axis().Location().X() << a.Axis().Location().Y() << a.Axis().Location().Z();