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

# fighting against regressions

This commit is contained in:
msv
2018-08-08 16:30:25 +03:00
parent c1a495689d
commit afd7551d88

View File

@@ -306,11 +306,12 @@ void GCPnts_TangentialDeflection::PerformCurve (const TheCurve& C)
;}
////
Standard_Real param = 0.;
gp_Pnt prevMiddlePoint = CurrentPoint;
for (i = 1; i <= NbInterv && IsLine; ++i)
{
// Avoid usage intervals out of [firstu, lastu].
if ((Intervs(i+1) < firstu) ||
(Intervs(i) > lastu))
if ((Intervs(i+1) <= firstu) ||
(Intervs(i) >= lastu))
{
continue;
}
@@ -327,8 +328,6 @@ void GCPnts_TangentialDeflection::PerformCurve (const TheCurve& C)
}
Standard_Real delta = (Intervs(i+1) - Intervs(i))/(NbPoints-1);
gp_Pnt prevMiddlePoint = CurrentPoint;
for (j = 1; j < NbPoints && IsLine; ++j)
{
param = Intervs(i) + j*delta;
@@ -345,7 +344,7 @@ void GCPnts_TangentialDeflection::PerformCurve (const TheCurve& C)
{
gp_XYZ V3 = MiddlePoint.XYZ() - prevMiddlePoint.XYZ();
Standard_Real L3 = V3.Modulus();
IsSequential = (L3 <= L1);
IsSequential = (L2 <= L1 && L3 <= L1);
}
}
prevMiddlePoint = MiddlePoint;