From 55374b512e43ed62480474ef6220470807d3cfca Mon Sep 17 00:00:00 2001 From: ifv Date: Fri, 17 Jan 2020 11:30:50 +0300 Subject: [PATCH] 0031260: Geom2dGcc_Circ2d2TanRad fails in this case (720) --- src/Adaptor2d/Adaptor2d_OffsetCurve.cxx | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx b/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx index 8805b4bccd..8eb020a913 100644 --- a/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx +++ b/src/Adaptor2d/Adaptor2d_OffsetCurve.cxx @@ -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; } -- 2.39.5