1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-09 13:22:24 +03:00

0032236: Modeling Algorithms - Exception on calculation optimal bounding box

- BRepBndLib - added VOID box checks to AdjustFaceBox() method.
 - added the test
This commit is contained in:
kgv
2021-03-24 10:37:29 +03:00
committed by smoskvin
parent eee6a80a90
commit 5aa7b61083
2 changed files with 110 additions and 3 deletions

View File

@@ -306,9 +306,13 @@ void BRepBndLib::AddOptimal(const TopoDS_Shape& S, Bnd_Box& B,
Tol);
}
}
Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
B.Update(xmin, ymin, zmin, xmax, ymax, zmax);
if (!aLocBox.IsVoid())
{
Standard_Real xmin, ymin, zmin, xmax, ymax, zmax;
aLocBox.Get(xmin, ymin, zmin, xmax, ymax, zmax);
B.Update(xmin, ymin, zmin, xmax, ymax, zmax);
}
}
}
}
@@ -703,6 +707,16 @@ void AdjustFaceBox(const BRepAdaptor_Surface& BS,
Bnd_Box& FaceBox,
const Bnd_Box& EdgeBox, const Standard_Real Tol)
{
if (EdgeBox.IsVoid())
{
return;
}
if (FaceBox.IsVoid())
{
FaceBox = EdgeBox;
return;
}
Standard_Real fxmin, fymin, fzmin, fxmax, fymax, fzmax;
Standard_Real exmin, eymin, ezmin, exmax, eymax, ezmax;
//