PrsMgr_ListOfPresentableObjects get Shape() from child

Hello all,

how to get the shape of a child of a AIS_Shape?

Thanks!

m_aisDisplay->addChild(...);

PrsMgr_ListOfPresentableObjects children = m_aisDisplay->Children();

for(const Handle(PrsMgr_PresentableObject)& value : children) {
{
            AIS_Shape s = static_cast<Handle(AIS_Shape)>(value); // doesn't work. how to cast?
            TopLoc_Location processPosition = value->TransformationGeom();
            TopoDS_Shape processShape = value->Shape().Moved(processPosition); //no Shape() here

...
Kirill Gavrilov's picture

AIS_Shape s = static_cast<Handle(AIS_Shape)>(value); // doesn't work. how to cast?

Handle(AIS_Shape) s = Handle(AIS_Shape)::DownCast (value);