Exemplo n.º 1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="points"></param>
 /// <param name="tolerance"></param>
 /// <param name="indexMap"></param>
 /// <param name="grid"></param>
 /// <returns></returns>
 public static List <Vec2d> RemoveCoincident(this IReadOnlyList <Vec2d> points, HashGrid2d <int> grid, out int[] indexMap, double tolerance = SlurMath.ZeroTolerance)
 {
     return(DataUtil.RemoveCoincident(points, p => p, grid, out indexMap, tolerance));
 }
Exemplo n.º 2
0
 /// <summary>
 /// For each point in A, returns the index of all coincident points in B.
 /// </summary>
 /// <param name="pointsA"></param>
 /// <param name="pointsB"></param>
 /// <param name="tolerance"></param>
 /// <param name="grid"></param>
 /// <returns></returns>
 public static IEnumerable <IEnumerable <int> > GetAllCoincident(this IReadOnlyList <Vec2d> pointsA, IReadOnlyList <Vec2d> pointsB, HashGrid2d <int> grid, double tolerance = SlurMath.ZeroTolerance)
 {
     return(DataUtil.GetAllCoincident(pointsA, pointsB, p => p, grid, tolerance));
 }
Exemplo n.º 3
0
 /// <summary>
 /// For each point in A, returns the index of the first coincident point in B. If no coincident point is found, -1 is returned.
 /// </summary>
 /// <param name="pointsA"></param>
 /// <param name="pointsB"></param>
 /// <param name="tolerance"></param>
 /// <param name="grid"></param>
 /// <returns></returns>
 public static IEnumerable <int> GetFirstCoincident(this IReadOnlyList <Vec2d> pointsA, IReadOnlyList <Vec2d> pointsB, HashGrid2d <int> grid, double tolerance = 1.0e-8)
 {
     return(DataUtil.GetFirstCoincident(pointsA, pointsB, p => p, grid, tolerance));
 }