mirror of
https://git.dev.opencascade.org/repos/occt.git
synced 2025-08-09 13:22:24 +03:00
0030292: Modeling Algorithms - BRepBndLib should avoid using Poly_Polygon3D when called with useTriangulation set to false
BRepBndLib.cxx : treatment of useTriangulation is modified according to specified behavior of algorithm BRepTest_CurveCommands.cxx : creation edge from polygon3d is added in Draw command mkedge.
This commit is contained in:
committed by
Vadim Glukhikh
parent
44be123039
commit
6d140acb14
@@ -127,6 +127,14 @@ 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() && P3d->NbNodes() > 0)
|
||||
{
|
||||
@@ -143,7 +151,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() && !T.IsNull() && T->NbNodes() > 0)
|
||||
if (!Poly.IsNull() && !T.IsNull() && T->NbNodes() > 0)
|
||||
{
|
||||
const TColStd_Array1OfInteger& Indices = Poly->Nodes();
|
||||
nbNodes = Indices.Length();
|
||||
|
Reference in New Issue
Block a user