File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -1138,10 +1138,10 @@ private double[] GetTriangulationKnots()
11381138 // turning angle so the resulting triangles stay tight enough to bound the curve.
11391139 const double maxSpanAngle = Math . PI / 4.0 ; // 45° per sub-span
11401140 List < double > res = new List < double > ( tknots . Length ) ;
1141+ GeoVector2D d0 = DirectionAtParam ( tknots [ 0 ] ) ;
11411142 for ( int i = 0 ; i < tknots . Length - 1 ; i ++ )
11421143 {
11431144 res . Add ( tknots [ i ] ) ;
1144- GeoVector2D d0 = DirectionAtParam ( tknots [ i ] ) ;
11451145 GeoVector2D d1 = DirectionAtParam ( tknots [ i + 1 ] ) ;
11461146 if ( ! d0 . IsNullVector ( ) && ! d1 . IsNullVector ( ) )
11471147 {
@@ -1154,6 +1154,7 @@ private double[] GetTriangulationKnots()
11541154 res . Add ( tknots [ i ] + ( tknots [ i + 1 ] - tknots [ i ] ) * j / sub ) ;
11551155 }
11561156 }
1157+ d0 = d1 ;
11571158 }
11581159 res . Add ( tknots [ tknots . Length - 1 ] ) ;
11591160 return res . ToArray ( ) ;
You can’t perform that action at this time.
0 commit comments