From: vsr Date: Tue, 28 Oct 2014 06:33:55 +0000 (+0300) Subject: OCC dev (IR-2014-10-23) porting part 2 X-Git-Tag: V7_5_0b1~6 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ba89da1b1663a9ae63a39595e58ef5281f1179f7;p=modules%2Fgui.git OCC dev (IR-2014-10-23) porting part 2 --- diff --git a/src/OCCViewer/OCCViewer_ClippingDlg.cxx b/src/OCCViewer/OCCViewer_ClippingDlg.cxx index d6359071f..2c993287b 100644 --- a/src/OCCViewer/OCCViewer_ClippingDlg.cxx +++ b/src/OCCViewer/OCCViewer_ClippingDlg.cxx @@ -96,12 +96,12 @@ void getMinMaxFromContext( Handle(AIS_InteractiveContext) ic, double xmin, ymin, zmin, xmax, ymax, zmax; #if OCC_VERSION_LARGE > 0x06070100 Bnd_Box aBox = aPrs->MinMaxValues(); - xmin = aBox.CornerMin().X(); - ymin = aBox.CornerMin().Y(); - zmin = aBox.CornerMin().Z(); - xmax = aBox.CornerMax().X(); - ymax = aBox.CornerMax().Y(); - zmax = aBox.CornerMax().Z(); + xmin = aBox.IsVoid() ? RealFirst() : aBox.CornerMin().X(); + ymin = aBox.IsVoid() ? RealFirst() : aBox.CornerMin().Y(); + zmin = aBox.IsVoid() ? RealFirst() : aBox.CornerMin().Z(); + xmax = aBox.IsVoid() ? RealLast() : aBox.CornerMax().X(); + ymax = aBox.IsVoid() ? RealLast() : aBox.CornerMax().Y(); + zmax = aBox.IsVoid() ? RealLast() : aBox.CornerMax().Z(); #else aPrs->MinMaxValues( xmin, ymin, zmin, xmax, ymax, zmax ); #endif diff --git a/src/OCCViewer/OCCViewer_ViewModel.cxx b/src/OCCViewer/OCCViewer_ViewModel.cxx index c11d24ca0..ae9e8639f 100755 --- a/src/OCCViewer/OCCViewer_ViewModel.cxx +++ b/src/OCCViewer/OCCViewer_ViewModel.cxx @@ -960,12 +960,12 @@ double OCCViewer_Viewer::computeSceneSize(const Handle(V3d_View)& view3d) const #if OCC_VERSION_LARGE > 0x06070100 Bnd_Box aBox = view3d->View()->MinMaxValues(); - Xmin = aBox.CornerMin().X(); - Ymin = aBox.CornerMin().Y(); - Zmin = aBox.CornerMin().Z(); - Xmax = aBox.CornerMax().X(); - Ymax = aBox.CornerMax().Y(); - Zmax = aBox.CornerMax().Z(); + Xmin = aBox.IsVoid() ? RealFirst() : aBox.CornerMin().X(); + Ymin = aBox.IsVoid() ? RealFirst() : aBox.CornerMin().Y(); + Zmin = aBox.IsVoid() ? RealFirst() : aBox.CornerMin().Z(); + Xmax = aBox.IsVoid() ? RealLast() : aBox.CornerMax().X(); + Ymax = aBox.IsVoid() ? RealLast() : aBox.CornerMax().Y(); + Zmax = aBox.IsVoid() ? RealLast() : aBox.CornerMax().Z(); #else view3d->View()->MinMaxValues( Xmin, Ymin, Zmin, Xmax, Ymax, Zmax ); #endif diff --git a/src/OCCViewer/OCCViewer_ViewWindow.cxx b/src/OCCViewer/OCCViewer_ViewWindow.cxx index 621df3289..2fa68a577 100755 --- a/src/OCCViewer/OCCViewer_ViewWindow.cxx +++ b/src/OCCViewer/OCCViewer_ViewWindow.cxx @@ -653,12 +653,12 @@ bool OCCViewer_ViewWindow::computeGravityCenter( double& theX, double& theY, dou #if OCC_VERSION_LARGE > 0x06070100 Bnd_Box aBox = aStructure->MinMaxValues(); - aXmin = aBox.CornerMin().X(); - aYmin = aBox.CornerMin().Y(); - aZmin = aBox.CornerMin().Z(); - aXmax = aBox.CornerMax().X(); - aYmax = aBox.CornerMax().Y(); - aZmax = aBox.CornerMax().Z(); + aXmin = aBox.IsVoid() ? RealFirst() : aBox.CornerMin().X(); + aYmin = aBox.IsVoid() ? RealFirst() : aBox.CornerMin().Y(); + aZmin = aBox.IsVoid() ? RealFirst() : aBox.CornerMin().Z(); + aXmax = aBox.IsVoid() ? RealLast() : aBox.CornerMax().X(); + aYmax = aBox.IsVoid() ? RealLast() : aBox.CornerMax().Y(); + aZmax = aBox.IsVoid() ? RealLast() : aBox.CornerMax().Z(); #else aStructure->MinMaxValues( aXmin, aYmin, aZmin, aXmax, aYmax, aZmax ); #endif