diff --git a/src/BRepBndLib/BRepBndLib.cxx b/src/BRepBndLib/BRepBndLib.cxx index db239c4217..22d8cb7dbb 100644 --- a/src/BRepBndLib/BRepBndLib.cxx +++ b/src/BRepBndLib/BRepBndLib.cxx @@ -207,19 +207,26 @@ void BRepBndLib::AddClose(const TopoDS_Shape& S, Bnd_Box& B) BRepAdaptor_Curve BC; - for (ex.Init(S,TopAbs_EDGE); ex.More(); ex.Next()) { + for (ex.Init (S, TopAbs_EDGE); ex.More(); ex.Next()) + { const TopoDS_Edge& anEdge = TopoDS::Edge (ex.Current()); if (BRep_Tool::IsGeometric (anEdge)) { BC.Initialize (anEdge); - BndLib_Add3dCurve::Add(BC,0.,B); + BndLib_Add3dCurve::Add (BC, 0., B); } } // Add the vertices not in edges - for (ex.Init(S,TopAbs_VERTEX,TopAbs_EDGE); ex.More(); ex.Next()) { - B.Add(BRep_Tool::Pnt(TopoDS::Vertex(ex.Current()))); + 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() + 2 * B.GetGap())) + { + B.SetVoid(); } }