From: FtpSantos Date: Fri, 24 May 2024 11:24:37 +0000 (+0100) Subject: 0033727: Modeling Algorithms - Add corner check in AddClose function to detect void... X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=a54fad2fb346bb5dbbae269fb6b8c71a43a540cb;p=occt.git 0033727: Modeling Algorithms - Add corner check in AddClose function to detect void bounding box Added corner check to AddClose for void bounding boxes --- diff --git a/src/BRepBndLib/BRepBndLib.cxx b/src/BRepBndLib/BRepBndLib.cxx index db239c4217..c9a598943f 100644 --- a/src/BRepBndLib/BRepBndLib.cxx +++ b/src/BRepBndLib/BRepBndLib.cxx @@ -221,6 +221,11 @@ void BRepBndLib::AddClose(const TopoDS_Shape& S, Bnd_Box& B) for (ex.Init(S,TopAbs_VERTEX,TopAbs_EDGE); ex.More(); ex.Next()) { B.Add(BRep_Tool::Pnt(TopoDS::Vertex(ex.Current()))); } + + if (!B.IsVoid() && B.CornerMax().IsEqual(B.CornerMin(), Precision::Confusion())) + { + B.SetVoid(); + } } //=======================================================================