private static System.Windows.Point[] filter(Point2Dmm[] arg) { var result = new List <System.Windows.Point>(); foreach (var point in arg) { var p = OffsetCalculator.AsPoint(point); if (result.Count > 0 && (result.Last() - p).Length < 0.1) { continue; } result.Add(p); } return(result.ToArray()); }