From c1a495689d508bc9754e96ccc71a6aacc72ca98f Mon Sep 17 00:00:00 2001 From: msv Date: Wed, 8 Aug 2018 12:15:08 +0300 Subject: [PATCH] #return back to original patch by denix56 --- src/GCPnts/GCPnts_TangentialDeflection.pxx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/GCPnts/GCPnts_TangentialDeflection.pxx b/src/GCPnts/GCPnts_TangentialDeflection.pxx index 11f44bbb66..65a30a01f6 100644 --- a/src/GCPnts/GCPnts_TangentialDeflection.pxx +++ b/src/GCPnts/GCPnts_TangentialDeflection.pxx @@ -327,6 +327,8 @@ 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; @@ -341,9 +343,12 @@ void GCPnts_TangentialDeflection::PerformCurve (const TheCurve& C) // Check if points on line are subsequent if(IsLine && IsSequential) { - IsSequential = (L2 <= L1); + gp_XYZ V3 = MiddlePoint.XYZ() - prevMiddlePoint.XYZ(); + Standard_Real L3 = V3.Modulus(); + IsSequential = (L3 <= L1); } } + prevMiddlePoint = MiddlePoint; } } -- 2.39.5