1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-08-29 14:00:49 +03:00

0031260: Geom2dGcc_Circ2d2TanRad fails in this case (720)

Adaptor2d/Adaptor2d_OffsetCurve.cxx:
Function nbPoints(...) is modified

Test case added
This commit is contained in:
ifv
2020-01-16 12:07:33 +03:00
committed by bugmaster
parent 08353e37cf
commit 389f5b59dd
2 changed files with 32 additions and 8 deletions

View File

@@ -656,19 +656,16 @@ static Standard_Integer nbPoints(const Handle(Adaptor2d_HCurve2d)& theCurve)
Standard_Integer nbs = 20;
if (theCurve->GetType() == GeomAbs_Line)
nbs = 2;
else if (theCurve->GetType() == GeomAbs_BezierCurve)
if (theCurve->GetType() == GeomAbs_BezierCurve)
{
nbs = 3 + theCurve->NbPoles();
nbs = Max(nbs, 3 + theCurve->NbPoles());
}
else if (theCurve->GetType() == GeomAbs_BSplineCurve) {
nbs = theCurve->NbKnots();
nbs *= theCurve->Degree();
nbs = Max(nbs, theCurve->NbKnots() * theCurve->Degree());
}
if (nbs > 200)
nbs = 200;
if (nbs > 300)
nbs = 300;
return nbs;
}