Is there a way to zoom a AIS_Shape in the view?, So that the AIS_Shape is maximized in the view?
Do you have any hints on how to achieve this?
Thanks, Author
Discussion
4 archived replies
Posts are displayed in their archived order.
01Commenter-1
If you mean to fit AIS_Shape bounding box into entire View, then you may call an appropriate V3d_View::FitAll() method.
Handle(V3d_View) theView;
Handle(AIS_Shape) thePrs;
Bnd_Box aBndBox;
thePrs->BoundingBox (aBndBox); // or use another AIS_Shape::BoundingBox() relying on BRepBndLib
if (!aBndBox.IsVoid())
{
theView->FitAll (aBndBox, 0.01, true);
}