DiscussionsIssue archiveVisualization and 3D Viewer

Archived discussion

PrsMgr_ListOfPresentableObjects get Shape() from child

Visualization and 3D ViewerMon, 01/31/2022 - 01:371 reply

Browse this forum
QuestionAuthor

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

...

Discussion

1 archived reply

Posts are displayed in their archived order.

01Commenter-1

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

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