From: kgv Date: Thu, 25 Oct 2018 07:13:44 +0000 (+0300) Subject: 0030292: Modeling Algorithms - BRepBndLib should avoid using Poly_Polygon3D when... X-Git-Url: http://git.dev.opencascade.org/gitweb/?a=commitdiff_plain;h=refs%2Fheads%2FCR30292;p=occt-copy.git 0030292: Modeling Algorithms - BRepBndLib should avoid using Poly_Polygon3D when called with useTriangulation set to false --- diff --git a/src/BRepBndLib/BRepBndLib.cxx b/src/BRepBndLib/BRepBndLib.cxx index 6aa8c2dd49..f0eac8a3ef 100644 --- a/src/BRepBndLib/BRepBndLib.cxx +++ b/src/BRepBndLib/BRepBndLib.cxx @@ -136,6 +136,13 @@ void BRepBndLib::Add(const TopoDS_Shape& S, Bnd_Box& B, Standard_Boolean useTria for (ex.Init(S,TopAbs_EDGE,TopAbs_FACE); ex.More(); ex.Next()) { const TopoDS_Edge& E = TopoDS::Edge(ex.Current()); + if (!useTriangulation && BRep_Tool::IsGeometric(E)) + { + BC.Initialize(E); + BndLib_Add3dCurve::Add(BC, BRep_Tool::Tolerance(E), B); + continue; + } + Handle(Poly_Polygon3D) P3d = BRep_Tool::Polygon3D(E, l); if (!P3d.IsNull()) { @@ -152,7 +159,7 @@ void BRepBndLib::Add(const TopoDS_Shape& S, Bnd_Box& B, Standard_Boolean useTria else { BRep_Tool::PolygonOnTriangulation(E, Poly, T, l); - if (useTriangulation && !Poly.IsNull()) + if (!Poly.IsNull()) { const TColStd_Array1OfInteger& Indices = Poly->Nodes(); const TColgp_Array1OfPnt& Nodes = T->Nodes();