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

Location problem for PrsMgr_PresentableObject's children

comak's picture
Forums: 

I try to find all children of an object which is a PrsMgr_PresentableObject. Firstly, I take the location of this object and this return us correct location. But whenever I find the children and get these children location, it always returns us zero location (0,0,0). You can see the code block for this case.

aisShape->LocalTransformation().TranslationPart();  -->correct location

const PrsMgr_ListOfPresentableObjects& children = aisShape->Children(); 

for (PrsMgr_ListOfPresentableObjectsIter anIter(children); anIter.More(); anIter.Next()) {

Handle(AIS_ConnectedInteractive) aConnected = Handle(AIS_ConnectedInteractive)::DownCast(anIter.Value());

Handle(AIS_InteractiveObject) ​obj = aConnected->ConnectedTo();

obj->LocalTransformation().TranslationPart();  --> always (0,0,0)

}