mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-09-13 14:27:08 +03:00
0025935: Visualization, TKV3d, Exception when displaying shell in the viewer
Fixed processing of double precision numbers in Visual3d_View::MinMaxValues; Test case for issue #25935.
This commit is contained in:
@@ -1714,6 +1714,18 @@ inline void addStructureBndBox (const Handle(Graphic3d_Structure)& theStruct,
|
||||
|
||||
// "FitAll" operation ignores object with transform persistence parameter
|
||||
const Bnd_Box aBox = theStruct->MinMaxValues (theToIgnoreInfiniteFlag);
|
||||
|
||||
// To prevent float overflow at camera parameters calculation and further
|
||||
// rendering, bounding boxes with at least one vertex coordinate out of
|
||||
// float range are skipped by view fit algorithms
|
||||
if (Abs (aBox.CornerMax().X()) >= ShortRealLast() ||
|
||||
Abs (aBox.CornerMax().Y()) >= ShortRealLast() ||
|
||||
Abs (aBox.CornerMax().Z()) >= ShortRealLast() ||
|
||||
Abs (aBox.CornerMin().X()) >= ShortRealLast() ||
|
||||
Abs (aBox.CornerMin().Y()) >= ShortRealLast() ||
|
||||
Abs (aBox.CornerMin().Z()) >= ShortRealLast())
|
||||
return;
|
||||
|
||||
theBndBox.Add (aBox);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user