From a54fad2fb346bb5dbbae269fb6b8c71a43a540cb Mon Sep 17 00:00:00 2001 From: FtpSantos Date: Fri, 24 May 2024 12:24:37 +0100 Subject: [PATCH] 0033727: Modeling Algorithms - Add corner check in AddClose function to detect void bounding box Added corner check to AddClose for void bounding boxes --- src/BRepBndLib/BRepBndLib.cxx | 5 +++++ 1 file changed, 5 insertions(+) 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(); + } } //======================================================================= -- 2.39.5