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
#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
#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