0030428: Modeling Algorithms - BRepBndLib::AddOBB() throws exception on empty Compound
[occt.git] / src / BRepBndLib / BRepBndLib_1.cxx
index 4035a3b..c70c2df 100644 (file)
@@ -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();