From: kgv Date: Sat, 29 Dec 2018 12:41:54 +0000 (+0300) Subject: 0030428: Modeling Algorithms - BRepBndLib::AddOBB() throws exception on empty Compound X-Git-Tag: V7_4_0_beta~275 X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=0939d4cf1f0393ff0d51abcf670894c80b07624e;p=occt-copy.git 0030428: Modeling Algorithms - BRepBndLib::AddOBB() throws exception on empty Compound Added missing Bnd_Box::IsVoid() check. --- diff --git a/src/BRepBndLib/BRepBndLib_1.cxx b/src/BRepBndLib/BRepBndLib_1.cxx index 4035a3b885..c70c2df236 100644 --- a/src/BRepBndLib/BRepBndLib_1.cxx +++ b/src/BRepBndLib/BRepBndLib_1.cxx @@ -414,6 +414,10 @@ static void ComputePCA(const TopoDS_Shape& theS, { BRepBndLib::Add(aST, aShapeBox); } + if (aShapeBox.IsVoid()) + { + return; + } gp_Pnt aPMin = aShapeBox.CornerMin(); gp_Pnt aPMax = aShapeBox.CornerMax();